Repository navigation
Resume typing and restore focus across conversation tabs - #909
Conversation
wesbillman
left a comment
There was a problem hiding this comment.
No changes requested in this slice. The source paths preserve editor-owned selection, distinguish pointer tab activation from keyboard navigation, and make opener-focus restoration a one-shot close-commit handoff.
Automated source review by Star Lord via Wes’s account; head bffb8aee86513d451c2cb47178bd154298353c6b, base cdbf1013557499d106c48faf22cc5d6f60b3b73f. Tests/app were not run; current-head native acceptance remains pending, and this does not close findings on earlier stack slices.
baxen
left a comment
There was a problem hiding this comment.
🤖 Approving on behalf of baxen. They tested the full stack from this head on desktop: tab drafts surviving channel switches, moving tabs between panes, reusing an already-open tab, the Main pane setting, resuming the cursor on tab return, the return highlight, and same-thread links.
wesbillman
left a comment
There was a problem hiding this comment.
🤖 No blockers. The pointer-versus-keyboard tab activation, the data-tab-focus handoff and the one-shot close-focus effect behave as described. Editor focus defers to pointer and native-input placement.
Validation: source review. The one failing CI job, WebKit 1/6, is inbox.spec.mjs resize-drag geometry (moved 57px, expected 64). It passed 3/3 locally on WebKit at bffb8aee, so it looks like a flake, not this change. The other jobs were cancelled, so CI needs a rerun after the stack is rebased. Not checked: Mac WebKit native caret behavior in the app.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
cdbf101 to
64dc783
Compare
bffb8ae to
0357696
Compare
|
🤖 Final slice rebased onto merged #908 at 0357696. Independent integration review confirms the combined focus/caret change is unchanged in behavior and retains all earlier stack repairs. Typecheck, 490 focused owner tests and all 46 affected Chromium/WebKit cases pass. The initial push hook failed locally; the four affected files and then the complete unchanged push hook passed, with no bypass or relaxed settings. Fresh hosted CI is running. @wesbillman, please give this exact rebased head its final no-further-issues review. Morgan authorized merging once that comment, passing checks and required approval are present. No earlier review is being treated as exact-head confirmation. |
|
🤖 Current CI fails the same WebKit media-control mute-glide case independently tracked in #917. The test and media-control owner are unchanged by this focus slice. #917 is green with Wes’s no-changes review but awaits required approval; I’m watching for it to merge, then will rebase this final slice and require fresh CI plus exact-head review. No bypass or speculative rerun. |
Pointer tab selection resumes the editor caret; keyboard navigation keeps focus in the tabs. Known native-edit edge cases remain under investigation. Co-authored-by: Carl <goose@block.xyz> Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Complete the one-shot focus handoff without waiting on an animation frame, including paused-clock reading journeys. Drop hidden targets instead of overriding a later tab selection. Co-authored-by: Carl <goose@block.xyz> Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Co-authored-by: Carl <goose@block.xyz> Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
0357696 to
06db0be
Compare
|
🤖 #917 is merged, and Baxen has rebased/pushed this PR at 06db0be. I independently verified that its file tree matches my local rebase exactly; no focus behavior changed, and I will not overwrite Baxen’s update. Fresh CI is running on that head. @wesbillman, please give this exact head the final no-further-issues review. Morgan’s merge authorization remains gated on that comment and passing checks/required approval. Local validation of the newly combined media/focus paths is in progress; previous 490 focused owner and 46 browser results remain separately attributed. |
What this does
Clicking a conversation tab returns focus to its composer and resumes the saved typing position. Keyboard tab selection keeps focus in the tab row. Closing a main-pane thread returns keyboard focus to its still-visible opener after pane selection commits.
This is the final slice, rebased onto main containing merged #904–908 and #850. It repairs the overlapping/frozen desktop text cursor found during tab-switch testing.
Why it matters
After returning to a conversation, typing should continue where it was left—not at a stale position or behind a wrongly painted cursor. Keyboard users should also retain a clear place in the channel when leaving a thread.
How it works
The editor owns its selection and the Mac WebKit repaint repair. A native edit in progress is not mistaken for a tab-return handoff; pointer release outside the editor, cancellation and window blur retire the pointer state. The workspace distinguishes pointer selection from keyboard navigation, and one-shot close-commit focus restoration avoids hidden content and preserves scroll.
Rebase and verification
On the newly rebased media-test base, all 42 cases across media-controls, navigation-thread-history and mention-edit pass in Chromium/WebKit (1.2m, local macOS). This ran at local head
9ce700cc1, whose complete tree6438d9e470bc10ccca57428f57b94fd2a427895ais identical to remote06db0be59. No source edits occurred during the run; remote CI remains the Linux/cross-platform gate.Upstream media-animation blocker is resolved: test(media): keep the mute-glide check off playback and transitionrun timing #917 merged as
bd52c734b. Baxen rebased and pushed Resume typing and restore focus across conversation tabs #909 at06db0be59a3f97c9629ef9ad1b0b5b2b95402ee4; the original three focus commits are unchanged in intent. An independently prepared local rebase has the identical tree (6438d9e4), so no duplicate push or rewrite of Baxen’s update is needed. Fresh CI and Wes’s exact-head final clearance remain pending.Current remote head
06db0be59a3f97c9629ef9ad1b0b5b2b95402ee4, basebd52c734b. The seven-file combined slice is unchanged in behavior from the previously reviewedbffb8aee8; the rebase retains merged drag-navigation cancellation, frontmost targets, reading/modal protections, timeline initialization repair and return-highlight animation ownership.Independent focused integration review is clear. The PanelWorkspace conflict preserves both the content-focus target and the modal guard; no additional product behavior or test scenarios were added in this pass.
Typecheck and all 490 focused tests across EditableInput, MessageComposer and PanelWorkspace pass. All 46 cases across the complete navigation-thread-history, mention-edit, thread-unread and channel-members files pass in Chromium/WebKit (2.3m, local Apple Silicon macOS), including first-edit caret, pointer tab return, main-thread Escape and modal focus.
Existing regressions cover editor-owned caret restoration, pointer release/cancellation, first-native-edit focus ordering, pointer-versus-keyboard tab activation and one-shot opener focus. Earlier fail-before/pass-after evidence remains documented; this pass revalidates their merged integration rather than inventing another focus owner.
Morgan explicitly confirmed desktop outside-editor selection/tab-return and main-thread keyboard-open/Escape at pre-rebase
9ddc42895; Baxen tested the prior full stack atbffb8aee8. These are historical native/human acceptance, not a fresh packaged/native build at this rebased head. Browser synthetic events do not prove every OS-input ordering.Initial local push was blocked by six related-test failures: four 5-second timeouts and two subsequent media-edit assertions. All 60 cases in the four failed files passed unchanged, then the complete original push hook passed on retry with identical selection, timeouts, assertions and worker settings. No code changes or hook bypass were used; this does not prove the failures can never recur.
The previous published focus snapshot passed commit/push hooks; Baxen’s new remote head is verified as an identical focus change on the merged media-test base. Fresh hosted checks, required approval and Wes’s final exact-head no-further-issues comment gate the authorized merge. No manual CI rerun, full scan, native build or thread resolution.
Stack
Slice 6 of 6, final. Based on main including merged Return highlight #908. All earlier slices and blank-tab removal are already merged.