Fix/eliminate action not found race condition with rw lock#39
Closed
alekseysotnikov wants to merge 11 commits into
Closed
Conversation
Adds `compact-uuids` library and switches frontend-facing IDs from hyphen (`-`) to underscore (`_`) separator (snake case). ## Rationale - **Snake case:** allow double-click selection of entire ID in browser devtools - **Compact UUIDs:** 26 chars vs 36 chars (30% smaller), URL-safe, no ambiguous characters (0/O, 1/l/I) ## Changes 1. **Compact UUIDs:** All UUID usages replaced with compact encoding 2. **Snake case:** Only frontend-facing IDs modified - action-id and tab-id
Problem: cleanup-tab-actions! created a gap where :actions was empty between cleanup and re-registration. In-flight HTTP action requests during this gap would fail with "Action not found". Solution: Use ReentrantReadWriteLock (FIFO) per tab to serialize cleanup+render (write lock) with action execution (read lock).
Don't re-create cursors in the examples (cherry picked from commit c59b595)
Closes dynamic-alpha#35 Prevent reverse proxies such as NGINX and OpenResty from buffering or transforming Hyper's SSE stream. In some managed hosting setups, that can delay SSE patches and leave the UI stuck in transient states even though the underlying action has already completed. Send Cache-Control: no-cache, no-transform and X-Accel-Buffering: no with Hyper's built-in /hyper/events response so SSE behaves reliably behind those proxies while preserving the existing Brotli behavior. (cherry picked from commit f49074c) # Conflicts: # src/hyper/server.clj
Clarify commit message standards to have a target max length (cherry picked from commit 03686a5)
Fix an issue where we couldn't use nil as a value on a signal (cherry picked from commit 78bab7b)
Read *registered-action-ids* after HTML serialization. The accumulator was captured before (c/html body), so actions registered inside lazy hiccup sequences (for, map, etc.) were missed. sweep-stale-tab-actions! then removed every action for the tab, causing "Action not found" on the next click. Move (c/html body) before the deref so all lazily-realized actions are included in the live set. (cherry picked from commit 9d66c63)
Closes dynamic-alpha#37 When an app is served under a subfolder by a reverse proxy, all internal /hyper/* endpoint URLs were previously hard-coded and had to be patched manually. :base-path prefixes the system routes at mount time and propagates the value through app-state so that action expressions, navigate links, the SSE data-init attribute, and the popstate fetch all emit the correct URLs automatically. (cherry picked from commit 3532d3d)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.