Repository navigation
feat(desktop): dock the terminal to the right, and let it fill the window - #1601
Merged
Merged
Conversation
…ndow The terminal panel only ever drew one way: a row under the conversation and the files panel. It now has the two placements a workbench terminal has — the same row, or a column between the conversation and the files panel — plus a maximized state that gives it the whole content area. - `useTerminalPanel` keeps the dock, a width and a height (the two docks size on different axes), and the maximize state. Dock and sizes are window-level preferences, persisted with the open-per-conversation map; maximizing is session state and is dropped when the panel closes, so reopening gives the layout it was docked in. A right dock is only *effective* when the window can host the column beside the conversation's floor — the stored choice is kept and comes back when the window grows, and the header hides the dock button while it cannot be honoured rather than offering an inert control. - `TerminalPanelShell` draws the size, border and resize grip for the edge it is attached to, and gains the two header buttons. Both owners (this machine's shells and a paired desktop's) go through the same shell, so a dock and a maximize work on either. - `AppShell` builds one panel element and places it: the bottom row, the column after the conversation, or — maximized — the content column with the conversation and files panel `hidden` but still mounted, so returning to them keeps the transcript, its scroll position and the draft. The right column is reserved in the two clamps that could otherwise squeeze the conversation (`useTerminalPanel`'s `reservedWidth`, `useRightPanelWidth`'s `reserveRight`). - The screenshot harness gains `terminal-right` and `terminal-maximized`, which measure the panel's rect, the conversation's width and the grip's axis, and `?terminal=reset` so both frames start from the same layout instead of from whatever the previous run left docked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The desktop terminal panel could only sit in one place: a row under the conversation and the files panel. This PR gives it the two placements a workbench terminal has — the bottom row or a column between the conversation and the files panel — plus a maximized state that hands it the whole content area. Both owners of the panel (this machine's shells and a paired desktop's) go through the same shell, so a dock and a maximize work on either.
Commits
feat(desktop): dock the terminal to the right, and let it fill the window—useTerminalPanelkeeps the dock, a width and a height (the two docks size on different axes) and the maximize state;TerminalPanelShelldraws size, border and resize grip for the edge it is attached to;AppShellbuilds one panel element and places it in the bottom row, the right column, or the whole content column. The right column is reserved in the two clamps that could otherwise squeeze the conversation (reservedWidth,useRightPanelWidth'sreserveRight).Verification
Run in a detached worktree at
32b450f8ewith the workspacenode_moduleslinked from the main checkout (ulimit -n 8192):npx tsc --noEmit(desktop) — cleannpx eslinton the six changed sources — cleannpx vitest run(desktop, full) — 426 files / 6041 tests passednpx vitest runon the six changed test files — 212 tests passedmake check-docs— 417 docs OK, 0 pairs pending, provider matrix 13 rows OKNo Rust crate is touched, so no cargo run was needed.
User-visible changes
hidden, so restoring keeps the transcript, its scroll position and the draft.a2ebb3e1arestores the previous bottom-row-only behaviour; no stored preference becomes invalid (the dock field simply stops being read).Notes
None: no migration, no feature flag, no default value of an existing setting changes.