Skip to content

chore(ui): align prettier across all three UI workspaces and enforce it in the ui:lint chain#8193

Merged
JSONbored merged 1 commit into
mainfrom
chore/prettier-alignment
Jul 23, 2026
Merged

chore(ui): align prettier across all three UI workspaces and enforce it in the ui:lint chain#8193
JSONbored merged 1 commit into
mainfrom
chore/prettier-alignment

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

What

Permanent fix for the class of damage behind the #8182 docs mangling (repaired in #8192): prettier's coverage differed between what npm run format rewrites locally and what CI checks (nothing), so a local format pass could silently rewrite hand-authored or generated content.

How

  • .prettierignore in every UI workspace covering the generated artifacts (public/openapi.json, routeTree.gen.ts, dist, ui-kit's CHANGELOG.md) and — deliberately — content/docs: prettier's mdx pass reformats the template-literal code inside <CodeBlock code={\…`}>` attributes, destroying embedded YAML indentation (exactly what broke the multi-runner compose example). Docs mdx stays formatter-free; its accuracy is guarded by the drift tests instead.
  • One mechanical reformat bringing all three workspaces to prettier-clean (loopover-ui was 3 files away; miner-ui and ui-kit had never been formatted).
  • format:check in each workspace, wired into the root ui:lint chain that CI's validate job and npm run test:ci already run — local and CI now enforce the identical surface.

Validation

ui:lint (with the three new format:checks), ui:typecheck, ui:test, and ui:build all green locally on the reformatted tree. No behavior changes — the non-config diff is purely mechanical formatting.

…it in the ui:lint chain

Root cause of the #8182 docs mangling: prettier coverage differed between
what 'npm run format' would rewrite locally and what CI checked (nothing).
Now the three UI workspaces agree everywhere:

- .prettierignore in every workspace covers the generated artifacts
  (openapi.json, routeTree.gen.ts, dist, CHANGELOG.md) and — deliberately —
  content/docs: prettier's mdx pass reformats the template-literal code
  inside <CodeBlock code={`...`}> attributes, destroying embedded
  YAML/compose indentation. Docs mdx stays formatter-free.
- One mechanical reformat brings every remaining file to prettier-clean.
- Each workspace gains format:check, wired into the root ui:lint chain that
  CI's validate job and npm run test:ci already run — local format runs and
  CI now enforce the identical surface, so drift of this class cannot land
  silently again.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
loopover-ui d10ae1a Commit Preview URL

Branch Preview URL
Jul 23 2026, 10:19 AM

@JSONbored JSONbored self-assigned this Jul 23, 2026
@JSONbored
JSONbored merged commit 89e2c4e into main Jul 23, 2026
6 of 7 checks passed
@JSONbored
JSONbored deleted the chore/prettier-alignment branch July 23, 2026 10:17
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
20726 4 20722 17
View the top 3 failed test(s) by shortest run time
test/unit/docs-selfhost-operations-runner-tmpdir.test.ts > self-hosting-operations doc: runner temp storage guidance matches docker-compose.yml (#selfhost-runner-tmp) > the doc's multi-runner snippet never mounts the Docker socket
Stack Traces | 0.00193s run time
AssertionError: expected null not to be null
 ❯ test/unit/docs-selfhost-operations-runner-tmpdir.test.ts:71:32
test/unit/docs-selfhost-operations-runner-tmpdir.test.ts > self-hosting-operations doc: runner temp storage guidance matches docker-compose.yml (#selfhost-runner-tmp) > includes a multi-runner override snippet whose x-runner-tmp-env values match the real anchor in docker-compose.yml
Stack Traces | 0.00841s run time
AssertionError: expected a multi-runner CodeBlock snippet in the doc: expected null not to be null
 ❯ test/unit/docs-selfhost-operations-runner-tmpdir.test.ts:45:88
test/unit/docs-selfhost-audit-checklist.test.ts > self-host docs accuracy audit (#1829) > manifest lists every self-host docs route file on disk
Stack Traces | 0.0144s run time
AssertionError: docs.self-hosting-quickstart.tsx: expected false to be true // Object.is equality

- Expected
+ Received

- true
+ false

 ❯ test/unit/docs-selfhost-audit-checklist.test.ts:33:79
View the full list of 1 ❄️ flaky test(s)
test/unit/kill-switch-incident-runbook.test.ts > kill-switch incident runbook (#4809) > exists as a wired docs page with nav entry

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0.0079s run time
Error: ENOENT: no such file or directory, open '.../src/routes/docs.ams-kill-switch-incident.tsx'
 ❯ test/unit/kill-switch-incident-runbook.test.ts:19:19

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: '.../src/routes/docs.ams-kill-switch-incident.tsx' }

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

JSONbored added a commit that referenced this pull request Jul 23, 2026
…hree UI workspaces (#8199)

The #8193 alignment missed them: a worktree that had run vitest
--coverage fails format:check on coverage/lcov-report/** artifacts that
are never formatter input. CI checkouts are clean so this only bit local
gates -- but local and CI enforcing the identical surface is the point.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant