Skip to content

Keep one chat toggle in the toolbar while a file is open - #1764

Merged
xuzhougeng merged 1 commit into
mainfrom
hide-chat-tools-in-file-view
Nov 24, 2026
Merged

xuzhougeng merged 1 commit into
mainfrom
hide-chat-tools-in-file-view

Conversation

@xuzhougeng

Copy link
Copy Markdown
Owner

Problem

With a file open on its own in the center, the toolbar still showed every conversation tool: views, outline, share, trajectory, archive, inbox, terminal and the panel toggle. None of them apply to the file. The status bar also had its own "Chat beside" button, which repeated the toolbar's panel icon.

Change

  • While a file is shown alone, .topbar-actions gets a file-view class, and CSS hides the overflow group and the "more" button.
  • The remaining panel button becomes Chat beside the document / 在文档旁边对话. It has data-center-split and aria-pressed, and it toggles the conversation beside the file. Opening the chat closes the right pane, as the old split button did.
  • Once the conversation is beside the file, its tools come back. On the conversation tab the button is the usual panel toggle.
  • Removed the status-bar split button and its center.split_short key.
  • Updated the matching row in docs/gpui-parity.md.

Files

  • ui/src/main.rs: topbar file-view class and the dual-role panel button; status-bar split button removed
  • ui/src/styles/chat.css: hides the conversation tools in file view
  • ui/src/i18n.rs: removed center.split_short
  • ui-tests/tests/visual-polish.spec.ts: file-view toolbar assertions
  • docs/gpui-parity.md

Tests

visual-polish.spec.ts now checks the following with a file open alone:

  • share, trajectory and archive are hidden
  • there is no "Toggle panel" button
  • the one toggle is named "Chat beside the document" and shows the panel icon
  • the status bar has no split button
  • toggling restores the conversation and its tools

Existing tests that click [data-center-split] (ui.spec.ts center split, document-select-all.spec.ts) now reach the toolbar button. Only cargo check --target wasm32-unknown-unknown was run locally; Playwright runs in CI.

Manual smoke

  1. Open a file in the center. The toolbar shows only the panel button.
  2. Click it. The chat appears beside the file, the right pane closes, and the conversation tools return.
  3. Click it again. The file is alone again.
  4. Switch to the conversation tab. The panel button opens the right pane as before.

Known limitations

While a file is shown alone, the right pane can't be opened from the toolbar. Switch to the conversation tab to open it.

🤖 Generated with Claude Code

A file alone in the center hides the conversation's toolbar tools
(views, outline, share, trajectory, archive, inbox, terminal); the panel
button then brings the conversation in beside the file, replacing the
status bar's separate Chat beside button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xuzhougeng
xuzhougeng merged commit 162fe0f into main Nov 24, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant