Skip to content

fix(runtime): republish projects after renderer reload - #8072

Open
bbingz wants to merge 1 commit into
stablyai:mainfrom
bbingz:fix/remote-projects-after-renderer-reload
Open

bbingz wants to merge 1 commit into
stablyai:mainfrom
bbingz:fix/remote-projects-after-renderer-reload

Conversation

@bbingz

@bbingz bbingz commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

After a host renderer reload, paired clients can discard the project snapshot while the runtime graph is rebuilding. Emit the existing reposChanged event once after the rebuilt graph becomes ready, so those clients refetch. Cold startup and ordinary graph syncs remain quiet. The same boundary also covers attaching a desktop window to a live headless session.

This ports the reload notification into the current split runtime without changing an RPC field or stream opcode. SSH and folder workspaces use the existing catalog refresh path.

Testing and review

At 596fdc96a7b3e9473e4d7c1936126dfd1da816b5, independent verification passed the full runtime harness: 1,259 tests passed, 1 skipped. The added regression covers initial startup, one reload notification and subsequent quiet syncs. CLI, Node and Web TypeScript checks (--composite false), changed-file lint/format and diff whitespace passed. Independent Cursor review passed on this exact commit.

Full repository tests, packaging, live paired-client/SSH smoke and mobile consumer tests were not run. This covers the first successful reload-to-ready transition; a reload that has already ended as unavailable is outside this change. No rendered layout changes.

AI disclosure

Cursor ported and independently reviewed the change; Codex checked the original requirements, source and verification results.

@bbingz
bbingz force-pushed the fix/remote-projects-after-renderer-reload branch from 89f8574 to 8464a75 Compare July 10, 2026 10:08
@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 86629358-d71d-4121-ae43-b27ad21c8860

📥 Commits

Reviewing files that changed from the base of the PR and between e4e54a1 and b984528f5bf487d4c488f6941ed8083245319efc.

📒 Files selected for processing (2)
  • src/main/runtime/orca-runtime.test.ts
  • src/main/runtime/orca-runtime.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main/runtime/orca-runtime.ts
  • src/main/runtime/orca-runtime.test.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

OrcaRuntimeService detects restoration from a reloading renderer graph and emits one reposChanged client event during synchronization. Tests verify that no event occurs before reload, one event occurs after reload, and later synchronizations do not emit duplicates.

Merge Risk: ⚪ Minimal · up to b9845

The change republishes the existing project-refresh event after renderer reloads so paired clients recover their project snapshot; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed and covers the change, rationale, testing, compatibility, and checklist, but it does not provide the required linked issue. Provide a linked issue under “Linked Issue,” because the repository template requires one for every pull request.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the runtime fix to republish projects after a renderer reload.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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.

@bbingz

bbingz commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@bbingz

bbingz commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@bbingz

bbingz commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (34c160442f9e77d8162b4c54ecd9b39f0ba6a4f2). Conflicts resolved in: orca-runtime.ts (kept main's previousTabs/previousLeaves tracking + reload reposChanged republish), pty-connection.test.ts (dispose foreground trackers + main's async flush). Ready for re-review.

@bbingz
bbingz force-pushed the fix/remote-projects-after-renderer-reload branch from 5d1adfa to c5f4141 Compare July 22, 2026 01:30
@nwparker nwparker added the bug Something isn't working label Jul 27, 2026
@bbingz
bbingz force-pushed the fix/remote-projects-after-renderer-reload branch from c5f4141 to 579d49b Compare July 28, 2026 11:33
@bbingz
bbingz force-pushed the fix/remote-projects-after-renderer-reload branch from 579d49b to 735e34f Compare August 5, 2026 23:44
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@bbingz
bbingz force-pushed the fix/remote-projects-after-renderer-reload branch from 735e34f to a9fba76 Compare August 11, 2026 05:07
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@bbingz

bbingz commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Ready for review (contributor priority pack)

  • Rebased / checked against current main where needed
  • Scoped bugfix; summary + test plan in the description
  • Community PR: please Approve and run workflows when convenient (fork CI stays off)
  • No maintainer merge expected from us — happy to iterate on review comments

Part of a short priority list for maintainers: P0 #13609 #13566 · hot #13710 #13692 #13691 #13536 #13572 #8072 #13237 · easy #13570 #13561 #13255.

@bbingz
bbingz force-pushed the fix/remote-projects-after-renderer-reload branch from a9fba76 to 45e918a Compare August 11, 2026 19:23
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

1 similar comment
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@bbingz

bbingz commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed onto current main in b984528f5b without force-pushing. The conflict was resolved by preserving main's markGraphReady / renderer-generation flow and emitting the existing reposChanged event only after the reload graph becomes ready.

Fresh verification: regression red→green, runtime + desktop consumer suites 1165 passed / 1 skipped, full pnpm lint and pnpm typecheck passed, changed-code quality 0 findings. Mobile's separate consumer test could not start locally because the Expo dependency tree is not installed; PR CI remains the verifier for that environment.

Community PR: please Approve and run workflows on head b984528f5b when convenient.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

@bbingz: I will review the changes on head b984528f5b.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@bbingz
bbingz force-pushed the fix/remote-projects-after-renderer-reload branch from b984528 to 596fdc9 Compare September 8, 2026 22:10
Remote clients can drop project snapshots while the runtime graph is
reloading. Emit reposChanged on the first rebuilt graph so they refetch.

Closes stablyai#8072

Co-authored-by: Cursor <[email protected]>
@bbingz
bbingz force-pushed the fix/remote-projects-after-renderer-reload branch from 596fdc9 to 06e431c Compare September 20, 2026 11:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants