Repository navigation
feat(sidebar): main produces per-workspace PR facts, checked against the window in dev and test - #30026
Merged
Conversation
…the window in dev and test Co-Authored-By: Claude <noreply@anthropic.com>
…ting an import Co-Authored-By: Claude <noreply@anthropic.com>
…-facts # Conflicts: # src/main/runtime/rpc/methods/sidebar-inputs.ts # src/renderer/src/env.d.ts # src/renderer/src/lib/sidebar-shadow/sidebar-shadow-comparison.ts # src/renderer/src/main.tsx # src/shared/rpc-contract/rpc-params-catalog.generated.ts
…-facts # Conflicts: # src/main/runtime/orca-runtime.ts # src/main/runtime/rpc/methods/sidebar-inputs.ts # src/renderer/src/main.tsx # src/shared/rpc-contract/rpc-params-catalog.generated.ts
Merged
9 tasks done
8 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
The sidebar can group workspaces by the state of their pull request (In progress, In review, Done, Closed). Today only the desktop window knows each workspace's PR state, because only it holds the PR cache. This PR teaches Orca's background process ("main") to work out the same answer per workspace, so the phone can later group the same way. Nothing reads main's answer yet. In dev and test builds the window checks main's answer against its own.
What Changed
No visible change. The window still groups from its own cache.
src/shared/sidebar-list/workspace-review-facts.ts. The window'sprGroupOfand main both call it. The cache-key module it needs moved from the renderer store tosrc/shared/github/github-cache-key.ts. The reader'ssettingsargument was never used (the key ignores focus once the repo is known), so it is gone from the reveal and collapsed-group plumbing.{ provider: 'github', reviewState }per workspace through a newsidebarInputs.reviewFactsRPC. It is read on demand from main's copy of the PR cache over main's own worktree list, so it has no state or timers of its own. Rows with no PR are absent. It imports no Electron and runs underorcad.workspace-review, registered next to the activity check. The shared counter now counts per check, soexpectNoSidebarShadowMismatcheswaits for two fresh reads of every check. Before, with two checks, one tick satisfied it.sidebar-review-facts.spec.ts: a PR written into the window's cache reaches main within a second, follows state changes and removal, and the shadow stays clean.Why
Design decisions:
providerso GitLab can be added as a deliberate, visible change later.linkedPRfallback. A linked PR number without a fetched state cannot change a lane: the window keeps such a row In progress. Publishing it as "unknown" would put the row in In review on the phone and disagree with the desktop. The phone's existingworktree.psalready does this.prGroupOf. Folder cards render their review badge from both caches at row-render time, so that belongs with the per-row detail the feed will carry.Linked Issue
Part of the sidebar refactor plan (step 5b). No issue.
Visual Proof
N/A. Nothing visible changes. The comparison is dev and test tooling.
Testing
sidebar-review-facts, the three activity shadow specs,worktree-reveal-host-sections,source-control-create-pr. 10 passed, no mismatches.workspace-reviewmismatches.pnpm tc, oxlint, changed-code quality gate, focus-read ratchet (baseline pruned for the moved file), RPC catalog check.Notes
worktree.pskeeps its own PR lookup (no host scope, no unlink check); moving it onto the shared lookup would change the phone and gets its own PR.