Skip to content

Fix cmux-tui startup config latency - #9738

Merged
lawrencecchen merged 31 commits into
mainfrom
task-uvx-npx-startup-latency
Aug 7, 2026
Merged

lawrencecchen merged 31 commits into
mainfrom
task-uvx-npx-startup-latency

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

cmux-tui startup no longer runs ghostty +show-config from config::load. It reads the user Ghostty config file directly, parses the color/cursor defaults we already support, and keeps the resolver parser path covered by tests without invoking an external process on startup.

The first commit adds a regression test that fails on main because load() executes the configured GHOSTTY_BIN. The second commit removes the startup subprocess path and makes that test pass.

Incident Notes

Benchmark harness: isolated UV_CACHE_DIR, UV_TOOL_DIR, UV_PYTHON_INSTALL_DIR, npm_config_cache, isolated XDG_RUNTIME_DIR, isolated cmux state roots, PTY first-draw detection. Baseline was taken before editing on main. Current-head package validation used local debug-size packages built from this branch, so cold package numbers include package-manager install work but are not release artifact size forecasts.

Baseline public package samples on main:

path n median p90 max
uvx cmux --help cold 7 2397 ms 2730 ms 2744 ms
npx cmux --help cold 7 907 ms 923 ms 983 ms
uvx cmux --help warm 15 214 ms 226 ms 234 ms
npx cmux --help warm 15 289 ms 345 ms 357 ms
direct PyPI console script help 15 40 ms 45 ms 47 ms
direct npm node shim help 15 35 ms 39 ms 40 ms
direct Rust help 15 4 to 7 ms median by package binary 7 to 8 ms 7 to 9 ms
uvx cmux warm first draw 9 8634 ms 8850 ms 9042 ms
npx cmux warm first draw 9 9007 ms 9051 ms 9157 ms
direct Rust warm first draw 9 8624 ms 8632 ms 8649 ms

Current-head local package samples:

path n median p90 max
local uvx --from <wheel> cmux --help cold 5 1468 ms 1471 ms 1471 ms
local npx --package file:<pkg> cmux --help cold 5 3267 ms 3358 ms 3358 ms
local uvx --from <wheel> cmux --help warm 9 52 ms 65 ms 65 ms
local npx --package file:<pkg> cmux --help warm 9 237 ms 409 ms 477 ms
direct PyPI console script help 9 33 ms 34 ms 36 ms
direct npm node shim help 9 37 ms 46 ms 104 ms
direct Rust help 9 7 ms 9 ms 991 ms outlier
local uvx --from <wheel> cmux cold first draw 5 1626 ms 1668 ms 1668 ms
local npx --package file:<pkg> cmux cold first draw 5 3720 ms 5706 ms 5706 ms
local uvx --from <wheel> cmux warm first draw 9 91 ms 96 ms 102 ms
local npx --package file:<pkg> cmux warm first draw 9 299 ms 368 ms 431 ms
direct Rust warm first draw 9 40 ms 48 ms 52 ms

Decomposition:

  • Package-manager cold work is real and still visible: baseline registry uvx cold help was 2.4 s median, baseline registry npx cold help was 0.9 s median. Local debug packages are not size-comparable to release packages, but they keep package-manager install work in the measured path.
  • Warm package-manager and launcher overhead is bounded: current warm uvx local help is 52 ms median versus 33 ms direct console script; current warm npx local help is 237 ms median versus 37 ms direct node shim.
  • Rust process startup is not the owner: direct --help stays around 7 ms median, with one scheduler outlier at 991 ms.
  • Daemon/saved-state recovery was not the owner for this incident: sampling a slow launch stopped in config::load, before terminal recovery completed.
  • Time until terminal usable was owned by eager config resolution: warm first draw went from 8.6 to 9.0 s median to 91 ms for local uvx, 299 ms for local npx, and 40 ms direct.

Tests

  • CARGO_TARGET_DIR=/tmp/cmux-tui-startup-latency-target rustup run 1.94.0 cargo test -p cmux-tui ghostty -- --nocapture
  • CARGO_TARGET_DIR=/tmp/cmux-tui-startup-latency-target rustup run 1.94.0 cargo test -p cmux-tui load_uses_file_ghostty_defaults_without_invoking_external_resolver -- --nocapture
  • CARGO_TARGET_DIR=/tmp/cmux-tui-startup-latency-target rustup run 1.94.0 cargo build -p cmux-tui --bin cmux-tui

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Speed up cmux-tui startup by resolving Ghostty defaults with an in-binary, self-reexec helper instead of calling ghostty +show-config. Warm launch is ~90 ms via uvx, ~300 ms via npx, and ~40 ms direct.

  • Bug Fixes

    • Add __ghostty-config-defaults helper with a ~250 ms budget, bounded stdout drains, bounded descendant scan, and process‑group kill/reap; prints fg/bg/cursor/blink/palette.
    • Startup never invokes an external Ghostty resolver (GHOSTTY_BIN); on helper miss, fall back to bounded file parsing; on timeout, skip fallback to keep startup bounded.
    • Match Ghostty file semantics: bounded includes with ~ and optional ?, deferred theme resolution, preserve resource themes, explicit overrides beat themes, first resolvable theme wins; cursor-style = block_hollow; window-theme supports light/dark/system/auto; select light/dark from system appearance on macOS and Linux/BSD; skip probes when window-theme is fixed.
    • Prefer Ghostty theme env (if set) before desktop appearance probes; cache conditional theme mode to avoid repeated probes and keep launches consistent.
    • Harden helper entrypoint and isolate desktop probes; scrub provider secret env vars before probing.
  • Dependencies

    • Add wait-timeout to bound the helper process and reads.

Written for commit b423d56. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes

    • Ghostty configuration defaults now load reliably from readable configuration files and included files.
    • Conditional light and dark theme selections are handled correctly during startup.
    • Theme settings from files and bundled resources are detected more consistently.
    • Circular configuration includes are prevented from causing startup issues.
    • Startup no longer depends on an external Ghostty configuration command, reducing related delays and failures.
  • Refactor

    • Simplified configuration loading and parsing for more consistent startup behavior.

Note

Medium Risk
Large change to startup config resolution with subprocess timeouts, process-group kills, and desktop appearance probes; wrong defaults or hung children could affect every launch, but behavior is heavily tested and bounded.

Overview
Startup no longer shells out to ghostty +show-config (or GHOSTTY_BIN) during config::load. Terminal colors and cursor defaults come from a self-reexec path __ghostty-config-defaults that parses Ghostty config files inside the same binary, with a ~250 ms parse budget and ~500 ms parent wait via wait-timeout.

The helper serializes resolved fg/bg/cursor/palette lines on stdout; the main process prefers that result, falls back to the same bounded file parser on failure, and on helper timeout skips file fallback so startup stays bounded. Process cleanup uses isolated process groups, capped stdout reads, optional ps descendant scan, and scrubs provider secret env vars before any desktop theme probes.

File parsing now matches more Ghostty behavior: config-file includes (depth/file/byte limits), deferred theme resolution, first successful theme, light/dark conditional themes from system appearance (macOS / Linux desktop probes with short deadlines), cursor-style = block_hollow, and explicit overrides winning over themes. main handles the helper argv early; CLI tests assert no external resolver at startup and correct helper output.

Reviewed by Cursor Bugbot for commit b423d56. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Ghostty defaults now load directly from readable configuration files. The loader supports recursive includes, cycle prevention, overlay ordering, conditional themes, and resource theme lookup. Unix tests verify startup behavior without external resolver execution.

Changes

Ghostty configuration loading

Layer / File(s) Summary
Local Ghostty default resolution
cmux-tui/crates/cmux-tui/src/config.rs
Ghostty defaults now load from the first readable config file. Recursive config-file includes use overlay ordering and canonical-path cycle prevention. Production resolver execution and related runtime dependencies were removed.
Conditional theme selection
cmux-tui/crates/cmux-tui/src/config.rs
Theme loading now parses complete light and dark entries with : or = separators. It selects the active theme mode before path resolution and falls back for malformed values.
Startup behavior validation
cmux-tui/crates/cmux-tui/src/config.rs
Unix tests cover direct files, resource themes, included configurations, unreadable-theme fallback, conditional theme selection, and prevention of external resolver execution.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Startup
  participant GhosttyConfig
  participant ThemeFile
  Startup->>GhosttyConfig: Load first readable config file
  GhosttyConfig->>GhosttyConfig: Parse includes and select conditional theme
  GhosttyConfig->>ThemeFile: Read selected theme
  ThemeFile-->>Startup: Return foreground, background, and palette values
Loading
🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 76.92% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Swift Actor Isolation ✅ Passed The PR diff contains only the Rust file cmux-tui/crates/cmux-tui/src/config.rs; it contains no Swift changes or actor-isolation markers.
Cmux Swift Blocking Runtime ✅ Passed The PR diff changes only cmux-tui Rust config.rs; it introduces no production Swift changes covered by the blocking-runtime check.
Cmux Browser Automation Off-Main ✅ Passed The PR changes only cmux-tui/config.rs; both rule-scoped Swift files are byte-identical at base and tip, so it adds no browser socket automation change or off-main wait.
Cmux Expensive Synchronous Load ✅ Passed The PR changes only one Rust file, cmux-tui/crates/cmux-tui/src/config.rs; it adds no production Swift changes or agent-history loads covered by this Swift-specific rule.
Cmux Cache Substitution Correctness ✅ Passed The PR diff changes only cmux-tui/crates/cmux-tui/src/config.rs, a Rust file; it contains no production Swift, TypeScript, or JavaScript changes covered by this check.
Cmux No Hacky Sleeps ✅ Passed The PR changes only config.rs (Rust); the rule covers TypeScript, JavaScript, shell, and non-Swift build/runtime scripts, with no covered delay additions.
Cmux Algorithmic Complexity ✅ Passed The new startup parser performs a linear include traversal with a HashSet, and only scans bounded config/theme-directory candidates; no nested scalable-collection scan was introduced.
Cmux Swift Concurrency ✅ Passed The full PR range changes only cmux-tui/crates/cmux-tui/src/config.rs, a Rust file; it introduces no cmux-owned Swift code or Swift concurrency patterns.
Cmux Swift @Concurrent ✅ Passed The PR-range diff changes only cmux-tui Rust config.rs; it adds no Swift files or Swift concurrency constructs, so this check is not applicable.
Cmux Swift Package Boundaries ✅ Passed The cumulative PR diff changes only cmux-tui/crates/cmux-tui/src/config.rs; it contains no Swift paths or Swift hunks, so Swift package boundaries are not implicated.
Cmux Swiftpm Lockfiles ✅ Passed The PR diff from main to HEAD changes only cmux-tui/crates/cmux-tui/src/config.rs; it contains no SwiftPM, Xcode project, .gitignore, workflow, or dependency changes.
Cmux Swift Logging ✅ Passed The full PR diff against origin/main changes only cmux-tui/src/config.rs; it contains no Swift paths or added Swift logging statements.
Cmux User-Facing Error Privacy ✅ Passed The production diff changes Ghostty file parsing and removes startup resolution; it adds no user-facing errors, alerts, command output, or exposed diagnostic payloads. Resolver and environment-vari...
Cmux Full Internationalization ✅ Passed The only changed file is Rust Ghostty config parsing; production additions contain config/env tokens, while new prose is comments or tests. No user-facing text or localization/catalog/web entries c...
Cmux Swiftui State Layout ✅ Passed The pull request changes only cmux-tui/crates/cmux-tui/src/config.rs; it contains no Swift or SwiftUI changes covered by this check.
Cmux Architecture Rethink ✅ Passed The diff changes only Rust config.rs and contains no Swift files or Swift lifecycle code, so the Swift-specific architectural check does not apply.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed The PR changes only cmux-tui/crates/cmux-tui/src/config.rs; the parent-to-head diff contains no Swift window code or auxiliary-window shortcut changes, so the check is not applicable.
Cmux Source Artifacts ✅ Passed The PR changes only the tracked Rust source file cmux-tui/crates/cmux-tui/src/config.rs; no artifact-like paths, added files, binaries, logs, or generated output appear in the diff.
Cmux No Test Or Debug Seam In Production Source ✅ Passed The full PR range changes only cmux-tui/crates/cmux-tui/src/config.rs; it adds no Swift files under production Sources/, so this rule is not applicable.
Cmux No Ambient Global State ✅ Passed The diff changes only cmux-tui/crates/cmux-tui/src/config.rs, a Rust file; it contains no production Swift changes, so this Swift-only check is not applicable.
Title check ✅ Passed The title clearly summarizes the main change: reducing cmux-tui startup latency caused by Ghostty configuration resolution.
Description check ✅ Passed The description explains the change, motivation, performance impact, and testing, but omits the template checklist, review trigger, and demo video.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task-uvx-npx-startup-latency

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmux-tui/crates/cmux-tui/src/config.rs`:
- Around line 3224-3227: Update the test setup around the environment-variable
saves and the load call to also save, remove, and restore CMUX_TUI_CONFIG
alongside CMUX_MUX_CONFIG and the other process-global variables, ensuring load
uses the temporary Ghostty configuration path.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 57817b3b-8e44-40d3-99e4-c5763a4946f4

📥 Commits

Reviewing files that changed from the base of the PR and between 07322a4 and 49eaccf.

📒 Files selected for processing (1)
  • cmux-tui/crates/cmux-tui/src/config.rs

Comment thread cmux-tui/crates/cmux-tui/src/config.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
cmux-tui/crates/cmux-tui/src/config.rs (2)

2779-2810: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Select the conditional Ghostty theme based on system appearance.

selected_conditional_ghostty_theme accepts both light and dark entries but always returns light, so conditional themes are resolved incorrectly for dark-mode users. Use an authoritative system appearance source to select the matching entry, and fail closed when that source is unavailable. Update the Unix resolver test to cover both appearance values.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmux-tui/crates/cmux-tui/src/config.rs` around lines 2779 - 2810, Update
selected_conditional_ghostty_theme to query the authoritative system appearance
source and return the matching light or dark theme, rather than always returning
light; return None when appearance detection is unavailable. Extend the Unix
resolver test to cover both light- and dark-mode selections.

Source: Coding guidelines


2633-2636: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Use Ghostty’s resolved config for startup defaults.

ghostty_config_paths() is only a candidate list, but ghostty_defaults() parses the first readable candidate file and stops. Ghostty can layer several config files and handles config-file includes with later values winning, or it can choose a different value through dynamic theme selection. Use Ghostty’s resolved application defaults as the source of truth and apply the file-only fallback only when the resolver is unavailable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmux-tui/crates/cmux-tui/src/config.rs` around lines 2633 - 2636, Update the
startup defaults logic surrounding ghostty_defaults() to use Ghostty’s resolved
application defaults as the primary source, preserving layered config-file
includes, later-value precedence, and dynamic theme selection. Only invoke the
existing ghostty_config_paths()/parse_ghostty_defaults fallback when the
resolver is unavailable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@cmux-tui/crates/cmux-tui/src/config.rs`:
- Around line 2779-2810: Update selected_conditional_ghostty_theme to query the
authoritative system appearance source and return the matching light or dark
theme, rather than always returning light; return None when appearance detection
is unavailable. Extend the Unix resolver test to cover both light- and dark-mode
selections.
- Around line 2633-2636: Update the startup defaults logic surrounding
ghostty_defaults() to use Ghostty’s resolved application defaults as the primary
source, preserving layered config-file includes, later-value precedence, and
dynamic theme selection. Only invoke the existing
ghostty_config_paths()/parse_ghostty_defaults fallback when the resolver is
unavailable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 80f114af-338e-42b4-ae97-a4cd1cd2e85a

📥 Commits

Reviewing files that changed from the base of the PR and between c7dd8c4 and 0db3a70.

📒 Files selected for processing (1)
  • cmux-tui/crates/cmux-tui/src/config.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmux-tui/crates/cmux-tui/src/config.rs`:
- Around line 2713-2721: In the configuration-loading flow around
parse_ghostty_config_text and parse_ghostty_config_file, defer resolving the
root conditional theme until all included files have updated the effective
theme_mode, so an included window-theme = dark selects the dark root theme.
Preserve default overlays and add the regression test
load_applies_ghostty_config_file_after_root_and_respects_dark_theme_mode
covering a root conditional theme with an included mode.
- Around line 2633-2635: Update the Ghostty defaults loading around
parse_ghostty_defaults_from_path to discover Ghostty’s current ordered
config.ghostty candidates, including the com.mitchellh.幽灵ghostty location,
rather than only legacy config paths. Replace find_map’s first-match behavior
with ordered parsing and overlay of every readable candidate, preserving
later-file precedence before applying application defaults.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5e3452a7-db94-4386-928c-5fd8f10b44f5

📥 Commits

Reviewing files that changed from the base of the PR and between 0db3a70 and d404bf2.

📒 Files selected for processing (1)
  • cmux-tui/crates/cmux-tui/src/config.rs

Comment thread cmux-tui/crates/cmux-tui/src/config.rs Outdated
Comment thread cmux-tui/crates/cmux-tui/src/config.rs Outdated
Comment thread cmux-tui/crates/cmux-tui/src/config.rs Outdated
Comment thread cmux-tui/crates/cmux-tui/src/config.rs
Comment thread cmux-tui/crates/cmux-tui/src/config.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
cmux-tui/crates/cmux-tui/src/config.rs (2)

2882-2889: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Process config-file in order, not after the full file.

config-file is parsed into config_files and applied after all lines in the current file, so settings after the directive cannot override included values. Ghostty processes included config at the directive’s position.

Apply each include before parsing the remaining lines of the current file so later root keys still win.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmux-tui/crates/cmux-tui/src/config.rs` around lines 2882 - 2889, Update the
config parsing flow around the config-file match and its surrounding loop so
each GhosttyConfigFile include is parsed and applied immediately at the
directive’s position, rather than queued in config_files for later application.
Preserve input order so keys encountered after the include in the current file
override included settings.

2874-2906: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Drive conditional theme selection from system appearance, not window-theme.

theme = light:X,dark:Y selects the terminal content color palette by system appearance. window-theme controls window chrome only, with values such as light and dark already distinct from theme branch selection. This code writes window-theme into the mode that load_ghostty_theme uses for the light:/dark: branches, so window-theme = light can load the dark terminal palette on a dark appearance. Keep window-theme for chrome resolution and use the detected system appearance for conditional palette selection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmux-tui/crates/cmux-tui/src/config.rs` around lines 2874 - 2906, Update the
theme-loading flow in the parsed Ghostty configuration so load_ghostty_theme
selects light:/dark: branches using the detected system appearance, not
theme_mode populated by parse_ghostty_window_theme. Preserve theme_mode for
window chrome resolution and continue parsing window-theme independently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmux-tui/crates/cmux-tui/src/config.rs`:
- Around line 3685-3729: Add a regression test alongside ghostty configuration
parsing tests that creates two config files which include each other via
config-file, then invokes parse_ghostty_defaults_from_path or the relevant
parse_ghostty_config_file entry point. Assert parsing returns successfully and
that representative keys from both files are applied exactly once, covering the
loaded-set cycle guard without changing production logic.
- Around line 2762-2792: Document at the call site where
GhosttyThemeMode::detect is consumed that its result is a non-authoritative,
cosmetic hint used only to select terminal colors. Keep the detection logic
unchanged and place the clarification adjacent to the invocation so future
callers do not treat it as a correctness-critical decision.

---

Outside diff comments:
In `@cmux-tui/crates/cmux-tui/src/config.rs`:
- Around line 2882-2889: Update the config parsing flow around the config-file
match and its surrounding loop so each GhosttyConfigFile include is parsed and
applied immediately at the directive’s position, rather than queued in
config_files for later application. Preserve input order so keys encountered
after the include in the current file override included settings.
- Around line 2874-2906: Update the theme-loading flow in the parsed Ghostty
configuration so load_ghostty_theme selects light:/dark: branches using the
detected system appearance, not theme_mode populated by
parse_ghostty_window_theme. Preserve theme_mode for window chrome resolution and
continue parsing window-theme independently.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e1a77785-2c08-42e9-ae8a-c893d1eea588

📥 Commits

Reviewing files that changed from the base of the PR and between d404bf2 and 6ca536d.

📒 Files selected for processing (1)
  • cmux-tui/crates/cmux-tui/src/config.rs

Comment thread cmux-tui/crates/cmux-tui/src/config.rs Outdated
Comment thread cmux-tui/crates/cmux-tui/src/config.rs
Comment thread cmux-tui/crates/cmux-tui/src/config.rs Outdated
@socket-security

socket-security Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​wait-timeout@​0.2.110010093100100

View full report

Comment thread cmux-tui/crates/cmux-tui/src/config.rs Outdated
Comment thread cmux-tui/crates/cmux-tui/src/config.rs Outdated
Comment thread cmux-tui/crates/cmux-tui/src/config.rs
@lawrencecchen
lawrencecchen force-pushed the task-uvx-npx-startup-latency branch from 0ab474f to 643c688 Compare August 7, 2026 05:22
Comment thread cmux-tui/crates/cmux-tui/src/config.rs
@lawrencecchen
lawrencecchen force-pushed the task-uvx-npx-startup-latency branch from 6fa249d to ad52218 Compare August 7, 2026 07:05
@lawrencecchen
lawrencecchen force-pushed the task-uvx-npx-startup-latency branch from ad52218 to cbc0df0 Compare August 7, 2026 07:12
Comment thread cmux-tui/crates/cmux-tui/src/config.rs Outdated
Comment thread cmux-tui/crates/cmux-tui/src/config.rs
Comment thread cmux-tui/crates/cmux-tui/src/config.rs
Comment thread cmux-tui/crates/cmux-tui/src/config.rs
Comment thread cmux-tui/crates/cmux-tui/src/config.rs
Comment thread cmux-tui/crates/cmux-tui/src/config.rs Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f04599d. Configure here.

Comment thread cmux-tui/crates/cmux-tui/src/config.rs
@lawrencecchen
lawrencecchen merged commit 6089fa0 into main Aug 7, 2026
24 checks passed
@lawrencecchen
lawrencecchen deleted the task-uvx-npx-startup-latency branch August 7, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant