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 Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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.
Reviewed the header-controls customization for UI consistency. Three concrete issues in apps/web/src/components/chat/ChatHeader.tsx: the checkmark column does not survive the web context-menu fallback's rendering, hiding "Open in editor" also unbinds its global keyboard shortcut, and the thread action menu's right-click target is narrowed from the breadcrumb row to the title button only.
Posted via Macroscope — UI Consistency
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. This PR introduces a new user-facing feature with new state management and persistence. Multiple unresolved comments identify a usability bug where hiding all three controls collapses the container to zero height, making the context menu inaccessible and the controls unrecoverable. New capabilities warrant human review. You can customize Macroscope's approvability policy. Learn more. |
…text menu handling
| data-chat-header-actions | ||
| onContextMenu={handleHeaderActionsContextMenu} | ||
| className={cn( | ||
| "flex shrink-0 items-center justify-end gap-2 @3xl/header-actions:gap-3", |
There was a problem hiding this comment.
🟡 Medium chat/ChatHeader.tsx:364
When all three controls are hidden, the [data-chat-header-actions] element collapses to zero height, so right-clicking the header can only open the thread menu and there is no way to reopen the visibility menu. Give this container a header-height hit area so its context-menu handler remains reachable even when its children are unmounted or display: none.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/chat/ChatHeader.tsx around line 364:
When all three controls are hidden, the `[data-chat-header-actions]` element collapses to zero height, so right-clicking the header can only open the thread menu and there is no way to reopen the visibility menu. Give this container a header-height hit area so its context-menu handler remains reachable even when its children are unmounted or `display: none`.
There was a problem hiding this comment.
Reviewed the header controls visibility toggle for UI/behavioral consistency. One finding: hiding the git control unmounts it, which takes app-wide git-status refresh down with it. The openIn control already uses the correct CSS-hidden approach.
Posted via Macroscope — UI Consistency
…ntain header actions hit area
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9d21704. Configure here.
| onOpenPullRequest={onOpenPullRequest} | ||
| {...(draftId ? { draftId } : {})} | ||
| /> | ||
| </div> |
There was a problem hiding this comment.
Hidden git control stays active
Low Severity
Hiding Git source control now only applies Tailwind hidden instead of unmounting GitActionsControl. The control keeps running its focus and visibility VCS refresh listeners, status subscription, and draft branch sync, so background git work continues after the user hides the chrome. The actions strip already has min-w-6 for the context-menu hit target, so keeping this tree mounted is not required for that UX.
Reviewed by Cursor Bugbot for commit 9d21704. Configure here.
There was a problem hiding this comment.
One finding on the header actions hit area.
Posted via Macroscope — UI Consistency
| onContextMenu={handleHeaderActionsContextMenu} | ||
| className={cn( | ||
| "flex shrink-0 items-center justify-end gap-2 @3xl/header-actions:gap-3", | ||
| "flex h-full min-w-6 shrink-0 items-center justify-end gap-2 @3xl/header-actions:gap-3", |
There was a problem hiding this comment.
h-full here resolves to auto: the actions cluster's containing block is the ChatHeader root (ChatHeader.tsx:274), which is a flex item of the items-center topbar <header> (ChatView.tsx:6214) and therefore has an indefinite (content) height, so height: 100% never picks up --workspace-topbar-height. With every control toggled off the three wrappers are display:none, so this container has zero content height — min-w-6 gives width but the box is 24x0 and cannot be right-clicked. Since this context menu is the only way to re-enable the controls and the choice is persisted in localStorage, hiding all three leaves the header controls unrecoverable.
Consider stretching to the row instead of relying on a percentage height, so the empty region keeps a real hit area:
| "flex h-full min-w-6 shrink-0 items-center justify-end gap-2 @3xl/header-actions:gap-3", | |
| "flex min-w-6 shrink-0 items-center justify-end gap-2 self-stretch @3xl/header-actions:gap-3", |
Posted via Macroscope — UI Consistency
|
Note 🤖 GPT-5.6 Sol responding on behalf of Theo We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together. This adds persisted visibility state and a context menu for existing header actions. Hiding core actions reduces discovery and adds settings state for a small layout preference. If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed. |


Summary
Allows users to show or hide the topbar action controls (Action scripts, Open in editor, Git source control) by right-clicking on the header bar or buttons.
Changes
useHeaderControlsStorewith localStorage support for action visibility toggles.Note
Low Risk
UI preference state in localStorage only; no auth, data, or API behavior changes beyond conditional header rendering.
Overview
Adds a right-click context menu on the chat header actions strip so users can show or hide Action scripts, Open in editor, and Git source control. Choices are stored in a new persisted
useHeaderControlsStore(localStoragekeyt3code:header-controls:v1); all three default to visible.ChatHeaderwires the menu through the localcontextMenu.showAPI, toggles visibility on selection, and wraps each control in a container that useshiddenwhen turned off. Right-clicks inside[data-chat-header-actions]open this menu instead of being ignored; the breadcrumb/title area still opens the existing thread actions menu.buildHeaderControlsContextMenuItemsbuilds checkmarked menu labels; unit tests cover the store and menu helper.Reviewed by Cursor Bugbot for commit 9d21704. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add context menu to chat header for toggling header controls visibility
buildHeaderControlsContextMenuItemsin ChatHeader.tsx to format menu items with checkmark/unchecked indicators based on current visibility.useHeaderControlsStorein headerControlsStore.ts, a Zustand store that persists visibility state to localStorage under the keyt3code:header-controls:v1.Macroscope summarized 9d21704.