feat: make headless terminal size configurable - #2829
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe server now supports configurable headless terminal dimensions. Defaults are 120 columns by 40 rows. Configuration validation, live reloads, runtime sizing, documentation, and integration tests cover the behavior. ChangesHeadless terminal sizing
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The PR adds configurable sizing for headless terminals while preserving attached-client and detached PTY behavior; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Config
participant AppState
participant HeadlessServer
participant PanePTY
Config->>AppState: Load headless_cols and headless_rows
AppState->>HeadlessServer: Provide headless_size
HeadlessServer->>PanePTY: Apply effective_size without a client
Config->>AppState: Reload server dimensions
AppState->>HeadlessServer: Refresh headless_size
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThe PR adds reloadable headless terminal dimensions while retaining attached-client authority and preserving existing PTY sizes after detach.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/server/headless.rs | Propagates configured fallback dimensions into the headless server and safely recomputes detached view geometry without resizing existing PTYs. |
| src/app/state.rs | Stores the configured headless size and uses it when no computed pane geometry exists. |
| src/app/mod.rs | Initializes and reloads headless dimensions while retaining current values when the server section is invalid. |
| src/config.rs | Adds defaults and nonzero validation for headless terminal dimensions. |
| src/config/io.rs | Registers and live-loads the new top-level server configuration section. |
| src/config/model.rs | Defines the server configuration model, defaults, parsing coverage, and validation tests. |
| tests/detach_reattach.rs | Adds real-PTY coverage for initial headless creation and creation after detaching a differently sized client. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
Config[server.headless_cols / headless_rows] --> State[AppState headless_size]
State --> Server[HeadlessServer headless_size]
Client{Client attached?}
Client -->|Yes| Attached[Use attached-client geometry]
Client -->|No| Headless[Recompute virtual headless layout]
Headless --> NewPane[Seed newly created pane PTY]
Attached --> ExistingPTY[Resize shared attached runtime]
Headless -. no resize .-> ExistingPTY
Reviews (5): Last reviewed commit: "Merge branch 'master' into issue/2828-he..." | Re-trigger Greptile
f765603 to
20cf796
Compare
20cf796 to
f533492
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: fc41ed59-d8ab-484e-b5ff-148adb7bb8a5
📒 Files selected for processing (2)
src/server/headless.rstests/detach_reattach.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- src/server/headless.rs
f533492 to
f8125c4
Compare
Summary
server.headless_colsandserver.headless_rowssettingsRefs #2828.
Validation
just checkjust bench-render-scale