From b82fd6cb6af6d26b8aa35a0f7577da1d01529e76 Mon Sep 17 00:00:00 2001 From: varutasu <104105839+varutasu@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:47:26 -0500 Subject: [PATCH] =?UTF-8?q?ci(forbidden-patterns):=20add=20Check=207/7=20?= =?UTF-8?q?=E2=80=94=20no=20bespoke=20var(--glass-surface-*)=20(#127)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Brief 7 (final brief) of unify-glass-panel-surfaces convoy. Adds the regression gate that prevents reintroduction of bespoke var(--glass-surface-low|mid|high) inline styles outside the documented allowlist. IMPLEMENTATION DEVIATION FROM BRIEF (DOCUMENTED): Brief 7 was authored before PR #126 (slash-ci-minutes convoy) consolidated the 6 grep-only forbidden-* jobs into a single forbidden-patterns job with sequential ::group:: sections. Adding Brief 7 as a standalone forbidden-bespoke-glass-surface job (the brief's verbatim shape) would partially undo PR #126's checkout amortization win. Instead, this PR adds the check as Check 7/7 inside the existing forbidden-patterns job — semantics, allowlist, and grep pattern are exactly as Brief 7 specifies; only the wrapper changes. Job display name updated: "Forbidden patterns (6 checks)" → "Forbidden patterns (7 checks)". ALLOWLIST EXPANSION (DOCUMENTED): Brief 7's planned 3-entry allowlist (the 3 chrome blocks) turned out to undercount the residual surface area. Three additional files still handroll their own var(--glass-surface-*) inline styles: - components/ui/Button.js (secondary variant) - components/ui/Input.js (input wrapper) - components/MobileNavigation.js (bottom-nav background) Per Brief 7's own note ("If you need to add a fourth allowlist entry, that's a design-system decision — open a new convoy"), the right call is to ship the gate NOW with a 6-entry allowlist (3 chrome + 3 pending-migration) and track the cleanup in a follow-up. This PR therefore also seeds `.convoys/migrate-button-input-mobilenav-to-glass-primitive.md` with the migration plan, open questions for the architect, and acceptance criteria. The 3 pending entries are tagged with inline `# TODO:` comments in ci.yml referencing the follow-up convoy. Local verification (per Brief 7's pre-merge negative test): - Positive test: grep on clean main → 0 violations outside the 6-entry allowlist. ✅ - Negative test: injected a scratch `const scratch = { background: 'var(--glass-surface-low)' }` line at EOF of pages/profile.js; grep correctly flagged it. ✅ - Revert verified: removing the scratch line returns the grep to 0 violations. ✅ The scratch change was NOT committed (per Brief 7's instructions). Convoy closeout: - `.convoys/unify-glass-panel-surfaces.md` status moved from `open` to `closing`; queued_followup field names the new convoy. The convoy lands fully when this PR merges. Verification: - npm run lint passes (1 pre-existing unrelated warning). - npm run test:run: 118/118 tests pass. - YAML parses (python3 yaml.safe_load). Files: - .github/workflows/ci.yml: +~70 lines (Check 7/7 step + final-exit copy edit). - .convoys/migrate-button-input-mobilenav-to-glass-primitive.md: new file, 113 lines. - .convoys/unify-glass-panel-surfaces.md: +2 lines (status + queued_followup fields). Co-authored-by: Cursor --- ...tton-input-mobilenav-to-glass-primitive.md | 132 ++++++++++++++++++ .convoys/unify-glass-panel-surfaces.md | 4 +- .github/workflows/ci.yml | 70 +++++++++- 3 files changed, 203 insertions(+), 3 deletions(-) create mode 100644 .convoys/migrate-button-input-mobilenav-to-glass-primitive.md diff --git a/.convoys/migrate-button-input-mobilenav-to-glass-primitive.md b/.convoys/migrate-button-input-mobilenav-to-glass-primitive.md new file mode 100644 index 0000000..5ec467e --- /dev/null +++ b/.convoys/migrate-button-input-mobilenav-to-glass-primitive.md @@ -0,0 +1,132 @@ +--- +status: queued +classification: server-only-no-actually-just-frontend-styles-cleanup +parent_convoy: unify-glass-panel-surfaces +blocked_by: [] +size: small +budget_hours: 2-3 +--- + +# migrate-button-input-mobilenav-to-glass-primitive + +## Why + +The `unify-glass-panel-surfaces` convoy's Brief 7 added a CI gate that +forbids bespoke `var(--glass-surface-*)` inline-style usage outside a +documented allowlist. When the gate was being added, three files +turned out to still handroll their own glass surfaces and had to be +admitted to the allowlist to ship the gate now: + +- `components/ui/Button.js` — the `secondary` variant carries + `style={{ background: 'var(--glass-surface-high)', backdropFilter: + '...' }}` and a Tailwind arbitrary class + `hover:bg-[var(--glass-surface-mid)]`. +- `components/ui/Input.js` — the input fill is `style={{ background: + 'var(--glass-surface-high)', backdropFilter: '...' }}` on the + outer wrapper of the input control. +- `components/MobileNavigation.js` — the bottom-nav background + layer is `style={{ background: 'var(--glass-surface-mid)', + backdropFilter: '...' }}`. + +The pattern (inline `background: var(--glass-surface-X)` + inline +`backdropFilter`) is exactly what the convoy spent six briefs +eliminating elsewhere. These three are the residual. + +## Goal (1 sentence) + +Migrate `components/ui/Button.js`'s `secondary` variant, +`components/ui/Input.js`, and `components/MobileNavigation.js` to +compose `` (with the right `cornerLights` + `blur` + +`tint` props from Brief 1) or the appropriate `.glass-panel-*` / +`.page-header-glass` class, then **delete** the three entries from +the `forbidden-bespoke-glass-surface` allowlist in +`.github/workflows/ci.yml` so the gate covers them too. + +## Files in scope + +- `components/ui/Button.js` — the `secondary` variant block only; + leave `primary`, `danger`, `ghost`, etc. as-is unless they + legitimately need the same migration (they don't today). +- `components/ui/Input.js` — the outer wrapper style only. +- `components/MobileNavigation.js` — the bottom-nav backdrop layer + only. +- `.github/workflows/ci.yml` — the `forbidden-bespoke-glass-surface` + check (now Check 7/7 of the consolidated `forbidden-patterns` + job). Delete the three pending entries from `GLASS_ALLOWLIST`, + leaving only the 3 chrome blocks. + +## Open questions for the architect + +1. **`