Repository navigation
feat(github-projects): render Board project views as a kanban board (read-only) - #10186
pythonstrup wants to merge 2 commits into
Conversation
|
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:
📝 WalkthroughWalkthroughThe change adds GitHub Project Board view support. Board view grouping fields are fetched and normalized, then converted into ordered columns with empty and deleted-option handling. A new Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🟠 High · up to Board views remain inaccessible through a primary navigation path, and board-only projects can fail to open entirely. These central feature regressions should be fixed before merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 28.13% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 18 files. (5 skipped: 5 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 (2)
src/shared/github-project-board-columns.ts (1)
39-58: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTrailing "No
<field>" column label bypasses i18n.
buildBoardColumnshardcodes`No ${field.name}`as English text. Every other board-view string (no-group-field,empty,restricted) is routed throughtranslate()with a locale key, but this one isn't, so non-English users will always see this label in English.♻️ Proposed fix — build the label in the renderer via translate()
- const noValue: ProjectBoardColumn = { - key: NO_VALUE_KEY, - label: `No ${field.name}`, - color: '', - rows: [] - } + const noValue: ProjectBoardColumn = { + key: NO_VALUE_KEY, + // Why: shared/*.ts has no i18n access; leave localization to the renderer + // and expose the raw field name instead of a pre-formatted English string. + label: field.name, + color: '', + rows: [] + }Then in
ProjectBoardView.tsx'sBoardColumn, format the no-value label withtranslate('...ProjectBoardView.no-value-column', 'No {{value0}}', { value0: column.key === NO_VALUE_KEY ? field.name : column.label })(or thread a boolean/kind throughProjectBoardColumnso the renderer can distinguish the no-value column from a real option).Also applies to: 66-77
src/renderer/src/components/github-project/ProjectCell.tsx (1)
1094-1114: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winChip-color utilities are exported from a table-cell component for a board component to consume.
chipStyle/singleSelectChipColorslive inProjectCell.tsxpurely to be reused by the newProjectBoardView.tsx, coupling the board feature to the cell-rendering module's internals rather than a shared, feature-neutral module.
src/renderer/src/components/github-project/ProjectCell.tsx#L1094-L1114: movechipStyle,singleSelectChipColors,labelChipColors, andSINGLE_SELECT_HEXinto a small shared module (e.g.github-project-chip-colors.ts) instead of exporting them from the cell component.src/renderer/src/components/github-project/ProjectBoardView.tsx#L1-L10: import the chip helpers from that new shared module instead of./ProjectCell.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2cd77556-563f-4893-94ec-89dd2ea6191b
📥 Commits
Reviewing files that changed from the base of the PR and between 8f40ddf and e67af0d8ed222177bb8cedc279977e34528224e3.
📒 Files selected for processing (12)
src/main/github/project-view.tssrc/renderer/src/components/github-project/ProjectBoardView.tsxsrc/renderer/src/components/github-project/ProjectCell.tsxsrc/renderer/src/components/github-project/ProjectViewWrapper.tsxsrc/renderer/src/components/github-project/project-board-columns.test.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/github-project-board-columns.tssrc/shared/github-project-types.ts
3218ec9 to
2c2d06f
Compare
Greptile SummaryThis PR adds read-only kanban board rendering for GitHub Projects Board views, previously disabled with an "unsupported" message. Column derivation, row bucketing, and in-column sorting all reuse the existing shared table-view primitives (
Confidence Score: 5/5Safe to merge — board rendering is a self-contained additive path that reuses proven table-view primitives, touches no auth or IPC surfaces, and is fully covered by unit tests. The column-derivation logic is pure and well-tested. The main-process change is a small additive GraphQL field with the same normalizer path as the adjacent Files Needing Attention: No files require special attention;
|
| Filename | Overview |
|---|---|
| src/shared/github-project-board-columns.ts | New pure module deriving board columns from a group field; handles single-select option order, deleted-option rows, and the no-value bucket correctly |
| src/renderer/src/components/github-project/ProjectBoardView.tsx | New board renderer; the table.rows.length === 0 early-return bypasses already-computed empty single-select option columns, diverging from GitHub.com's behaviour for zero-item views |
| src/shared/github-project-group-sort.ts | Refactored to export EMPTY_GROUP_KEY and extract groupRowsByField from groupRows; existing behaviour preserved, board view reuses the identical bucketing path |
| src/main/github/project-view.ts | Adds verticalGroupByFields to the GraphQL query and normalizer; lifts BOARD_LAYOUT out of the unsupported-layout early-return so the full item pipeline runs |
| src/renderer/src/components/github-project/single-select-chip-colors.ts | Chip-color functions extracted verbatim from ProjectCell.tsx to a shared module; no logic changes, both consumers now import from one place |
| src/renderer/src/components/github-project/ProjectViewWrapper.tsx | Routes BOARD_LAYOUT to the new ProjectBoardView; ViewTabStrip now enables board tabs; error copy updated for Roadmap-only unsupported state |
| src/renderer/src/components/github-project/project-board-columns.test.ts | 10 unit tests covering group-field resolution, fallback logic, single-select option ordering, deleted-option rows, non-single-select grouping, and iteration ordering |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[getProjectViewTable] -->|BOARD_LAYOUT now allowed| B[Fetch items via table pipeline]
B --> C[finalizeView: normalize verticalGroupByFields]
C --> D[GitHubProjectTable with selectedView.verticalGroupByFields]
D --> E[ProjectViewWrapper]
E -->|layout === BOARD_LAYOUT| F[ProjectBoardView]
E -->|layout === TABLE_LAYOUT| G[ProjectViewList]
F --> H[resolveBoardGroupField]
H -->|verticalGroupByFields present| I[Use first verticalGroupByField]
H -->|fallback: cached view| J[Status field → any single-select]
F --> K[sortRows: apply selectedView.sortByFields]
K --> L[buildBoardColumns]
L -->|single-select field| M[One column per option in option order + deleted-option columns + no-value column if needed]
L -->|other field kind| N[groupRowsByField groups label-sorted, no-value last]
M --> O[BoardColumn x n]
N --> O
O --> P[BoardCard for each row - clickable opens handleOpenDialog]
Reviews (2): Last reviewed commit: "fix(github-projects): correct Japanese b..." | Re-trigger Greptile
9eb4661 to
33e2342
Compare
33e2342 to
131f65d
Compare
|
Note The previously reviewed commits are no longer reachable (likely due to a force-push or rebase), so CodeRabbit is performing a full review instead of an incremental one. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: fb26776d-51d9-4aaf-8018-d38e0c128259
📥 Commits
Reviewing files that changed from the base of the PR and between a76a95d and 131f65de39c6446efda2ad6cf18c5d8f9d1980dc.
📒 Files selected for processing (16)
src/main/github/project-view.tssrc/renderer/src/components/github-project/ProjectBoardView.tsxsrc/renderer/src/components/github-project/ProjectCell.tsxsrc/renderer/src/components/github-project/ProjectGroupHeader.tsxsrc/renderer/src/components/github-project/ProjectViewList.tsxsrc/renderer/src/components/github-project/ProjectViewWrapper.tsxsrc/renderer/src/components/github-project/project-board-columns.test.tssrc/renderer/src/components/github-project/single-select-chip-colors.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/github/project-board-columns.tssrc/shared/github/project-group-sort.tssrc/shared/github/project-types.ts
🚧 Files skipped from review as they are similar to previous changes (10)
- src/renderer/src/components/github-project/ProjectViewList.tsx
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/components/github-project/ProjectGroupHeader.tsx
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/components/github-project/ProjectCell.tsx
- src/renderer/src/components/github-project/ProjectViewWrapper.tsx
- src/renderer/src/components/github-project/single-select-chip-colors.ts
- src/renderer/src/i18n/locales/zh.json
- src/main/github/project-view.ts
- src/renderer/src/i18n/locales/ja.json
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.
…read-only)
Board-layout views in the GitHub Projects tab now render as a kanban
board instead of a disabled tab. Columns come from the view's vertical
group-by field (fallback: Status, then any single-select), in option
order with empty columns kept, a trailing "No <field>" column for
valueless rows, and orphaned columns for deleted options. Cards show
the PR/draft/restricted glyph, repo, number, two-line clamped title,
and assignee avatars; clicking opens the existing item dialog.
Main process: query verticalGroupByFields and let BOARD_LAYOUT through
the items pipeline.
Drag-and-drop status changes are a follow-up; the field mutation backend
already exists.
Squashed from the branch's five commits and re-ported over main's
restructuring: project-view.ts split into project-view/{config,table},
ProjectViewWrapper split into ProjectPickerPanels/ProjectViewStates,
chip colors already extracted on main as project-cell-chip-colors
(the branch's duplicate module was dropped), and roadmap support that
landed on main is preserved alongside board support.
Refs stablyai#9943 (upstream stablyai/orca)
Co-Authored-By: Claude Fable 5 <[email protected]>
131f65d to
ea268d3
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟠 Major · Enable Board layouts in the supported-layout allowlist. · src/renderer/src/components/github-project/ProjectViewStates.tsx:47-47
47-47: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winEnable Board layouts in the supported-layout allowlist.
BOARD_LAYOUTevaluates as unsupported at Line 47. The tab is then disabled and receivespointer-events-none, so users cannot open Board views through the Projects tab. AddBOARD_LAYOUTtosupported.
🟠 Major · Select a board when no table or roadmap view exists. · src/main/github/project-view/project-view-table.ts:93-93
93-93: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winSelect a board when no table or roadmap view exists.
When no selector is provided,
matchesSelectorrecognizes onlyTABLE_LAYOUTas the default. For a project containing onlyBOARD_LAYOUTviews, the loop scans all views, the fallback finds no roadmap, andgetProjectViewTablereturnsnot_found.BOARD_LAYOUTis supported by the item pipeline and renderer.Keep the existing table-then-roadmap order, then use the first board as the final fallback. Add a board-only test without a selector.
Proposed fix
- selectedRaw = viewsSeen.find((v) => v.layout === 'ROADMAP_LAYOUT') ?? null + selectedRaw = + viewsSeen.find((v) => v.layout === 'ROADMAP_LAYOUT') ?? + viewsSeen.find((v) => v.layout === 'BOARD_LAYOUT') ?? + null
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 361fc12d-86a9-456b-91cf-15f030ace31d
📥 Commits
Reviewing files that changed from the base of the PR and between 131f65de39c6446efda2ad6cf18c5d8f9d1980dc and ea268d3.
📒 Files selected for processing (16)
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/ProjectBoardView.tsxsrc/renderer/src/components/github-project/ProjectGroupHeader.tsxsrc/renderer/src/components/github-project/ProjectPickerPanels.tsxsrc/renderer/src/components/github-project/ProjectViewList.tsxsrc/renderer/src/components/github-project/ProjectViewStates.tsxsrc/renderer/src/components/github-project/ProjectViewWrapper.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/github/project-group-sort.tssrc/shared/github/project-types.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/i18n/locales/zh.json
- src/renderer/src/i18n/locales/ko.json
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/i18n/locales/en.json
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
…tricted numbers The empty state now keys off the built columns, so a single-select board with zero matching rows still shows its option columns (as on github.com). Board cards no longer print #number for REDACTED items, matching the table's title cell. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Closing as superseded: the linked issue's requested behavior is already implemented on GitHub Projects Board views now render columns and cards with the configured grouping and also support drag-and-drop status changes. This covers the read-only board request. Thanks for the contribution. This closes the redundant PR without deleting its branch. |
Summary
Board-layout views in the GitHub Projects tab now render as a kanban board. Previously the Board tab was disabled with "Orca doesn't support Board project views yet" (#9943); now it's clickable and renders columns with cards.
verticalGroupByFields, whatever its kind — GitHub boards group by Assignee, Iteration, Milestone and Repository as well as single-select. Bucketing reuses the table view's grouping (groupRowsByField, extracted fromgroupRows) so both views order and label groups identically.labelForEmpty).verticalGroupByFieldswas queried: the field namedStatus, then any single-select field.TitleCellrules), repo, number, two-line clamped title, and assignee avatars. Clicking a card opens the existing issue/PR dialog, so all existing editing flows work unchanged.sortByFieldsordering applies within columns via the existing sharedsortRows.unsupported_layout), with copy updated to say Table and Board are rendered.This is read-only rendering (PR 1 of 2). Drag-and-drop between columns is a planned follow-up — the field-mutation backend (
updateProjectItemFieldValue) already exists and is wired for the table view.Screenshots
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildproject-board-columns.test.ts(10 tests) covering group-field resolution for single-select and non-single-select fields, the cached-view fallbacks, option-order columns with empty columns kept, the trailing no-value column, deleted-option rows, users-field grouping, iteration column ordering, and in-column order preservation. The column-derivation logic lives in a pure shared module (src/shared/github-project-board-columns.ts, mirroringgithub-project-group-sort.ts) so these tests exercise the real production path.Manually verified against a real Projects v2 board (user-owned project, 19 visible items incl. a PR, empty columns, no-status items, long titles, emoji, assignees) in light and dark mode.
AI Review Report
Review ran with Claude Code during implementation; main risks checked:
fetchProjectViewTablepipeline, which already routes via runtime RPC for remote environments; no new IPC channels or preload surface. Board rendering is a pure function of the already-fetched table.verticalGroupByFieldsis queried identically to the adjacentgroupByFieldsconnection (both part of the initial ProjectV2 GraphQL surface); the field normalizer drops unknown nodes and the board falls back to the Status field if the connection comes back empty.[groupField, table]; no new dependencies; board reuses the existing sharedsortRows. No hot-path or startup impact.card/border/muted/accent) — no new hex values; option-color chips reusesingleSelectChipColors/chipStylefrom the sharedsingle-select-chip-colorsmodule so board headers match table cells pixel-for-pixel in both themes; card hover matchesProjectRow'saccent/60; count badge matchesProjectGroupHeader's;scrollbar-sleekon both overflow containers.Flagged and fixed during review: card hover tint initially diverged from the sibling
ProjectRow(accent/50vsaccent/60) — aligned per STYLEGUIDE's sibling-consistency rule.Security Audit
ghGraphQL query; responses go through the existing normalizer, which drops malformed nodes.imgURLs come from the GitHub API exactly as in the existingProjectCellassignee rendering. NodangerouslySetInnerHTML, no user-controlled URL navigation.Notes
DRAFT_ISSUE/REDACTEDglyphs for when that policy changes.no-group-field,empty,restricted) rather than content-hashed like the generated ones;sync:localization-catalogran clean, and ko/ja/zh/es reuse the catalog's existing translations for the two strings that already existed in the table view. Happy to re-key if your tooling prefers hashes.updateProjectItemFieldValue.Closes #9943
🤖 Generated with Claude Code
ELI5
GitHub Projects Board views were disabled in Orca. Board layout now renders as a read-only kanban with columns and cards so you can browse board-style projects without leaving the app.