Skip to content

feat(sidebar): the desktop window lists main's sidebar inputs behind the build switch (dark) - #30461

Merged
Jinwoo-H merged 8 commits into
mainfrom
jinwoo/sidebar-desktop-reads-main
Oct 19, 2026
Merged

Jinwoo-H merged 8 commits into
mainfrom
jinwoo/sidebar-desktop-reads-main

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 26 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​662 $\color{#cf222e}{\Huge{\mathbf{−}}}$​202 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​460
Prod 46 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1327 $\color{#cf222e}{\Huge{\mathbf{−}}}$​944 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​383

Do not merge: owner approval pending.

ELI5

Today the desktop window works out its own sidebar list (which workspaces exist, their order, activity, review state) from its own copy of the data. The app's main process already works out the same list for the phone. With the sidebar-inputs build switch on, the desktop window now reads that list from main too, so the desktop and the phone show one list from one source. With the switch off (every shipped build), nothing changes.

What Changed

All of this is behind the existing ORCA_SIDEBAR_INPUTS build switch. Switch-off builds keep the current code path, and the sidebar goldens are byte-identical.

  • The desktop window reads main's sidebar feed. The feed is the same paged read and change notice the phone uses. Main now lets its own desktop window call the read, which before only its own phone could do. The window forwards main's change notice to the renderer, and a small reader installs each page.
  • The window keeps only screen-local state. It still owns hover hold, drag preview, search, selection, collapse and the activation highlight. It is the writer for collapse and activation, so waiting on main for them would only add delay.
  • Two list models, one picked at build time. use-window-list-model.ts is the current pipeline moved without changes. use-main-list-model.ts builds the same rows from main's feed. The phone's row builder in shared code is split into index, rank, plan and render steps so the desktop can reuse it. Cards still render the window's own store records.
  • A small pending layer, in one place (lib/sidebar-pending-layer.ts). It shows the window's own writes until main's feed shows them. It covers two cases: row writes (drag order, pin, archive, unread, rename, status) and newly created workspaces. Each entry has an operation id. A newer write to the same field replaces an older one. For rows main owns, an entry clears once a read sent after main answered is installed. For a paired server's rows, it clears once main's row shows the value, after at most 10 seconds. Either way, main's value wins afterwards.
  • Shadow comparisons are removed. The switch-on path dropped the shadow domains, the mismatch readouts and the e2e mismatch assertions. The parity suite (test(sidebar): the desktop window and a phone reading the feed draw the same list (dark) #30426) and the goldens cover that ground now. The parity suite gains a third adapter that runs the main list model over the installed feed.

Measured round trips (switch-on build, hidden window)

Operation Median p99
Row write, then a feed read 0.9 ms 6.9 ms
Row write, through the change notice (before the publish fix below) 54 ms 105 ms
Activation reaching main 205 ms 229 ms
Collapse write echoed by main 6.2 ms 8.8 ms
Paired-server row write reaching main's feed (n=20) 19.7 ms 31.7 ms (max)

Without the pending layer, drag and create showed a gap of one or two frames: the old order flashed back, or the new workspace showed up late. Those two got the pending layer. Activation and collapse are already instant because the window writes them, so they stay window-local.

Render cost at about 423 rows (re-render after one row changes)

Model Grouped by project Not grouped
Window, switch off 1.22 ms 0.88 ms
Window, switch on 1.20 ms 0.89 ms
Main feed 1.25 ms 1.06 ms

Collapse costs about 0.32 ms on every model. An agent status tick causes 0 re-renders. Parsing the feed takes 0.38 ms (median). The row counts match (451 and 421).

What the flip will delete

The window-side computation only runs with the switch off. It stays until the flip: use-window-list-model.ts, use-sort-order.ts, use-visible-worktrees.ts, the window-only parts of use-section-rows.ts, and the lib/sidebar-shadow readouts that the parity fixture still uses.

Known gaps before the flip

  • Paired-server activity. Main's activity domain does not include the desktop's own session tabs inside a paired server's workspace. So "Hide sleeping" can hide a workspace that is active there (paired-mobile-desktop-mirror-workspace-visibility). This needs a producer fix in main.
  • Paired-server creates. These are not held by the pending layer. The new row arrives through the server's change event.
  • Specs that plant workspaces. agent-send-picker-reveal and worktree-reveal-host-sections create workspaces only in the window's store, so main never lists them. Those specs need to plant through main.
  • Feed parse cache. Not added, because parsing measured 0.38 ms.
  • Bundle. A switch-off renderer still contains the feed reader, but it is unreachable: the pending layer's entry points return early. The preload method is also present. The pending-layer code paths and the shared planner are not in the bundle.

Why

The goal is one list that both clients read from main, instead of two copies that can drift apart. Reusing the phone's feed, read method and change notice avoids building a second channel. We measured before adding any optimistic state, and added it only where frames were visibly wrong. Keeping it in one module, keyed by operation id and always settling to main's value, leaves the flip with one thing to review. We also considered skipping the pending layer and waiting for main's notice. Before the publish fix below, that cost 54 ms (median) and up to about 105 ms of the old order snapping back after every drag.

Linked Issue

N/A (internal sidebar inputs series)

Visual Proof

The screenshots come from hidden windows via CDP. Switch off is the current behaviour; switch on is this change. They should look the same.

Switch off Switch on
List off-list on-list
After drag off-drag on-drag
After create off-create on-create
After scroll and reveal off-reveal on-reveal

Testing

  • I manually tested these changes locally (hidden windows, macOS, both builds)

  • Automated tests added/updated

  • The new e2e sidebar-desktop-reads-main.spec.ts runs on both builds and passed 2/2 on each. It covers:

    • On the switch-on build, rows stay listed after the window's store is emptied.
    • Drag frames, the open highlight and the Cmd+2 target.
    • Collapse in the first frame after the click.
    • Create with no gap.
    • Virtualized scroll and reveal.
  • Switch-on e2e sweep: 26 sidebar specs against a baseline at the base commit.

    • The baseline already fails worktree-jump-palette-filter.
    • The new failures are the three specs listed under known gaps.
    • pr-comments was flaky and passed 2/2 on rerun.
  • Unit tests:

    • The pending layer (5) and the feed reader (3).
    • The read method now admits the desktop caller and still refuses a paired device.
  • The parity suite now has the main-model adapter. As a positive control, reversing the ranked order made 13 tests fail. That control is not committed.

  • The goldens are unchanged.

  • Gates: pnpm tc, the full unit suite with agent env stripped, check:code-quality:changed, the focus-read ratchet (total unchanged, the allowance moved with the code), oxlint, anti-slop and format all pass.

AI Disclosure

Review

An Opus review was applied:

  • A newer write wins, by field and with operation ids.
  • A created row holds the stamped record.
  • Runtime creates are not held.
  • A write names its host when it is made.
  • Read retries and request ids are fixed.
  • Only changed domain maps are copied.

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

  • SSH and paired servers. Paired-server rows come through main's existing paired-server domain. The gaps are listed above.
  • Folder workspaces. These are handled, including creates.
  • Mobile. No change. The phone read keeps its existing check.
  • Wire compatibility. No wire change. The read method only admits one more local caller.
  • Platforms. Nothing platform-specific.

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)

Switch on vs today (interleaved A/B, same machine)

Both builds were measured on the same machine against this branch merged with main. "Today" is the switch-off build and "switch on" is the switch-on build. Runs alternated on/off for 10 rounds, with 6 samples per event per run (3 for creates), so each cell is 60 samples (30 for creates). Every number is the time from an event to the change being in the window's sidebar DOM, measured with a mutation observer. Hidden windows, background launch.

  • Hook: an agent status hook posted to the hook server.
  • Remote: a worktree.set call through main's runtime RPC, the same handler a phone or the CLI uses.
  • CLI create: the bundled orca CLI run as a separate process.
  • Server: a call made on a paired orca serve host while the desktop is paired to it.
  • Window: the window's own store action, or a DOM click for collapse.

The one-minute load average was 12 to 30 (median about 20 to 23) on both sides.

First pass: the feed as it was (50 ms trailing coalesce)

Event n (on/off) Switch on: median / p90 / p99 ms Today: median / p90 / p99 ms Median difference
hook working 60/60 4.6 / 20.9 / 22.0 5.5 / 18.1 / 23.4 -0.9 ms
hook done 60/60 5.6 / 9.4 / 11.5 6.1 / 11.0 / 12.7 -0.5 ms
remote rename (worktree.set) 60/60 23.2 / 27.3 / 30.7 23.6 / 28.5 / 34.2 -0.4 ms
remote pin (worktree.set) 60/60 59.3 / 60.6 / 62.7 27.8 / 32.5 / 50.5 +31.5 ms
remote reorder (worktree.set) 60/60 59.7 / 61.1 / 62.7 28.8 / 34.6 / 52.0 +30.9 ms
window drag write 60/60 12.2 / 14.7 / 15.9 12.2 / 15.8 / 16.7 +0.0 ms
window create 60/60 145.8 / 165.7 / 181.6 139.8 / 153.1 / 158.4 +6.0 ms
window activate 60/60 15.6 / 17.4 / 20.7 15.7 / 16.9 / 17.6 -0.1 ms
cli create (from cli exit) 30/30 32.6 / 34.5 / 34.6 10.0 / 12.9 / 16.1 +22.6 ms
cli create (from cli start) 30/30 364.0 / 396.6 / 469.9 328.1 / 354.1 / 384.7 +35.9 ms
window collapse 60/60 5.4 / 8.7 / 9.4 5.2 / 8.7 / 9.3 +0.2 ms
window expand 60/60 13.2 / 16.6 / 17.7 13.5 / 17.2 / 17.9 -0.3 ms
server rename (from call) 60/60 19.7 / 23.7 / 37.8 18.9 / 22.2 / 25.5 +0.8 ms
server create (from answer) 30/30 57.0 / 58.4 / 59.5 11.5 / 13.7 / 14.3 +45.5 ms
server create (from call) 30/30 274.8 / 316.1 / 352.0 228.5 / 246.2 / 267.9 +46.3 ms

The extra latency is the feed's 50 ms coalescing, and nothing else.

  • Main-sourced order changes (pin, reorder) and creates were about 30 ms slower, and paired-server creates about 46 ms slower. Each wait is the 50 ms timer minus whatever the old path already spent on its own refetch.
  • Hook status, renames and every window-local action were unchanged. The cards still draw the window's own records, and the window writes its own collapse and activation.

Fix: publish a change after a quiet spell at once

In sidebar-inputs-feed.ts, the first change after at least 50 ms without a publish now publishes on the next timer turn. Later changes in the same burst still wait for one shared publish, at most once every 50 ms. The publish rate is still bounded the way it was, so a phone over the relay sees no more notices in a burst than before. An isolated change simply arrives sooner, for the phone as well.

This is smaller than a separate push channel to the window: there is no new IPC, no new event type on the wire, and one path for every reader. It is behind the switch, because the feed only exists in a switch-on build. A unit test pins it: the first change publishes within 1 ms, and a burst right after it waits for the shared publish. Restoring the plain 50 ms delay fails that test.

Second pass: with the fix

Event n (on/off) Switch on: median / p90 / p99 ms Today: median / p90 / p99 ms Median difference
hook working 60/60 4.8 / 18.8 / 21.9 5.2 / 18.3 / 19.9 -0.4 ms
hook done 60/60 5.8 / 9.3 / 10.1 6.2 / 10.2 / 11.4 -0.4 ms
remote rename (worktree.set) 60/60 23.4 / 29.5 / 35.9 23.8 / 26.4 / 29.3 -0.4 ms
remote pin (worktree.set) 60/60 29.9 / 51.3 / 55.1 26.8 / 31.1 / 33.8 +3.1 ms
remote reorder (worktree.set) 60/60 31.0 / 36.8 / 59.0 28.9 / 31.8 / 34.9 +2.1 ms
window drag write 60/60 12.4 / 14.6 / 17.5 12.5 / 15.2 / 16.6 -0.1 ms
window create 60/60 141.1 / 151.1 / 181.3 138.5 / 149.8 / 177.6 +2.6 ms
window activate 60/60 14.7 / 16.4 / 18.1 15.2 / 16.6 / 16.9 -0.5 ms
cli create (from cli exit) 30/30 -8.0 / 11.5 / 15.2 10.9 / 12.6 / 14.8 -18.9 ms
cli create (from cli start) 30/30 330.6 / 358.1 / 420.0 326.2 / 340.7 / 358.8 +4.4 ms
window collapse 60/60 7.1 / 8.7 / 9.4 6.0 / 8.6 / 9.0 +1.1 ms
window expand 60/60 14.1 / 16.5 / 17.3 14.5 / 16.9 / 18.4 -0.4 ms
server rename (from call) 60/60 19.5 / 23.1 / 24.9 19.1 / 22.2 / 23.0 +0.4 ms
server create (from answer) 30/30 9.7 / 11.2 / 13.1 12.2 / 13.9 / 16.1 -2.5 ms
server create (from call) 30/30 221.0 / 232.1 / 275.1 225.4 / 237.5 / 249.7 -4.4 ms

With the fix, every event lands within a few milliseconds of today at the median.

  • Pin and reorder are still 2 to 3 ms slower at the median. Their p90 and p99 tails are wider (up to about 51 to 59 ms), because a follow-up change that lands inside the 50 ms window waits for the shared publish.
  • "CLI create (from CLI exit)" is negative on the switch-on side: the row shows up before the CLI process has finished exiting. Measured from CLI start, the two sides are within 5 ms.

Re-render cost per row change at about 423 rows (simulated DOM, interleaved 10 runs each)

Model Grouped by project: median / p90 Not grouped: median / p90 Collapse: median / p90
Today (window list, switch off) 1.44 / 1.77 ms 1.15 / 1.30 ms 0.39 / 0.50 ms
Switch on (main feed list) 1.60 / 1.85 ms 1.34 / 1.52 ms 0.40 / 0.45 ms

How to read the table:

  • Each value is the median across the 10 runs of that run's median or p90; each run took 50 samples.
  • The worst run's p90 was 2.25 ms with the switch on and 2.78 ms today.
  • Row counts were 451 grouped and 421 not grouped.
  • Parsing the feed adds 0.37 ms (median) and 0.51 ms (p90) per install with the switch on.
  • So a row change costs about 0.2 ms of rendering plus about 0.4 ms of parsing more than today: under 1 ms, which is well inside a frame.
  • The load average was 23 to 31 on both sides.

Jinwoo-H and others added 3 commits October 18, 2026 20:03
…ts own writes shown until main does (dark)

Co-Authored-By: Claude <[email protected]>
…old the stamped record, writes name their host (dark)

Co-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in 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: Advanced
  • Run ID: f1f57427-98aa-479d-b8ae-db4f9ccb43a3
📥 Commits

Reviewing files that changed from the base of the PR and between a00415b and 01daf2e.

📒 Files selected for processing: 1
  • tests/e2e/sidebar-desktop-reads-main.spec.ts

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

📝 Walkthrough

The desktop renderer can read main-process sidebar-feed data and receive change events. The sidebar uses either a main-feed or window-derived list model. Pending row writes and created workspaces are overlaid until the feed reflects them or their pending entries expire. The change also removes the sidebar shadow-comparison system and updates related tests.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 01daf

The opt-in desktop sidebar reads main’s feed, and the inspected authorization, update, and activity paths show no concrete remaining merge risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 46.15% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 91 functions across 52 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: enabling the desktop window to read main's sidebar inputs behind the build switch.
Description check Passed The description is detailed and covers the required explanation, changes, rationale, testing, visual proof, review notes, compatibility considerations, and checklist. The Linked Issue section uses N/A…
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.
Full details: Description check

Explanation

The description is detailed and covers the required explanation, changes, rationale, testing, visual proof, review notes, compatibility considerations, and checklist. The Linked Issue section uses N/A, but the description explains that this is an internal series, which matches the template's maintainer exception.

  • 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.

…p-reads-main

# Conflicts:
#	src/renderer/src/main.tsx
…p-reads-main

# Conflicts:
#	config/focus-setting-read-baseline.txt

@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: Advanced
  • Run ID: 4b39e10e-2dde-42fd-8b8e-0be1c0c48c9d
📥 Commits

Reviewing files that changed from the base of the PR and between a29a5c6 and 7c2bff9.

📒 Files selected for processing: 8
  • config/focus-setting-read-baseline.txt
  • src/main/runtime/rpc/methods/sidebar-inputs.ts
  • src/renderer/src/lib/sidebar-shadow/window-unread-decisions.ts
  • src/renderer/src/lib/sidebar-shadow/workspace-unread-shadow.ts
  • src/renderer/src/main.tsx
  • src/renderer/src/store/slices/workspace-attention/workspace-attention-slice.ts
  • src/renderer/src/store/slices/workspace-attention/workspace-unread-flag.ts
  • tests/e2e/sidebar-host-unread.spec.ts
💤 Files with no reviewable changes: 4
  • src/renderer/src/lib/sidebar-shadow/workspace-unread-shadow.ts
  • src/renderer/src/store/slices/workspace-attention/workspace-attention-slice.ts
  • src/renderer/src/main.tsx
  • src/renderer/src/lib/sidebar-shadow/window-unread-decisions.ts

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

1 src/renderer/src/components/sidebar/worktree-filter-visibility.ts
1 src/renderer/src/components/sidebar/worktree-list/listing/use-filters.ts
1 src/renderer/src/components/sidebar/worktree-list/listing/use-section-rows.ts
1 src/renderer/src/components/sidebar/worktree-list/listing/use-window-list-model.ts

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

#!/bin/bash
# Inspect the ratchet rules and the model's setting reads or called helpers.
rg -n -C 2 'focus-read-ratchet' . || true
sed -n '1,100p' src/renderer/src/components/sidebar/worktree-list/listing/use-window-list-model.ts
rg -n -C 2 'activeRuntimeEnvironmentId' src/renderer/src/components/sidebar/worktree-list/listing || true

Repository: stablyai/orca

Length of output: 8176


🏁 Script executed:

#!/bin/bash
set -o pipefail
printf '%s\n' '--- ratchet scanner ---'
sed -n '1,260p' config/scripts/check-focus-read-ratchet.mjs
printf '%s\n' '--- baseline entry and diff ---'
nl -ba config/focus-setting-read-baseline.txt | sed -n '185,198p'
git diff --no-ext-diff --unified=8 1ad8755fa809bdae29c7dfef7c34f552edab9452 7c2bff99d98159a0c6c655280214864de7d03412 -- config/focus-setting-read-baseline.txt
printf '%s\n' '--- called helper definitions/imports ---'
rg -n -F --glob '*.ts' --glob '*.tsx' -e 'useSidebarSectionRows' -e 'useSidebarWorktreeSortOrder' -e 'useVisibleSidebarWorktrees' -e 'useSidebarHostVisibleScope' -e 'useSidebarExternalWorktreeCards' -e 'useOrderHeldWhileEngaged' src/renderer/src/components/sidebar/worktree-list
printf '%s\n' '--- setting references in renderer ---'
rg -n -F --glob '*.ts' --glob '*.tsx' -- 'activeRuntimeEnvironmentId' src/renderer/src | head -200

Repository: stablyai/orca

Length of output: 41390


🏁 Script executed:

#!/bin/bash
set -o pipefail
printf '%s\n' '--- ratchet discovery and counting ---'
sed -n '250,470p' config/scripts/check-focus-read-ratchet.mjs
printf '%s\n' '--- relevant helper files: imports and declarations ---'
for f in \
  src/renderer/src/components/sidebar/worktree-list/listing/use-window-list-model.ts \
  src/renderer/src/components/sidebar/worktree-list/listing/use-section-rows.ts \
  src/renderer/src/components/sidebar/worktree-list/listing/use-sort-order.ts \
  src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.ts \
  src/renderer/src/components/sidebar/worktree-list/listing/use-host-visible-scope.ts \
  src/renderer/src/components/sidebar/worktree-list/listing/use-external-worktree-cards.ts \
  src/renderer/src/components/sidebar/worktree-list/listing/use-order-hold.ts
do
  printf '\n--- %s ---\n' "$f"
  rg -n -F \
    -e 'activeRuntimeEnvironmentId' \
    -e 'defaultScopeHost' \
    -e 'defaultScopeSource' \
    -e 'defaultCreationHost' \
    -e 'rowLessSourceTarget' \
    -e 'getActiveRuntimeTarget' \
    -e 'legacyRouteFromSettings' \
    -e 'settingsForRuntimeOwner' \
    -e 'export function' \
    -e 'export const' \
    "$f" || test "$?" -eq 1
done

Repository: stablyai/orca

Length of output: 8352


🏁 Script executed:

#!/bin/bash
set -o pipefail
printf '%s\n' '--- listing imports and relevant calls ---'
rg -n -E '^(import|export)|ORCA_SIDEBAR_INPUTS|useAppStore|use[A-Z][A-Za-z0-9_]*\(' \
  src/renderer/src/components/sidebar/worktree-list/listing \
  --glob '*.ts' --glob '*.tsx' || test "$?" -eq 1
printf '%s\n' '--- selected implementation files ---'
rg -n -C 3 -E 'useSidebarWorktreeSortOrder|useMainSidebarWorktreeSortOrder|useWindowSidebarWorktreeSortOrder|activeRuntimeEnvironmentId|defaultScopeHost|defaultScopeSource|defaultCreationHost|rowLessSourceTarget' \
  src/renderer/src/components/sidebar/worktree-list \
  --glob '*.ts' --glob '*.tsx' || test "$?" -eq 1

Repository: stablyai/orca

Length of output: 630


🏁 Script executed:

#!/bin/bash
set -o pipefail
printf '%s\n' '--- listing imports and relevant calls ---'
rg -n -e '^(import|export)' -e 'ORCA_SIDEBAR_INPUTS' -e 'useAppStore' -e 'use[A-Z][A-Za-z0-9_]*\(' \
  src/renderer/src/components/sidebar/worktree-list/listing \
  --glob '*.ts' --glob '*.tsx' || test "$?" -eq 1
printf '%s\n' '--- selected implementation files ---'
rg -n -C 3 -e 'useSidebarWorktreeSortOrder' -e 'useMainSidebarWorktreeSortOrder' -e 'useWindowSidebarWorktreeSortOrder' -e 'activeRuntimeEnvironmentId' -e 'defaultScopeHost' -e 'defaultScopeSource' -e 'defaultCreationHost' -e 'rowLessSourceTarget' \
  src/renderer/src/components/sidebar/worktree-list \
  --glob '*.ts' --glob '*.tsx' || test "$?" -eq 1

Repository: stablyai/orca

Length of output: 41397


🏁 Script executed:

#!/bin/bash
set -o pipefail
printf '%s\n' '--- sort-order module ---'
nl -ba src/renderer/src/components/sidebar/worktree-list/listing/use-sort-order.ts | sed -n '1,135p'
printf '%s\n' '--- sort-order implementation bindings ---'
rg -n -C 8 -e 'useStampSidebarWorktreeSortOrder' -e 'useSettledSidebarWorktreeSortOrder' \
  src/renderer/src/components/sidebar/worktree-list \
  --glob '*.ts' --glob '*.tsx' || test "$?" -eq 1
printf '%s\n' '--- exact referenced declarations ---'
rg -n -C 12 -e 'export function useStampSidebarWorktreeSortOrder' \
  -e 'export const useStampSidebarWorktreeSortOrder' \
  -e 'export function useSettledSidebarWorktreeSortOrder' \
  -e 'export const useSettledSidebarWorktreeSortOrder' \
  src/renderer/src --glob '*.ts' --glob '*.tsx' || test "$?" -eq 1

Repository: stablyai/orca

Length of output: 11238


🏁 Script executed:

#!/bin/bash
set -o pipefail
for spec in \
  'src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.ts:1,260' \
  'src/renderer/src/components/sidebar/worktree-list/listing/use-host-visible-scope.ts:1,180' \
  'src/renderer/src/components/sidebar/worktree-list/listing/use-external-worktree-cards.ts:1,180' \
  'src/renderer/src/components/sidebar/worktree-list/listing/use-order-hold.ts:65,120' \
  'src/renderer/src/components/sidebar/worktree-list/listing/use-section-rows.ts:60,310'
do
  file=${spec%%:*}
  range=${spec#*:}
  printf '\n--- %s [%s] ---\n' "$file" "$range"
  nl -ba "$file" | sed -n "${range}p"
done

Repository: stablyai/orca

Length of output: 30051


🏁 Script executed:

#!/bin/bash
for spec in \
  'src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.ts:1,260' \
  'src/renderer/src/components/sidebar/worktree-list/listing/use-host-visible-scope.ts:1,180' \
  'src/renderer/src/components/sidebar/worktree-list/listing/use-external-worktree-cards.ts:1,180' \
  'src/renderer/src/components/sidebar/worktree-list/listing/use-order-hold.ts:65,120' \
  'src/renderer/src/components/sidebar/worktree-list/listing/use-section-rows.ts:60,310'
do
  file=${spec%%:*}
  range=${spec#*:}
  printf '\n--- %s [%s] ---\n' "$file" "$range"
  nl -ba "$file" | sed -n "${range}p"
done

Repository: stablyai/orca

Length of output: 30051


🏁 Script executed:

nl -ba src/renderer/src/components/sidebar/worktree-list/listing/use-external-worktree-cards.ts | sed -n '175,245p'

Repository: stablyai/orca

Length of output: 1357


Remove the stale allowance for use-window-list-model.ts.

useWindowSidebarListModel and its called hooks contain no direct activeRuntimeEnvironmentId read or discovered focus-reader call. Remove this baseline entry.

Suggested baseline update
--- "a/config/focus-setting-read-baseline.txt"
+++ "b/config/focus-setting-read-baseline.txt"
@@ -190,7 +190,6 @@
 1 src/renderer/src/components/sidebar/worktree-filter-visibility.ts
 1 src/renderer/src/components/sidebar/worktree-list/listing/use-filters.ts
 1 src/renderer/src/components/sidebar/worktree-list/listing/use-section-rows.ts
-1 src/renderer/src/components/sidebar/worktree-list/listing/use-window-list-model.ts
 1 src/renderer/src/components/sidebar/worktree-list/rows/ProjectGroupDialogs.tsx
 1 src/renderer/src/components/sidebar/worktree-visibility-host-target.ts
 1 src/renderer/src/components/skills/SkillsPage.tsx
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
1 src/renderer/src/components/sidebar/worktree-list/listing/use-window-list-model.ts

…p-reads-main

# Conflicts:
#	config/focus-setting-read-baseline.txt
@Jinwoo-H
Jinwoo-H merged commit 19e45b7 into main Oct 19, 2026
46 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.

1 participant