Skip to content

T-N7RT-extract-generic-vue-ui-composables

Status: planning/draft · Impact: low · Complexity: medium

Extract the genuinely generic, domain-free Vue composables and formatting utils from apps/pumice/src-nuxt/app into a shared packages/ts/vue-ui-kit (name TBD), so a second Vue app (the dashboard, a future app) can reuse them — a lower-priority Phase-2 extraction from D-0016-pumice-app-integration.

Pumice’s frontend mixes generic UI helpers with domain-specific ones under src-nuxt/app/composables and src-nuxt/app/utils.

Candidate (generic)LocationNotes
usePopoverCoordinator / useDropdownStatecomposablesUI overlay coordination
useDateTimeFormatcomposablesLocale-aware formatting
useWindowTitlecomposablesWindow title management
useTransportcomposablesClient transport wrapper (couples to the generated client)
formatDuration / formatTime / timeutilsPure formatting helpers

Domain-coupled (stay app-local): useProfiles, useFocusCardState, useDashboard, useExport, uiSemantics.

Move only the genuinely generic helpers into a shared package, leaving domain composables in pumice. useTransport is a judgment call — it may belong with the client package instead (see D-0017 / T-W3KP).

  1. Gate on T-M7QX. Same Bun-workspace reasoning as T-W3KP — extract only after pumice is on Bun.
  2. Triage genericity. Confirm each candidate has zero pumice-domain coupling; drop any that don’t from the move.
  3. Create the package. packages/ts/vue-ui-kit (or similar); move the generic composables/utils; repoint pumice imports.
  4. Second-consumer check. Per S-0001-co-locate-first-promote-when-shared, only promote helpers with a real (or clearly imminent) second consumer; otherwise leave them in pumice. This task is explicitly low-priority.
  5. Verify. pumice typecheck + build + unit tests pass; Storybook stories for moved components (if any) still run.
LocationKindChange
packages/ts/vue-ui-kit/**newPromoted generic composables/utils
apps/pumice/src-nuxt/app/{composables,utils}/*edit/deleteMove generics; repoint imports
  • AC-1: Only genuinely generic, domain-free helpers are moved; domain composables stay in pumice.
  • AC-2: pumice typecheck, build, and unit tests pass after the move.
  • AC-3: Each promoted helper has a real or clearly-imminent second consumer (per S-0001); the rest are deliberately left app-local.
  • Admin-layer packagesT-W3KP.
  • Speculative promotion of helpers with no second consumer.
  • T-M7QX (hard): Bun migration first.

T-M7QX


← Back to Tasks