feat(status): show agent source in live bubbles - #39
Conversation
|
MonkeyScan 正在重新评审当前 PR 的全部有效改动,完成后会更新到本评论中,请稍后刷新查看。 |
📝 WalkthroughWalkthrough状态卡片新增代理来源标签。页面保留原有详情文本,并调整元信息布局。新增 Playwright 测试,模拟 Tauri 数据并验证 Codex 与 Claude Code 会话卡片的来源显示与标签可见性。 Changes状态卡片来源显示
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
e2e/status.e2e.tssrc/status.tssrc/styles.css
|
PR Title: feat(status): show agent source in live bubbles Commit: 本次修改修复了状态窗口中 agent source 标签的重复显示问题,并补充了对应的 E2E 测试。 核心变更:
整体设计合理,变更范围聚焦,测试覆盖了新增行为。未发现功能性缺陷或回归风险。 |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
e2e/status.e2e.tssrc/status.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/status.ts
Summary
agentNamesupplied by the agent registry so Codex, Claude Code, and future integrations share the same rendering pathUI 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 passednpm run build— TypeScript check and Vite production build passednpx playwright test e2e/status.e2e.ts --project=e2e— 1 test passedgit diff --check— passedSummary by CodeRabbit
新功能
测试