Skip to content

feat(terminal): name local AI-agent tabs after the reported task title - #616

Open
WilliamWang1721 wants to merge 15 commits into
Kuddev:mainfrom
WilliamWang1721:fix/issue-475-njaj7k
Open

WilliamWang1721 wants to merge 15 commits into
Kuddev:mainfrom
WilliamWang1721:fix/issue-475-njaj7k

Conversation

@WilliamWang1721

Copy link
Copy Markdown
Contributor

Result / 用户结果

When several Claude Code or Codex tabs run in the same directory, each local tab is now labelled with the task title the agent reports (OSC 0/2), so they can be told apart. The animated leading status glyph is stripped. The label falls back to the directory name when the agent only reports its own name or when it exits; SSH tabs, custom names and other programs are unchanged, and the tooltip keeps the directory and agent name. Fixes #475.

Design / 设计边界

  • Responsibility and affected modules: TerminalView::tab_label in nebula_app/src/gpui_shell/terminal/view/tab_identity.rs; the tooltip's existing task detection moved into one shared helper so label and tooltip cannot disagree.
  • Why this belongs here: tab identity is already owned by this file; the workspace tab title calls tab_label and needs no change beyond a comment.
  • Dependency, data-format, threading, or lifetime changes (ADR if applicable): none.
  • Compatibility and migration/fallback behavior: SSH tabs keep the saved host name ([Bug] SSH 主机标签页不显示创建时填写的自定义主机名称 #164); no new setting.

Evidence / 验证依据

  • Commands and actual results (include unrun checks): not run locally; validation pending in GitHub Actions.
  • Regression tests: ai_tab_is_named_after_reported_task_but_not_stale_task (startup_tests.rs) now asserts the task label, glyph stripping, fallback to the directory name, and no stale label after the command ends.
  • UI changes: not yet verified with screenshots.
  • Hot-path changes: none beyond a string comparison on the label path.

Required Review / 必须确认

  • I followed CONTRIBUTING.md, docs/architecture.md, and docs/project-constraints.md.
  • I split responsibilities, not arbitrary line ranges; no duplicate behavior authority was added.
  • python3 scripts/check_architecture.py --base <PR-base-commit> passes; budgets were not inflated to fit the change.
  • Tests cover success and failure; platform/feature coverage limitations are stated.

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.

[Feature] Name local AI-agent tabs after the agent's reported session title

1 participant