Keep sidebar worker rows opening terminal logs
īģŋ## Summary
- Adds focused regression coverage for sidebar automation/orchestration worker rows opening their terminal log when the worker tab hydrates during
activateAndRevealWorktree. - Covers the still-hydrating case so live worktree-attributed rows remain visible instead of being dismissed while tab state catches up.
- Covers compact sidebar row activation through a real happy-dom click on
.compact-agent-row.
Screenshots
No visual change. This PR adds regression coverage only; production UI code is unchanged.
Design / Review Pipeline
- Design doc:
design-docs/automation-worker-log-activation.md(scratch/ignored, not included in PR). - Design review:
auto-design-review-fixcompleted clean after doc edits. - Implementation: test-only change in
WorktreeCardAgents.activation.test.tsx; no production change was needed becauseWorktreeCardAgents.tsxalready reads fresh store state after reveal. - Completeness verification: passed; verifier confirmed the implementation matches the reviewed design.
- Code review loop: completed clean after two fixes:
- Changed hydrated tests so reveal mutates mock store instead of pre-seeding the tab.
- Reset reveal mock implementation in
beforeEachto avoid cross-test leakage.
- CodeRabbit fix: moved the new coverage into a focused test file so the PR no longer touches the existing broad suite's max-lines suppression.
AI Review Report
- Two independent review agents returned clean in the final round.
- CodeRabbit reported one actionable maintainability concern about touching an existing max-lines-disabled suite; addressed by moving the new coverage into
WorktreeCardAgents.activation.test.tsx.
Security Audit
- No production code, IPC, auth, filesystem, network, provider, or prompt/agent-facing text changes.
- Test-only mocks use stable pane keys and renderer store state to cover local and SSH/runtime hydration behavior.
Validation
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/sidebar/WorktreeCardAgents.activation.test.tsx src/renderer/src/components/sidebar/WorktreeCardAgents.test.tsx- passed, 31 tests.pnpm exec oxlint src/renderer/src/components/sidebar/WorktreeCardAgents.activation.test.tsx src/renderer/src/components/sidebar/WorktreeCardAgents.test.tsx- passed.pnpm exec oxfmt --check src/renderer/src/components/sidebar/WorktreeCardAgents.activation.test.tsx src/renderer/src/components/sidebar/WorktreeCardAgents.test.tsx- passed.git diff --check- passed.- Pre-commit hook ran
oxlint,oxlint --config config/oxlint-react-doctor.json, andoxfmt --writesuccessfully.
Notes
- The required
brennan-test-changesdelegated validation stage could not complete because two replacement subagents hit the account usage limit before producing a report. - Manual Electron screenshot evidence was not captured because the change is test-only and there is no production UI delta in this PR.
- Post-PR stabilization is in progress after the amended push.
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: b96babaa-f242-451e-aaa8-524e938ebcbe
đĨ Commits
Reviewing files that changed from the base of the PR and between 6e47e378334704f26b153107c82e8fe0c1ea27a7 and f34b8ef70f7af0888c9fe88aa809cf2716796ccc.
đ Files selected for processing (1)
src/renderer/src/components/sidebar/WorktreeCardAgents.activation.test.tsx
đ§ Files skipped from review as they are similar to previous changes (1)
- src/renderer/src/components/sidebar/WorktreeCardAgents.activation.test.tsx
đ Walkthrough
Walkthrough
Adds a new Vitest suite for WorktreeCardAgents activation behavior. The test file mocks store selectors, worktree activation helpers, tab focus helpers, stale-row dismissal, row rendering, and focused-row highlighting. It covers hydrated reveal activation, live hydrating row behavior, and compact-mode row clicking with cleanup.
đĨ Pre-merge checks | â 4 | â 1
â Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | â ī¸ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
â Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | â Passed | The title clearly matches the main change: regression coverage for sidebar worker rows opening terminal logs. |
| Description check | â Passed | All major template sections are present, but the AI Review Report does not explicitly confirm macOS/Linux/Windows cross-platform checks. |
| 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. |
âī¸ Tip: You can configure your own custom pre-merge checks in the settings.
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.
Comment @coderabbitai help to get the list of available commands.
Closing as superseded by #6387, which merged the regression coverage from this PR plus the production fix for #6261.