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) | Location | Notes |
|---|---|---|
usePopoverCoordinator / useDropdownState | composables | UI overlay coordination |
useDateTimeFormat | composables | Locale-aware formatting |
useWindowTitle | composables | Window title management |
useTransport | composables | Client transport wrapper (couples to the generated client) |
formatDuration / formatTime / time | utils | Pure formatting helpers |
Domain-coupled (stay app-local): useProfiles, useFocusCardState,
useDashboard, useExport, uiSemantics.
Proposed
Section titled “Proposed”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).
Approach
Section titled “Approach”- Gate on
T-M7QX. Same Bun-workspace reasoning asT-W3KP— extract only after pumice is on Bun. - Triage genericity. Confirm each candidate has zero pumice-domain coupling; drop any that don’t from the move.
- Create the package.
packages/ts/vue-ui-kit(or similar); move the generic composables/utils; repoint pumice imports. - 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.
- Verify. pumice typecheck + build + unit tests pass; Storybook stories for moved components (if any) still run.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
packages/ts/vue-ui-kit/** | new | Promoted generic composables/utils |
apps/pumice/src-nuxt/app/{composables,utils}/* | edit/delete | Move generics; repoint imports |
Acceptance criteria
Section titled “Acceptance criteria”- 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.
Out of scope
Section titled “Out of scope”- Admin-layer packages —
T-W3KP. - Speculative promotion of helpers with no second consumer.
Dependencies
Section titled “Dependencies”T-M7QX(hard): Bun migration first.
Depends on
Section titled “Depends on”T-M7QX