fix(client): stabilize mobile send, jump recovery, and PWA diagnostics#112
Conversation
Code Coverage OverviewLanguages: JavaScript JavaScript / code-coverage/vitestThe overall coverage in the branch remains at 22%, unchanged from the branch. Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5614e4347b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d41dc8174
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8779b19db9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Deploying with
|
| Status | Preview URL | Commit | Alias | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! | https://pr-112-charm.justin-tech.workers.dev | 4b1fec1 | pr-112 |
Tue, 16 Jun 2026 16:12:20 GMT |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b1fec1956
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!(target instanceof HTMLButtonElement)) return; | ||
| const buttons = Array.from(items.querySelectorAll<HTMLButtonElement>('button')); | ||
| const index = buttons.indexOf(target); | ||
| if (index >= 0) applySelectedIndex(index); |
There was a problem hiding this comment.
Prevent first ArrowUp from skipping the last suggestion
When focus is still in the editor and the user presses ArrowUp as the first autocomplete navigation key, the active FocusTrap handles ArrowUp in the capture phase, moves focus to the last button, and this new focusin path immediately updates selectedIndexRef to that last index. The same keydown then reaches RoomInput, dispatches autocomplete-navigate with direction -1, so the selection lands on the second-to-last item (or stays on the first item when there are only two) instead of wrapping to the last suggestion. Avoid updating the selected ref for that focus-trap move, or suppress the duplicate navigation for editor-originated ArrowUp events.
Useful? React with 👍 / 👎.
Description
Fixes the current follow-up set for mobile sending, jump-to-message stability, autocomplete selection highlighting, and Safari/PWA freeze diagnosis.
#111,#103, and#109Related repo history checked before opening this PR:
Closes #111
Closes #103
Closes #109
Closes #113
Related to #91
Type of change
Checklist:
AI disclosure:
This PR keeps mobile schedule-send on long press, but hardens the gesture handling so movement, release, leave, or cancel reliably stop the timer and only a true sustained press opens the scheduling modal. It updates the timeline sync hook so permalink / reply / bookmark jumps keep their event-focused context through room refresh and foreground recovery instead of being replaced early by the live bottom timeline, and it adds regression tests for those guard paths. It also fixes the shared autocomplete menu so suggestion lists always mark a default selected item and keep arrow-key highlighting synchronized with the active choice, covering emoji and command suggestion flows. Finally, it adds service-worker and app-visibility breadcrumbs and metrics around controller changes, claim requests, reload triggers, and client-claim recovery to narrow down long-idle Safari PWA freezes. The new manual QA document lists the browser/device checks still required because those paths could not be exercised end-to-end from Codex.