docs(plan-3): close out Plan 3 — BACKLOG entries, RFC status, primitives registry, tooling conventions
- BACKLOG: add 3 spawned follow-ups (EnergyDots NaN, DraggableBlock pointercancel, AD-3 Menubar a11y) - RFC-WS-GUI-REDESIGN-CREWLI-STARTER: mark Plan 3 complete with commit refs + DoD ledger - PRIMEVUE_COMPONENTS: v2 primitives registry (8 components), statusSeverity SoT, Menubar-wrap pattern - ARCH-TESTING: mount-helper type convention (Plan 3 codified, Plan 4 carry-over) - FRONTEND-TOOLING: scoped lint invocation note (DoD #13 root cause) - AppDialog.stories.ts: rename title to 'Shared/AppDialog' for sibling consistency
This commit is contained in:
@@ -340,3 +340,30 @@ For Playwright tests to run, the host must have:
|
||||
for v1 per RFC §A.5.
|
||||
- Mobile viewport baselines — desktop 1440×900 only for v1.
|
||||
- Soketi / WebSocket testing infrastructure when ART-15 lands.
|
||||
|
||||
---
|
||||
|
||||
## Mount-helper type convention (Plan 3 codified)
|
||||
|
||||
Plan 3 hit this in 6+ tasks: a plan-doc test spec typed the `mount`
|
||||
helper's props parameter as `Record<string, unknown>`, which `vue-tsc`
|
||||
strict mode rejects when the object is passed to
|
||||
`mount(Component, { props })` — the component's generated prop type is
|
||||
narrower than `Record<string, unknown>`, so the assignment is a type
|
||||
error (and widening it with `any` would violate the project zero-`any`
|
||||
rule).
|
||||
|
||||
**Convention:** type the helper parameter as `Partial<<Component>Props>`,
|
||||
never `Record<string, unknown>`:
|
||||
|
||||
```ts
|
||||
const mountX = (props: Partial<XProps> = {}) =>
|
||||
mount(X, { props })
|
||||
```
|
||||
|
||||
Rationale: satisfies `vue-tsc` strict; behaviour-neutral; introduces no
|
||||
`any`. Plan 3 used the equivalent explicit inline props shape per task
|
||||
(the behaviour-neutral sanctioned deviation from the verbatim plan-doc);
|
||||
**standardise on `Partial<<Component>Props>` from Plan 4 onward** so the
|
||||
template-layer tests (List / Form / Detail / Dashboard / StateBlock)
|
||||
share one idiom rather than re-deriving the shape each time.
|
||||
|
||||
Reference in New Issue
Block a user