Skip to content

feat(github-projects): render Board project views as a kanban board (read-only) - #10186

Closed
pythonstrup wants to merge 2 commits into
stablyai:mainfrom
pythonstrup:pythonstrup/feat-project-board-view
Closed

pythonstrup wants to merge 2 commits into
stablyai:mainfrom
pythonstrup:pythonstrup/feat-project-board-view

Conversation

@pythonstrup

@pythonstrup pythonstrup commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Columns come from the view's 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 from groupRows) so both views order and label groups identically.
  • Single-select fields additionally get one column per option in option order, including empty ones, matching github.com. Rows pointing at a deleted option keep their own labeled column instead of being mislabeled.
  • Rows with no value go to the shared trailing no-value group, localized in both the board column header and the table group header (previously hardcoded English in labelForEmpty).
  • Fallback for views cached before verticalGroupByFields was queried: the field named Status, then any single-select field.
  • Cards show the PR/draft/restricted glyph (mirroring the table's TitleCell rules), 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.
  • The view's saved sortByFields ordering applies within columns via the existing shared sortRows.
  • Roadmap views remain unsupported (count-only + 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

image

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added project-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, mirroring github-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:

  • Cross-platform (macOS/Linux/Windows): no keyboard shortcuts, file paths, shell invocations, or Electron platform APIs added. Pure renderer components + one GraphQL field added in the main process. No platform-conditional code paths.
  • SSH/remote/local: data flows through the existing fetchProjectViewTable pipeline, 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.
  • Git providers / integrations: feature is GitHub-specific and lives entirely in the existing GitHub-only project-view modules; no generic review/source-control surfaces touched. GHES: verticalGroupByFields is queried identically to the adjacent groupByFields connection (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.
  • Performance: column bucketing is O(rows) and memoized on [groupField, table]; no new dependencies; board reuses the existing shared sortRows. No hot-path or startup impact.
  • UI quality: tokens only (card/border/muted/accent) — no new hex values; option-color chips reuse singleSelectChipColors/chipStyle from the shared single-select-chip-colors module so board headers match table cells pixel-for-pixel in both themes; card hover matches ProjectRow's accent/60; count badge matches ProjectGroupHeader's; scrollbar-sleek on both overflow containers.

Flagged and fixed during review: card hover tint initially diverged from the sibling ProjectRow (accent/50 vs accent/60) — aligned per STYLEGUIDE's sibling-consistency rule.

Security Audit

  • No new IPC handlers, preload APIs, command execution, or path handling. The one main-process change adds a field to an existing authenticated gh GraphQL query; responses go through the existing normalizer, which drops malformed nodes.
  • Renderer renders only normalized data from that pipeline; assignee avatar img URLs come from the GitHub API exactly as in the existing ProjectCell assignee rendering. No dangerouslySetInnerHTML, no user-controlled URL navigation.
  • No dependencies added. No secrets, auth, or token paths touched.

Notes

  • Draft items don't appear in Orca's Projects tab (table or board) because the existing repo-selection row filter drops rows without a repository. That's pre-existing behavior, out of scope here; the board still handles the DRAFT_ISSUE/REDACTED glyphs for when that policy changes.
  • Default view selection (when no view is pinned) still prefers the first table view — unchanged.
  • The three new i18n keys are named descriptively (no-group-field, empty, restricted) rather than content-hashed like the generated ones; sync:localization-catalog ran 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.
  • Follow-up (PR 2): drag-and-drop between columns with optimistic update + rollback via the existing 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.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview 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
📝 Walkthrough

Walkthrough

The 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 ProjectBoardView renders columns and cards with item metadata, assignees, restricted-item states, and dialog interaction. Board layouts now use the board pipeline, picker labels, unsupported-layout messages, and localized strings. Tests cover grouping, column construction, and board retrieval.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: 🟠 High · up to ea268

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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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:… 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: rendering GitHub Projects Board views as a read-only kanban board.
Description check ✅ Passed The description provides a clear summary, rationale, linked issue, screenshot, testing results, AI disclosure, review notes, security notes, and an ELI5 explanation. It does not include a before-and-a…
Linked Issues check ✅ Passed Issue #9943 requests Board-layout rendering in the Projects tab, especially grouping by a single-select Status field. The PR enables Board tabs, fetches Board view items, resolves the configured verti…
Out of Scope Changes check ✅ Passed The changes stay within issue #9943. The shared grouping extraction, Board column builder, Board renderer, Board view routing, localization, configuration loading, and automated tests directly support…
Full details: Docstring Coverage

Explanation

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.

❤️ 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.

🧹 Nitpick comments (2)
src/shared/github-project-board-columns.ts (1)

39-58: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Trailing "No <field>" column label bypasses i18n.

buildBoardColumns hardcodes `No ${field.name}` as English text. Every other board-view string (no-group-field, empty, restricted) is routed through translate() 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's BoardColumn, format the no-value label with translate('...ProjectBoardView.no-value-column', 'No {{value0}}', { value0: column.key === NO_VALUE_KEY ? field.name : column.label }) (or thread a boolean/kind through ProjectBoardColumn so 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 win

Chip-color utilities are exported from a table-cell component for a board component to consume. chipStyle/singleSelectChipColors live in ProjectCell.tsx purely to be reused by the new ProjectBoardView.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: move chipStyle, singleSelectChipColors, labelChipColors, and SINGLE_SELECT_HEX into 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.ts
  • src/renderer/src/components/github-project/ProjectBoardView.tsx
  • src/renderer/src/components/github-project/ProjectCell.tsx
  • src/renderer/src/components/github-project/ProjectViewWrapper.tsx
  • src/renderer/src/components/github-project/project-board-columns.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/github-project-board-columns.ts
  • src/shared/github-project-types.ts

@nwparker nwparker added the enhancement New feature or request label Jul 27, 2026
@pythonstrup
pythonstrup force-pushed the pythonstrup/feat-project-board-view branch from 3218ec9 to 2c2d06f Compare July 29, 2026 02:36
Comment thread src/renderer/src/i18n/locales/ja.json Resolved
@greptile-apps

greptile-apps Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

This 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 (groupRowsByField, sortRows), keeping the two views consistent.

  • verticalGroupByFields is added to the GraphQL query and type, with a graceful fallback (Status → any single-select) for cached payloads; BOARD_LAYOUT is lifted out of the "unsupported" early-return so the full item pipeline now runs for it.
  • A new pure module github-project-board-columns.ts derives columns from the group field and is covered by 10 unit tests; chip-color logic is extracted to single-select-chip-colors.ts so both the table cell and the board column header share identical styling.
  • Board cards render the PR/draft/restricted glyph, repo, number, two-line title, and assignee avatars; clicking opens the existing issue/PR dialog unchanged.

Confidence Score: 5/5

Safe 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 groupByFields. Chip-color extraction is a pure refactor with no logic change. The one note is a minor UX divergence (empty single-select boards show a message rather than empty columns), which does not affect correctness.

Files Needing Attention: No files require special attention; ProjectBoardView.tsx has a minor empty-state behaviour worth a look before drag-and-drop is added in the follow-up PR.

Important Files Changed

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]
Loading

Reviews (2): Last reviewed commit: "fix(github-projects): correct Japanese b..." | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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.

@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: 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.ts
  • src/renderer/src/components/github-project/ProjectBoardView.tsx
  • src/renderer/src/components/github-project/ProjectCell.tsx
  • src/renderer/src/components/github-project/ProjectGroupHeader.tsx
  • src/renderer/src/components/github-project/ProjectViewList.tsx
  • src/renderer/src/components/github-project/ProjectViewWrapper.tsx
  • src/renderer/src/components/github-project/project-board-columns.test.ts
  • src/renderer/src/components/github-project/single-select-chip-colors.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/github/project-board-columns.ts
  • src/shared/github/project-group-sort.ts
  • src/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]>
@pythonstrup
pythonstrup force-pushed the pythonstrup/feat-project-board-view branch from 131f65d to ea268d3 Compare September 15, 2026 12:48

@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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (2)

🟠 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 win

Enable Board layouts in the supported-layout allowlist.

BOARD_LAYOUT evaluates as unsupported at Line 47. The tab is then disabled and receives pointer-events-none, so users cannot open Board views through the Projects tab. Add BOARD_LAYOUT to supported.

🟠 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 win

Select a board when no table or roadmap view exists.

When no selector is provided, matchesSelector recognizes only TABLE_LAYOUT as the default. For a project containing only BOARD_LAYOUT views, the loop scans all views, the fallback finds no roadmap, and getProjectViewTable returns not_found. BOARD_LAYOUT is 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.ts
  • src/main/github/project-view/project-view-table.test.ts
  • src/main/github/project-view/project-view-table.ts
  • src/renderer/src/components/github-project/ProjectBoardView.tsx
  • src/renderer/src/components/github-project/ProjectGroupHeader.tsx
  • src/renderer/src/components/github-project/ProjectPickerPanels.tsx
  • src/renderer/src/components/github-project/ProjectViewList.tsx
  • src/renderer/src/components/github-project/ProjectViewStates.tsx
  • src/renderer/src/components/github-project/ProjectViewWrapper.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/github/project-group-sort.ts
  • src/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]>
@nwparker

nwparker commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Closing as superseded: the linked issue's requested behavior is already implemented on main by #19074.

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.

@nwparker nwparker closed this Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support Board (kanban) layout for GitHub Projects v2 views

3 participants