Fix chat rail disclosure button that appeared dead - #5027
Conversation
The '...' control next to '+ New chat' expanded the rail, but it used the same IconDots glyph as the chat rows' overflow menus and every host passes one static label for both states, so nothing about the control changed when pressed. It read as a menu trigger that failed silently. Use a disclosure chevron that flips with the expanded state.
There was a problem hiding this comment.
Builder reviewed your changes — looks good ✅
Review Details
Code Review Summary
PR #5027 makes a focused UI clarification in the shared @agent-native/toolkit chat-history rail: the disclosure control now renders a down chevron when collapsed and an up chevron when expanded, replacing the ambiguous static overflow glyph. The underlying toggle behavior, aria-expanded state, item limits, and host-provided labels remain unchanged. Regression coverage verifies both icon transitions with identical labels, ARIA state changes, and separation from per-row overflow icons.
Risk level: Low. Two independent code-review passes found no confirmed bugs or regressions, and the targeted toolkit tests passed (10/10). The implementation is appropriately scoped and preserves the existing action and accessibility semantics.
🧪 Browser testing: Attempted full visual verification, but it was blocked because Chrome MCP browser-automation tools are not available in this environment; the dev server itself was healthy. Factory was also not launched by the default dev configuration, so no visual evidence was captured.
Summary
Replaces the static
IconDotsglyph on the sidebar chat rail's "more chats" disclosure control with a chevron that flips between up/down based on expanded state, and adds regression tests to cover it.Problem
Factory item:
595bdeda0b0a9f75462d9af7322c4aa889727941e16991f39deffe6516be6b88Slack thread: https://slack.com/app_redirect?team=T0GCV21GE&channel=C0ATH3CCZT4&message_ts=1789442547.519719
The "..." button next to "+ New chat" in the Brain sidebar appeared to be a dead CTA — clicking it triggered no visible dropdown, modal, or drawer. Investigation found the button actually worked (it expanded the chat history rail), but it used the same
IconDotsoverflow glyph as the individual chat row menus above it, and its label ("Chats") is passed identically for both expanded and collapsed states across all hosts (Brain, Assets, Factory, Plan, and Dispatch). Since neither the icon nor the label changed on interaction, and the glyph looked like an unrelated menu trigger, the control read as non-functional even though it was firing its handler correctly.Solution
Interpretation chosen: since the underlying expand/collapse behavior was already correct, the fix is a UI clarity fix rather than a new feature — swap the ambiguous
IconDotsglyph for a disclosure chevron (IconChevronDown/IconChevronUp) that visibly flips witharia-expandedstate, making it clear the control is a working disclosure toggle and distinct from the row-level overflow menus.Key Changes
ChatHistoryRail.tsx: replacedIconDotswithIconChevronDown/IconChevronUp, switching the icon based on theexpandedstate.ChatHistoryRail.spec.tsx: added tests verifying the glyph changes with state even when both labels match, and that the disclosure glyph is distinct from the row overflow-menu glyph.@agent-native/toolkitpatch) documenting the fix and rationale.To clone this PR locally use the Github CLI with command
gh pr checkout 5027You can tag me at @BuilderIO for anything you want me to fix or change