Skip to content

Fix manual project order across paired runtime hosts - #8894

Merged
Jinwoo-H merged 3 commits into
mainfrom
Jinwoo-H/repro-8803-multi-node-project-order
Jul 15, 2026
Merged

Jinwoo-H merged 3 commits into
mainfrom
Jinwoo-H/repro-8803-multi-node-project-order

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • preserve the intentional canonical-project merge across execution hosts
  • persist the desktop manual repo order as host-qualified identities while each server remains authoritative for its own permutation
  • reapply that overlay during UI hydration and every host catalog merge, including late arrivals, duplicate repo IDs, and SSH target-ID migration

Root cause

Cross-host dragging was split into valid per-host repo.reorder permutations, but only those host-local permutations were durable. On a cold load, remote catalogs resolve concurrently and unseen repos append in response order, so the desktop had no persisted relationship from which to reconstruct the cross-host interleaving.

Fixes #8803.

Real-runtime validation

Reproduced first with the exact reported v1.4.141 artifacts, then validated this branch with:

  • macOS arm64 E2E client built from a1dc486f3
  • two real paired Docker/Linux arm64 orca serve v1.4.141 nodes; no mocked RPC or direct store seeding
  • AppImage SHA-256 42e0f9747819d331dc88683b5e21cfbb59e7f54e617008ad70cfac7363606391
  • three Git repos per server, including one canonical GitHub identity present on both servers

After dragging the five logical headers to alpha, charlie, bravo, delta, shared, the exact order survived:

  • 3 independent cold client relaunches
  • simultaneous restart of both serve processes with persistent volumes
  • an update-equivalent application rebuild/relaunch using a profile copied from the v1.4.141 reproduction

Every sample retained one merged shared header and both shared workspaces. Server-local orders remained alpha, bravo, shared and charlie, delta, shared.

Raw diagnostics and screenshots remain in ignored test-results/issue-8803/ and are not part of this diff.

Automated validation

  • focused Vitest matrix: 8 files, 582 tests
  • pnpm run typecheck
  • pnpm run lint
  • pnpm run check:max-lines-ratchet
  • pnpm exec electron-vite build --mode e2e

Risk notes

Offline-host entries are deliberately retained so a late host can reclaim its saved position. Newly discovered repos append stably after ranked entries, and the next successful drag replaces the overlay with the current complete visible order. The change does not alter canonical project merging or server-side repo persistence.

Made with Orca 🐋

Co-authored-by: Orca <help@stably.ai>
@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

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: f8fef26a-070c-4706-9c65-38d1860f5503

📥 Commits

Reviewing files that changed from the base of the PR and between c6e8701 and 6a19b35.

📒 Files selected for processing (2)
  • src/renderer/src/web/web-preload-api.test.ts
  • src/renderer/src/web/web-preload-api.ts

📝 Walkthrough

Walkthrough

Adds host-qualified manual repository ordering with normalization, stable cross-host application, persistence, and SSH host-id migration. Renderer hydration applies saved ordering immediately, and repository refreshes preserve it across catalog completion orders. Reordering now persists the full cross-host overlay while continuing host-local reorder operations. Tests cover utility behavior, persistence, RPC acceptance, migration, hydration, refresh ordering, and reorder persistence.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary, root cause, validation, and risks, but it omits required template sections like screenshots, AI review report, security audit, and notes. Add the missing template sections, or state 'No visual change' for screenshots, and include the AI review report, security audit, and notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: persisting manual project order across paired runtime hosts.
Linked Issues check ✅ Passed The changes address #8803 by preserving cross-host project order, reapplying it during hydration and merges, and keeping per-host permutations authoritative.
Out of Scope Changes check ✅ Passed The added IPC, preload, UI, and test changes all support the manual ordering fix; no unrelated feature work is evident.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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 coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 17614752-5dd1-42cc-abe7-a4cc32aa4796

📥 Commits

Reviewing files that changed from the base of the PR and between 190ed7d and a1dc486.

📒 Files selected for processing (16)
  • src/main/persistence.test.ts
  • src/main/persistence.ts
  • src/main/runtime/rpc/methods/client-ui-schemas.ts
  • src/main/runtime/rpc/methods/client-ui.test.ts
  • src/main/ssh/ssh-target-id-migration.test.ts
  • src/main/ssh/ssh-target-id-migration.ts
  • src/renderer/src/store/slices/repos-host-identity-routing.test.ts
  • src/renderer/src/store/slices/repos-manual-order-hydration.test.ts
  • src/renderer/src/store/slices/repos-runtime-routing-fixture.ts
  • src/renderer/src/store/slices/repos.ts
  • src/renderer/src/store/slices/ui.test.ts
  • src/renderer/src/store/slices/ui.ts
  • src/shared/constants.ts
  • src/shared/manual-repo-order.test.ts
  • src/shared/manual-repo-order.ts
  • src/shared/types.ts

Comment thread src/renderer/src/store/slices/repos.ts Resolved
Jinwoo-H and others added 2 commits July 15, 2026 15:39
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
@Jinwoo-H
Jinwoo-H merged commit a2d3451 into main Jul 15, 2026
2 of 3 checks passed
@AmethystLiang AmethystLiang added the orca-remote-server Remote Orca Server / orca serve / paired remote runtime label Jul 22, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix(sidebar): persist manual project order across hosts

Co-authored-by: Orca <help@stably.ai>

* fix(sidebar): scope desktop repo reorder by host

Co-authored-by: Orca <help@stably.ai>

* fix(web): cover host-scoped repo reorder API

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

orca-remote-server Remote Orca Server / orca serve / paired remote runtime

Projects

None yet

2 participants