Extract split-pane layout into center-pane-split.tsx#800
Merged
Conversation
Move the ~80-line isSplit render block out of agents-view.tsx into a new presentational CenterPaneSplit component. Pure refactor: the JSX is unchanged and the terminal DOM node is still portaled into the shared split terminal slot; refs and layout effects stay in the parent. agents-view.tsx: 1006 -> 933 lines. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
What
Extract the ~80-line
isSplitrender block out ofagents-view.tsxinto a new presentationalCenterPaneSplitcomponent (apps/web/src/components/app/center-pane-split.tsx).Why this is tech debt
agents-view.tsxis one of the largest, most-frequently-touched web components (1006 lines). The split-pane JSX is a self-contained, purely presentational chunk that was inlined in the middle of the render tree, making the component harder to read. This is the "self-contained sub-component extraction" the tech-debt backlog recommended for this file — chosen over a risky big split of the WebSocket/terminal lifecycle.Change
CenterPaneSplitreceivessplitState, the three refs (splitLeftRef,splitButtonRef,splitTerminalSlotRef),changesElement,isMobile,onLayoutChange, andonExitSplit.agents-view.tsx.Split(lucide) andResizable*imports fromagents-view.tsx.agents-view.tsx: 1006 → 933 lines.Validation
pnpm run check✅pnpm run finalize:web✅pnpm run test:e2e✅ (168 passed, 13 skipped — terminal-live suite requires live mode)No behavior change.
Next run
Backlog: continue trimming
agents-view.tsx(933 lines) with another self-contained extraction (e.g. the bottom dialog cluster or the center-pane header toolbar), or do a fresh dead-code/duplication scan ofapps/server/srcandapps/web/src.🤖 Generated with Claude Code