orca icon indicating copy to clipboard operation
orca copied to clipboard

Keep sidebar worker rows opening terminal logs

Open brennanb2025 opened this issue 5 months ago â€ĸ 1 comments

īģŋ## 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-fix completed clean after doc edits.
  • Implementation: test-only change in WorktreeCardAgents.activation.test.tsx; no production change was needed because WorktreeCardAgents.tsx already 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 beforeEach to 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, and oxfmt --write successfully.

Notes

  • The required brennan-test-changes delegated 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.

brennanb2025 avatar Jun 25 '26 03:06 brennanb2025

Review Change Stack

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.

â¤ī¸ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot] avatar Jun 25 '26 04:06 coderabbitai[bot]

Closing as superseded by #6387, which merged the regression coverage from this PR plus the production fix for #6261.

brennanb2025 avatar Jun 26 '26 00:06 brennanb2025