Split the TUI root component into focused modules - #285
Merged
TheGreatAxios merged 14 commits intoAug 2, 2026
Merged
Conversation
TheGreatAxios
force-pushed
the
cl-4364-split-the-tui-root-component-into-focused-modules
branch
from
August 1, 2026 22:15
b18d53a to
aab0732
Compare
TheGreatAxios
marked this pull request as ready for review
August 2, 2026 03:49
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.
Summary
Splits
src/tui/app.tsxinto focused sibling hooks undersrc/tui/hooks/, along the seams: layout/scroll geometry, message pipeline, quota retry, image attach, command context, and drain logic (plus a provider-auth hook for Codex/xAI login and re-auth handling). This is pure code motion — no logic changes, no behavior changes.New files:
src/tui/hooks/use-quota-retry.tssrc/tui/hooks/use-image-attach.tssrc/tui/hooks/use-drain-logic.tssrc/tui/hooks/use-message-pipeline.tssrc/tui/hooks/use-command-context.tssrc/tui/hooks/use-transcript-layout.tssrc/tui/hooks/use-provider-auth.tssrc/tui/app.tsxdrops from 2409 to 1766 lines.src/tui/runner.tsx(including theCycleTextRecorderdispose/reset wiring) is untouched.Closes CL-4364
Verification
bun run typecheck— passesbun run build— passesbun test— 3565 pass, 0 fail, across 274 files (full suite, including the previously-flakytests/unit/tui/{app,use-scroll,onboarding,use-gates}suites, run both individually and as part of the full suite)