Repository navigation
Collapse Grok rotating working titles to stable label - #7863
Conversation
Grok Build's working OSC titles interpolate a rotating status or tool phrase between the spinner and its name, causing tab and sidebar titles to fluctuate rapidly. Collapse these working frames to a stable "⠋ Grok" label, while leaving idle and session titles untouched.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis change adds detection and normalization support for Grok agent terminal titles. A new exported helper, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
36 commits from main incl. the v1.4.130 release. Two conflicts, both the branch-guide pattern (our restructured shape wins; main's new semantics graft in): - pty-dispatcher.ts (eager-buffer exitHandler): kept our releaseDeliveryInterest() (hidden-delivery-gate ref-count invariant) AND grafted main's identity guard (#7894 detach/attach remount race) around the handler deletions. - orca-runtime.ts: (1) kept our isCursorNativeAgentTitle import; (2) OSC-title path — kept our 4-arg trackHeadlessTerminalData(...forwardQueryReplies) and the shared per-PTY title tracker, dropped main's superseded inline OSC extraction. Grafting main's #7863 Grok/#7880 Pi title-normalization required a real fix, not just keeping our block: the runtime's normalizeTerminalTitle re-export chain (agent-detection → agent-title-status.ts) lacked the Grok-collapse branch main added to the sibling terminal-title-display.ts impl. Added isGrokRotatingWorkingTitle collapsing to agent-title-status.ts and made applyTrackedPtyTitle store the NORMALIZED title (matching main's inline block) — restores 4 Grok/Pi runtime tests. Gates: typecheck 0 errors; lint 0 errors; terminal-pane+ipc/pty+daemon+pane-manager 4574 passed; runtime+renderer-runtime+shared 4063 passed / 0 failed. Co-authored-by: Orca <[email protected]>
Grok Build's working OSC titles interpolate a rotating status or tool phrase between the spinner and its name, causing tab and sidebar titles to fluctuate rapidly. Collapse these working frames to a stable "⠋ Grok" label, while leaving idle and session titles untouched.
Summary
Collapses Grok Build's rotating working terminal titles (e.g.,
⠋ - Waiting for response… - grok,⠴ - Thinking - grok) to a single stable label (⠋ Grok). This prevents tab and sidebar labels from constantly jumping/flickering during agent execution. Idle/session titles and task text containing "grok" are preserved.Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildNote: Unit tests added in
agent-status.test.tsandterminal-title-agent-type.test.tsverify both matching and non-matching lookalike/idle titles.AI Review Report
Reviewed regex pattern matches for Grok's working titles to ensure that general task texts ending in or referencing "grok" are not inadvertently collapsed. Confirmed cross-platform compatibility: Unicode spinner character logic and string processing are fully platform-agnostic across macOS, Linux, and Windows.
Security Audit
Reviewed terminal title input parsing. The bounded regular expressions used to match the suffix
- grokpose no security or ReDoS risk. No IPC, auth, or command execution channels are touched.Notes
The collapsed representation is fully idempotent and remains stable upon subsequent normalizations.