Make the selected sidebar thread stand out clearly and never go stale - #123
Merged
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughChangesThe sidebar thread selection now derives active styling and Sidebar thread selection
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Two problems with the sidebar's selected-thread state: - The selected thread was barely distinguishable: .thread.active used the same --panel2 background as :hover, only brightening the text, so in a long list it was hard to tell which thread was open. - Selection was applied imperatively (querySelectorAll + classList.toggle in openThread/openDraftThread). Thread rows are rebuilt whenever the list reloads, so a hand-set highlight could survive a rebuild and leave a previously selected row still looking selected. Styling (app.css): restyle .thread.active using the code-editor convention -- a neutral raised fill with a faint 9% accent whisper (color-mix, with a plain --panel2 fallback) plus a thin 2px accent left-rail carrying the signal, no colored wash and no bold. Reads as clearly selected in a long list while staying restrained, and derives from the active theme accent (blue in IDE/default/bubbles, green in terminal). .thread.active:hover sits a step above at 13%. The tint stays clearly above a plain hover and coexists with the leading status glyph and trailing actions button. State (app.js): derive the selection from state.threadId as the single source of truth. markThreadRowActive toggles the class and mirrors it to aria-current; syncActiveThreadHighlight recomputes every row; threadRow applies it at creation so re-renders preserve exactly one active row. openThread and openDraftThread call the shared helper. Tests: add a Playwright test (create two threads, switch, reload) asserting exactly one active row, that switching moves it, that the accent rail and aria-current are present, and that the highlight survives a full list rebuild on reload. Regenerate the README desktop and mobile screenshots for the new styling. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012P8N8b5SuaxDKEMcAAN73U
marmeladema
force-pushed
the
claude/approval-request-persistence-c47tky
branch
from
July 24, 2026 21:07
408e9d3 to
5ccdd22
Compare
This was referenced Jul 24, 2026
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.
What & why
Two problems with the sidebar's selected-thread state:
.thread.activeused the same--panel2background as:hover, only brightening the text — in a long list it was hard to tell which thread was open.querySelectorAll+classList.toggleinopenThread/openDraftThread). Thread rows are rebuilt whenever the list reloads, so a hand-set highlight could survive a rebuild and leave a previously selected row still looking selected.Changes
Styling —
app.css.thread.activeusing the code-editor convention: a neutral raised fill with a faint 9% accent whisper (color-mix, with a plain--panel2fallback) plus a thin 2px accent left-rail carrying the signal — no colored wash, no bold. Reads as clearly selected in a long list while staying restrained, and derives from the active theme accent (blue in IDE/default/bubbles, green in terminal)..thread.active:hoversits a step above at 13% so the selected row still reacts to hover without jumping.--panel2) and coexists cleanly with the leading status glyph (!approval /xerror /orunning /*unread, each keeping its own semantic color) and the trailing...actions button.State —
app.jsstate.threadIdas the single source of truth.markThreadRowActivetoggles the class and mirrors it toaria-current;syncActiveThreadHighlightrecomputes every row;threadRowapplies it at creation so re-renders preserve exactly one active row.openThreadandopenDraftThreadnow call the shared helper.Tests
tests/e2e/tests/thread-selection.spec.ts): create two threads, switch, reload — asserting exactly one active row, that switching moves it, that the accent rail andaria-currentare present, and that the highlight survives a full list rebuild on reload.Screenshots
🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit
Bug Fixes
Tests
nonebox shadow, correctaria-currentstate, and persistence after page reload.