Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughScrollback sizing was changed from a fixed line-based clamp to a byte-budget estimate; the default scrollback limit was increased (10_000 → 10_000_000 bytes). Config parsing now normalizes integer literals with underscores. Debug scrollback seeding estimates UTF‑8 bytes-per-line and generates lines via an awk-based generator. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Sources/GhosttyConfig.swift`:
- Around line 256-257: When parsing the scrollback-limit, don't accept zero or
negative values from Self.parseIntegerLiteral; after obtaining limit in
GhosttyConfig (the code block that sets scrollbackLimit), validate that limit >
0 and only then assign scrollbackLimit, otherwise leave the default and treat
the input as invalid. Apply the same non-positive-value rejection to the other
parse site that uses Self.parseIntegerLiteral (the similar block around lines
320-323) so both parsed byte limits require limit > 0 before assignment.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8390b642-0767-4955-aeca-ce6c389b476b
📒 Files selected for processing (3)
Sources/AppDelegate.swiftSources/GhosttyConfig.swiftweb/app/[locale]/docs/configuration/page.tsx
Greptile SummaryThis PR corrects a fundamental unit mismatch: cmux was treating Ghostty's Confidence Score: 5/5Safe to merge; all findings are minor P2 style suggestions that do not affect correctness. The core fix is correct and isolated — scrollbackLimit is only consumed by the debug generator. No overflow, no injection risk, and the awk-based generator is sound. Both P2 comments are minor approximation notes and a clarifying comment suggestion, neither blocks merge. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["GhosttyConfig.parse()"] -->|"case scrollback-limit"| B["parseIntegerLiteral(value)\nStrip '_', parse Int"]
B -->|success| C["scrollbackLimit = bytes\n(default: 10_000_000)"]
B -->|failure| D["scrollbackLimit unchanged\n(silent no-op)"]
C --> E["openDebugScrollbackTab()"]
E --> F["doubledLimit = min(limit, 100M) × 2"]
F --> G["targetBytes = clamp(doubledLimit, 2M, 200M)"]
G --> H["lineCount = ⌈targetBytes / 18⌉, min 2000"]
H --> I["awk command sent to terminal\ngenerates lineCount lines"]
Reviews (1): Last reviewed commit: "Fix scrollback limit handling" | Re-trigger Greptile |
There was a problem hiding this comment.
1 issue found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="Sources/AppDelegate.swift">
<violation number="1" location="Sources/AppDelegate.swift:7817">
P2: Clamp `scrollbackLimit` to a non-negative range before doubling; current ordering can overflow on extreme negative config values.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8ec3a86. Configure here.
There was a problem hiding this comment.
2 issues found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="Sources/GhosttyConfig.swift">
<violation number="1" location="Sources/GhosttyConfig.swift:324">
P2: `parsed > 0` rejects `0`, so `scrollback-limit = 0` (which means "unlimited" in Ghostty) silently falls back to the 10MB default. The previous code accepted zero via `Int(value)`. Use `parsed >= 0` to preserve the semantics.</violation>
</file>
<file name="Sources/AppDelegate.swift">
<violation number="1" location="Sources/AppDelegate.swift:7823">
P1: Infinite loop: the `while true` convergence loop oscillates when the line count lands exactly at a digit-count boundary. For example, with `targetBytes ≈ 18M`, `digitCount=6` produces 1,000,000 lines (7 digits) and `digitCount=7` produces 947,369 lines (6 digits), bouncing forever. Add an iteration cap or break when `digitCount` revisits a previous value.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
Addressed the remaining review feedback in
Resolved the related review threads. |

Fixes #2879.
Summary
scrollback-limitas bytes in the local Ghostty config modelawkinstead of brace expansionscrollback-limitvalueTesting
./scripts/reload.sh --tag issue-2879-scrollback-limit-ignored --launchNote
Medium Risk
Changes the semantics and default of
scrollback-limit, which can affect runtime memory usage and user expectations if existing configs assumed lines. Also adjusts the debug scrollback generator command generation, so regressions would surface mainly in debug tooling and config parsing.Overview
Fixes
scrollback-limithandling to match Ghostty’s byte-based semantics by updating the local config model default to10_000_000bytes and allowing underscore-separated integer literals via a newparseIntegerLiteralparser.Updates the DEBUG large-scrollback tab generator to size output by target bytes (with 2MB–200MB bounds) and emit lines via a streamed
awkloop instead of shell brace expansion. Documentation is updated to show a byte-scalescrollback-limitexample value.Reviewed by Cursor Bugbot for commit 3856ffa. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Treat
scrollback-limitas bytes (not lines) and update the debug scrollback generator to size and stream by bytes. Fixes #2879 and aligns code and docs with Ghostty’s byte-based setting.scrollback-limitas bytes, default to10_000_000, allow underscores, ignore invalid/negative values.awk.scrollback-limit = 50000000).Written for commit 3856ffa. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Documentation