Fix mobile new-thread action visibility#1988
Fix mobile new-thread action visibility#1988SAKETH11111 wants to merge 1 commit intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
ApprovabilityVerdict: Approved CSS-only changes to fix mobile button visibility, a new test verifying the fix, and defensive type validation in the adapter. All changes are limited in scope with no schema, security, or significant runtime behavior implications beyond the intended mobile UI fix. You can customize Macroscope's approvability policy. Learn more. |
Closes #1924
What was broken
On mobile, the project header hid the new-thread action behind desktop-style hover behavior, so touch users could not reliably start a thread from the sidebar.
Root cause
The project header crossfaded the remote badge and the new-thread action using hover/focus-only visibility rules. In the mobile sidebar sheet there is no reliable hover state, so the action stayed hidden and non-interactive.
What changed
Note
Fix new-thread action visibility in mobile sidebar for project items
Sidebar.tsx, the new-thread action onSidebarProjectItemis now always visible and clickable on small screens (opacity 100, pointer-events auto), with hover/focus behavior retained on medium screens and above viamd:prefixes.px-2topl-2 pr-8to accommodate the action on the right.ChatView.browser.tsxverifies the button is visible and clickable in a compact viewport without hover.ClaudeAdapter.tsto ignore tool-use content blocks with missing or non-stringnameorid.Macroscope summarized 5bf922f.
Note
Medium Risk
Tweaks sidebar interaction/visibility rules across breakpoints and adds a mobile regression test; also tightens Claude SDK stream event parsing, which could affect tool-call event emission if unexpected payload shapes appear.
Overview
Fixes the project-level New thread action in the sidebar so it is visible and clickable on mobile without relying on hover/focus, while preserving the existing hover/focus reveal behavior on
md+screens and adjusting header padding/spacing accordingly.Adds a browser regression test ensuring the mobile sidebar sheet shows the action with
pointer-eventsenabled and that tapping it navigates to a new draft thread route.Hardens
ClaudeAdaptertool-usecontent_block_starthandling by narrowing/validatingtype,name, andidbefore treating a block as a tool call, avoiding unsafe access under current SDK typings.Reviewed by Cursor Bugbot for commit 5bf922f. Bugbot is set up for automated code reviews on this repo. Configure here.