Skip to content

Keep managed status warnings out of desktop gitignore writes - #26671

Merged
OrcaWin merged 1 commit into
mainfrom
nwparker/managed-huge-status-ignore
Oct 9, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
nwparker/managed-huge-status-ignore

Conversation

@nwparker

@nwparker nwparker commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​86 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​86
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​7 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4

ELI5

A remote project and a desktop project can have the same address. Orca saw many changed files remotely, then offered to ignore a folder from the desktop project. Clicking the suggestion edited the desktop file. The suggestion now checks which machine owns the project before calling the desktop helper.

What Changed

Source Control’s large-status effect uses the existing local-path guard with its repository-owner-routed settings and legacy SSH connection ID. Managed targets stop before the desktop folder probe. Local projects still receive and apply the same suggestion; direct SSH targets retain their existing exclusion.

Why

Managed conversion clears the old repository SSH connection ID, so that ID alone cannot identify a remote project. Reusing the shared guard preserves the intended local-only behavior without creating a new remote ignore-write API or duplicating host rules.

Linked Issue

Found while exercising SSH-to-managed-server conversion. No existing issue linked.

Visual Proof

managed-huge-ignore-owner-before.png
managed-huge-ignore-owner-after.png
desktop-huge-ignore-control-before.png
desktop-huge-ignore-control-after.png
managed-huge-ignore-owner-final-runtime-red.log
managed-huge-ignore-owner-runtime-green.log
managed-huge-ignore-owner-full-runtime-green.log
managed-huge-ignore-owner-unit-red.log

Before: the managed server positively reports a capped 1,000-entry status caused by node_modules. The desktop project at the same absolute path has dist. The actual remote Source Control toast offers dist; clicking it changes desktop content from # DESKTOP_IGNORE_OWNER to that marker plus dist/. Remote content stays # REMOTE_IGNORE_OWNER.

After: the desktop content remains unchanged for the managed case. A separate real desktop large-status control still offers the suggestion and successfully appends dist/.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated

Unchanged Phase 3.5 fails after the real wrong-machine write in 10.7 seconds; the repeated screenshot-ready baseline fails in 11.5 seconds. The corrected remote and local cases pass in 12.9 / 5.6 seconds (20.2 seconds total). The managed-owner hook case fails before the guard; two local/direct-SSH controls pass. All three pass after the fix.

77 affected hook/helper/CI-contract tests across eight files, full pnpm tc, pnpm lint, changed-code/design-system checks, a fresh E2E build and commit hooks pass. The final rebuilt 13-case conversion/stdio/port/update/idle/reboot/menu/ignore suite passes in 3.1 minutes.

CI follow-up: the initial Docker lane passed all 12 remote/other controls but its desktop control waited for full toast visibility until the short-lived toast expired. The test now uses CI’s 1280 × 1024 viewport, reduced-motion mode, and a real hover to pause the toast timer before its screenshot and click. The exact rebuilt remote/local pair passes in 14.4 / 5.3 seconds (33.9 seconds including runtime preparation); no ignore-write assertions were weakened. Full typecheck, lint and changed-code checks pass. CI is fully green on f0aa44f: 22 successful checks and 22 conditional skips after this test-only correction.

Actual platforms: hidden macOS Electron and disposable Linux Docker SSH hosts. Local and remote Git repositories/files are owned test fixtures. No OS windows were opened or focused. Native Windows runtime was not exercised.

The changed effect, local guard, desktop write helpers and shared host harness route to the dedicated Docker/template lane. The general lane excludes the dedicated regression.

Review

P1 / Low merge risk for this change. Adds an owner check to the existing effect; no IPC, wire, Git command or backend mutation changes. Stacked on #26668 (Medium merge risk), which must merge first. The old effect’s bytes are identical on Phase 3.5 and #26668.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Existing local-only helper behavior and local suggestion copy remain intact. The effect depends on a boolean capability result rather than settings-object identity. Remote clients with older peers exchange the same messages. Folder workspaces and Git providers receive no new assumptions or commands.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@OrcaWin
OrcaWin force-pushed the nwparker/remote-open-in-owner branch from 88db24b to 486786c Compare October 9, 2026 05:35
@OrcaWin
OrcaWin requested a review from brennanb2025 as a October 9, 2026 05:35
@OrcaWin
OrcaWin force-pushed the nwparker/remote-open-in-owner branch 3 times, most recently from a70ab92 to 9a3416a Compare October 9, 2026 06:27
@OrcaWin
OrcaWin changed the base branch from nwparker/remote-open-in-owner to main October 9, 2026 06:49
@OrcaWin

OrcaWin commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Rebased onto main now that #26668 has merged. I narrowed the change to the source-control effect fix and its unit test. The new Docker E2E spec and its CI routing edits are dropped: they added a dedicated lane for a three-line guard, and the unit test already fails on main (a managed owner probes the desktop folder) and passes with the fix. pnpm tc, oxlint, check:code-quality:changed and audit:anti-slop pass locally.

@OrcaWin
OrcaWin force-pushed the nwparker/managed-huge-status-ignore branch from f0aa44f to 69db57f Compare October 9, 2026 08:31
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a1075c71-fa8f-4c34-b703-5929e2db2b34

📥 Commits

Reviewing files that changed from the base of the PR and between 39a01f9 and 69db57f.


📒 Files selected for processing (2)
  • src/renderer/src/components/right-sidebar/source-control/sync/use-status-refresh.local-ignore.test.tsx
  • src/renderer/src/components/right-sidebar/source-control/sync/use-status-refresh.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.



📝 Walkthrough

Walkthrough

The refresh hook now uses isLocalPathOpenBlocked to gate the huge-repository .gitignore prompt. The change replaces the rule that skipped the prompt whenever an active connection ID existed. Tests cover managed owners without a legacy SSH ID, local owners, and direct SSH targets.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 69db5

No actionable issue remains in the reviewed change; it is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description is detailed and covers the change, reason, testing, visual proof, risks, and checklist. However, the required Linked Issue section states that no existing issue is linked. Link the actual issue addressed by this pull request in the Linked Issue section, using the required issue reference format.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check Passed The title clearly describes the main change: preventing managed status warnings from writing to the desktop .gitignore file.


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@OrcaWin
OrcaWin merged commit fd6bc7e into main Oct 9, 2026
30 checks passed
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.

2 participants