V13-FE-005: restore direct UI components and harden grid provider
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
| Acceptance requirement | Evidence |
|
||||
| --- | --- |
|
||||
| Feature direct vendor import is zero | `tools/validate_v16.py` scans only `.ts`/`.vue` sources and rejects PrimeVue/AG Grid imports outside the approved adapter boundary. |
|
||||
| Feature direct vendor import is zero | `tools/validate_v16.py` rejects PrimeVue/AG Grid imports in feature code and unrelated shared code. It allows the approved direct-vendor ownership boundary (`shared/ui/components/`) and the adapter boundary (`shared/ui/adapter/primevue/`). |
|
||||
| Validator remains valid as WBS evolves | Master WBS IDs must be nonblank and unique; the validator no longer uses a stale fixed total row count. |
|
||||
| Reproducible evidence | `python tools/validate_v16.py` result is recorded in the WBS tracker after execution. |
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# V13-FE-005 — Existing Component Direct Vendor Restore
|
||||
|
||||
## Source / Assumption / Unknown / Decision Required
|
||||
|
||||
- **Source:** `frontend/src/shared/ui/components/`, existing PrimeVue/AG Grid adapters, and current component contract tests.
|
||||
- **Assumption:** Existing `Ks*` components are application-owned components whose established behavior must not be narrowed by the vendor-neutral adapter contract.
|
||||
- **Unknown:** Whether the native provider is still a supported production target for every existing component. This must not be inferred from the presence of `VITE_UI_ADAPTER`.
|
||||
- **Decision Required:** Confirm the supported provider matrix before removing the remaining adapter-backed input, dialog, status, paginator, and tabs components.
|
||||
|
||||
## Scope
|
||||
|
||||
Behavior-preserving refactoring under `V13-FE-005`:
|
||||
|
||||
- Existing components may use the selected vendor directly inside `shared/ui/components`.
|
||||
- Feature code remains vendor-import free.
|
||||
- New reusable components may use the adapter pattern only when a vendor-neutral contract is an explicit requirement.
|
||||
- No policy, API, database, migration, or production automation change.
|
||||
|
||||
## Implemented
|
||||
|
||||
- `KsButton.vue` now uses PrimeVue Button directly and preserves the existing public events and semantic props.
|
||||
- `KsDataGrid.vue` now uses AG Grid directly and preserves the existing grid behavior while retaining the client-side row model module boundary.
|
||||
- Core tests were changed from adapter-injection assertions to behavior assertions for direct component ownership.
|
||||
|
||||
## Remaining
|
||||
|
||||
- Existing `shared/ui/components/*.vue` no longer imports `useUiAdapter`; the direct-vendor restore is complete for the current component set.
|
||||
- Reassess native provider support and remove obsolete adapter implementation files only after a separate provider-retirement decision. The adapter remains available for new vendor-neutral components.
|
||||
|
||||
## Evidence
|
||||
|
||||
- Targeted tests: shared component tests — 25/25 PASS.
|
||||
- Full frontend tests: `pnpm test -- --run` — 63 files / 168 tests PASS.
|
||||
- Typecheck: `pnpm typecheck` — PASS.
|
||||
- Build: `pnpm build` — PASS; Vite retains a >500 kB warning and reports `main-CffH25aC.js` 587.58 kB / gzip 163.16 kB.
|
||||
- Boundary check: no `useUiAdapter` import remains under `frontend/src/shared/ui/components`.
|
||||
- Harness: `frontend/src/shared/ui/components/tests/directVendorOwnership.contract.spec.ts` fails closed if an existing component reintroduces adapter-owned rendering.
|
||||
@@ -0,0 +1,24 @@
|
||||
# V13-FE-005 — component/template contract test hardening
|
||||
|
||||
## Scope
|
||||
|
||||
- **WBS:** V13-FE-005
|
||||
- **Requirement/API/UI/Test:** REQ-FE-UI-PORT / Cross / UI-COMPONENTS / T-FE-COMPONENT-CONTRACT
|
||||
- **Source:** existing `KsButton`, `KsTextField`, `FieldShell`, native adapter contracts, and shared screen-template tests.
|
||||
- **Change:** add behavior-focused contract coverage for loading/disabled buttons, adapter-neutral activation, field label/error wiring, input type forwarding, and model updates.
|
||||
- **Not changed:** component runtime behavior, vendor provider implementation, API/data ownership, policy thresholds, or screen state semantics.
|
||||
|
||||
## Source / Assumption / Unknown / Decision Required
|
||||
|
||||
- **Source:** current component props/emits and native adapter implementation.
|
||||
- **Assumption:** native adapter is the deterministic test provider; provider-specific visual behavior remains outside unit-test scope.
|
||||
- **Unknown:** visual and assistive-technology behavior in a real browser across PrimeVue and native providers.
|
||||
- **Decision Required:** visual/AT/browser approval remains required before completion.
|
||||
|
||||
## Evidence
|
||||
|
||||
- Targeted contract test: 1 file / 3 tests passed.
|
||||
- Full frontend regression: 59 files / 156 tests passed.
|
||||
- `pnpm typecheck`: passed.
|
||||
- `pnpm build`: passed; known Vite >500 kB chunk warning remains and is not claimed as a performance-gate pass.
|
||||
- Evidence: `evidence/V13-FE-005/component-template-tests_20260813.log`.
|
||||
@@ -0,0 +1,5 @@
|
||||
# V13-FE-005 — detail action button port adoption
|
||||
|
||||
ModelDetail and ShadowRunDetail action buttons now use the shared `KsButton` port. Variant-to-severity mapping is explicit; detail query, mutation, routes, and policy state are unchanged. Input/grid vendor boundaries remain separate slices.
|
||||
|
||||
Evidence is recorded with the subsequent full frontend regression. Visual/AT/browser evidence remains outstanding.
|
||||
@@ -0,0 +1,19 @@
|
||||
# V13-FE-005 — ModelsList vendor boundary adoption
|
||||
|
||||
## Scope
|
||||
|
||||
- **Change:** ModelsList search input and buttons now use existing `KsTextField`/`KsButton` ports instead of direct KBX vendor-bound components.
|
||||
- **Not changed:** KbxListPage, query semantics, routes, API, or model state. The grid was migrated separately under V13-FE-023 after column/event characterization.
|
||||
- **Source:** current shared UI adapter contracts and existing ModelsList usage.
|
||||
|
||||
## Source / Assumption / Unknown / Decision Required
|
||||
|
||||
- **Source:** `KsTextField`, `KsButton`, PrimeVue/native adapter ports, and ModelsList characterization.
|
||||
- **Assumption:** adding a visible search label is an accessibility-preserving contract improvement.
|
||||
- **Resolved:** KbxDataGrid column/event parity was characterized under V13-FE-023; ModelsList now uses `KsDataGrid` with explicit `Model.modelId` navigation.
|
||||
- **Decision Required:** visual/AT/browser evidence for the shared grid boundary remains outstanding under V13-FE-023.
|
||||
|
||||
## Evidence
|
||||
|
||||
- Targeted characterization test added; full FE regression, typecheck, and build required before completion.
|
||||
- No API, DB, or domain policy changed.
|
||||
@@ -0,0 +1,15 @@
|
||||
# V13-FE-005 — ShadowRunList vendor boundary adoption
|
||||
|
||||
## Scope
|
||||
|
||||
- Migrated the search/date fields and action buttons to `KsTextField`/`KsButton`; the shared text-field contract now supports the bounded date input type.
|
||||
- Preserved query state, date inputs, status filter, and routes. Grid behavior was migrated separately under V13-FE-023 to `KsDataGrid` with explicit `ShadowRun.runId` navigation.
|
||||
- No API, DB, job, model policy, or KIS path changed.
|
||||
|
||||
## Decision boundary
|
||||
|
||||
Date-specific input behavior and grid column/event parity remain separate because the current shared ports do not express the complete Kbx contracts.
|
||||
|
||||
## Evidence
|
||||
|
||||
Full FE regression, typecheck, and build are required before completion. Visual/AT/browser evidence remains outstanding.
|
||||
@@ -0,0 +1,16 @@
|
||||
# Grid provider decision
|
||||
|
||||
## Decision
|
||||
|
||||
The default grid is AG Grid Community. The application does not depend on `ag-grid-enterprise`, Enterprise modules, Enterprise licensing, or Enterprise-only APIs.
|
||||
|
||||
## Evidence
|
||||
|
||||
- `frontend/package.json` declares `ag-grid-community` and has no `ag-grid-enterprise` dependency.
|
||||
- `frontend/src/shared/ui/components/KsDataGrid.vue` imports `AgGridVue` and `ClientSideRowModelModule` from AG Grid Community.
|
||||
- `frontend/src/shared/ui/adapter/primevue/AgGridAdapter.vue` follows the same Community module boundary for new vendor-neutral components.
|
||||
- `frontend/src/shared/ui/components/tests/gridProvider.contract.spec.ts` enforces the dependency and module boundary.
|
||||
|
||||
## Consequence
|
||||
|
||||
Community functionality is the baseline for existing direct components. Enterprise-only features require a separate approved dependency, license, contract, performance, and security decision; they must not be introduced implicitly.
|
||||
@@ -0,0 +1,35 @@
|
||||
# Legacy adapter inventory and cleanup boundary
|
||||
|
||||
## Decision
|
||||
|
||||
Legacy adapter files are not bulk-deleted. The current tree contains active references from list pages, layouts, registry code, provider contracts, and tests. Deletion is split into an inventory/retirement Slice so behavior-preserving component restoration is not mixed with removal.
|
||||
|
||||
## Active or contract-required
|
||||
|
||||
- `KbxListPage.vue`: referenced by existing model and shadow-run list pages.
|
||||
- `KsListPage.vue`: direct-owned replacement used by model and shadow-run list pages.
|
||||
- `contracts.ts`, `compatibility.ts`, `useUiAdapter.ts`: provider and contract tests still use these symbols.
|
||||
- `primevue/*` and `native/*`: provider contract implementations; native is test/reference-only but still required by contract tests.
|
||||
|
||||
## Removed after zero-reference verification
|
||||
|
||||
- `KbxButton.vue`, `KbxInput.vue`, `KbxDataGrid.vue`: had no internal runtime consumers; only legacy index exports remained. Their exports and files were removed after static zero-reference verification.
|
||||
- `KbxListPage.vue`: replaced by `shared/ui/components/KsListPage.vue`; the legacy file and adapter export were removed after migrating both runtime consumers.
|
||||
|
||||
## Remaining cleanup candidates
|
||||
|
||||
- Duplicate `.js` source companions where the TypeScript/Vue source is authoritative and no runtime import requires the JavaScript file.
|
||||
- Legacy `Kbx*` components after all current consumers have migrated and a zero-reference test is preserved.
|
||||
|
||||
## Required evidence before deletion
|
||||
|
||||
1. Static import graph shows zero runtime consumers.
|
||||
2. Contract and feature tests pass without the candidate.
|
||||
3. Production build no longer includes the candidate.
|
||||
4. Rollback path and migration note identify the removed file set.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- Do not delete adapter contracts merely because existing components now use direct vendors.
|
||||
- Do not remove native reference provider without replacing its contract-test role.
|
||||
- Do not mix legacy deletion with AG Grid performance or visual/accessibility changes.
|
||||
@@ -0,0 +1,25 @@
|
||||
# Native provider decision record
|
||||
|
||||
## Decision
|
||||
|
||||
`native-accessible` is retained as a test/reference provider only. It is not an approved production provider and is not used as a fallback for existing application-owned components.
|
||||
|
||||
PrimeVue/AG Grid (`primevue-aggrid`) is the explicit default provider when `VITE_UI_ADAPTER` is omitted.
|
||||
|
||||
## Evidence
|
||||
|
||||
- `frontend/src/shared/ui/adapter/native/index.ts` declares `productionEligible: false`.
|
||||
- Repository configuration and deployment references contain no approved `VITE_UI_ADAPTER=native` production target.
|
||||
- Existing `frontend/src/shared/ui/components/*.vue` components directly own PrimeVue/AG Grid behavior and do not render through the native provider.
|
||||
- `frontend/src/shared/ui/provider/tests/resolveUiProvider.spec.ts` uses native resolution as a deterministic contract test.
|
||||
|
||||
## Consequences
|
||||
|
||||
- Do not delete native adapters yet; they remain useful for adapter contract and accessibility smoke tests.
|
||||
- Do not advertise `native` as a production switch. A future provider switch requires a full component parity Slice first.
|
||||
- Existing production bootstrap remains PrimeVue by default. No automatic provider fallback is introduced.
|
||||
- `resolveUiProvider('native')` now fails closed in production artifacts; native remains available only to the non-production contract harness.
|
||||
|
||||
## Follow-up
|
||||
|
||||
Provider retirement may be proposed only with explicit evidence that no test or contract harness requires it, plus an approved WBS/ADR. Until then this is deliberate retained debt, not an accidental runtime dependency.
|
||||
Reference in New Issue
Block a user