Repository navigation
fix: pre-release review fixes from the second Codex pass - #592
Conversation
sharedKey split the client name at the first " via ", but the text before it is the client's own X-Forwarded-For, so a forwarded address that itself said " via <n>" got a fresh shared budget per guess. Read the peer after the last " via ": it is the socket's address and never holds a space.
parseSubscription let plain-http loopback endpoints through in production only because the tests' fake push service runs there, so a paired watch device could make every agent alert a POST to a local service. Production now takes https only; a push service made with loopbackHttp (createServer's pushLoopbackHttp, set only by the tests that deliver to push.fake.ts) accepts the fake. Stored subscriptions pass the same rule on load.
…stop The #570 entry said two tabs can no longer send the same message. The lease is read, then written, in localStorage, so two tabs pressing Send at nearly the same moment can both send.
Add PC opened from Settings over a file preview: Settings closed, the preview's trap stayed on top of openTraps, and its window listener cancelled every Tab in the Add PC dialog to focus its own inert controls. A trap now stands down, for Tab, the initial focus and the restore, while a native modal it is not part of is open. scripts/file-viewer-regression.ts covers the case.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (8)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe changes update push-subscription validation and delivery, forwarded-address peer extraction, focus behavior around native modals, and duplicate-send wording in the changelog. ChangesPush Endpoint Parsing
Forwarded-Address Peer Extraction
Native Modal Focus Handling
Duplicate-Send Changelog Wording
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No identified issue needs correction before merging; normal checks remain appropriate. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The inspected changes tighten push delivery and authentication controls without identifying a newly introduced security regression. The loopback HTTP exception requires explicit server configuration. Production deployment configuration and external integrations were not fully verified. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
deliver() let fetch follow redirects, so an https endpoint answering 307 to http://127.0.0.1 had every alert POSTed to that local service, past the https-only check. A push service never redirects: the fetch now errors on one, and the delivery fails.
Add PC opened from Settings over a file preview: Settings closed, FileViewer's window Escape handler was active again, and one Escape closed both Add PC and the preview, consuming its history entry. The window Escape handlers of FileViewer, FilesDialog, ConfirmDialog and NewSessionDialog now stand down while a native modal they are not part of is open, through useFocusTrap's nativeModalOver. scripts/file-viewer-regression.ts presses Escape over Add PC and checks the preview and its entry stay.
devswha
left a comment
There was a problem hiding this comment.
Independent review (rev-astra lane) — verdict: clean at 44d203a, merge once the required checks are green
Reviewed in separate detached worktrees; nothing was pushed to this branch by the reviewer.
What I ran
On the first head, 94745a5
- Each new test against its fix reverted, then restored:
server/auth.test.tswithserver/auth.tsfrom main: 1 fail (Expected: 50, Received: 60); with the fix: 12 pass.server/push.test.tswithserver/push.tsandserver/index.tsfrom main: 1 fail (http loopback accepted); with the fix: 30 pass.scripts/file-viewer-regression.tswithsrc/lib/useFocusTrap.tsfrom main, rebuilt: fails at "Tab moves through Add PC over a preview" (the same field three times); with the fix: passes.
bun run check fast: exit 0 (1798 unit tests).- Through
bun run check run:scripts/file-viewer-regression.ts,scripts/ui-regression.ts,server/api.contract.test.ts(93 pass),server/device-access.contract.test.ts(5 pass): all exit 0. - My own probe of the shared token budget with the real auth functions: rotated addresses,
viainjected, trailing and repeatedvia, comma lists, through peers127.0.0.1,::1and::ffff:127.0.0.1: 50 x 401 then 429 every time. An address that already presented the right token still getsmatchwhile the shared window is full; a request with no token isnone; a direct loopback request withoutX-Forwarded-Forismatch. - Diff audit:
REMOTE_BUNDLE_VERSIONis not in the diff ("20"). No productioncreateServercall setspushLoopbackHttp(server/index.tsmain,server/remote-entry.ts) and no environment variable reaches it. The CHANGELOG change is under## [Unreleased]and matchesComposerDraftStore.begin(), which reads the lease and then writes it.
On 44d203a (the two follow-up commits)
server/push.test.tswithpush.tsfrom before 70315aa: the new redirect case fails (delivery.oktrue); with it: 31 pass.scripts/file-viewer-regression.tswith the fivesrc/files from before 44d203a, rebuilt: fails at "Escape over Add PC leaves the preview beneath it"; with them: passes.bun run check fast,ui-regression.ts,api.contract.test.tsanddevice-access.contract.test.tsagain: all exit 0.
Codex adversarial pass (gpt-6.1-sol, xhigh, read-only, on 94745a5): five findings, each checked by me
- High, reproduced, fixed in 70315aa. Push delivery followed redirects: an endpoint answering
307tohttp://127.0.0.1:<port>got the alert POSTed to that local service, past the https-only check. Reproduced with the real push service (the second local server receivedPOST /admin/restart). Fixed withredirect: "error". - Medium, reproduced, not fixed here. Distinct
127/8source addresses each get their own shared budget, andsharedFailureshas no cap (300 peers gave 300 x 401). It needs a process already running on the same PC, it is how #570 keyed the budget rather than something this PR changed, and the forwarded-text bypass this PR targets is closed. Worth a follow-up, not worth holding the release fix. - Medium, not run by me, not fixed here. Trap ownership follows mount order, not visual layer (palette open, then the Settings shortcut). Read in the code only. It predates this PR and is outside finding 5.
- Medium, not run by me, not fixed here. A surface opened by shortcut underneath an open Add PC gets no initial focus when Add PC closes, until Tab. On main the same surface also took Tab away from Add PC, so this is not a regression. Follow-up.
- Medium, reproduced in Chromium, fixed in 44d203a. Escape over Add PC also closed the preview beneath it and consumed its history entry. It is on main too, but it is the same native-modal-over-an-overlay rule as finding 5. Fixed by exporting
nativeModalOverand using it in the Escape handlers of FileViewer, FilesDialog, ConfirmDialog and NewSessionDialog. Only the FileViewer path has a browser check.
Codex also confirmed as fine: header-borne budget renewal in every shape it tried, paired / tokenless / admitted / stale-cookie access, https-only on the subscribe POST and on load from disk, the test opt-in unreachable from an install, the CHANGELOG wording.
Other reviewers
CodeRabbit on 94745a5: no actionable comments, no threads.
Verdict
The three original fixes and the two follow-ups do what they say and each is held by a test that fails without it. Findings 2, 3 and 4 above are left as follow-ups for the reasons given.
## Change Prepares v0.4.1 and remote bundle 21. - `package.json` and `herdr-plugin.toml`: 0.4.0 → 0.4.1. A patch release: fixes from the audit and the pre-release reviews (#566, #570, #588, #592), Windows chat discovery (#563, #582), the plugin's port handling (#577), GJC menus (#593) and more. The new pieces are small and opt-in or additive: the sidebar's Activity order and Quiet opened finishes (#529, both off by default), the `/effort` card (#594), the clipboard-from-a-pane switch (#570) and the Portal guide (#229). - `shared/machines.ts`: `REMOTE_BUNDLE_VERSION` 20 → 21. `server/` code that ships in the bundle changed since v0.4.0 (#566, #563, #572, #576, #582, #583, #588, #519, #570, #592, #593, #594), so remote PCs need a new bridge. - `CHANGELOG.md`: the Unreleased notes become `[0.4.1] - 2026-10-08`, with the compare links. #592 merged without entries; its three user-visible fixes are added under Fixed (forwarded-address token limit, https-only web push that never follows a redirect, Tab and Escape in Add PC over a file preview). - `release-summaries.json`: 0.4.1 in English, Korean, Japanese and Chinese: four new, seven improved and eight fixed lines (eight is the most a list keeps). ## After the merge 1. `git tag remote-v21 <merge commit> && git push origin remote-v21` → the remote-bundles workflow publishes the five bundles and `manifest.json` as release `remote-v21`. 2. Only then `gh workflow run release.yml --ref main -f version=0.4.1`: preflight validates version, notes and summaries, CI runs on the exact commit, and the tag `v0.4.1` with its GitHub release is created. ## Validation - `bun run check fast` (workflow syntax, generated types, typecheck, build, unit tests). - `bun scripts/release-notes.ts 0.4.1` prints the notes (version sources agree, one heading, summaries in all four languages).
…e notes (#598) Two changes the owner asked for, one commit each. ## 1. Clipboard from a pane (OSC 52) is on by default #570 turned **Settings → Terminal → Clipboard from a pane** off by default, so copying from vim, tmux and Claude Code silently did nothing. It is on again; the switch stays for anyone running output they do not trust. **Migration: a new storage key.** Settings are saved as one whole record, so any 0.4.1 install whose user changed *any* setting has `terminalOsc52: false` stored without choosing it. The choice now lives under `paneClipboard` (default `true`) and `terminalOsc52` is ignored and dropped by `sanitizeSettings`, which already discards unknown keys. That is the simplest correct option: - a 0.4.1 record loads as on (its `false` cannot be told apart from a real choice, so it is not trusted); - an off chosen from now on is written under `paneClipboard` and stays off across saves and reloads; - no version field or one-off migration state is needed. A settings version would do the same with more code. Known edge: a tab still running the 0.4.1 bundle that saves settings writes its own record, which has no `paneClipboard`, so a new "off" would read as on again until it is re-chosen. Tabs pick up the new bundle on reload, and settings already have no cross-tab sync (each tab saves its in-memory record), so this is no worse than any other setting. Tests (`src/lib/settings.test.ts`, "clipboard from a pane"): fresh default on; a 0.4.1 record with `terminalOsc52: false` loads as on; an off chosen after the change survives a save, a reload and an unrelated change. A mutation that falls back to the old key fails the second case. Also: the setting's description and code comments say what is true now, ko/ja/zh entries are updated, and there is a CHANGELOG line under Unreleased → Changed. No doc in `docs/`, `DESIGN.md`, `INSTALL.md` or `README.md` mentions the default. ## 2. Patch-note style GitHub release notes `scripts/release-notes.ts` printed the whole CHANGELOG section (181 lines for v0.4.1). It now prints the English lists from `release-summaries.json` (`### New features`, `### Improvements`, `### Bug fixes`, a list with no lines left out), then the full section inside `<details><summary>Full changelog</summary>` with blank lines around it so GitHub renders the markdown. Lines come through `readSummary`, so they are trimmed and capped exactly as an install shows them. Every validation is unchanged (version format, the three version sources, exactly one heading, nonempty notes, all four languages). `scripts/release-notes.test.ts` pins the shape, the order and an empty list left out. `docs/development.md` → Releasing and `scripts/AGENTS.md` describe the new body. The published v0.4.1 release is not touched here; the lead regenerates it after the merge. ### v0.4.1 rendered with this script (`bun scripts/release-notes.ts 0.4.1`) ### New features - Typing /effort in a Claude Code chat opens a card to pick the effort for this session - Settings → Appearance can keep waiting and the latest agents on top of the Agents list - A finished agent you opened in the web UI can lose its dot, as it would in herdr (opt-in) - The guide shows how to give the app a public HTTPS address with Portal ### Improvements - A wrong access token waits longer after five tries, up to a minute - A program in a pane copies to your clipboard only once you allow it in Settings → Terminal - Dialogs keep Tab inside them, and screen readers announce tabs, panes and status lines - Add PC, Reconnect PC and Update remote bridge open as a bottom sheet on a phone - Updating a remote PC that is already current reuses its bridge without a new download - Alerts go only to https push services and never follow a redirect - Long drafts wrap, and the scrollbar no longer covers text when the page is zoomed ### Bug fixes - A long line of unclosed brackets or broken escape codes no longer freezes the chat - On Windows, more Claude Code and Codex panes show their chat instead of an error - Your own devices are recognised by their Tailscale login again, without pairing - A Claude Code chat shows what a slash command answered, and /goal is suggested - Settings, the palette, Add PC and file previews stack in order; Escape closes the top one - The plugin's start keeps the app on its port while herdr is away - A secret or typed text no longer reaches a pane you have already left - Gajae Code's selection and startup menus show their choices, not only arrow keys <details><summary>Full changelog</summary> ### Added - `/effort` sent from a Claude Code chat opens a card with the effort levels, low to max, so the level no longer has to be set in the terminal. A pick applies to this session only, as a pick from the `/model` card does, and leaves the default for new sessions alone. `/effort` is also in the chat's command list now. ([#594](#594), [#523](#523) by @suho-han) - Settings → Terminal has a **Clipboard from a pane** switch, off by default: a program running in a pane can no longer put text on your clipboard unless you turn it on. Programs that copy this way (vim, tmux, Claude Code) copy again once it is on. ([#570](#570) by @radicor) - The guide's **Behind a reverse proxy** shows how to give the app a public HTTPS address with [Portal](https://github.com/gosuda/portal-tunnel) v2.6.1 or later, behind a long random token and with a visitor's `Tailscale-User-Login` header dropped. ([#229](#229) by @rabbitson87) - **Settings → Appearance → Agents order → Activity** keeps a waiting agent on top of the Agents list and orders the rest by their latest state change, as herdr's agents panel keeps the latest work in view: the agent you just sent a message to stays on top while it runs and after it finishes, and a new one starts there. herdr's own order and the workspace rows are unchanged. **Workspaces** (herdr's order) remains the default. ([#529](#529) by @phirschybar) - **Settings → Appearance → Quiet opened finishes** (off by default): a finished agent you have opened in the web UI loses its dot and reads as ready, as viewing it in herdr would make it. herdr's DONE otherwise stands until herdr itself shows the pane. It is remembered per PC in this browser. ([#529](#529) by @phirschybar) ### Changed - A wrong access token is refused with a growing wait after five tries, up to a minute, whether it is typed into the sign-in form or sent with a request. Each visitor behind `tailscale serve` has their own count, and a browser holding an old token never stops you signing in with the new one. ([#570](#570) by @radicor) - The app now sends itself a Content-Security-Policy, so third-party content rendered in a chat — math, agent marks — cannot run script in the app. ([#570](#570) by @radicor) - A web-push subscription must be an https endpoint. ([#570](#570) by @radicor) ### Fixed - Gajae Code's selection menus show their choices instead of only arrow-key buttons, including startup selectors shown before the pane reports that it is waiting. Answers move to the selected row and recheck the menu before confirming. ([#593](#593)) - Secret input and the Codex follow-up fallback validate the live screen, so a password prompt or collapsed question queue in scrollback cannot send input into the current program. ([#566](#566)) - The PC's Tailscale login is read from a real Tailscale user id. These ids are too large for a JavaScript number, so the owner was not recognised and the owner's own devices had to pair. Two logins with neighbouring ids are also no longer taken for one. ([#572](#572)) - On Windows, a Claude Code pane started with a second account's `~/.claude-*` directory as its `CLAUDE_CONFIG_DIR` shows its chat. Before, the pane fell back to `~/.claude`, so the chat said **Conversation unavailable** and only the terminal worked. Windows does not let the server read another process's environment, so the store is the one among the server's own `CLAUDE_CONFIG_DIR`, `~/.claude` and the `~/.claude-*` directories beside it that holds the Claude process's own record, checked against the time the process started. A directory elsewhere is not looked in. Claude Code processes reported as `claude.exe` are recognized too. ([#563](#563) by @David-Sousa-Web) - A long line of brackets, `\(` or underscores that never close, as an agent prints in a log or a minified file, no longer freezes the chat: a megabyte of them took a minute or more to read, and now takes milliseconds. What every message shows is unchanged. ([#574](#574)) - On a mirrored pane (Windows, where herdr cannot attach a terminal), text typed while a message was still being sent no longer reaches the pane once you have left it, or left it and opened it again, before the text's turn came. ([#576](#576)) - The plugin's `start` keeps the app on its port when the app's own server holds it but cannot reach herdr. It used to move the app to another port beside the running one and blame another program; now it says that the app runs there without herdr and exits, and the app answers again on its port once herdr is back. ([#577](#577)) - On Windows, a Codex pane shows its chat when Codex stored its paths with the `\\?\` prefix, as it does for a canonical Windows path (`\\?\D:\work` for `D:\work`). Before, the chat said **Conversation unavailable**: the session's file seemed to lie outside Codex's store, and none of the threads matched the pane's directory as herdr reports it. ([#582](#582) by @David-Sousa-Web) - In a Claude Code pane, the chat shows what a slash command answered, so a `/goal` that Claude Code refuses says why in the chat instead of only in the terminal. `/goal` is also among the commands the message box suggests. ([#583](#583)) - Settings opened over a file preview is visible above it; Escape and Back close Settings first, preserving the preview and its history entry until the file itself is closed. ([#568](#568)) - Command palette buttons keep their native Enter action; IME commit and cancel keys stay with text input, and arrow navigation keeps the selected result visible. ([#567](#567)) - Long drafts in the message box wrap and keep a narrow scroll cue in reserved space, so the scrollbar no longer covers text at fractional zoom. ([#522](#522) by @suho-han) - A secret sent from a pane you then left and opened again, while another browser kept the pane open, is no longer typed into the pane: you send it again from the pane you opened. ([#588](#588)) - A Claude Code slash command whose answer holds a long run of broken terminal escape codes no longer stalls the server while the chat reads it. Its answer also drops a link cut off before its end and a stray `B` after a charset switch, and an answer with both output and errors shows both. ([#588](#588)) - The command palette opened over Settings and a file preview shows above both, instead of taking the keyboard unseen beneath them. ([#588](#588)) - The plugin's `start` no longer takes another program on the app's port for the app because its answer says `ok`: it treats it as any other program there, moving the app to a free port, or saying the port is taken when `PORT` is set. ([#588](#588)) - A 500 from the server no longer repeats the system's own error text, which carried absolute paths and the herdr socket location; it names a short id you can quote in a bug report instead. ([#570](#570) by @radicor) - Settings, the command palette, the file viewer, the file browser and the new-workspace dialog keep Tab inside them and give the focus back to whatever opened them. ([#570](#570) by @radicor) - The tabs of a workspace name the pane region they govern, so a screen reader announces the tab and the pane together. ([#570](#570) by @radicor) - Agent headings in a chat no longer pose as the app's own page structure; they sit below the app's own headings and look the same as before. ([#570](#570) by @radicor) - The "reconnecting" line and the composer's terminal-only hint are announced when they appear. ([#570](#570) by @radicor) - A chat locked out by the token gate, the "Last checked" line under Settings → About (with its date in your language) and a remote PC's state word in the sidebar are translated like the rest of the UI. ([#570](#570) by @radicor) - The alerts menu item now says the same thing the same way in every state. ([#570](#570) by @radicor) - Held terminal input typed while disconnected is forgotten after a day. ([#570](#570) by @radicor) - A link printed in the terminal opens only if it is an http(s) address, on both link paths. ([#570](#570) by @radicor) - A second tab open on one pane no longer sends a message the first tab is already sending: it sees that send on its way and holds back. Two tabs that press Send at nearly the same moment can still both send it. ([#570](#570) by @radicor) - A row's ⋯ menu is capped to the room its button leaves and scrolls instead of being cut off by the viewport, so the pane picker of a tab with many panes keeps every entry reachable with the pointer as well as the keyboard. Before, items below the fold were rendered but unreachable. ([#570](#570) by @radicor) - A row menu open while the window crosses the 640 px breakpoint now switches between bottom sheet and popover instead of keeping the form it opened with. ([#570](#570) by @radicor) - The workspace drawer a narrow window opened is closed again when the window is widened past 768 px, so narrowing it no longer brings back a drawer and its scrim unasked. ([#570](#570) by @radicor) - **Add PC**, **Reconnect PC** and **Update remote bridge** open as a bottom sheet on a phone, like every other dialog, and keep clear of the on-screen keyboard. Before, the one native dialog stayed a centred card on a phone. ([#570](#570) by @radicor) - **Remove PC**'s first click is a quiet ghost button that only arms the removal; the second is the red one, as revoking a device already was. ([#570](#570) by @radicor) - A PC's rename, connect and disconnect buttons disable while their request is in flight, so a double click no longer sends two overlapping requests. ([#570](#570) by @radicor) - A failed pane or workspace rename keeps the field open with what you typed, so a network blip no longer makes you write the name again. ([#570](#570) by @radicor) - A workspace reorder that fails no longer undoes a later, successful reorder. ([#570](#570) by @radicor) - A tab watching several busy panes gives up its oldest cached conversation answers when they grow past a byte budget, not only past sixteen of them. ([#570](#570) by @radicor) - The usage meters' note is the same size as every other advisory and empty state. ([#570](#570) by @radicor) - The PDF viewer's page colour, the pill radii, the tab dot and the pairing-code size come from design tokens now, and the pairing code follows the compact density setting. ([#570](#570) by @radicor) - Updating an already current remote bridge verifies and reuses it without downloading or restarting it again, while a bridge from a newer app is left running instead of downgraded. A PC that waits on such a conflict says so in the sidebar and under the header, with a **Reconnect** button, instead of asking for setup approval. ([#519](#519) by @suho-han) - A wrong access token sent through a proxy on this PC with a made-up `X-Forwarded-For` address that itself says " via " now counts against the limit every visitor through that proxy shares, like any other wrong token. Before, each such try started a fresh count. ([#592](#592)) - A web-push subscription must be an https address, with no exception for this PC, and an alert is never sent on where a push service redirects it, so an alert can never be posted to a service running on this PC. ([#592](#592)) - In the **Add PC** dialog opened over a file preview, Tab moves through the dialog's own controls and Escape closes the dialog alone, leaving the preview beneath it open. ([#592](#592)) </details> ## Checks - `bun run check fast`: ok (1817 pass, 6 platform skips, 0 fail). - No browser regression covers OSC 52 (`terminal-copy-regression.ts` covers drag and Ctrl+C copy), so none was run for it. ## Codex review (gpt-6-astra, read-only) - **Fixed** (P2): summary text was put into the markdown as-is, so `"…\n\n<!--"` could hide the whole changelog fold. The gate now refuses a summary line with a line break in any language, and the English lines escape `<`. A test covers both and fails without the fix. - **Declined, documented** (P2): a tab still on the 0.4.1 bundle that saves settings drops `paneClipboard`, so a new "off" reads as on until it is chosen again. A versioned storage key would stop that, but then every setting changed in such a tab would be lost instead. It lasts only until that tab reloads, and every setting added before this one had the same gap. - **Pre-existing, not in this diff** (P2): settings have no cross-tab sync, so a stale tab's next save writes its own copy of every setting, this one included. Reported to the lead as a follow-up.
Fixes from the second Codex pass over v0.4.0..6993563, before v0.4.1: findings 2, 1 and 5, and the CHANGELOG wording for 4. Finding 3 is #589 and finding 6 is #591; neither is touched here.
REMOTE_BUNDLE_VERSIONis unchanged.One commit per finding. Each finding was reproduced by a test or browser check that fails on 6993563, and that check is kept.
Finding 2: the shared token budget split attacker text (
fix(auth))server/auth.test.tssends 60 wrong tokens from a loopback peer withX-Forwarded-For: claimed via <n>. On 6993563 all 60 got 401 and none got 429 (Expected: 50, Received: 60).sharedKeysplit<forwarded> via <peer>at the firstvia, so each guess got its own shared budget.via. It is the socket's own address, which never holds a space, so nothing the client writes can move the split. Per-address budgets, paired devices, tokenless local or serve-only access, and admitted addresses are unchanged. The existing auth and access tests pass.indexOf), the new case fails as above.Finding 1: http loopback push endpoints were accepted in production (
fix(push))server/push.test.tschecks that a default parse rejectshttp://127.0.0.1,http://[::1]andhttp://localhostendpoints. On 6993563 the default parse accepted them.parseSubscriptionaccepts https only. A push service made withloopbackHttpalso accepts loopback http. Only tests set it, throughcreateServer({ pushLoopbackHttp: true }), the one injection seam, and they deliver topush.fake.ts. No environment variable reaches it.POST /api/push/subscribeand stored subscriptions on load both go through the service's rule, so an http entry already on disk is dropped in production. https endpoints, including https on loopback, are still accepted.options.loopbackHttp === true &&) makes the new case fail. The existing push tests and the push contract tests still deliver to the fake.Finding 5: a background focus trap took Tab from Add PC (
fix(a11y))scripts/file-viewer-regression.tsuses the real client and an owned herdr pane, at 1280px. It opens a file preview, then Settings, Remote PCs and Add PC. On 6993563, Tab pressed three times stayed on Add PC's first field. The preview's trap was still on top ofopenTrapsand cancelled each Tab.useFocusTrapstands down while a native modal (dialog:modal) it is not part of is open. That covers its Tab listener, its initial focus and its focus restore.Review follow-ups (rev-astra on 94745a5)
fix(push): never follow a push endpoint's redirect): an endpoint answering 307 tohttp://127.0.0.1had the alert POSTed there. The newserver/push.test.tscase uses a redirector to the fake push service. It failed before the fix (ok: true) and passes withredirect: "error": the fake receives nothing and the delivery is not ok.fix(a11y): leave Escape to a native modal over an overlay): the window Escape handlers in FileViewer, FilesDialog, ConfirmDialog and NewSessionDialog stand down while a native modal they are not part of is open, using the exportednativeModalOver. SettingsDialog closes when Add PC opens, and WorktreeDialog already ignores Escape when focus is outside it. The regression case now presses Escape over Add PC and checks that the preview and its history entry stay. It failed on 94745a5 in the reviewer's run and passes now. Only the FileViewer path is exercised in the browser.Finding 4: wording only (
docs(changelog))The #570 line said two tabs can no longer send the same message. The lease is read and then written in localStorage, so two tabs pressing Send at nearly the same moment can both send. The line now says that. No code change.
CHANGELOG
Findings 1, 2 and 5 correct behavior that #570 added after v0.4.0, so they get no new lines. The #570 line "A web-push subscription must be an https endpoint." is now accurate without exceptions.
Checks
bun run check fast,server/api.contract.test.ts,server/device-access.contract.test.ts,scripts/file-viewer-regression.tsandscripts/ui-regression.ts(which covers Add PC from Settings and its focus return), all run throughbun run check run.