Repository navigation
fix(native-chat): show the message rail from the first user message - #25707
Conversation
The rail on the right of native chat stayed hidden until a conversation had three user messages, so short chats had no rail at all. Show it whenever there is at least one user message (still hidden in panes too narrow for it). Co-Authored-By: Claude <[email protected]>
…ctured-chat-message
…ctured-chat-message
|
Short native chats hid the message bar on the right until you had sent three messages. The bar now appears from your first message. Empty chats still have no bar, and the existing 512 px minimum pane width remains; previews and navigation use the existing control. Fresh adversarial and issue-first architecture reviews found no proven rail regression or reason to expand the design. Current main is integrated and the original rail patch is unchanged. The supporting test-only import duplication (P2) is fixed in 64d217347e35, with all journal assertions preserved; fresh narrow review verified the final diff. Verified locally: all 41 targeted rail/journal tests, scoped Node typecheck, renderer typecheck on the unchanged rail patch, and changed-file lint, formatting and code-quality checks. Latest CI has settled red with the same two failures plus aggregate verification. Typechecking, four test shards, relay integration and both packaging jobs—including Windows—pass. Two separate P2 check failures remain deferred:
The affected harness, dependency and startup-policy files match main. I read the actual failure logs and source; I did not independently reproduce main CI or locally reproduce these separate failures. The aggregate verification job is red because these two checks failed. No rail defects are deferred. Windows high-spec Electron QA now ran on the final head, driven by OpenCode Muse Spark 1.3 Free. The real hidden app rendered controlled transcripts; the coordinator directly checked the one-message rail, hover preview, Enter-to-focus/Escape-to-close and click selection evidence. The attached before/after images show the same transcript content without the rail under the old threshold, then with one tick under the restored final source. The coordinator inspected the original PNGs and verified GitHub serves matching bytes. Before: After: Hover preview: Limits: transcripts were seeded; a live provider conversation, native window focus, mobile, WSL, Linux/macOS rendering, live SSH and a runtime performance benchmark were not exercised. The coordinator recovered and read the actual test history and temporary test code. Six scenarios passed across the final five-test pass and the corrected resize rerun: zero user messages (assistant-only transcript), one/two/three messages, shrink/regrow, and theme capture. A separate measured-width run observed 512 px shown and 511 px hidden. Windows unit tests passed 80/80. This was not one final 6/6 suite run. Tab, exact post-selection scroll position and the fully empty-file loader were not verified as successful flows. The PR is open and ready for review, with the two CI failures above explicitly deferred. It is unmerged and auto-merge is disabled. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
💤 Files with no reviewable changes (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe message rail no longer uses a minimum item count of three. When the rail is wide enough, it is visible with one or more items and hidden when empty. Tests now cover these cases and expect ticks for all three user messages. An earlier duplicate import was also removed from a separate test file. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No actionable risk introduced by this change is evident. The reported CI failures are described as unrelated to the rail changes. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Message rail now shows from the first user message —
useNativeChatMessageRailreturnsvisible: wideEnough && items.length > 0, so a chat with a single user message shows the rail. Empty chats and panes narrower than 512px still hide it; previews, selection, scrolling and history navigation are unchanged. - Unused minimum constant removed —
NATIVE_CHAT_RAIL_MIN_ITEMS(3) is deleted fromnative-chat-message-rail-items.ts, with no remaining references repo-wide. - Visibility test updated — the hook test now asserts one-message visibility (exact
toBe(true)) and an empty-chat case (toBe(false)) in place of the old "hides below the minimum" expectation. The single-message assertion fails against the old>= 3gate, so it is real coverage, not theatre. - Duplicate test import removed —
journal-submission-positions.test.tscarried two identicalcodexProviderHandleimports on the base; one is dropped. Test-only, no product behavior change.
I ran the four rail-related renderer specs (39 tests) against the head: all pass. The static analysis and typecheck CI job passes; the two red checks (cross-version wire compatibility and the verify aggregator) cover suites this diff does not touch.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏




ELI5
Short native chats hid the thin message bar on the right until you had sent three messages. The bar now appears from your first message, giving you the existing prompt previews and navigation in short conversations.
What Changed
Why
The count restriction caused the missing control. Removing that policy at its existing owner makes short chats use the same navigation as longer chats, without adding state or another control. Empty and narrow panes keep their existing policy.
Linked Issue
N/A (maintainer request)
Visual Proof
Windows high-spec Electron, final head
64d217347e35, driven by OpenCode Muse Spark 1.3 Free. These are full hidden-renderer screenshots of a controlled one-message transcript in the real app. The before build temporarily restored the old three-message threshold; the after build restored the final source and rebuilt it. No desktop input or foregrounding was used.Before: the one-message chat has no rail.
After: the same transcript content has one rail tick.
Hovering that tick opens the existing prompt preview.
The coordinator inspected all three original PNGs and verified the uploaded bytes against their SHA-256 hashes.
Testing
--config config/vitest.config.ts: all 41 tests pass across the three rail test files and the journal fixture test.tc-gateon the earlier integration; the rail patch is byte-identical on the updated head. Scoped Node typecheck also passed on the final head throughtc-gate.@streamparser/json; no compatibility assertions run in those suites. Separate harness fix deferred. Latest CI is terminal red with the same two failures plus aggregate verification. Four test shards and both packaging jobs (including Windows) pass; shard 1 also fails the Windows multiline startup-prompt expectation at startup-line-prompt-carry.test.ts:198. Related source/test files match main; separate investigation deferred. Aggregate verification is red.Review
Fresh adversarial and issue-first architecture reviews found no proven rail defect. Fresh narrow reviews checked the supporting fixture repair and final main integration. The final diff preserves the original rail patch and all journal assertions. The readiness checklist was applied without counsel as requested. Windows background Electron rendering and the one-message preview/focus/selection flow were exercised with controlled transcripts; before/after proof is attached.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
No production host-execution, mobile-facing contract, persistence, or wire change. No runtime performance benchmark or rendered mobile, WSL, Linux, macOS, or live SSH check was performed. The hook's existing state derivation and bounded sampling are unchanged.
Author: @BrennanKB5
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)