Skip to content

Document terminal title evidence cleanup plan - #7452

Closed
brennanb2025 wants to merge 3 commits into
mainfrom
brennanb2025/terminal-title-evidence-plan
Closed

brennanb2025 wants to merge 3 commits into
mainfrom
brennanb2025/terminal-title-evidence-plan

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a focused plan for replacing ad hoc terminal title authority with typed title, owner, activity, and renderer-policy decisions.
  • Inventories the current title/agent/rendering consumers affected by [Bug]: mid session flicker on terminal window #7428: tab labels, tab identity, sidebar status, smart ordering, title-derived rows, send targets, Native Chat, cleanup safety, prompt-cache seeding, synthetic titles, and GPU policy.
  • Defines reliability invariants, phased rollout, migration gates, validation matrix, and performance guardrails for future implementation PRs.

Scope

This is a planning PR only. It does not change runtime behavior or implement the resolver layer.

Screenshots

Not applicable; documentation-only change with no visible UI behavior.

Testing Checklist

AI Review Report

  • Ran an independent read-only audit of current title/identity/rendering pipelines.
  • Ran a second design review of the plan; addressed findings by adding missing consumers, splitting confidence/source per decision, adding renderer-policy precedence, adding a direct-import migration gate, and adding per-PR process checkpoints.
  • Addressed CodeRabbit doc feedback by normalizing status taxonomy and clarifying explicit GPU on precedence.
  • Cross-platform review confirmation: the plan explicitly covers local macOS/Linux/Windows foreground-process differences, Linux/WebGL auto policy, Windows/GPU crash containment, SSH/remote runtime absence of local foreground-process evidence, and WSL/remote fallback expectations.

Security Audit

Documentation-only change. No new IPC, subprocess, storage, network, shell, credential, or telemetry behavior.

Notes

  • Future implementation PRs must run the automated/manual matrix named in the plan before claiming readiness.
  • No live Electron, SSH, or renderer validation was run for this docs-only PR.

Plan Verification Pass (2026-07-05)

  • Audited every file, function, store map, and test gate the plan names against the current tree: all exist; three descriptions corrected (internal applyObservedTerminalTitle closure, the claude→openclaude hook-payload shim, and resolveExplicitTerminalTitleAgentType living in terminal-title-agent-type.ts, not agent-detection.ts).
  • Recorded the verified Phase 2 call-site baseline as an appendix, with audit-scoping caveats: getAgentLabel is a name collision (match on import source), Native Chat is an identity consumer (not status), and detectAgentStatusFromTitle has main-process authority call sites (agent-detector.ts, orca-runtime.ts) that the renderer-scoped gate must slice or allowlist explicitly.
  • Confirmed the perf-sensitive Phase 1 facts: the Gemini GPU toggle is a single call site and title writes flow only through updateTabTitle/setRuntimePaneTitle.
  • Implementation has begun: PR 1 is Gate the Gemini GPU fallback on pane-owner evidence instead of raw title text (title evidence plan, PR 1) #7458, stacked on this branch.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This pull request adds docs/reference/terminal-title-evidence-plan.md, a planning document for restricting how terminal-title text affects agent identity, activity status, and renderer decisions. It documents current evidence flows, source-of-truth expectations, invariants, a typed resolver model, phased implementation steps, validation gates, risks, non-goals, rollout guidance, and a baseline inventory. No code or public API changes are included.

Changes

Cohort / File(s) Change Summary
Documentation — docs/reference/terminal-title-evidence-plan.md New plan document covering current flows, invariants, resolver design, phased rollout, validation, risks, and rollout checklist.

Sequence Diagram(s)

Not applicable — this change is documentation-only.

Related issues: #7428, #7447

Related PRs: None identified

Suggested labels: documentation

Suggested reviewers: None identified

Poem
A title once could steer the view,
Now evidence must see things through,
The plan lays out the path ahead,
With rules for what each signal said.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly matches the PR’s main change: documenting a terminal title cleanup plan.
Description check ✅ Passed The description covers the required sections and contains sufficient detail for a docs-only planning PR.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
docs/reference/terminal-title-evidence-plan.md (2)

119-126: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Normalize the status taxonomy.

This section mixes lifecycle terms (done/active/inactive) with the terminal-title activity states used elsewhere (working/permission/idle), so Phase 2 implementers could wire the wrong enum. Split the ordering from the activity model or define the canonical status set here.


240-252: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Clarify GPU precedence for explicit on.

The wording says on enables GPU, but the Gemini fallback later says it may disable GPU for genuine Gemini terminals. That makes the contract ambiguous and could let title evidence override an explicit user setting. State the intended precedence explicitly.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2ecdf84c-d17c-462b-a8df-2b9a4da9b86b

📥 Commits

Reviewing files that changed from the base of the PR and between 72a2380 and bc39e98.

📒 Files selected for processing (1)
  • docs/reference/terminal-title-evidence-plan.md

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Follow-up review feedback is addressed: the plan now separates title activity from surface status taxonomy, clarifies explicit GPU on precedence, and the PR description now includes cross-platform confirmation plus the testing checklist.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Readiness pass before implementation starts: audited every file, function, store map, and test gate the plan names against the current tree — all exist. Recorded the verified Phase 2 call-site baseline as an appendix and fixed three findings the audit surfaced:

  • getAgentLabel is a name collision (an unrelated display helper lives in agent-catalog.tsx), so the migration audit must match on import source, not bare identifier.
  • Native Chat is an identity consumer via resolveTabAgentFromTitle, not a detectAgentStatusFromTitle status consumer — reclassified in the Phase 2 list.
  • detectAgentStatusFromTitle also has main-process authority call sites (src/main/stats/agent-detector.ts, multiple in src/main/runtime/orca-runtime.ts), which the renderer-scoped Phase 2 gate can't reach — the gate now requires migrating them in their own slice or carrying them on the allowlist with an owner.

Also confirmed the perf-sensitive facts Phase 1 relies on: the Gemini GPU toggle is exactly one call site (pty-connection.ts setPaneGpuRendering), and title writes flow only through the existing updateTabTitle/setRuntimePaneTitle paths, so the resolver-only Phase 1 adds no new store churn, polling, or per-frame IPC.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Folding this into #7458 — the plan doc will ship with the Phase 1 implementation instead of as a standalone docs PR.

@brennanb2025
brennanb2025 deleted the brennanb2025/terminal-title-evidence-plan branch July 6, 2026 01:00
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