Skip to content

fix: [Timetraked] Restore Radix colors and add design-token, a11y, and markdown checks - #286

Merged
AdamJ merged 4 commits into
mainfrom
chore/agents-check-scripts
Nov 14, 2026
Merged

AdamJ merged 4 commits into
mainfrom
chore/agents-check-scripts

Conversation

@AdamJ

@AdamJ AdamJ commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

AGENTS.md required pnpm check:design-tokens, pnpm check:a11y, and pnpm lint:markdown before every commit, but none of those scripts existed. This PR adds them and fixes what they caught.

Building the design-token check surfaced a larger bug: the TrailPeak theme integration (031516f) dropped the @radix-ui/colors imports and their Tailwind mappings, so every Radix scale class (text-blue-11, bg-indigo-9, ring-blue-8, …) has produced no CSS since September. This PR restores them, then moves the two surfaces that clashed with the warm TrailPeak palette onto theme tokens.

Type of Change

  • New feature
  • Update to existing feature
  • Bug fix
  • Documentation update
  • Other (describe below) — new lint/check tooling

Related Issue

None.

Changes Made

New checks (d0f9b10)

  • scripts/check-design-tokens.mjs (pnpm check:design-tokens): flags default Tailwind palette classes (bg-blue-500) and hex classes (text-[#fff]) in src/. Skips vendored src/components/ui; a design-allow comment suppresses a line.
  • eslint.a11y.config.js (pnpm check:a11y): eslint-plugin-jsx-a11y recommended rules. autoFocus is allowed on components (dialogs focus their first field intentionally).
  • .markdownlint-cli2.jsonc (pnpm lint:markdown): markdownlint-cli2 with line length, inline HTML, first-line heading, and table alignment rules off; skips CHANGELOG.md, .claude/, .superpowers/, docs/plans/, docs/superpowers/.
  • eslint.config.js: registers jsx-a11y so its disable comments resolve; ignores local build output (src-tauri/target, .claude/worktrees).
  • Existing violations fixed:
    • PlannedTaskCard.tsx: title was a click-only <h3>; now a Button variant="link" inside the heading (keyboard accessible).
    • ExportDialog.tsx: date <label>s with no control are now <span>s (buttons still named via aria-labelledby).
    • TaskItem.tsx: delete button text-red-600/bg-red-50 → destructive tokens.
    • Context-menu wrapper tabIndex={0} kept (keyboard access to Shift+F10 menu) with a documented disable.
    • ~240 markdown issues across docs, mostly autofix.
  • Docs: AGENTS.md pre-commit checklist lists the new checks and corrects "tabs (not spaces)" to spaces; agents/workflow.md and README.md list the commands.

CI (f73005f)

  • .github/workflows/test.yml: runs check:design-tokens, check:a11y, and lint:markdown after lint; Node 20.x → 22.x (markdownlint-cli2 requires Node >=22; Node 20 is EOL).

Radix colors restored (705f0fb)

  • src/index.css: re-imports the 12 Radix light/dark scales and maps --color-<scale>-<1..12> in @theme inline, so classes follow .dark wherever it is set.
  • Visible effect: the dashboard "Active" badge (previously invisible white-on-nothing), the active-task ring, and client/project badge colors are back.

TrailPeak tokens for clashing surfaces (cd786a6)

  • KanbanColumn.tsx: column tints To Do/In Progress/Blocked/Done → dune (muted) / clay (chart-1) / stone (chart-5) / moss (chart-2); Blocked count badge stays rust (destructive).
  • ArchiveItem.tsx: Restore → muted-foreground, Total → foreground, billable/duration/revenue/value → moss (chart-2, ~5:1 on sand). text-primary avoided for small text (~4.4:1).

Checklist

Documentation

  • Any notable changes added to the README.md
  • CHANGELOG.md updated accordingly — left to the release workflow
  • N/A — no README changes

General

  • Branch is up to date with main
  • No unrelated files included in this PR
  • Tested locally by invoking the pnpm test, pnpm lint, and pnpm build — pnpm lint (0 errors) and pnpm build pass; pnpm test not run locally, relying on CI

Notes for Reviewers

  • Visual change: Radix classes now render again across the app. Before/after screenshots were checked for Dashboard, Tasks, Projects, Clients, Categories, Archive, and Settings (light mode; the app has no dark toggle). /report redirected in guest mode and was not captured.
  • src/components/ui/callout.tsx, badge.tsx, and toast.tsx still use default palette classes; they are vendored shadcn files and excluded from the token check.
  • src/trailpeak-theme.css is an unimported duplicate of index.css; left untouched.
  • release.yml still uses Node 20 and does not run the new checks.

AGENTS.md required pnpm check:design-tokens, check:a11y, and
lint:markdown before commits, but none of the scripts existed.

- check:design-tokens flags default Tailwind palette and hex color
  classes in src/ (skips vendored src/components/ui)
- check:a11y runs eslint-plugin-jsx-a11y recommended rules
- lint:markdown runs markdownlint-cli2
- Fix existing violations: keyboard-inaccessible planned task title,
  orphaned export date labels, palette classes on task delete button,
  and markdown lint issues across docs
- Ignore local build output in eslint; fix tabs/spaces in checklist
The TrailPeak theme integration removed the @radix-ui/colors imports
and their Tailwind @theme mappings, so every Radix scale class
(text-blue-11, bg-indigo-9, ring-blue-8, ...) produced no CSS. Restore
the 12 light/dark scales and map them in @theme inline so they follow
the .dark class wherever it is set.
Restoring the Radix scales brought back cool blue/pink/green column
tints and blue/green archive text that clash with the warm TrailPeak
palette. Map the board columns to dune/clay/stone/moss tints and the
archive totals to foreground/moss. Badges and the active-task state
keep their Radix colors.
@AdamJ AdamJ added fix For general fixes or bundled fixes accessibility frontend labels Nov 14, 2026
@github-actions github-actions Bot added actions For all items related to GitHub, deployment, and release automations and actions. automation For items related to release/documentation/workflow automations dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation labels Nov 14, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Deploying timetrackerpro with  Cloudflare Pages  Cloudflare Pages

Latest commit: f73005f
Status: ✅  Deploy successful!
Preview URL: https://7ebcb4e1.timetrackerpro.pages.dev
Branch Preview URL: https://chore-agents-check-scripts.timetrackerpro.pages.dev

View logs

Bump the test job to Node 22.x: markdownlint-cli2 requires Node >=22,
and Node 20 is past end of life.
@AdamJ AdamJ added this to Timetraked Nov 14, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Timetraked Nov 14, 2026
@AdamJ
AdamJ merged commit 268edef into main Nov 14, 2026
3 checks passed
@AdamJ AdamJ self-assigned this Nov 14, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Timetraked Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility actions For all items related to GitHub, deployment, and release automations and actions. automation For items related to release/documentation/workflow automations dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation fix For general fixes or bundled fixes frontend

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant