Skip to content

fix(public): heading hierarchy cleanup on home and all six served pages - #28

Merged
nish3451 merged 3 commits into
mainfrom
fix/heading-hierarchy-complete
Aug 9, 2026
Merged

fix(public): heading hierarchy cleanup on home and all six served pages#28
nish3451 merged 3 commits into
mainfrom
fix/heading-hierarchy-complete

Conversation

@nish3451

@nish3451 nish3451 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

What and why

Dogfood finding e6e153bdadd0 ("Heading hierarchy needs cleanup on home", audit 20260808T074205Z-msk2fl3n): the home page's native outline skips levels — sections under an h2 used h4 sub-headings. The same skip classes exist on the sibling served pages (h1 -> h3 roster/findings/brief-requested steps, h2 -> h4 gatebox/stops/FAQ).

This change retags the sub-headings one level shallower so every outline descends without gaps (h1 -> h2 -> h3), retargets the affected CSS selectors with the same property values (rendered appearance unchanged), and adds a deterministic regression test (scripts/test-heading-hierarchy.mjs, wired into npm test) that locks the corrected outline of all six served public pages and proves the checker rejects the pre-fix shapes.

Files

  • public/index.html — home: .stop and .q sub-headings h4 -> h3 (the finding's page)
  • public/agents.html — roster h3 -> h2, gatebox h4 -> h2
  • public/pricing.html — stops/FAQ h4 -> h3
  • public/specimen.html — findings h3 -> h2, not-run note h4 -> h3
  • public/brief-requested.html — steps h3 -> h2 (the one page the earlier four-page attempt missed)
  • public/{index,agents,pricing,specimen,brief-requested}.css — selector retargets, values unchanged
  • package.json, scripts/test-heading-hierarchy.mjs — regression gate covering all six pages in the worker's PUBLIC_ASSET_PATHS set (index, audit, agents, pricing, specimen, brief-requested)

Relationship to the open attempts

Verification (local, fresh origin/main base)

  • npm run check — pass
  • npm test — 74/74 pass (check + 6 heading-hierarchy + 53 worker + 15 UI)
  • git diff --check — clean
  • sgscan — no new security findings
  • npm run check:render-blocking — 6/6 PASS (real Chromium, production CSP)
  • npx wrangler deploy --dry-run — ok

Repository proof only (heading hierarchy + tests, locally verified). No live-deployment, ranking, or accessibility-certification claim; no deploy or merge here.

Summary by CodeRabbit

  • Accessibility

    • Improved heading hierarchy across public pages for clearer structure and better screen-reader navigation.
    • Added supporting explanatory text to the pricing timeline section.
  • Bug Fixes

    • Added automated checks to detect skipped or invalid heading levels and prevent regressions.
  • Tests

    • Included heading-hierarchy validation in the standard test workflow.
    • Added coverage for valid and invalid heading structures across public pages.

The dogfood audit (20260808T074205Z-msk2fl3n, finding e6e153bdadd0)
flagged the home page's outline skipping levels: sections under h2 used
h4 sub-headings. The same skip existed on agents, pricing and specimen
(h1 -> h3 roster/findings, h2 -> h4 gatebox/stops/faq).

Retag the sub-headings one level shallower so the native outline
descends without gaps, retarget the affected CSS selectors with the same
property values (appearance unchanged), and add a deterministic
regression test (scripts/test-heading-hierarchy.mjs, wired into npm
test) that locks the corrected outline per page and proves the checker
rejects the pre-fix shapes.
…x served pages

The earlier four-page cleanup (index, agents, pricing, specimen) left one
heading-level skip of the same class on the sixth served page:
brief-requested.html used h3 directly under the h1. Retag the three step
headings to h2 and retarget .step h3 -> .step h2 in brief-requested.css
with identical property values, so the rendered appearance is unchanged.

Extend the regression test to all six served public pages (index, audit,
agents, pricing, specimen, brief-requested — the worker's PUBLIC_ASSET_PATHS
set) and lock their corrected outlines, plus prove the checker rejects the
pre-fix brief-requested h1 -> h3 shape.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nish3451 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b8a12a5c-0963-4c86-bd60-0e7564c1ff89

📥 Commits

Reviewing files that changed from the base of the PR and between fa2ba07 and cea7074.

📒 Files selected for processing (4)
  • public/agents.html
  • public/index.html
  • public/pricing.html
  • public/specimen.html
🚧 Files skipped from review as they are similar to previous changes (4)
  • public/agents.html
  • public/pricing.html
  • public/specimen.html
  • public/index.html

📝 Walkthrough

Walkthrough

The public pages now use revised heading levels and matching CSS selectors. A heading hierarchy checker validates six pages and regression cases. The checker runs through a new npm script included in the main test workflow.

Changes

Public heading hierarchy

Layer / File(s) Summary
Heading hierarchy checker
scripts/test-heading-hierarchy.mjs
Parses rendered headings, validates h1 structure and level transitions, checks six expected outlines, and covers invalid markup cases.
Public page heading updates
public/agents.*, public/brief-requested.*, public/index.*, public/pricing.*, public/specimen.*
Promotes page headings and updates CSS selectors. The pricing page also adds a lead paragraph beneath the “How the clock is counted” heading.
Test workflow integration
package.json
Adds test:headings and runs it before the worker and UI tests.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the heading hierarchy fixes across the served public pages.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/heading-hierarchy-complete

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@public/agents.css`:
- Line 19: Update the .gatebox h2 font-family declaration to use the unquoted
Fraunces family name while preserving the existing serif fallback.

In `@public/specimen.css`:
- Line 20: Update the .notrun h3 font-family declaration to use the unquoted
Fraunces family name, while preserving the existing serif fallback.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 784fe7b9-e4d6-4a26-b124-51cc6f7370f5

📥 Commits

Reviewing files that changed from the base of the PR and between a76dba4 and fa2ba07.

📒 Files selected for processing (12)
  • package.json
  • public/agents.css
  • public/agents.html
  • public/brief-requested.css
  • public/brief-requested.html
  • public/index.css
  • public/index.html
  • public/pricing.css
  • public/pricing.html
  • public/specimen.css
  • public/specimen.html
  • scripts/test-heading-hierarchy.mjs

Comment thread public/agents.css
.gatebox>div{padding:38px 42px}
.gatebox>div:first-child{border-right:1px solid var(--line)}
.gatebox h4{font-family:'Fraunces',serif;font-weight:300;font-size:25px;letter-spacing:-.02em}
.gatebox h2{font-family:'Fraunces',serif;font-weight:300;font-size:25px;letter-spacing:-.02em}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the quotes from the Fraunces font family.

Stylelint reports font-family-name-quotes on Line 19. Remove the quotes while keeping the fallback family unchanged.

Proposed fix
-  .gatebox h2{font-family:'Fraunces',serif;font-weight:300;font-size:25px;letter-spacing:-.02em}
+  .gatebox h2{font-family:Fraunces,serif;font-weight:300;font-size:25px;letter-spacing:-.02em}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.gatebox h2{font-family:'Fraunces',serif;font-weight:300;font-size:25px;letter-spacing:-.02em}
.gatebox h2{font-family:Fraunces,serif;font-weight:300;font-size:25px;letter-spacing:-.02em}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 19-19: Expected no quotes around "Fraunces" (font-family-name-quotes)

(font-family-name-quotes)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@public/agents.css` at line 19, Update the .gatebox h2 font-family declaration
to use the unquoted Fraunces family name while preserving the existing serif
fallback.

Source: Linters/SAST tools

Comment thread public/specimen.css
.notrun{margin-top:40px;background:rgba(176,74,46,.05);border:1px solid rgba(176,74,46,.22);
border-radius:10px;padding:26px 30px}
.notrun h4{font-family:'Fraunces',serif;font-weight:300;font-size:21px;letter-spacing:-.018em;color:var(--sig)}
.notrun h3{font-family:'Fraunces',serif;font-weight:300;font-size:21px;letter-spacing:-.018em;color:var(--sig)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the quotes from the Fraunces font family.

Stylelint reports font-family-name-quotes on Line 20. Remove the quotes while keeping the fallback family unchanged.

Proposed fix
-  .notrun h3{font-family:'Fraunces',serif;font-weight:300;font-size:21px;letter-spacing:-.018em;color:var(--sig)}
+  .notrun h3{font-family:Fraunces,serif;font-weight:300;font-size:21px;letter-spacing:-.018em;color:var(--sig)}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.notrun h3{font-family:'Fraunces',serif;font-weight:300;font-size:21px;letter-spacing:-.018em;color:var(--sig)}
.notrun h3{font-family:Fraunces,serif;font-weight:300;font-size:21px;letter-spacing:-.018em;color:var(--sig)}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 20-20: Expected no quotes around "Fraunces" (font-family-name-quotes)

(font-family-name-quotes)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@public/specimen.css` at line 20, Update the .notrun h3 font-family
declaration to use the unquoted Fraunces family name, while preserving the
existing serif fallback.

Source: Linters/SAST tools

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nish3451 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cea7074e93

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"public/agents.html",
"public/pricing.html",
"public/specimen.html",
"public/brief-requested.html"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the served Agent Desk in the heading gate

This page list omits public/agent-desk.html, even though src/worker.js exposes both /agent-desk.html and /agent-desk through PUBLIC_ASSET_PATHS. Consequently, the new suite can report that every owned public page is protected while heading-level regressions on the Agent Desk pass unnoticed; add that HTML file and its expected outline to the gate.

Useful? React with 👍 / 👎.

@nish3451
nish3451 merged commit 7be3d8f into main Aug 9, 2026
3 checks passed
nish3451 added a commit that referenced this pull request Aug 9, 2026
Resolve the drift between fix/apple-touch-icon-home (finding 98a7bf8e08fc)
and origin/main after #28 (heading hierarchy) and #31 (social share tags)
landed. Both changes touched the same head regions and check-site.mjs;
the merged result keeps the apple-touch-icon link and its regression guard
alongside main's og:/twitter: share blocks on all five public pages.
nish3451 added a commit that referenced this pull request Aug 9, 2026
This branch sat open long enough for four other public-page PRs (#28 heading
hierarchy, #30 apple touch icon, #32 schema.org, #33/#34 links) to land on the
same five head sections and the same guard script, so every touched file
conflicted.

Resolution: all six conflicts were additive, not competing.
- The five HTML files each gained a <link rel="canonical"> on this branch and
  icon/og/twitter/JSON-LD tags on main; both sets are kept.
- scripts/check-site.mjs was rebuilt from main's version with this branch's
  53-line canonical guard inserted verbatim before the migrations loop, rather
  than by textually merging two overlapping hunks — the first attempt at that
  spliced a dangling `const canonicalPages = [` and broke the file.

intended-outcome: PR #29 becomes mergeable with the canonical guard and every
already-landed head guard both enforced.
verify: node scripts/check-site.mjs -> "TinyStudio.io checks passed."; npm test
-> 15/15; npm run check, test:headings, test:worker all pass. check:render-blocking
is not runnable here (playwright is not installed in this worktree) — CI covers it.
nish3451 added a commit that referenced this pull request Aug 9, 2026
…nst current main and live (#40)

The code-side fix (PR #28) and CI enforcement (scripts/test-heading-hierarchy.mjs,
wired into npm test as test:headings) for dogfood finding e6e153bdadd0
('Heading hierarchy needs cleanup on home') are already merged in origin/main.
This lane re-verified the guarantee still holds after the subsequent page
edits (canonical URLs, structured data, sitemap, internal-link cleanups):

- npm run check passes on all six served public pages.
- npm test passes (source checks + heading-hierarchy, sitemap, agent-worker
  and agent-UI suites).
- Fresh live measurement of the deployed pages in real Chromium confirms the
  same: every served page carries exactly one h1 as its first heading and a
  gap-free descending outline — no h2->h4 or h1->h3 skips anywhere, including
  the home page the finding flagged.
nish3451 added a commit that referenced this pull request Aug 10, 2026
…and live (#92)

The scout finding 'Ship origin/main past the stuck fleet-release SHA'
(named PRs #28 heading hierarchy and #30 apple-touch-icon on main but not
live) was already accepted by the fleet pipeline: the hourly release
advanced release-state-tinystudio-io.json past the stuck eae1d87 to
c5e2f2b on 2026-08-09, and the closeout receipt was prepared on branch
docs/evidence/fleet-release-closeout but never merged to main. This lane
re-verified the acceptance criteria against the current head and live
(2026-08-11) and records the closeout on origin/main so the tracker item
cannot re-open by drift:

- release-state-tinystudio-io.json pins 354e725 (2026-08-11T03:38:32),
  strictly newer than the stuck eae1d87; pipeline actively shipping.
- All six served pages serve exactly one leading h1, zero h4+, and
  gap-free outlines matching scripts/test-heading-hierarchy.mjs.
- All five appraisal pages serve rel=apple-touch-icon; the asset returns
  200 image/png; matches source (brief-requested is outside #30's scope
  in both source and live).
- npm run check and full npm test pass on origin/main c934538 (90 tests,
  0 failures); the live/main gap is exactly three docs(evidence) commits
  with zero public/ src/ scripts/ changes pending.
nish3451 added a commit that referenced this pull request Aug 12, 2026
…(PR #22 conflict-locked, superseded by #28) against current GitHub state (2026-08-12) (#152)

Closes the review item "Two open PRs carry the same heading-hierarchy fix —
PR #22 is conflict-locked and superseded" (review queue, unreviewed-by-grok),
re-verified against the current GitHub state on 2026-08-12.

Verified facts (2026-08-12):
- PR #22 is CLOSED (2026-08-09), never merged, mergeStateStatus: DIRTY
  (conflict-locked) at close — the item's description was accurate.
- The superseding fix PR #28 is MERGED on main (2026-08-09, commit 7be3d8f);
  sibling duplicate #27 is also CLOSED.
- All 53 currently open PRs diff-reviewed: the only literal heading markup
  anywhere is one hierarchy-preserving h2 on /specimen in PR #107 (with its
  locked outline updated in scripts/test-heading-hierarchy.mjs) and one
  standalone h1 in PR #116's new closed-intake page — zero open PR retags
  an existing heading level, so no open PR duplicates the heading fix.
- Main has carried exactly one heading fix since 2026-08-09: the only
  heading-tag change since the merge is 2ae7504's two hierarchy-preserving
  homepage FAQ h3s (PR #102, locked outline updated). npm run check passes
  and npm test passes in full (test:headings 6/6) on current origin/main
  (ad9cee3).
- Site-side verification is current via docs/evidence/heading-hierarchy-2026-08-09.md
  (PR #74) with the 2026-08-12 re-verify in flight as PR #120.

Docs-only change; no code, no deployment.
nish3451 added a commit that referenced this pull request Aug 13, 2026
…and live (#139)

The 2026-08-11 re-verification confirmed the closeout on head 354e725.
Thirteen commits have landed since; the pipeline kept shipping every merge,
so release-state-tinystudio-io.json now pins 18128e8 — byte-identical to the
current origin/main HEAD, zero deployment lag (the 2026-08-11 receipt's
docs-only lag is gone). Both named PRs (#28 7be3d8f heading hierarchy, #30
b004c11 apple-touch-icon) are ancestors of the deployed release; the stuck
eae1d87 is strictly older. Live: all six served pages serve the locked
gap-free heading outlines (home now 30 items incl. PR #102's two FAQ h3s),
all five appraisal pages serve rel=apple-touch-icon resolving 200 image/png.
npm run check passes; npm test passes 92/92 on this head.
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