Skip to content

feat(status): show agent source in live bubbles - #39

Merged
LRainner merged 2 commits into
masterfrom
codex/status-agent-source-label
Aug 4, 2026
Merged

feat(status): show agent source in live bubbles#39
LRainner merged 2 commits into
masterfrom
codex/status-agent-source-label

Conversation

@LRainner

@LRainner LRainner commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • show the originating agent name in the lower-right area of every live-status bubble
  • place the source label immediately to the left of the spinner, success check, or warning indicator without increasing the bubble height
  • reuse the normalized agentName supplied by the agent registry so Codex, Claude Code, and future integrations share the same rendering path
  • add browser-level coverage for mixed Codex and Claude Code sessions and verify that source labels do not overlap their status indicators

UI behavior

The task detail remains the primary secondary line. A small, muted source label now appears at the right edge of that line, allowing users to identify whether an active bubble came from Codex or Claude Code while preserving the existing status animation and stacked-session behavior.

Validation

  • npm test — 67 tests passed
  • npm run build — TypeScript check and Vite production build passed
  • npx playwright test e2e/status.e2e.ts --project=e2e — 1 test passed
  • git diff --check — passed

Summary by CodeRabbit

  • 新功能

    • 状态卡片现在会显示对应的 Agent 来源信息。
    • 优化来源标签与状态指示器的布局,信息展示更清晰。
    • 隐藏任务摘要时,仍保留卡片标题并隐藏重复的来源标签。
  • 测试

    • 新增端到端测试,验证多个会话的 Agent 来源、摘要显示及界面布局。

@monkeyscan

monkeyscan Bot commented Aug 4, 2026

Copy link
Copy Markdown

MonkeyScan 正在重新评审当前 PR 的全部有效改动,完成后会更新到本评论中,请稍后刷新查看。

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

状态卡片新增代理来源标签。页面保留原有详情文本,并调整元信息布局。新增 Playwright 测试,模拟 Tauri 数据并验证 Codex 与 Claude Code 会话卡片的来源显示与标签可见性。

Changes

状态卡片来源显示

Layer / File(s) Summary
状态卡片元信息布局
src/status.ts, src/styles.css
状态卡片标题条件性显示任务名称或代理名称。代理来源元素仅在显示任务摘要时展示并填充代理名称,否则隐藏并清空。详情文本与来源标签并列于元信息行容器。
状态来源端到端验证
e2e/status.e2e.ts
测试模拟 Tauri 接口、配置和事件。验证两个会话卡片的来源名称。验证来源标签位于状态指示器左侧。验证隐藏任务摘要时卡片标题仍为 Codex 且来源标签不可见。

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了状态气泡显示代理来源这一主要变更。
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

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 `@src/status.ts`:
- Line 81: 更新状态卡片渲染逻辑:当 showsAgentTaskSummary(config, status.agent) 返回 false
时,避免将 status.agentName 重复写入
.status-source,可隐藏该元素或使用不同内容;保留摘要开启时的现有显示行为,并在现有状态端到端测试中覆盖摘要开启和关闭两种配置。
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0493a37b-9dfc-47a0-a292-3a6978a42ed9

📥 Commits

Reviewing files that changed from the base of the PR and between 8fe1726 and 7a82c39.

📒 Files selected for processing (3)
  • e2e/status.e2e.ts
  • src/status.ts
  • src/styles.css

Comment thread src/status.ts Outdated
@monkeyscan

monkeyscan Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR Title: feat(status): show agent source in live bubbles

Commit: 9bbe2cc

本次修改修复了状态窗口中 agent source 标签的重复显示问题,并补充了对应的 E2E 测试。

核心变更:

  1. src/status.ts:提取 showTaskSummary 判断结果复用,当不显示任务摘要时,将 .status-source 元素设为 hidden 并清空其文本,避免在 .status-title 已显示 agentName 的情况下 source 标签重复出现。
  2. e2e/status.e2e.ts:将 test.beforeEach 重构为可接受自定义配置的 mockStatusWindow 函数,使不同测试能注入不同配置;新增测试用例验证 showTaskSummary: false 时 source 标签被正确隐藏且 title 显示 agentName。

整体设计合理,变更范围聚焦,测试覆盖了新增行为。未发现功能性缺陷或回归风险。

@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 (1)
e2e/status.e2e.ts (1)

72-80: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

让未覆盖的 Tauri 命令使测试失败。

default: return null 会把未声明的命令静默当作成功。若 src/status.ts 调用拼写错误或新增必需命令,测试仍可能通过,无法检测 Tauri 调用契约变化。将默认分支改为抛出错误;仅为已知的无返回值命令保留 null

建议修改
           case "plugin:window|show":
           case "plugin:window|hide": return null;
-          default: return null;
+          default: throw new Error(`Unexpected Tauri command: ${command}`);
🤖 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 `@e2e/status.e2e.ts` around lines 72 - 80, Update the mock invoke
implementation’s default branch in invoke so unrecognized Tauri commands throw
an error instead of returning null. Keep null returns only for the explicitly
listed known no-result commands and preserve the existing responses for
get_config and get_live_event.
🤖 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 `@e2e/status.e2e.ts`:
- Around line 72-80: Update the mock invoke implementation’s default branch in
invoke so unrecognized Tauri commands throw an error instead of returning null.
Keep null returns only for the explicitly listed known no-result commands and
preserve the existing responses for get_config and get_live_event.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9af9b9ac-c03e-4309-aade-7186a3c40064

📥 Commits

Reviewing files that changed from the base of the PR and between 7a82c39 and 9bbe2cc.

📒 Files selected for processing (2)
  • e2e/status.e2e.ts
  • src/status.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/status.ts

@LRainner
LRainner merged commit 9aad9c3 into master Aug 4, 2026
8 checks passed
@LRainner
LRainner deleted the codex/status-agent-source-label branch August 4, 2026 13:38
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