Improve mobile terminal mode and web sidebar layout#14
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR adds a terminal output formatting utility and refactors the chat screen to support responsive layout modes. A new module detects and collapses consecutive divider lines in terminal output while respecting configurable width constraints. The chat screen integrates this formatter and implements three layout modes—split view, terminal-only, and chat-only—using window dimensions and measured pane width. The sidebar container switches to fixed-width styling. ChangesTerminal Output Formatting and Chat Layout Modes
Sequence DiagramsequenceDiagram
participant User
participant ChatScreen
participant TerminalOutput
participant Layout
User->>ChatScreen: Toggle terminal view
ChatScreen->>ChatScreen: Measure window dimensions
ChatScreen->>ChatScreen: Read terminalPaneWidth state
ChatScreen->>ChatScreen: Derive canShowTerminal, canUseSplitView, showSplit
ChatScreen->>TerminalOutput: formatTerminalOutputForDisplay(output, { dividerWidth })
TerminalOutput->>TerminalOutput: Detect divider lines via isDividerLine
TerminalOutput->>TerminalOutput: Collapse consecutive dividers
TerminalOutput->>ChatScreen: Return formatted output
ChatScreen->>Layout: Render based on view mode (split/narrow/chat-only)
Layout->>User: Display terminal or chat or both
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
app/app/(main)/agent/[sessionId]/chat.tsxESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. app/components/ProjectSidebar.tsxESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. app/lib/terminal-output.test.tsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.
Comment |
Summary
Verification
Summary by CodeRabbit
New Features
UI Improvements