feat(annotate): Make Agent TUI placement configurable#1050
Open
leoreisdias wants to merge 1 commit into
Open
Conversation
bc61cf4 to
e7d1d1b
Compare
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.
Context
The annotate-mode Agent TUI is currently fixed to the left side of the document. This makes it awkward for people who expect agent controls beside Ask AI and annotations on the right.
This PR adds a persisted Left/Right position control to the terminal's Display popover. Left remains the default. When docked right, the terminal occupies the existing Ask AI/Annotations slot instead of adding a fourth column.
What changed
GIF
Review focus
The important invariant is that changing layout must not tear down the active PTY.
agentTerminalPanelremains one keyed React element and moves between the left and right insertion points.The other area worth checking is right-slot coordination: a visible right-docked terminal suppresses Ask AI/Annotations, while opening either panel hides—but does not stop—the terminal. Below the desktop breakpoint, the terminal remains mounted and the normal right panel stays available.
Test plan
bun test packages/ui/utils/annotateAgentTerminal.test.ts packages/editor/agentTerminalIntegration.test.tsPATH="$PWD/packages/ui/node_modules/.bin:$PATH" bun run typecheckbun run --cwd apps/review build && bun run build:hooklgresponsive fallback