chore(ui): audit route heading structure - #1237
Conversation
|
@QwinDivy is attempting to deploy a commit to the ezedikeevan's projects Team on Vercel. A member of the Team first needs to authorize it. |
ezedike-evan
left a comment
There was a problem hiding this comment.
Thanks for taking #1068 on — tests/e2e/heading-structure.spec.ts is exactly the kind of test the issue asks for, one that asserts the rule rather than the current output. That file is worth keeping.
The problem is the other half of the diff. app/anchors/page.tsx cannot be taken as written, and it is not a one-line fix — it reverts the page rather than auditing its headings:
- Import statements are placed inside the function body, after
export default async function AnchorsPage()has already opened. That is theSyntaxError: Identifier expected. (106:7)thecheck (node 20)andcheck (node 22)jobs are failing on. Imports have to be at module scope. - It redefines
AnchorsContentlocally. That component already exists atcomponents/anchors/AnchorsContent.tsxand is already the client half of this page — the'use client'boundary was deliberately moved to the component so the page could stay a React Server Component. - It deletes the JSON-LD injection. The
<script type="application/ld+json">block withserializeJsonLd(jsonLd)is why this page is a server component at all; theDatasetmarkup has to carry a coverage window derived from real data. - It reverts the design tokens.
bg-blue-600,text-whiteandtext-gray-*were replaced across the app with the theme tokens (bg-bg-subtle,text-primary-text,border-control-border, and so on). Reintroducing raw Tailwind colours breaks dark mode and the contrast test. - Two default exports and an unbalanced
<Suspense>— the new one opens<Suspense>and closes</>.
What I would suggest: drop app/anchors/page.tsx from this PR entirely (git checkout origin/main -- app/anchors/page.tsx) and keep only tests/e2e/heading-structure.spec.ts. Then run the spec against the pages as they are and fix the specific heading violations it catches, one page at a time — that is the audit the issue is asking for. If the spec passes everywhere already, the PR is still valuable as the regression guard #1068 wants.
Happy to look again as soon as the page file is out of the diff.
close #1068
Summary
Linked issue
Closes #
Changes
Testing notes
Automated — run the block for whatever you touched. See
CONTRIBUTING.md § Per-surface checks.
Root (always):
npm run format:check· ⏳ not run / ✅ green / ❌ failingnpm run lint· ⏳ not run / ✅ green / ❌ failingnpm run typecheck· ⏳ not run / ✅ green / ❌ failingnpm run test· ⏳ not run / ✅ green / ❌ failingnpm run build· ⏳ not run / ✅ green / ❌ failingnpm run emit-openapi→ no diff, or spec committed · ⏳ / ✅ / ❌ / n-aRust (if
contracts/orcrates/changed):cargo fmt --check· ⏳ / ✅ / ❌ / n-acargo clippy --all-targets -- -D warnings· ⏳ / ✅ / ❌ / n-acargo test --locked· ⏳ / ✅ / ❌ / n-aPython (if
packages/python-sdk/changed):pytest· ⏳ / ✅ / ❌ / n-amypy src· ⏳ / ✅ / ❌ / n-awrapper.pyis ours) · ⏳ / ✅ / ❌ / n-aNew / modified tests
Manual verification (if applicable)
Screenshots / recordings
Checklist
Correctness
npm run typecheckpassesnpm run lintpasses with zero new warnings (we run--max-warnings 0in CI)npm run testpasses; new behaviour has a testnpm run buildpassesData integrity
CONTRIBUTING.md)isMock,// MOCK,// TODO: replace with real data, or commented-out real codestellar.tomlis publicly resolvable athttps://{domain}/.well-known/stellar.tomland containsTRANSFER_SERVER_SEP0024AbortControllertimeout is intact on anchor fetchescompleted | refunded | error) still stop the SWR loopSecurity & non-custody (see
docs/NON_CUSTODY.mdonce it lands).env.localis unchanged; new env vars are added to.env.exampleDocs
CHANGELOG.mdentry under[Unreleased]docs/*.mdupdated in the same PRdocs/ARCHITECTURE.mdupdated (file map, diagram, or invariants as applicable)docs/showcase/images/when relevant.env.example+ README env table updatedRelease hygiene
[ ]indocs/ROADMAP.mdis updatedBreaking changes
None.
For reviewers