Skip to content

fix(sources): GitHub Projects boards read from the task page's source host - #27270

Merged
OrcaWin merged 2 commits into
mainfrom
OrcaWin/d4-d4-v7b
Oct 10, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
OrcaWin/d4-d4-v7b

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​85 $\color{#cf222e}{\Huge{\mathbf{−}}}$​38 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​47
Prod 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​134 $\color{#cf222e}{\Huge{\mathbf{−}}}$​57 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​77

ELI5

The Tasks page has a GitHub Projects view (the project board). Before this change, the board quietly loaded from whichever server the app-wide "Active Server" setting named, while the label at the top of the Tasks page talked about the hosts of your selected repositories. So the label could say "This computer" while the board was actually coming from a remote server. Now the board loads from the same source host that Linear and Jira on the Tasks page already use, and the label names that host.

What Changed

  • Before (user): in GitHub → Projects mode, the header label showed the selected repositories' hosts (for example "GitHub · This computer · 2 projects"), but the board, the project picker and edits to rows that don't match a known repository were sent to the Active Server.
  • After (user): the header in Projects mode reads "GitHub · · Current account", where <host> is the host the board really loads from. It shows when that host is disconnected. Which host is used doesn't change: it is the same host Linear and Jira on the Tasks page use.
  • Mechanism:
    • ProjectViewWrapper now receives the Tasks page's row-less source host (accountBackedTaskSourceHostId, which Linear and Jira already use). It converts that host with the existing getTaskSourceRuntimeSettings selector and passes the result to the table hook, the project picker, the slug dialog and the row cells. None of them reads settings to pick a host anymore.
    • fetchProjectViewTable takes the source as an explicit argument instead of reading get().settings. Row edits already route by the source written into the cache key, so they follow automatically.
    • Removed a duplicate listProjectViewsForRuntime from useProjectViewTable. The table hook now reuses the one the picker uses.
    • The ownership table (HOST_OPERATION_OWNERSHIP) gets a short per-method list. The four board-level reads (github.project.viewTable, listViews, listAccessible, resolveRef) are scope-picked. Row edits stay credential, because they go to the matched repository's owner first.
    • An open dialog for a row whose repository Orca doesn't track now keeps sending comments and edits to the host that row was loaded from, even if the board's source changes while the dialog is open. It reads that host from the row's cache key, the same way row field edits already do. Before, it followed the board's current source.
    • The owner-routing ratchet drops by 2.

Why

This follows the decision that work with no source row (GitHub Projects boards, Tasks-page sources, Jira) uses the task-source selector with a visible host label, and never picks a host on its own from focus. Two other approaches were considered:

  • Adding a new host picker to the Tasks page now. It would need Linear and Jira connection status per host, because today those are tracked only for the default host. That is a much larger change, and the Settings host picker that just landed covers the settings side.
  • Keeping a separate Projects-only host. The board would then disagree with Linear and Jira on the same page.

With one host value for all three, a future Tasks-page picker only has to change that one value.

Adapted from the design (known limit): the shared host for row-less sources still comes from the "Active Server" / default-host setting, as it does on main. It is read again whenever the setting changes, the same way the Settings host picker uses that setting as its default. Making it a stable choice that ignores later setting changes needs Linear and Jira connection status per host, because the store tracks them only for that setting's host today. Without that, Linear and Jira could show a connection state from one host and data from another. That follow-up belongs with the Tasks-page picker. Writes are safe in the meantime: row edits and the unmatched-row dialog stay on the host their row was loaded from, and rows from a tracked repository go to that repository's owner.

Jira and Linear on the Tasks page already go through their task-source contexts, so this PR doesn't change them.

Linked Issue

None. This is part of the host-ownership routing stack.

Visual Proof

N/A. The only visible change is the text of the existing header label in Projects mode, which is covered by unit tests. The machine is load-capped, so the app wasn't launched.

Testing

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • host-operation-ownership.test.ts: the new board-method case fails on origin/main (expected 'credential' to be 'scope-picked') and passes here.

  • github-project-view-tables.test.ts: the board loads from the source it is given, not from the focused server, and runtime and local caches stay separate when focus doesn't change.

  • task-page-task-source-host-availability.test.ts: the Projects header names the board host, a missing task-source capability doesn't mark it unavailable, and a disconnected host does.

  • Ran: pnpm tc:web, focused pnpm test (github-project, task-page and store suites; 62 files), oxlint, pnpm run check:code-quality:changed, pnpm check:owner-routing-ratchet.

Review

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

No wire change: the runtime RPC methods and params are the same, and only the renderer decides where to send them. SSH: the row-less host is "this computer" or a saved server, never a direct SSH host, which is the same as before. Folder workspaces and Windows are unaffected.

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)

m4air added 2 commits October 10, 2026 08:56
… host

The Projects board, its project picker and unmatched-row edits picked their
host from the Active Server setting on their own, while the Tasks header
named the selected repositories' hosts. The board now takes the same
row-less source host that Linear and Jira use, converted through
getTaskSourceRuntimeSettings, and the header names that host in Projects
mode. fetchProjectViewTable takes the source explicitly instead of reading
settings. The ownership table marks the four board-level GitHub Projects
reads as scope-picked.
…ts row's host

The dialog took the board's live source, so a source change while it was
open sent its comment and field edits to a different host than the one the
row was loaded from. It now routes by the source encoded in its row's cache
key, like the row field edits already do.
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

Walkthrough

GitHub project operations now receive explicit source settings for project-table requests, view listing, browsing, and pasted-reference resolution. The task page passes the account-backed host ID to the project view and displays a source summary derived from the GitHub project host. Method-level ownership overrides classify four GitHub project methods as scope-picked. Related tests and the owner-routing baseline are updated.


Priority: ➖ Normal

Merge Risk: 🔵 Low · up to 34289

Switching board sources can temporarily show an error instead of an available cached table. This is a bounded issue to fix or explicitly accept before merging.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 15.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 19 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: routing GitHub Projects board reads through the Tasks page source host.
Description check Passed The description covers the user impact, implementation, rationale, testing, visual proof, compatibility considerations, and checklist. The required Linked Issue section is present but contains “None” …
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.

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

@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: ab4eb50b-7f02-4ba3-a86e-0d54b3857560
📥 Commits

Reviewing files that changed from the base of the PR and between 865183c and 34289f0.

📒 Files selected for processing (20)
  • config/owner-routing-baseline.txt
  • src/renderer/src/components/github-project/ProjectPicker.tsx
  • src/renderer/src/components/github-project/ProjectViewToolbar.tsx
  • src/renderer/src/components/github-project/ProjectViewWrapper.tsx
  • src/renderer/src/components/github-project/project-picker-runtime.ts
  • src/renderer/src/components/github-project/useProjectPickerBrowse.ts
  • src/renderer/src/components/github-project/useProjectViewTable.ts
  • src/renderer/src/components/task-page-source-context.tsx
  • src/renderer/src/components/task-page-task-source-host-availability.test.ts
  • src/renderer/src/components/task-page/Content.tsx
  • src/renderer/src/components/task-page/SourceBar.tsx
  • src/renderer/src/components/task-source-context-summary.ts
  • src/renderer/src/store/github/project-actions.ts
  • src/renderer/src/store/github/provider-request-coalescing.test.ts
  • src/renderer/src/store/github/slice-types.ts
  • src/renderer/src/store/slices/github-project-request-coordination.test.ts
  • src/renderer/src/store/slices/github-project-view-tables.test.ts
  • src/renderer/src/store/slices/github-provider-request-concurrency.test.ts
  • src/shared/host-operation-ownership.test.ts
  • src/shared/host-operation-ownership.ts
💤 Files with no reviewable changes (1)
  • config/owner-routing-baseline.txt

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

const mountedRef = useMountedRef()
const target = getActiveRuntimeTarget(settings)
const sourceScope = target.kind === 'environment' ? `runtime:${target.environmentId}` : 'local'
const sourceScope = projectViewSourceScope(sourceSettings)

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Ignore fetch failures from a previous board source.

If the source changes while a fetch is pending and the new source already has a cached table, the cache-hit effect does not call doFetch. fetchRunIdRef remains unchanged. A failure from the old source can then set error, and ProjectViewBody shows that error instead of the cached table. Invalidate pending fetch results when sourceScope changes, including when the new table is cached.

@OrcaWin
OrcaWin merged commit 5c7c493 into main Oct 10, 2026
31 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