Skip to content

fix(ui): keep the active conversation selected in the sidebar - #134

Merged
nixfred merged 1 commit into
nixfred:mainfrom
bndnsmth:fix/sidebar-selection
Oct 7, 2026
Merged

nixfred merged 1 commit into
nixfred:mainfrom
bndnsmth:fix/sidebar-selection

Conversation

@bndnsmth

@bndnsmth bndnsmth commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Why

In the main app's two-pane window, the sidebar could suggest that a different conversation was selected from the one displayed on the right. This is particularly misleading when composing a reply.

Reproduction confirmed on an installed client:

  1. Focus the empty sidebar search field and press Down to place the keyboard cursor on the first chat.
  2. Click a different chat.
  3. Move the pointer out of the sidebar.

The conversation pane switches, but the first row can remain highlighted, or the clicked row loses all highlighting once hover ends. Expected: the displayed chat retains a persistent selected state.

The row backgrounds previously represented only hover or the keyboard cursor. openThread() did not synchronize that cursor, and neither pinned tiles nor chronological rows had a selected state tied to active.

What

Give pinned tiles and chronological rows in split view a persistent selected fill using Style.selectedFillFor(). Selection follows the displayed chat's identity through isShowing(), independently of pointer hover, editor focus, or list position. Explicit opens also synchronize the sidebar cursor and stop any pending preview timer, without calling cursorMoved() and scheduling another preview. Existing hover/cursor styling remains for other rows, and the flyout does not gain the split-view selected fill. Add source-level regression checks in the existing QML safety-invariant style and an Unreleased changelog entry.

How it was verified

  • bun test is green (CI will check): 748 passing tests on current upstream main plus this fix.
  • Any send/receive behavior was exercised against my own number only — never a contact or a group. N/A: no messages were sent during validation; this change does not alter send behavior.
  • UI change → screenshot attached. Synthetic-data screenshots were inspected locally, but are not attached here.
  • Touches an invariant in CLAUDE.md → named below, and the doc updated if it changed. No invariant changed; the existing "A peeked thread is not read" gate is preserved.

Behavioral checks:

  • The affected user repeated the main-app click/move-pointer-away scenario after installing the patch and confirmed the selected state now persists.
  • The isolated fake-bridge harness rendered the shipping view in split-view mode. With the pointer outside the sidebar and the keyboard cursor explicitly cleared, the displayed chat still retained its selected fill. Inspected both a pinned tile and an ordinary chronological row.
  • No real conversations were opened by the automated checks, and no Mac-side tools or configuration were changed.

Tie pinned and chronological row selection to the displayed chat identity, independently of hover, editor focus and keyboard cursor position. Synchronize the cursor and cancel delayed previews on explicit opens. Preserve the preview read gate and cover the bindings with regression checks.
@bndnsmth
bndnsmth marked this pull request as ready for review October 7, 2026 01:03
@bndnsmth
bndnsmth requested a review from nixfred as a code owner October 7, 2026 01:04
@nixfred
nixfred merged commit 4d481a6 into nixfred:main Oct 7, 2026
1 check passed
@nixfred

nixfred commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Merged, thank you Brandon, and welcome. The sidebar pointing at one chat while the pane showed another is exactly the kind of quiet wrongness that bites when you are replying, and you tied the fill to the displayed chat's identity instead of hover or position, which is the right model. I checked the one thing I was worried about: moving the cursor in openThread() does not arm a preview (onCursorChanged only builds rows, previews start in cursorMoved()), so "a peeked thread is not read" still holds. 750 tests green, and both new tests fail against the old view. It is live on both my machines; I opened a pinned tile from outside the window and it keeps the selected fill with no hover.

One small ask: I thank contributors by name in a weekly post on X. Is there an account you'd like tagged? "Rather not be tagged" is an equally good answer.

nixfred added a commit that referenced this pull request Oct 7, 2026
…h asked for his X handle)

LR-T: blip, change-log, weekly-notes, roster, #133, #134, bndnsmth, ianswope
LR-D: blip

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeRMdPWNC2myz9U8hEeeCi
@bndnsmth
bndnsmth deleted the fix/sidebar-selection branch October 7, 2026 12:31
@bndnsmth

bndnsmth commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Appreciate the quick review and merge, @nixfred. Feel free to tag @bndnsmth in your post, thanks.

nixfred added a commit that referenced this pull request Oct 8, 2026
…damonjanis (#120)

LR-T: blip, contributors, x-handles, bndnsmth, damonjanis
LR-D: blip

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeRMdPWNC2myz9U8hEeeCi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants