Skip to content

[leas code] Reuse renderer control paths - #13425

Merged
nwparker merged 1 commit into
mainfrom
nwparker/leas-code-setup-status
Aug 10, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/leas-code-setup-status

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Summary

Remove two exact renderer control-flow duplicates:

  • Setup-script prompt inspection now uses the existing setup status predicate already used by the setup guide.
  • Browser grab-mode toggle now calls the existing cancel path when turning grab mode off.

The two changes remove 35 net lines while keeping their public behavior and ownership boundaries unchanged.

Screenshots

No visual change.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

Focused verification:

  • pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/browser-pane/useGrabMode.test.ts src/renderer/src/lib/setup-script-prompt.test.ts src/renderer/src/components/setup-guide/use-setup-guide-progress.test.ts (3 files, 35 tests)
  • pnpm run typecheck:web
  • Targeted oxlint and oxfmt checks
  • pnpm run check:code-quality:changed
  • pnpm run check:react-doctor:changed
  • git diff --check

AI Review Report

The review compared both duplicated branches statement by statement. For setup inspection it checked local-only, shared-only, run-both, empty command, error, forbidden runtime, and SSH inspection behavior through the retained predicate. For browser grab mode it checked the target tab, arm generation, disable IPC, conditional cancel IPC, stale operation cleanup, state reset, second-toggle cancellation, direct cancellation, and page-switch tests. The change was reviewed for macOS, Linux, and Windows and alters no shortcuts, labels, paths, shell commands, Electron platform checks, folder-workspace assumptions, Git behavior, or wire formats.

Security Audit

No authentication, secrets, dependencies, command execution, path handling, or input validation changed. Existing browser IPC calls occur in the same order with the same payloads, and setup-hook inspection still uses the same command-source policy.

Notes

Independent cleanup PR. The initial focused test retry required deleting this worktree’s gitignored generated out/ directory after the host disk filled; the directory is rebuildable and unrelated to the patch.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@nwparker, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b6409f3-a76e-4e2a-b121-67b68b39f89d

📥 Commits

Reviewing files that changed from the base of the PR and between cb6069c and bac4629.

📒 Files selected for processing (2)
  • src/renderer/src/components/browser-pane/useGrabMode.ts
  • src/renderer/src/lib/setup-script-prompt.ts

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.

@nwparker
nwparker merged commit 8a38e2f into main Aug 10, 2026
45 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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