control panel: code hygiene after the UI pass — table grammar and card shells into the kit, redeclared kit classes retired, BEM contractions, dead code, and the sidebar's dropped i18n #1444

Open
opened 2026-09-12 15:07:49 +00:00 by ben · 1 comment
Owner

Parent

Control-panel UI pass (Ben, 2026-09-10 → 09-12, commit 078cd5b3, merged to main 2026-09-12). The end-of-pass Standards review (CODING-STANDARDS.md + the smell baseline) found the items below. None changes behaviour; each is a refactor with the existing unit tests as the net. Filed as one ticket so the swarm does them as one commit series, not fifteen.

What to do

  1. Table grammar into the kit. The th / td / tr:last-child block is byte-identical (bar numbers) in dashboard/src/components/members/MembersScreen.vue, members/KomitiPanel.vue, members/ManageGroupsDialog.vue, backups/BackupsOverviewScreen.vue, backups/BackupsFirstRunScreen.vue. Add .oc-table (+ __num right-aligned tabular cell, __row--act clickable row) to packages/ui-kit/src/baseLayer.css; the five screens wear it. NOTE the .oc-row hazard already recorded in those files: the kit's .oc-row is a FLEX row and must never land on a <tr>.
  2. Card shell. 1.5px solid var(--oc-line) / panel / 10px is restated in shell/DeviceCard.vue, shell/ServiceCards.vue, shell/SystemCard.vue, shell/FleetDiagram.vue instead of .oc-card (DDR 0151). FleetDiagram.vue re-types the .oc-pill tones the pass deleted from FleetScreen — use OcPill.
  3. Redeclared kit classes (DDR 0155 §3 — surfaces cannot disagree): .oc-field / .oc-hint in device-add/AddDeviceScreen.vue and RentServerScreen.vue (1.5px/8px inputs vs the kit's 1px/4px worn by InviteScreen); .oc-link in monitoring/AlertContactCard.vue and members/InviteScreen.vue; an unused .oc-lede in catalogue/CatalogueScreen.vue. Delete the copies, wear the kit's.
  4. The "+ Add …" ghost card in shell/DeviceCards.vue ≡ shell/ServiceCards.vue (diff = 4 lines) → one OcGhostCard in the kit or a shared component. lib/stackExport.ts EXPORT_TITLE ≡ EXPORT_BUTTON → one.
  5. BEM contractions (CODING-STANDARDS bans ad-hoc ones): oc-rent__q, __sizeh, __cta (RentServerScreen), oc-place__pic, CatalogueScreen --cand, __prod, __hist, __unavail, __reqd, __sugs/__sug, SelectDeviceDialog __card-prod/__card-desc, SelectRoleServicesScreen oc-select__cath, ServiceCards/SystemCard __prod. Spell them out.
  6. Dead code. provisioning/SelectRoleServicesScreen.vue keeps tileFace / TILE_FACE_KEY / logoFor and the Browse-tab comments for a toggle nothing writes any more — logos are a requirement of the card now (Ben, 2026-09-11), so drop the toggle and always show the mark. Unused exports: hasServiceMark, ServerPreset, UplinkState, DeviceRole, gatewayRowName; OverviewScreen.vue communityName prop; SelectDeviceDialog.vue &__go--quiet. The prototype bench dashboard/tests/e2e/preview-harness/{fleet-diagram.html,fleetDiagram.ts,prototypes/*} (~800 lines) is referenced by nothing — delete on Ben's word (it was the three-option fleet-diagram comparison; the chosen option is FleetDiagram.vue).
  7. Sidebar i18n. packages/ui-kit/src/components/NavChrome.vue dropped $t('kit.nav.*') for literals and a hand pluraliser; the four locale nav: blocks in packages/ui-kit/src/i18n/index.ts are dead. Restore $t (the kit otherwise localises; dashboard/tests/unit/i18n.test.ts is the net).
  8. Non-null ! beyond DOM lookups — InviteScreen.vue, ManageGroupsDialog.vue, catalogue/CatalogueSurface.vue, monitoring/FleetServicesStatusScreen.vue, SelectRoleServicesScreen.vue, SystemCard.vue (props.source!.catalogueBrowse!()), ServiceCards.vue, PlaceScreen.vue, RentServerScreen.vue. Guard or narrow instead.
  9. Repeated switches. The 'System' category literal (SystemCard, ServiceCards, CatalogueScreen) → one SYSTEM_CATEGORY export in lib/catalogue.ts; the tone → OcPill mapping inline in BackupsOverviewScreen and MembersScreen → one helper; chipGlyph bad→▲ in DeviceCard vs bad→● in FleetDiagram → one glyph table.
  10. Palette presets. lib/brandkit.ts PALETTE_PRESETS holds hex in production lib (ADR 0122 lists preset swatches as fake data). Move to the brand-kit seam's answer or the fake.
  11. snakeize(req) as WireMintCodeRequest in lib/api/enrollClient.ts hides that name/kind/location are not in the generated wire type — that becomes honest when #1431 lands; until then narrow the cast so a dropped field is a type error.

Acceptance criteria

  • pnpm -C dashboard test and pnpm -C packages/ui-kit test green; vue-tsc clean; eslint clean.
  • grep -rn "border: 1.5px solid var(--oc-line)" dashboard/src finds only the kit; grep -rn "\.oc-link\|\.oc-field {" dashboard/src finds no redeclaration.
  • grep -rn '\$t(' packages/ui-kit/src/components/NavChrome.vue finds the nav labels again and the harness in all four locales reads the sidebar translated.
## Parent Control-panel UI pass (Ben, 2026-09-10 → 09-12, commit `078cd5b3`, merged to main 2026-09-12). The end-of-pass Standards review (CODING-STANDARDS.md + the smell baseline) found the items below. None changes behaviour; each is a refactor with the existing unit tests as the net. Filed as one ticket so the swarm does them as one commit series, not fifteen. ## What to do 1. **Table grammar into the kit.** The `th / td / tr:last-child` block is byte-identical (bar numbers) in `dashboard/src/components/members/MembersScreen.vue`, `members/KomitiPanel.vue`, `members/ManageGroupsDialog.vue`, `backups/BackupsOverviewScreen.vue`, `backups/BackupsFirstRunScreen.vue`. Add `.oc-table` (+ `__num` right-aligned tabular cell, `__row--act` clickable row) to `packages/ui-kit/src/baseLayer.css`; the five screens wear it. NOTE the `.oc-row` hazard already recorded in those files: the kit's `.oc-row` is a FLEX row and must never land on a `<tr>`. 2. **Card shell.** `1.5px solid var(--oc-line) / panel / 10px` is restated in `shell/DeviceCard.vue`, `shell/ServiceCards.vue`, `shell/SystemCard.vue`, `shell/FleetDiagram.vue` instead of `.oc-card` (DDR 0151). `FleetDiagram.vue` re-types the `.oc-pill` tones the pass deleted from FleetScreen — use `OcPill`. 3. **Redeclared kit classes** (DDR 0155 §3 — surfaces cannot disagree): `.oc-field` / `.oc-hint` in `device-add/AddDeviceScreen.vue` and `RentServerScreen.vue` (1.5px/8px inputs vs the kit's 1px/4px worn by InviteScreen); `.oc-link` in `monitoring/AlertContactCard.vue` and `members/InviteScreen.vue`; an unused `.oc-lede` in `catalogue/CatalogueScreen.vue`. Delete the copies, wear the kit's. 4. **The "+ Add …" ghost card** in `shell/DeviceCards.vue` ≡ `shell/ServiceCards.vue` (diff = 4 lines) → one `OcGhostCard` in the kit or a shared component. `lib/stackExport.ts` `EXPORT_TITLE` ≡ `EXPORT_BUTTON` → one. 5. **BEM contractions** (CODING-STANDARDS bans ad-hoc ones): `oc-rent__q`, `__sizeh`, `__cta` (RentServerScreen), `oc-place__pic`, CatalogueScreen `--cand`, `__prod`, `__hist`, `__unavail`, `__reqd`, `__sugs`/`__sug`, SelectDeviceDialog `__card-prod`/`__card-desc`, SelectRoleServicesScreen `oc-select__cath`, ServiceCards/SystemCard `__prod`. Spell them out. 6. **Dead code.** `provisioning/SelectRoleServicesScreen.vue` keeps `tileFace` / `TILE_FACE_KEY` / `logoFor` and the Browse-tab comments for a toggle nothing writes any more — logos are a requirement of the card now (Ben, 2026-09-11), so drop the toggle and always show the mark. Unused exports: `hasServiceMark`, `ServerPreset`, `UplinkState`, `DeviceRole`, `gatewayRowName`; `OverviewScreen.vue` `communityName` prop; `SelectDeviceDialog.vue` `&__go--quiet`. The prototype bench `dashboard/tests/e2e/preview-harness/{fleet-diagram.html,fleetDiagram.ts,prototypes/*}` (~800 lines) is referenced by nothing — delete on Ben's word (it was the three-option fleet-diagram comparison; the chosen option is `FleetDiagram.vue`). 7. **Sidebar i18n.** `packages/ui-kit/src/components/NavChrome.vue` dropped `$t('kit.nav.*')` for literals and a hand pluraliser; the four locale `nav:` blocks in `packages/ui-kit/src/i18n/index.ts` are dead. Restore `$t` (the kit otherwise localises; `dashboard/tests/unit/i18n.test.ts` is the net). 8. **Non-null `!` beyond DOM lookups** — `InviteScreen.vue`, `ManageGroupsDialog.vue`, `catalogue/CatalogueSurface.vue`, `monitoring/FleetServicesStatusScreen.vue`, `SelectRoleServicesScreen.vue`, `SystemCard.vue` (`props.source!.catalogueBrowse!()`), `ServiceCards.vue`, `PlaceScreen.vue`, `RentServerScreen.vue`. Guard or narrow instead. 9. **Repeated switches.** The `'System'` category literal (SystemCard, ServiceCards, CatalogueScreen) → one `SYSTEM_CATEGORY` export in `lib/catalogue.ts`; the tone → OcPill mapping inline in BackupsOverviewScreen and MembersScreen → one helper; `chipGlyph` bad→▲ in DeviceCard vs bad→● in FleetDiagram → one glyph table. 10. **Palette presets.** `lib/brandkit.ts` `PALETTE_PRESETS` holds hex in production lib (ADR 0122 lists preset swatches as fake data). Move to the brand-kit seam's answer or the fake. 11. **`snakeize(req) as WireMintCodeRequest`** in `lib/api/enrollClient.ts` hides that `name/kind/location` are not in the generated wire type — that becomes honest when #1431 lands; until then narrow the cast so a dropped field is a type error. ## Acceptance criteria - [ ] `pnpm -C dashboard test` and `pnpm -C packages/ui-kit test` green; `vue-tsc` clean; `eslint` clean. - [ ] `grep -rn "border: 1.5px solid var(--oc-line)" dashboard/src` finds only the kit; `grep -rn "\.oc-link\|\.oc-field {" dashboard/src` finds no redeclaration. - [ ] `grep -rn '\$t(' packages/ui-kit/src/components/NavChrome.vue` finds the nav labels again and the harness in all four locales reads the sidebar translated.

Blocked — agent-blocked (cannot-proceed: the prerequisite UI pass is not in main)

This ticket is the Standards-review fallout of the control-panel UI pass whose Parent line names "commit 078cd5b3, merged to main 2026-09-12". That commit and its code are not present in this repository's main (HEAD 1e5bdf60), so there is nothing here to refactor.

Verified against the current tree:

  • git cat-file -t 078cd5b3 → fatal: Not a valid object name — the parent commit is not an ancestor of main.
  • The subject components the items name do not exist anywhere under dashboard/ or packages/:
    shell/DeviceCard.vue, shell/DeviceCards.vue, shell/ServiceCards.vue, shell/SystemCard.vue, shell/FleetDiagram.vue, catalogue/CatalogueScreen.vue, catalogue/CatalogueSurface.vue, provisioning/RentServerScreen.vue, provisioning/SelectDeviceDialog.vue, provisioning/PlaceScreen.vue, lib/stackExport.ts.
  • Item 6's prototype bench dashboard/tests/e2e/preview-harness/ does not exist; item 10's PALETTE_PRESETS is not in lib/brandkit.ts.
  • Item 7's premise is the opposite of this tree's state: NavChrome.vue already localises with $t('kit.nav.*') (lines 37/47/106) and the four nav: locale blocks in packages/ui-kit/src/i18n/index.ts are live (last touched by #1380, 2026-09-10). There is no dropped-i18n regression to restore.
  • Item 2's acceptance grep already passes (grep -rn "border: 1.5px solid var(--oc-line)" dashboard/src → empty). Item 3's .oc-field { / .oc-link appear in ~24 unrelated screens (backups/provisioning/mail/members), not the two files named (AddDeviceScreen/RentServerScreen, AlertContactCard/InviteScreen) — AlertContactCard.vue has no .oc-link redeclaration at all.

Only fragments of the ticket have a real subject here: monitoring/AlertContactCard.vue, provisioning/SelectRoleServicesScreen.vue, lib/catalogue.ts, lib/brandkit.ts, and the item-11 snakeize(req) as WireMintCodeRequest cast in lib/api/enrollClient.ts. The other ten items reference code that has not landed. Doing only the fragments — or inventing the missing components — would neither be the filed scope nor satisfy the acceptance greps (which describe a different tree), and risks colliding with the real UI-pass merge when it arrives.

What a human must do to re-arm

Merge the control-panel UI pass (parent commit 078cd5b3 / its rebased equivalent) into main so the named components exist, then re-add ready-for-agent. If the pass landed under different paths/SHAs, please update this ticket's file references and acceptance greps to the merged tree and re-arm. Until the pass is in main, this hygiene series has no subject to act on.

## Blocked — `agent-blocked` (cannot-proceed: the prerequisite UI pass is not in `main`) This ticket is the Standards-review fallout of the **control-panel UI pass** whose Parent line names *"commit `078cd5b3`, merged to main 2026-09-12"*. That commit and its code are **not present in this repository's `main`** (HEAD `1e5bdf60`), so there is nothing here to refactor. Verified against the current tree: - `git cat-file -t 078cd5b3` → **`fatal: Not a valid object name`** — the parent commit is not an ancestor of `main`. - The subject components the items name **do not exist** anywhere under `dashboard/` or `packages/`: `shell/DeviceCard.vue`, `shell/DeviceCards.vue`, `shell/ServiceCards.vue`, `shell/SystemCard.vue`, `shell/FleetDiagram.vue`, `catalogue/CatalogueScreen.vue`, `catalogue/CatalogueSurface.vue`, `provisioning/RentServerScreen.vue`, `provisioning/SelectDeviceDialog.vue`, `provisioning/PlaceScreen.vue`, `lib/stackExport.ts`. - Item 6's prototype bench `dashboard/tests/e2e/preview-harness/` does not exist; item 10's `PALETTE_PRESETS` is not in `lib/brandkit.ts`. - Item 7's premise is the opposite of this tree's state: `NavChrome.vue` **already** localises with `$t('kit.nav.*')` (lines 37/47/106) and the four `nav:` locale blocks in `packages/ui-kit/src/i18n/index.ts` are **live** (last touched by #1380, 2026-09-10). There is no dropped-i18n regression to restore. - Item 2's acceptance grep already passes (`grep -rn "border: 1.5px solid var(--oc-line)" dashboard/src` → empty). Item 3's `.oc-field {` / `.oc-link` appear in ~24 **unrelated** screens (backups/provisioning/mail/members), not the two files named (`AddDeviceScreen`/`RentServerScreen`, `AlertContactCard`/`InviteScreen`) — `AlertContactCard.vue` has no `.oc-link` redeclaration at all. Only fragments of the ticket have a real subject here: `monitoring/AlertContactCard.vue`, `provisioning/SelectRoleServicesScreen.vue`, `lib/catalogue.ts`, `lib/brandkit.ts`, and the item-11 `snakeize(req) as WireMintCodeRequest` cast in `lib/api/enrollClient.ts`. The other ten items reference code that has not landed. Doing only the fragments — or inventing the missing components — would neither be the filed scope nor satisfy the acceptance greps (which describe a different tree), and risks colliding with the real UI-pass merge when it arrives. ## What a human must do to re-arm Merge the control-panel UI pass (parent commit `078cd5b3` / its rebased equivalent) into `main` so the named components exist, **then** re-add `ready-for-agent`. If the pass landed under different paths/SHAs, please update this ticket's file references and acceptance greps to the merged tree and re-arm. Until the pass is in `main`, this hygiene series has no subject to act on.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1444
No description provided.