Skip to content

Collapse Grok rotating working titles to stable label - #7863

Merged
AmethystLiang merged 1 commit into
mainfrom
grok-build-title-jumpy
Jul 9, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
grok-build-title-jumpy

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

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 lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

Note: Unit tests added in agent-status.test.ts and terminal-title-agent-type.test.ts verify 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 - grok pose 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.

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.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: cb80abff-cb10-4551-b3d5-86a8866bc2cc

📥 Commits

Reviewing files that changed from the base of the PR and between 29cbe2d and 961ed9a.

📒 Files selected for processing (4)
  • src/renderer/src/lib/agent-status.test.ts
  • src/shared/terminal-title-agent-type.test.ts
  • src/shared/terminal-title-agent-type.ts
  • src/shared/terminal-title-display.ts

📝 Walkthrough

Walkthrough

This change adds detection and normalization support for Grok agent terminal titles. A new exported helper, isGrokRotatingWorkingTitle, identifies rotating spinner-based Grok working titles using regex patterns matching Braille spinner glyphs with Grok identity suffixes. This helper is wired into normalizeTerminalTitle to collapse these rotating frames into a stable ⠋ Grok display label, whereas previously such titles passed through unchanged. Corresponding unit tests were added covering the helper's matching/non-matching behavior and the normalization output, including idempotency and idle-title cases.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: collapsing Grok rotating working titles to a stable label.
Description check ✅ Passed The description follows the required template and includes summary, screenshots, testing, AI review, security audit, and notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@AmethystLiang
AmethystLiang merged commit 2af8fb8 into main Jul 9, 2026
2 checks passed
Jinwoo-H added a commit that referenced this pull request Jul 9, 2026
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]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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.
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