mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-11-06 12:51:54 +00:00
chore(ui): design system audit autofixes (agent)
This commit is contained in:
1 parent
84ce8ed249
commit
fa5ef77ed8
6 files changed
+119
-2
No files matched your search
@@ -0,0 +1,21 @@
|
||||
---
|
||||
agent: design-system-audit-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-20T02:05:36Z
|
||||
prompt-path: src/prompts/daily/design-system-audit-agent.md
|
||||
commit-sha: 84ce8ed
|
||||
---
|
||||
|
||||
# Design System Audit Context
|
||||
|
||||
## Goal
|
||||
Verify UI alignment with the tokenized design system (CSS tokens + utilities).
|
||||
|
||||
## Scope
|
||||
- `dashboard/styles.css`: Canonical token and utility source.
|
||||
- `dashboard/index.html` and `dashboard/app.js`: UI implementation.
|
||||
|
||||
## Findings
|
||||
- Only one raw hex color (`#fff`) found in `styles.css`.
|
||||
- One mismapped token (`text-accent-strong` using `var(--accent)`).
|
||||
- One inline style in `app.js` for a dynamic progress bar (allowed).
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
agent: design-system-audit-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-20T02:05:36Z
|
||||
prompt-path: src/prompts/daily/design-system-audit-agent.md
|
||||
---
|
||||
|
||||
# Decisions
|
||||
|
||||
## Decision 1: Allow inline style in `app.js`
|
||||
- Rationale: The `bar.style.width` calculation for the progress bar is highly dynamic (calculated from `ttlPct`). While it could use a CSS variable, the current implementation is simple and safe.
|
||||
- Outcome: Noted in report as allowed.
|
||||
|
||||
## Decision 2: Replace `#fff` with `var(--text-strong)`
|
||||
- Rationale: `#fff` is identical to the `text-strong` token value. Using the token ensures consistency.
|
||||
|
||||
## Decision 3: Fix `text-accent-strong` mapping
|
||||
- Rationale: It was incorrectly using `var(--accent)` instead of `var(--accent-strong)`.
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
agent: design-system-audit-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-20T02:05:36Z
|
||||
prompt-path: src/prompts/daily/design-system-audit-agent.md
|
||||
---
|
||||
|
||||
# Test Log
|
||||
|
||||
## Environment
|
||||
- Commit: `84ce8ed`
|
||||
- Node: `v22.22.0`
|
||||
- npm: `10.9.4`
|
||||
|
||||
## Commands and Results
|
||||
1. `node scripts/memory/retrieve.mjs`
|
||||
- Result: `MEMORY_RETRIEVED`
|
||||
2. `npm run lint`
|
||||
- Result: Exit 0
|
||||
3. `grep -r "style=" dashboard/`
|
||||
- Result: No matches (except dynamic style in JS)
|
||||
4. `grep -r "#[0-9a-fA-F]" dashboard/`
|
||||
- Result: Identified only one non-token hex in `styles.css`.
|
||||
|
||||
## Validation Outcome
|
||||
- Lint passes before and after fixes.
|
||||
- Visual inspection of `styles.css` confirmed correct token usage after fixes.
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
agent: design-system-audit-agent
|
||||
cadence: daily
|
||||
run-start: 2026-02-20T02:05:36Z
|
||||
prompt-path: src/prompts/daily/design-system-audit-agent.md
|
||||
---
|
||||
|
||||
# TODO
|
||||
|
||||
## Completed
|
||||
- [x] Preflight checks (read docs, verified scripts).
|
||||
- [x] Run lint and style checks.
|
||||
- [x] Audit UI for inline styles, hex colors, and raw lengths.
|
||||
- [x] Produce remediation report: `reports/design-system/design-system-report-2026-02-20.md`.
|
||||
- [x] Apply safe auto-fixes to `dashboard/styles.css`.
|
||||
- [x] Verify fixes with `npm run lint`.
|
||||
Reference in new issue
Block a user