Repository navigation
Conversation
2c84618 to
4d5c997
Compare
Core features: - ProjectViewKanban: board layout with draggable cards grouped by single-select field, all options shown as columns (incl. empty) - Drag-drop: onDragEnd-based mutation with useRef (async useState can't deliver state before synchronous drop event) - ProjectViewWrapper: enable BOARD_LAYOUT in tab strip + picker, dispatch to kanban vs list based on view.layout - ProjectFieldsGrid: project-specific fields rendered as grid sections inside the issue dialog metadata (GHEditSection), with styled sidebar-popover for single-select and date inputs - project-view.ts: BOARD_LAYOUT passes data-fetch gate, default view selection prefers TABLE over BOARD, project-level fields fetched and stored in table.projectFields - GitHubProjectTable.projectFields: new type field for project-level fields that don't pollute selectedView.fields (table columns) - optimisticFieldValueFromMutation: checks all field sources incl. projectFields for proper optimistic name/color rendering - Filter: exclude dialog-owned fields (TITLE, ASSIGNEES, LABELS, etc.) + GitHub auto-timestamps (created, updated, closed) Design: - Dark board background (bg-[#0d0d10]), cards with elevated surface (bg-[#16161a] + subtle border + shadow) - 150ms ease-out transitions, focus-visible ring, keyboard accessible - Column headers with tracking-wide labels + tabular-nums counts - Polished grip handle (hidden, fades on hover) - Empty columns with dashed border + 'Drop issues here' placeholder Tests: ProjectViewKanban.test.tsx (6 tests), updated store/github tests for projectFields type, group-sort + row-filtering tests. Branch: v0id00/orca-kanban (squashed from 26 WIP commits).
4d5c997 to
8eafef8
Compare
|
Force pushed to fix merge conflict. |
|
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: Pro Plus Run ID: 📒 Files selected for processing (24)
🚧 Files skipped from review as they are similar to previous changes (17)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds board-layout project views with Kanban columns, drag-and-drop field updates, and board grouping fallback selection. Project-level fields are fetched, returned, filtered, and rendered in item dialogs with single-select and date editors. View selection now supports tables and boards while marking roadmaps unsupported. Optimistic field updates include project-level and grouping metadata. Tests and localized labels cover the new behavior. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
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.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
src/renderer/src/store/slices/github.test.ts (1)
6936-6962: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winAdd
projectFieldsto the localmakeTablehelper.
fetchProjectViewTablestoresenvelope.datainprojectViewCachewithout mapping fields, so these mocked values are accessed through theGitHubProjectTableshape. This helper omitsprojectFields, which is required byGitHubProjectTableand is used bytable.projectFields.find(...).🐛 Proposed fix
const makeTable = (host: string, id: string) => ({ project: { id, host, owner: 'acme', ownerType: 'organization' as const, number: 1, title: id, url: `https://${host}/orgs/acme/projects/1` }, selectedView: { id: 'view-1', number: 1, name: 'Table', layout: 'TABLE_LAYOUT' as const, filter: '', fields: [], groupByFields: [], sortByFields: [] }, rows: [], totalCount: 0, - parentFieldDropped: false + parentFieldDropped: false, + projectFields: [] })src/main/github/project-view.ts (2)
1343-1389: 🚀 Performance & Scalability | 🟠 Major | ⚡ Quick winMove the unsupported-layout check before the
fetchProjectFieldscall.
fetchProjectFieldsruns before Orca checks whether the layout is supported. For any layout other thanTABLE_LAYOUT/BOARD_LAYOUT(for exampleROADMAP_LAYOUT), the function returnsunsupported_layoutright after this call and never usesprojectFieldsorextraProjectFields. Each such request spends one GraphQL call from the shared rate-limit budget for nothing. This file already tracks rate-limit spend carefully elsewhere (runGraphql,repositoryRateLimitGuard), so this waste is worth avoiding.Move the unsupported-layout early return (and the
effectiveQuerycomputation it needs) above thefetchProjectFieldscall, so the fetch only runs forTABLE_LAYOUT/BOARD_LAYOUTviews.⚡ Proposed reordering
const selectedView = finalized.view - // Why: GitHub board views without an explicit group-by still render columns - // grouped by the project's first single-select/iteration field (Status by - // default). Without this fallback such boards collapse into one unlabeled - // column; the items fetch already includes the group field's values. - const projectFields = await fetchProjectFields({ - owner: args.owner, - ownerType: args.ownerType, - projectNumber: args.projectNumber, - host: args.host - }) - - if (selectedView.layout === 'BOARD_LAYOUT' && selectedView.groupByFields.length === 0) { - const fallback = resolveBoardGroupByFallback(selectedView, projectFields) - if (fallback) { - selectedView.groupByFields.push(fallback) - } - } - - // Why: store deduped project-level fields on the table so the renderer - // can merge them into the dialog without polluting selectedView.fields - // (which drives the table column list). - const extraProjectFields = projectFields.filter( - (pf) => !selectedView.fields.some((f) => f.id === pf.id) - ) - // Why: empty-string override means "no filter"; undefined means "use the view's stored filter". The override is ephemeral, never persisted. const effectiveQuery = typeof args.queryOverride === 'string' ? args.queryOverride : selectedView.filter // Unsupported layout: skip item pagination; best-effort count-only query. if (selectedView.layout !== 'TABLE_LAYOUT' && selectedView.layout !== 'BOARD_LAYOUT') { const count = await fetchItemsCountOnly({ owner: args.owner, ownerType: args.ownerType, projectNumber: args.projectNumber, query: effectiveQuery, host: args.host }) return { ok: false, error: { type: 'unsupported_layout', message: `Orca does not support ${selectedView.layout.replace('_LAYOUT', '').toLowerCase()} views yet.` }, ...(typeof count === 'number' ? { totalCount: count } : {}) } } + + // Why: GitHub board views without an explicit group-by still render columns + // grouped by the project's first single-select/iteration field (Status by + // default). Without this fallback such boards collapse into one unlabeled + // column; the items fetch already includes the group field's values. + const projectFields = await fetchProjectFields({ + owner: args.owner, + ownerType: args.ownerType, + projectNumber: args.projectNumber, + host: args.host + }) + + if (selectedView.layout === 'BOARD_LAYOUT' && selectedView.groupByFields.length === 0) { + const fallback = resolveBoardGroupByFallback(selectedView, projectFields) + if (fallback) { + selectedView.groupByFields.push(fallback) + } + } + + // Why: store deduped project-level fields on the table so the renderer + // can merge them into the dialog without polluting selectedView.fields + // (which drives the table column list). + const extraProjectFields = projectFields.filter( + (pf) => !selectedView.fields.some((f) => f.id === pf.id) + )
862-881: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winFix default view selection to keep paginating across default-tier matches.
selectedRawcaptures the first non-noneview, butdefaultBoardhas lower precedence thandefaultTable. If the first page contains only a board view and a later page contains an explicit or table default view,getProjectViewTable()returns the board view instead of the higher-ranked table view. Keep paginating when only a default-tier match has been seen, and update the loop comment to match this rule.
🧹 Nitpick comments (1)
src/renderer/src/components/github-project/ProjectViewKanban.test.tsx (1)
143-155: 🎯 Functional Correctness | 🔵 Trivial | 🏗️ Heavy liftTest name promises drag-and-drop coverage it doesn't provide.
This test creates
onEditFieldas a spy but never simulates a drag interaction (dragstart/dragover/dragend) and never asserts thatonEditFieldwas called with the expected arguments. As written, it only confirms the board renders a card, which the other tests already cover. Add real drag-event simulation (dispatchdragstarton the source card,dragoveron the target column,dragendon the source card) and assertonEditFieldreceives the expected row, field id, and mutation value. This kind of assertion would also catch regressions like sending the wrong mutation kind for non-single-select group fields.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: dbb34c3b-b7b2-4e5b-bfda-31f989dc0c57
📥 Commits
Reviewing files that changed from the base of the PR and between e08eba6 and 2c84618986edc485e06486219c7b19217613e11b.
📒 Files selected for processing (19)
src/main/github/project-view.test.tssrc/main/github/project-view.tssrc/renderer/src/components/GitHubItemDialog.tsxsrc/renderer/src/components/github-project/ProjectFieldsGrid.tsxsrc/renderer/src/components/github-project/ProjectFieldsSection.tsxsrc/renderer/src/components/github-project/ProjectPicker.tsxsrc/renderer/src/components/github-project/ProjectViewKanban.test.tsxsrc/renderer/src/components/github-project/ProjectViewKanban.tsxsrc/renderer/src/components/github-project/ProjectViewWrapper.tsxsrc/renderer/src/components/github-project/group-sort.test.tssrc/renderer/src/components/github-project/project-row-filtering.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/renderer/src/store/slices/github.test.tssrc/renderer/src/store/slices/github.tssrc/shared/github-project-types.ts
- extract shared useProjectDialogFields hook (grid + section stay in sync) - gate single-select/date editors on REDACTED rows - skip date commit after Escape reset - localize No-field and PR labels; fix wrong i18n hash keys - iteration-aware drag-and-drop (source key + mutation kind) - move unsupported-layout check before fetchProjectFields (rate limit) - keep paginating for default-tier view matches - real drag-event kanban tests (single-select + iteration)
|
Thanks @coderabbitai — all review items addressed in 167412b: Maintainability & Code Quality (Major):
Functional Correctness (Major):
Localization (Minor):
Tests / Nitpick:
|
|
Tip For best results, initiate chat on the files or code changes.
🐇 ✅ If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! You are interacting with an AI system. |
# Conflicts: # src/renderer/src/i18n/locales/ja.json
|
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.
🧹 Nitpick comments (1)
src/renderer/src/components/github-project/ProjectFieldsGrid.tsx (1)
39-42: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winGenerate the localization key from this file path.
This key does not use the required SHA-1-derived renderer localization format. Generate the key from
src/renderer/src/components/github-project/ProjectFieldsGrid.tsx:Project fieldsand update the catalogs with that key.Based on learnings: generate locale keys as the first 10 characters of the SHA-1 hash of
<filePath>:<text>.Source: Learnings
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0d030668-2e84-4d11-951b-dfd19076d5c2
📒 Files selected for processing (20)
src/main/github/project-view.test.tssrc/main/github/project-view.tssrc/renderer/src/components/GitHubItemDialog.tsxsrc/renderer/src/components/github-project/ProjectFieldsGrid.tsxsrc/renderer/src/components/github-project/ProjectFieldsSection.tsxsrc/renderer/src/components/github-project/ProjectPicker.tsxsrc/renderer/src/components/github-project/ProjectViewKanban.test.tsxsrc/renderer/src/components/github-project/ProjectViewKanban.tsxsrc/renderer/src/components/github-project/ProjectViewWrapper.tsxsrc/renderer/src/components/github-project/group-sort.test.tssrc/renderer/src/components/github-project/project-row-filtering.test.tssrc/renderer/src/components/github-project/use-project-dialog-fields.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/renderer/src/store/slices/github.test.tssrc/renderer/src/store/slices/github.tssrc/shared/github-project-types.ts
🚧 Files skipped from review as they are similar to previous changes (16)
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/components/github-project/ProjectPicker.tsx
- src/renderer/src/components/GitHubItemDialog.tsx
- src/renderer/src/components/github-project/group-sort.test.ts
- src/shared/github-project-types.ts
- src/renderer/src/components/github-project/project-row-filtering.test.ts
- src/renderer/src/store/slices/github.test.ts
- src/renderer/src/i18n/locales/zh.json
- src/renderer/src/store/slices/github.ts
- src/renderer/src/i18n/locales/ko.json
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/components/github-project/ProjectViewWrapper.tsx
- src/main/github/project-view.test.ts
- src/renderer/src/components/github-project/ProjectViewKanban.tsx
- src/renderer/src/i18n/locales/en.json
- src/main/github/project-view.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. |
|
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. |
# Conflicts: # src/main/text-generation/commit-message-text-generation.ts # src/renderer/src/components/github-project/ProjectPicker.tsx # src/renderer/src/components/github-project/ProjectViewWrapper.tsx # src/renderer/src/store/slices/github.ts
Summary
Adds a Board (kanban) view for GitHub Project
BOARD_LAYOUTviews in the Tasks panel, with drag-and-drop column moves and project field editing in the issue dialog.Board view
onDragEnd(ref-based to avoid React async state races)GitHubItemDialogIssue dialog: project fields
fields,groupByFields,sortByFields) plus project-level fields (fetchProjectFields), deduplicated by IDMain process changes
BOARD_LAYOUTnow passes the data-fetch layout gate (was blocked, returningunsupported_layout)TABLE_LAYOUToverBOARD_LAYOUTbut accepts bothfetchProjectFields) are stored intable.projectFields— not merged intoselectedView.fields(which drives table columns and must not be polluted)optimisticFieldValueFromMutationchecks all field sources includingprojectFieldsfor proper name/color rendering after editsScreenshots
NOTE: The project in the screenshots is a live project, some data is redacted for that reason.
Testing
pnpm typecheckpnpm lint(native + react-doctor)pnpm test(focused: github-project tests)pnpm buildProjectViewKanban.test.tsx(6 tests — rendering, grouping, empty columns, counts)group-sort.test.ts,project-row-filtering.test.ts,github.test.ts(addedprojectFields: []to table constructors)AI Review Report
Reviewed with an AI coding agent; the review explicitly checked:
main.css; no hardcoded shortcuts or menu accelerators.getActiveRuntimeTargetandcallRuntimeRpc; the board and dialog reuse the same store mutations (updateProjectFieldValue,clearProjectFieldValue) which correctly route through runtime targets.useMemofor row grouping/sorting; drag state usesuseRef(no re-render on drag); project fields in the dialog use lazy computeduseMemowith table dependency.Popover,PopoverContent,PopoverTrigger), STYLEGUIDE tokens (bg-card,text-foreground,border-border,scrollbar-sleek); sidebar-style bordered popover matches the existing issue Status dropdown design; divider section usescol-span-full border-tfor clean grid integration.hostparameter).Security Audit
updateProjectFieldValue/clearProjectFieldValuestore actions which route throughwindow.api.ghorcallRuntimeRpc.fetchProjectFields) is read-only and comes from the sameprojectV2GraphQL query already used for board group-by fallback.Notes
translate(key, fallback).selectedView.fields— they're stored intable.projectFieldsand only used byProjectFieldsGridin the dialog. Table columns remain unchanged.BOARD_LAYOUTas fallback.