feat: board filtering + status view #17
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-docs-app!17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "15-feat-board-filtering-status-view"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Changes
src/routes/boards/[slug]/+page.svelte: Board summary card, type filter pills, hide-done toggle, collapsible columns, URL persistence via SvelteURLSearchParams, consolidated card colors to use typeColor() from $lib/colorssrc/routes/projects/[slug]/+page.server.ts: Fetch boards list in parallel to find project boardsrc/routes/projects/[slug]/+page.svelte: Mini board distribution bar, clickable to navigate to full boardTest Plan
npm run buildpassesnpm run checkpasses (0 errors)npm run lintpasses (0 new errors)Review Checklist
Related
plan-2026-03-13-pal-e-frontendReview
Verdict: APPROVE
Checked
npm run build-- zero errors)npm run check-- 0 errors, 0 warnings)npm run lint-- 0 new errors, only 3 pre-existing in other files)itemsByColumndata untouchedreplaceStateto avoid polluting browser historySvelteSet,SvelteURLSearchParams, mutation over reassignment)typeColor()from$lib/colors(was duplicated local map)Nits (non-blocking)
COLUMN_COLORSmap is duplicated between board page and project page. Could be extracted to$lib/colors.tsin a follow-up.$effectfor URL initialization andupdateUrl/gotocould theoretically cause a single extra reactivity cycle on filter changes (set mutated -> goto -> URL change -> effect re-fires -> set re-populated with same values -> settles). Not a bug, just a note for future optimization if needed.PR #17 Review
BLOCKERS
None.
NITS
COLUMN_COLORS duplicated across two files. The
COLUMN_COLORSmap is defined identically in bothsrc/routes/boards/[slug]/+page.svelte(line 20) andsrc/routes/projects/[slug]/+page.svelte(line 18). This is the same class of duplication that was just cleaned up forTYPE_COLORS(which correctly now lives in$lib/colors.ts). Consider extractingCOLUMN_COLORSto$lib/colors.tsas well to keep a single source of truth.COLUMNS constant re-declared in project page.
src/routes/projects/[slug]/+page.svelte(line 7) declares a localCOLUMNSarray identical to the one already exported from$lib/api.ts(line 18). Should import from$lib/apiinstead of redeclaring.columnDisplayName()duplicated. The same helper function exists in bothsrc/routes/boards/[slug]/+page.svelte(line 167) andsrc/routes/projects/[slug]/+page.svelte(line 56). Could be extracted to a shared module.URL sync effect cycles on every
goto. The$effectatsrc/routes/boards/[slug]/+page.svelteline 86 readspage.url.searchParams, which means every call toupdateUrl()(viagoto) will re-trigger the effect, clearing and re-populatingactiveTypes/collapsedColumnswith the same values. This converges and does not cause an infinite loop, but it does cause a redundant clear-and-repopulate cycle on every filter toggle. A guard (e.g., a flag to skip the effect when the URL change was self-initiated) would eliminate the extra work.SvelteURLSearchParamsinupdateUrl()may be unnecessary. Atsrc/routes/boards/[slug]/+page.svelteline 106,new SvelteURLSearchParams()is used but the params object is local and ephemeral -- it is not reactive state. A plainURLSearchParams()would suffice and avoid importing an unnecessary Svelte-specific class for non-reactive use.ACCEPTANCE CRITERIA EVALUATION
typeColor())typeColor()from$lib/colors, showtypeCounts[t], toggle viaactiveTypesSvelteSetgetFilteredItems()usesactiveTypes.has(item.item_type), which is OR/union semanticstoggleType()deletes from the set if already presentvisibleColumnsfilters out'done'whenhideDoneis truecollapsedColumnsSvelteSet, collapsed view shows vertical header with count badgecolumnCounts, legend shows non-zero columns, type breakdown withtypeColor()+page.server.tsfetches boards in parallel,+page.svelterenders mini bar with<a href="/boards/{board.slug}">?type=phase&hide_done=true)updateUrl()serializes to query params,$effectreads on load. Also persistscollapsedstate.getFilteredItems()filters the view butdoMoveItem()operates onitemsByColumn(the underlying data). Drag/touch/tap-to-move handlers all calldoMoveItem()which mutates the source of truth. Drop targets remain active on all visible columns including collapsed ones.getFilteredItems()returns a filtered copy without mutatingitemsByColumn. Comment at line 144 explicitly documents this: "does NOT mutate underlying data".CODE QUALITY
#0e0e18, borders use#1a1a2e-- consistent with existing patterns.typeColor()used correctly: The old inlineTYPE_COLORSmap was removed from the board page and replaced withtypeColor()from$lib/colors. No duplicated color mappings for note types.$derived:visibleColumns,typeCounts,sortedTypes,allItems,columnCountsare all$derived.getFilteredItems()is a function that reads from$state/$derivedsources. Correct Svelte 5 pattern.board.columnstovisibleColumnsand fromgetColumnItems()togetFilteredItems(), but all event handlers remain intact.SOP COMPLIANCE
15-feat-board-filtering-status-viewmaps to Issue #15)plan-2026-03-13-pal-e-frontend) andCloses #15VERDICT: APPROVED