Skip to content

refactor(list): extract DateHierarchyBar from ListPage into @dar/list (#428)#501

Merged
MartinCastroAlvarez merged 1 commit into
mainfrom
refactor/extract-datehierarchybar-428
May 27, 2026
Merged

refactor(list): extract DateHierarchyBar from ListPage into @dar/list (#428)#501
MartinCastroAlvarez merged 1 commit into
mainfrom
refactor/extract-datehierarchybar-428

Conversation

@MartinCastroAlvarez
Copy link
Copy Markdown
Owner

First incremental step of #428 (decompose the ListPage / DetailPage god-components). Starting with ListPage since it's the larger one and — unlike DetailPage — isn't touched by the in-flight #427/#465 drafts, so no collision.

Role: Author / Architect.

Change

Lift the self-contained date_hierarchy drill-down bar (and its MONTH_NAMES) out of ListPage.tsx into a props-driven, individually-testable component in @dar/list — the package #303 wants the list page to live in. ListPage now composes <DateHierarchyBar dh=… onNavigate=… />.

  • No behaviour change (component logic copied verbatim; props identical).
  • ListPage.tsx: 837 → 729 lines (−108).
  • @dar/list gains react as a peer/dev dep (mirroring @dar/search) and is wired into apps/web.
  • Adds the package's first vitest (year/month drill-down + breadcrumb-up).

This establishes the extraction+test pattern; follow-up PRs lift the filter/columns modals, pagination, and the list_editable controller (each its own small PR, per the issue).

Verification

🤖 Generated with Claude Code

…#428)

First incremental step of decomposing the ListPage god-component: lift
the self-contained date_hierarchy drill-down bar (+ its MONTH_NAMES) into
@dar/list as a props-driven, individually-testable component, and add the
package's first vitest. No behaviour change — ListPage now composes it.

ListPage.tsx drops 837 → 729 lines. @dar/list gains react as a peer/dev
dep (mirroring @dar/search) and is wired into apps/web.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MartinCastroAlvarez MartinCastroAlvarez merged commit 216149f into main May 27, 2026
3 checks passed
@martin-castro-laminr-ai
Copy link
Copy Markdown
Contributor

Architect review + merge (multi-role, authorised on this repo).

Verified locally in a clean worktree off pr-501:

  • pnpm -r typecheck — clean (13/13)
  • pnpm lint — clean (eslint --max-warnings 0, stylelint, import-boundary + dark-mode coverage)
  • pnpm test97 passed (16 files, +3 new)

The extraction is verbatim (component logic + MONTH_NAMES moved unchanged; props identical), ListPage.tsx shrinks by ~108 LOC, @dar/list gains its first vitest, and the import-boundary lint stays green. No backend touched. Clears the bar for #428/#303. Merging.

@MartinCastroAlvarez MartinCastroAlvarez mentioned this pull request May 27, 2026
3 tasks
@MartinCastroAlvarez MartinCastroAlvarez deleted the refactor/extract-datehierarchybar-428 branch May 28, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants