feat: DORA dashboard -- cross-project board rollup #20

Merged
forgejo_admin merged 1 commit from 19-feat-dora-dashboard-cross-project-board into main 2026-03-14 23:29:10 +00:00

Summary

  • Add /dashboard route providing a cross-project DORA-style overview of all boards
  • Shows global column distribution, highlights items needing attention (awaiting review or stuck in progress 3+ days), and provides per-project breakdown cards with mini distribution bars
  • Adds "Dashboard" as the first nav link after the logo

Changes

  • src/lib/api.ts: Export COLUMNS constant for reuse; extend BoardItem interface with created_at and updated_at fields (already returned by pal-e-docs API)
  • src/routes/dashboard/+page.server.ts: New server load function that fetches all boards and their items in parallel, computes global column counts, identifies needs-attention items (needs_approval column + in_progress 3+ days), and builds per-project summaries
  • src/routes/dashboard/+page.svelte: New dashboard page with global distribution bar, needs-attention section with accent border, and responsive per-project card grid (1/2/3 columns). Consistent dark theme and column colors matching the board detail page
  • src/routes/+layout.svelte: Add "Dashboard" nav link between logo and Notes

Test Plan

  • Visit /dashboard and verify global distribution bar renders with correct column colors
  • Verify needs-attention section shows items in needs_approval and items stuck in in_progress for 3+ days
  • Verify per-project cards show correct item counts and mini distribution bars
  • Click a per-project card to verify it navigates to /boards/{slug}
  • Verify responsive layout: 1 column on mobile, 2 on tablet, 3 on desktop
  • npm run build passes, npm run check passes (0 errors)

Review Checklist

  • Passed automated review-fix loop
  • No secrets committed
  • No unnecessary file changes
  • Commit messages are descriptive
  • Closes #19
  • plan-2026-03-13-pal-e-frontend -- DORA dashboard feature
## Summary - Add `/dashboard` route providing a cross-project DORA-style overview of all boards - Shows global column distribution, highlights items needing attention (awaiting review or stuck in progress 3+ days), and provides per-project breakdown cards with mini distribution bars - Adds "Dashboard" as the first nav link after the logo ## Changes - `src/lib/api.ts`: Export `COLUMNS` constant for reuse; extend `BoardItem` interface with `created_at` and `updated_at` fields (already returned by pal-e-docs API) - `src/routes/dashboard/+page.server.ts`: New server load function that fetches all boards and their items in parallel, computes global column counts, identifies needs-attention items (needs_approval column + in_progress 3+ days), and builds per-project summaries - `src/routes/dashboard/+page.svelte`: New dashboard page with global distribution bar, needs-attention section with accent border, and responsive per-project card grid (1/2/3 columns). Consistent dark theme and column colors matching the board detail page - `src/routes/+layout.svelte`: Add "Dashboard" nav link between logo and Notes ## Test Plan - [ ] Visit `/dashboard` and verify global distribution bar renders with correct column colors - [ ] Verify needs-attention section shows items in `needs_approval` and items stuck in `in_progress` for 3+ days - [ ] Verify per-project cards show correct item counts and mini distribution bars - [ ] Click a per-project card to verify it navigates to `/boards/{slug}` - [ ] Verify responsive layout: 1 column on mobile, 2 on tablet, 3 on desktop - [ ] `npm run build` passes, `npm run check` passes (0 errors) ## Review Checklist - [x] Passed automated review-fix loop - [x] No secrets committed - [x] No unnecessary file changes - [x] Commit messages are descriptive ## Related - Closes #19 - `plan-2026-03-13-pal-e-frontend` -- DORA dashboard feature
feat: DORA dashboard -- cross-project board rollup
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
5720666923
Add /dashboard route with global column distribution bar, needs-attention
section (items in needs_approval + items stuck in_progress 3+ days), and
per-project breakdown cards with mini distribution bars. Add Dashboard
link to nav bar. Export COLUMNS from api.ts and extend BoardItem with
created_at/updated_at fields for time-based analysis.

Closes #19

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

Review: PASS

4 files changed, 355 additions, 1 deletion.

Checks

  • npm run build -- passes
  • npm run check -- 0 errors (1 pre-existing warning in search page)
  • npx eslint on changed files -- clean
  • No secrets committed
  • No unnecessary file changes
  • Follows existing codebase patterns (dark theme, distribution bars, card styles)

Assessment

  • Server load uses Promise.all for parallel board item fetches -- good performance
  • Needs-attention logic correctly identifies needs_approval items and in_progress items stuck 3+ days
  • BoardItem type extended with created_at/updated_at -- matches API schema, backwards compatible
  • COLUMNS export is additive (non-breaking change)
  • Responsive grid (1/2/3 columns) matches existing board list page pattern

Nit (non-blocking)

  • COLUMN_COLORS duplicated between board detail and dashboard pages. Issue spec acknowledges this: "constants consolidation is a separate epilogue item."

No fixes needed. Ready for merge.

## Review: PASS **4 files changed, 355 additions, 1 deletion.** ### Checks - [x] `npm run build` -- passes - [x] `npm run check` -- 0 errors (1 pre-existing warning in search page) - [x] `npx eslint` on changed files -- clean - [x] No secrets committed - [x] No unnecessary file changes - [x] Follows existing codebase patterns (dark theme, distribution bars, card styles) ### Assessment - Server load uses `Promise.all` for parallel board item fetches -- good performance - Needs-attention logic correctly identifies `needs_approval` items and `in_progress` items stuck 3+ days - `BoardItem` type extended with `created_at`/`updated_at` -- matches API schema, backwards compatible - `COLUMNS` export is additive (non-breaking change) - Responsive grid (1/2/3 columns) matches existing board list page pattern ### Nit (non-blocking) - `COLUMN_COLORS` duplicated between board detail and dashboard pages. Issue spec acknowledges this: "constants consolidation is a separate epilogue item." No fixes needed. Ready for merge.
Author
Owner

PR #20 Review

BLOCKERS

None. The implementation is clean, correct, and well-scoped.

NITS

  1. COLUMN_COLORS duplication (3 files) -- COLUMN_COLORS is now copy-pasted in src/routes/dashboard/+page.svelte, src/routes/boards/[slug]/+page.svelte, and src/routes/projects/[slug]/+page.svelte. Same values in all three. Should be extracted to $lib/colors.ts alongside the existing typeColor export. Growing tech debt.

  2. columnDisplayName() also duplicated -- The col.replace(/_/g, ' ') helper appears in both the dashboard and board detail pages. Another candidate for $lib/colors.ts or a new $lib/columns.ts utility.

  3. updated_at is a loose proxy for "time in column" -- The stuck detection uses item.updated_at to compute daysInColumn, but updated_at reflects the last modification of any kind (title, label, position), not when the item entered its current column. An item that was relabeled yesterday while stuck in in_progress for a week would show as "1 day in column." This is an API limitation, not a code bug, but worth documenting as a known imprecision. If the pal-e-docs API ever adds a column_changed_at field, this should be swapped in.

  4. Inline border-left vs Tailwind border class -- The needs-attention items use class="... border border-[#1a1a2e] ..." combined with style="border-left: 3px solid #e94560;". This works because inline styles override, but it is fragile -- the Tailwind class sets all four borders, then the inline style overrides only left. A cleaner approach would be border-l-[3px] border-l-[#e94560] in Tailwind or dropping the Tailwind border shorthand.

SOP COMPLIANCE

  • Branch named after issue (19-feat-dora-dashboard-cross-project-board references #19)
  • PR body follows template (Summary, Changes, Test Plan, Related all present)
  • Related references plan slug (plan-2026-03-13-pal-e-frontend)
  • Closes #19 present
  • No secrets committed
  • No unnecessary file changes (4 files, all scoped to feature)
  • Commit messages are descriptive

CODE QUALITY NOTES

  • Data fetching is efficient: single listBoards() call, then parallel Promise.all() for all board items. No N+1 problem.
  • COLUMNS correctly re-exported as const from api.ts and spread into the return value to avoid readonly array issues.
  • Column color values match exactly across dashboard and board detail page -- correct reuse of the visual pattern from PR #17.
  • Dark theme tokens (#0a0a14 bg, #0e0e18 cards, #1a1a2e borders, #e94560 accent) are consistent with the rest of the app.
  • Responsive grid (sm:grid-cols-2 lg:grid-cols-3) handles mobile/tablet/desktop correctly.
  • Needs-attention sort (needs_approval first, then stuck, both by days descending) is sensible.
  • BoardItem type extension (created_at, updated_at) is non-breaking -- fields already returned by the API.

VERDICT: APPROVED

## PR #20 Review ### BLOCKERS None. The implementation is clean, correct, and well-scoped. ### NITS 1. **COLUMN_COLORS duplication (3 files)** -- `COLUMN_COLORS` is now copy-pasted in `src/routes/dashboard/+page.svelte`, `src/routes/boards/[slug]/+page.svelte`, and `src/routes/projects/[slug]/+page.svelte`. Same values in all three. Should be extracted to `$lib/colors.ts` alongside the existing `typeColor` export. Growing tech debt. 2. **`columnDisplayName()` also duplicated** -- The `col.replace(/_/g, ' ')` helper appears in both the dashboard and board detail pages. Another candidate for `$lib/colors.ts` or a new `$lib/columns.ts` utility. 3. **`updated_at` is a loose proxy for "time in column"** -- The stuck detection uses `item.updated_at` to compute `daysInColumn`, but `updated_at` reflects the last modification of any kind (title, label, position), not when the item entered its current column. An item that was relabeled yesterday while stuck in `in_progress` for a week would show as "1 day in column." This is an API limitation, not a code bug, but worth documenting as a known imprecision. If the pal-e-docs API ever adds a `column_changed_at` field, this should be swapped in. 4. **Inline `border-left` vs Tailwind `border` class** -- The needs-attention items use `class="... border border-[#1a1a2e] ..."` combined with `style="border-left: 3px solid #e94560;"`. This works because inline styles override, but it is fragile -- the Tailwind class sets all four borders, then the inline style overrides only left. A cleaner approach would be `border-l-[3px] border-l-[#e94560]` in Tailwind or dropping the Tailwind `border` shorthand. ### SOP COMPLIANCE - [x] Branch named after issue (`19-feat-dora-dashboard-cross-project-board` references #19) - [x] PR body follows template (Summary, Changes, Test Plan, Related all present) - [x] Related references plan slug (`plan-2026-03-13-pal-e-frontend`) - [x] `Closes #19` present - [x] No secrets committed - [x] No unnecessary file changes (4 files, all scoped to feature) - [x] Commit messages are descriptive ### CODE QUALITY NOTES - Data fetching is efficient: single `listBoards()` call, then parallel `Promise.all()` for all board items. No N+1 problem. - `COLUMNS` correctly re-exported as `const` from `api.ts` and spread into the return value to avoid readonly array issues. - Column color values match exactly across dashboard and board detail page -- correct reuse of the visual pattern from PR #17. - Dark theme tokens (#0a0a14 bg, #0e0e18 cards, #1a1a2e borders, #e94560 accent) are consistent with the rest of the app. - Responsive grid (`sm:grid-cols-2 lg:grid-cols-3`) handles mobile/tablet/desktop correctly. - Needs-attention sort (needs_approval first, then stuck, both by days descending) is sensible. - `BoardItem` type extension (`created_at`, `updated_at`) is non-breaking -- fields already returned by the API. ### VERDICT: APPROVED
forgejo_admin deleted branch 19-feat-dora-dashboard-cross-project-board 2026-03-14 23:29:10 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/pal-e-docs-app!20
No description provided.