Repository navigation
feat(github-projects): render Board project views as a kanban with drag-and-drop - #19074
Conversation
There was a problem hiding this comment.
Caution
This PR imports a ProjectBoard renderer that is not part of the diff — and does not exist anywhere in the repository — so pnpm tc and the renderer build will both fail. The board layout support this PR describes is incomplete until that component lands.
Reviewed changes
- Board layout allow-listing —
BOARD_LAYOUTjoinsTABLE_LAYOUT/ROADMAP_LAYOUTingetProjectViewTable, the picker rows, the tab strip, and the unsupported-layout copy, so board views now fetch items on the same path as tables. verticalGroupByFieldsfetch with a GHES fallback — the views GraphQL query requests the board column field, retries without it on hosts whose schema predates it, and surfaces it as the optionalGitHubProjectView.verticalGroupByFields.- Shared grouping helper —
groupRowsByFieldextracts the tablegroupBybucketing for reuse by the board renderer, alongside theEMPTY_PROJECT_GROUP_KEYsentinel export.
⚠️ The GHES fallback path is untested
The capability-tracking and retry in project-view-config.ts is the only genuinely new failure-handling behavior in this PR, and it has no test. Its whole job is to prevent one unknown-field error from breaking every project view on a host, and a false positive in errorsIndicateVerticalGroupBy would silently drop the field for that host with no observable signal.
Technical details
# GHES verticalGroupByFields fallback is untested
## Affected sites
- src/main/github/project-view/project-view-config.ts:51 — `hostsWithoutVerticalGroupBy` module-level Set (never reset; not exported for test control)
- src/main/github/project-view/project-view-config.ts:59 — `errorsIndicateVerticalGroupBy` string match on `stdout\nstderr`
- src/main/github/project-view/project-view-config.ts:120 — retry-without-field branch
## Required outcome
- A test exercising `fetchProjectViewsPage` (with `runGraphql` stubbed) that returns an unknown-field error mentioning `verticalGroupByFields` on the first call, and asserts the retry omits the selection and the view finalizes with `verticalGroupByFields` absent.
## Open questions for the human
- Is the `'verticalGroupByFields'` substring match intended to be this loose? A unit test would pin the exact error shape it must match.ℹ️ Nitpicks
- The old
Board (unsupported)keyProjectPicker.d34ef9b554is now unreferenced in source but still present inen.jsonand every non-English locale — consider removing it in the catalog sync.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds board-layout support to project views. GraphQL fetching now handles hosts without Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No concrete merge-blocking risk remains. The board label uses the repository’s expected localization key format, and the formatting-only database change does not introduce a lint failure. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Out of Scope Changes checkExplanation Most changes support issue Full details: Docstring CoverageExplanation Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 16 files. (1 skipped: 1 unsupported.) 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/github-project/ProjectPickerPanels.tsx (1)
139-139: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse an intent-named localization ID for the new Board label.
Boardis a newly added user-facing string, but this change adds anotherauto.<hash>ID. Use an intent-named ID and add or update the matching catalog entry. Keep existing hash-based IDs only for grandfathered strings.Based on learnings: “For newly added user-facing strings in stablyai/orca TypeScript and TSX files, follow config/i18n-translation-source.md: use intent-named localization IDs with named interpolation placeholders. Treat existing hash-based IDs as grandfathered, and do not require SHA-1-derived IDs for new strings.”
Source: Learnings
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: e547d3c7-b0e5-40ba-a802-6ecf3356d4ad
📥 Commits
Reviewing files that changed from the base of the PR and between f952f1a and 9ed3cb6328bfe27dd08cf371ed9c5fda3119b82c.
📒 Files selected for processing (9)
src/main/github/project-view/project-view-config.tssrc/main/github/project-view/project-view-table.test.tssrc/main/github/project-view/project-view-table.tssrc/renderer/src/components/github-project/ProjectPickerPanels.tsxsrc/renderer/src/components/github-project/ProjectViewStates.tsxsrc/renderer/src/components/github-project/ProjectViewWrapper.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/shared/github/project-group-sort.tssrc/shared/github/project-types.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Board-layout views render as a kanban. Columns come from the view's verticalGroupByFields (the host retries without the selection on older GHES schemas and the renderer falls back to the Status field), with one column per single-select option in option order — empty ones included — plus a trailing no-value column whose drop clears the field. Card drops reuse the table's field mutation path, committed from a document-level capture listener because the preload's native-drop bridge stops drop events before React's root ever sees them. Co-Authored-By: Claude Fable 5 <[email protected]>
9ed3cb6 to
4926288
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/github-project/ProjectBoard.tsx (1)
109-112: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse intent-named localization IDs for new board strings.
The new strings use
auto.*IDs. The current renderer workflow requires intent-named IDs. Use named interpolation fields instead ofvalue0andvalue1.
src/renderer/src/components/github-project/ProjectBoard.tsx#L109-L112: Replace the auto ID with an intent-named board grouping-fallback ID.src/renderer/src/components/github-project/ProjectBoardCard.tsx#L25-L26: Replace the auto ID with an intent-named restricted-item ID.src/renderer/src/components/github-project/ProjectBoardCard.tsx#L46-L50: Replace the auto ID and positional placeholders with an intent-named card-label ID and named values such asissueNumberandtitle.Based on learnings: Newly added user-facing TypeScript and TSX strings must use intent-named localization IDs with named interpolation placeholders.
Source: Learnings
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 130eb2c6-36ec-4d95-8ddb-82e0b4c22f49
📥 Commits
Reviewing files that changed from the base of the PR and between 9ed3cb6328bfe27dd08cf371ed9c5fda3119b82c and 4926288.
📒 Files selected for processing (5)
src/renderer/src/components/github-project/ProjectBoard.test.tsxsrc/renderer/src/components/github-project/ProjectBoard.tsxsrc/renderer/src/components/github-project/ProjectBoardCard.tsxsrc/shared/github/project-board-columns.test.tssrc/shared/github/project-board-columns.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — since the prior review, the board renderer itself landed:
ProjectBoard+ProjectBoardCardcomponents — the previously-missing renderer is now in the PR, closing theBOARD_LAYOUTbranch that the wrapper already referenced. Column resolution, drop-to-move (via a document capture listener), and restricted/draft card states are all implemented.project-board-columns.tsshared column logic —resolveBoardColumnFieldandbuildBoardColumnsderive columns deterministically, with deleted-option "ghost" columns and a trailing no-value column whose drop clears the field.- Tests —
project-board-columns.test.ts(8) andProjectBoard.test.tsx(7) cover column construction, drop semantics (move / no-op / clear), and fallback behavior with exact assertions.
The prior blocking finding (missing ProjectBoard component) is addressed: pnpm run typecheck passes and the new test suites pass.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Review follow-up. The verticalGroupByFields capability probe now matches parsed GraphQL error messages instead of substring-scanning the whole response body — partial-error responses echo the field name as a data key on healthy schemas, so one SAML/FORBIDDEN partial error could permanently degrade github.com boards for the session. Covered by new project-view-config tests per the capability-cache testing contract. Also: only single-select/iteration vertical fields shape columns (a drifted field kind no longer yields a clear-on-drop no-value column), optimistic patches resolve the column field through the board/group config, drag cleanup moved to a document-level dragend listener, the column dot follows dark mode via the chip CSS variables, the supported- layout allowlist is a single shared predicate, and the board's edit handler is stable so its drop listener stops re-registering per render. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — since the prior review, a follow-up commit hardened the capability probe and drop lifecycle, and closed the last open item (GHES fallback coverage):
- Hardened the GHES capability probe —
errorsIndicateVerticalGroupBynow parses GraphQL error messages viaextractGraphqlErrorsinstead of substring-matching the rawstdout/stderr, removing the false-positive path where a partial-error body echoesverticalGroupByFieldsas a plain data key and silently degrades the host. - Added tests for the fallback —
project-view-config.test.tscovers the retry-without-field path, per-host memoization, unrelated-failure passthrough, and the partial-error guard, plusfinalizeViewvertical-field normalization. - Extracted a shared layout allowlist —
isRenderableProjectViewLayoutnow gates the host allowlist, tab strip, and picker in one place so a future GitHub layout rejects consistently. - Fixed the drop lifecycle — a document-level
dragendlistener clears the column highlight when a mid-drag re-render detaches the source card or a drag is cancelled (Esc/drop outside), replacing the card-levelonDragEnd. - Memoized
onEditField— the wrapper passes a stable callback soProjectBoard'smoveRowmemoization holds and its document listeners don't re-register on every wrapper render. - Broadened the optimistic field lookup —
optimisticFieldValueFromMutationsearchesverticalGroupByFields/groupByFieldstoo, so board drops patch correctly-named chips. - Guarded board column resolution —
resolveBoardColumnFieldaccepts onlysingle-select/iterationvertical fields, falling back to Status for a drifted non-select field.
The prior blocking finding (missing ProjectBoard) was already resolved, and the prior project-view-config.test.ts (6), project-board-columns.test.ts (9), and ProjectBoard.test.tsx (7) — all 22 pass.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…hub-project-board-view # Conflicts: # src/shared/github/project-group-sort.ts
|
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. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — since the prior review, a merge of main resolved the branch against main's grouping/sorting refactor:
- Merged
main(precomputed field-order index) —src/shared/github/project-group-sort.tsnow builds acreateFieldOrderIndexMap(id → position) once per group/sort field and looks option/iteration order up by id, replacing the per-rowfindIndex/findscans. - Threaded the order index through
groupRowsByField— the board's bucketing helper computesgroupOrderIndexonce and passes it intogetFieldValueForGrouping; iteration metadata is read back viaiterations[idx], which is equivalent to the priorfindand keeps board/table ordering identical.
The conflict resolution is behavior-preserving: pnpm tc passes and all three suites (project-view-config.test.ts 6, project-board-columns.test.ts 9, ProjectBoard.test.tsx 7) pass.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…hub-project-board-view # Conflicts: # src/renderer/src/i18n/locales/en.json
|
Ran a deep automated review over this PR (high effort). Three correctness findings worth fixing before merge, plus a few smaller cleanliness notes. Correctness
Smaller notes
Nothing here changes the overall shape of the approach — it's a solid, well-scoped feature. Happy to help verify a fix for any of these. |
|
This is very cool Thanks for always making cool PRs @NaoyaTatetsu |
|
Reviewed adversarially, pushed fixes, and merged as Fixed findings:
Verification on the final source:
Scope of evidence: the Electron test uses deterministic main-process GitHub IPC responses; it does not write a real user's project. Existing main-process field mutation tests cover the GraphQL path, and a read-only live schema query confirmed Final integration verification: merged main Hosted CI limitation: main has no required status-check rules. The final hosted PR runs ended before creating any jobs; GitHub reports a likely workflow-file issue (run). Merge used the passing local verification and an exact-head guard; this is not a claim of green hosted CI. After the failed clear: the card remains in Done and the error is visible: |
…oard-view # Conflicts: # src/renderer/src/i18n/locales/en.json




ELI5
GitHub Projects has a kanban-style Board view. Orca previously grayed the Board tab out with "unsupported" — now it renders real columns (one per Status option, with colored dots and counts) and you can drag a card between columns to change its status, exactly like on github.com.
What Changed
verticalGroupByFields; the renderer falls back to the Status field (then any single-select) for cached or config-less views.groupRowsByField, extracted fromgroupRows), so board and table order and label groups identically.onDrop: Orca's preload stops every native drop withstopPropagationbefore it reaches React's root (the native file-drop bridge), so React drop handlers never fire — the same pattern the workspace kanban uses. Drag-cancel (Esc / drop outside) clears the column hover highlight viadragend.verticalGroupByFields, with a per-host retry that drops the selection when an older GHES schema rejects it — one unknown field must not break every project view on that host. The layout gate stays an allowlist (table + board + roadmap); unknown future layouts still reject cleanly. Default view fallback is table → roadmap → board.#number, two-line clamped title, repo, and assignee avatars; clicking a card opens the existing item dialog.Why
Board is the most requested Projects layout (#9943 has
help wantedplus several closed duplicates), and with Table and Roadmap (#17795) already rendering, it was the last first-class layout Orca couldn't show. Deriving columns fromverticalGroupByFieldsuses GitHub's own board configuration instead of guessing, and reusing the table's grouping and mutation paths keeps the three views consistent rather than forking per-view logic.Linked Issue
Fixes #9943
Visual Proof
Same 12-item project before and after, so the shots can be tab-switched.
Before — Board tab disabled (table shown, hover card explains):
After — Board renders as a kanban (Status columns with colored dots and counts):
After — drop-target highlight while dragging a card over In Progress:
Testing
Unit: 8 tests on the shared column module — vertical-field preference, Status/single-select fallback, option-order columns with empty ones, deleted-option ghost columns, no-value trailing column, iteration columns, read-only non-select buckets.
Component: 7 tests on
ProjectBoard— column rendering, drop moves viaonEditField, no-op drop suppression, clear-on-no-value-drop, dialog open, restricted-item labeling, hover-highlight cleanup on dragend/payload-less drops, fallbacks and empty states.Updated the layout-gate tests: board now fetches items like a table; unknown future layouts still reject with the count-only query.
Gates:
pnpm tc, changed-file code-quality gate, and all three localization gates pass locally.Manually verified on macOS (dev app, CDP-driven): board rendering on two real projects (12-item sample and a 65-item project with four custom Status columns), then a full drag round-trip — card dragged In Progress → Done updated optimistically and flipped the Status on github.com (confirmed via API), then dragged back.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Implemented with Claude Code (Fable 5); design decisions, review, and manual verification by the author.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
verticalGroupByFields, empty option columns, deleted-option handling).verticalGroupByFieldson the view payload is optional — old hosts simply omit it and new clients fall back to the Status field; old clients ignore it. Old host × new client still returnsunsupported_layoutfor boards (generic copy, no layout named). GHES schemas lacking the GraphQL field are detected and retried without it, per host.@dnd-kitnot needed).Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)