Skip to content

Remove the repeated title heading from five split-out pages - #564

Merged
dem-extra1 merged 6 commits into
mainfrom
claude/project-thread-ykzrw4
Nov 2, 2026
Merged

dem-extra1 merged 6 commits into
mainfrom
claude/project-thread-ykzrw4

Conversation

@dem-extra1

Copy link
Copy Markdown
Contributor

Closes #563.

The functions, sets, indicator-functions, linear-algebra-vectors and linear-algebra-matrices pages opened with a level 2 heading that repeated the page title.
This applies the option Ezra chose for these pages: drop the repeated heading and keep its id.

  • _functions.qmd and _sets.qmd: remove the leading ## heading. The remaining sections stay at level 2.
  • The vectors, matrices and indicator-functions fragments are also sections of larger pages, so their headings must stay in the fragment.
    The new split-page-headings.lua filter, used only by those three standalone pages, drops the heading that repeats the title (keeping its id as an empty anchor) and moves later headings up one level.
  • Rendered all five pages plus linear-algebra.qmd to HTML: each standalone page now has the title at level 1 and sections at level 2; the combined Linear Algebra page is unchanged.

The branch also carries a merge commit with the already-merged history of #545, because the remote branch could not be fast-forwarded.

Thread: Fix heading levels in split-out pages


Generated by Claude Code

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor Author

Pushed 5d77ff6 for the review above:

  • The #sets and #functions ids stay as empty anchors at the top of _sets.qmd and _functions.qmd. Rendered both pages and confirmed each id is present once.
  • _sets-functions.qmd now adds its own ## Sets and ## Functions headings.
  • The filter writes a warning to stderr when no heading matches the title.
  • The other linear-algebra split pages have titles that differ from their fragments' headings (for example "Subspaces and Rank" over "Rank"), so none repeats its title and none needs the filter.

Generated by Claude Code

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@dem-extra1

Copy link
Copy Markdown
Contributor Author

🤖 Antigravity agent report

Cross-harness review (Gemini 3.8 Flash (Medium) via Antigravity agy 1.3.5, standing in while Argon quota is exhausted, read-only plan mode) at 5d77ff6

This supersedes the request at 8625744.
I gave the model the full diff (8 files, 3.6 KB) and facts I checked: the three standalone pages' titles match the first headings of their fragments; the remaining headings in _functions.qmd and _sets.qmd are level 2; a document-level filters: entry is added to the project filters (I rendered a test page with a project filter and a document filter, and both ran); the filter does what the description says (I ran it with pandoc on a test page: it drops the repeated heading, leaves an empty anchor, and lowers later ### and #### headings, but not a definition div's #### title); and pandoc emits the same id twice when a ## Sets heading and a []{#sets} span are on one page.
Nothing in the mds site was rendered (the PR rendered HTML only).

Since 8625744 the filter warns on stderr when no heading matches the title, the two fragments keep the old auto-ids as []{#functions} and []{#sets}, and the compatibility shim _sets-functions.qmd now supplies the ## Sets and ## Functions headings itself.

Findings

  1. The shim now produces duplicate ids.
    _sets-functions.qmd has ## Sets followed by {{< include mds/_sets.qmd >}}, and _sets.qmd now begins with []{#sets}, so a page that includes the shim gets two elements with id="sets" (and likewise functions).
    No host site includes the shim today, per its own comment, so this is inert for now; drop the two anchors when the fragment is used inside the shim, or give the shim's headings explicit different ids.
  2. The shim's advice no longer holds.
    Its comment says "new host pages should include the three fragments directly", but _sets.qmd and _functions.qmd no longer open with a section heading, so a host that follows that advice gets no "Sets" or "Functions" section.
    Change the comment (include the shim, or supply the heading).
  3. The slide, pdf and docx structure of the three standalone pages is still unverified.
    Lowering ### to ## changes where revealjs starts a slide and how the pdf and docx handouts are sectioned; the PR rendered only HTML.
    Render the slides and the pdf of linear-algebra-vectors.qmd once and check the breaks.
  4. The filter's header comment overstates what it does (a nit).
    "move every later heading up one level" is not what if dropped and block.level > 2 does: a later level-2 heading stays where it is, so it would become a sibling of the lowered former subsections.
    Say "every later heading deeper than level 2", and that the three fragments have no other level-2 heading.

I disagree with two of the model's points.
It says the filter should also reach headings nested in divs, but those #### are the titles of definition and exercise divs, which the lab does not count as headings.
It objects to the empty paragraph that holds the anchor, a tradeoff that mds#545 states and accepts.

Verdict

VERDICT: FINDINGS

Reviewed-Commit: 5d77ff6

Posted by Claude Code (AI agent) --- not written by a human.

Copy link
Copy Markdown
Contributor Author

Pushed e39a2cf for the Flash findings:

  1. The shim's headings now have their own ids (#sec-shim-sets, #sec-shim-functions), so they no longer duplicate the fragments' #sets and #functions anchors.
  2. The shim's comment now says the fragments no longer open with a section heading, so a host page writes its own.
  3. Rendered linear-algebra-vectors.qmd to slides, PDF and DOCX with no errors. Slides: "Vectors" title slide, then "Special vectors" and "Orthogonality" as level 2 sections. PDF: Vectors, then Special vectors and Orthogonality as sections.
  4. The filter comment now says "deeper than level 2" and notes that the fragments have no other level 2 heading.

Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Claude finished review — View run


I fetched PR #564 live just now. It is open and not a draft, and it has not been merged. Its head is e39a2cf39cf967b1e3846eca241d3c0504ec3529, the commit I reviewed, so my review stands.

Verdict

Ready for merge. I found no new issues in e39a2cf. My earlier "Ready for merge" verdict on 5d77ff6 also stands (comment). I did not render the site.

Stopping Point: This is an automated non-interactive run whose output a harness posts. I changed no files and made no commits.

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "e39a2cf39cf967b1e3846eca241d3c0504ec3529",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "The shim headings in _sets-functions.qmd get unique sec-shim ids that do not collide with the fragments' empty anchors, and the Lua filter comment now matches the level greater than 2 promotion logic.",
  "holistic_assessment": "The commit is a small documentation and id cleanup that keeps page anchors stable for course sites, introduces no regression risk, and the only unchecked item is a full site render."
}

Reviewed commit: e39a2cf

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

💰 Cost: $0.2353 (review) — run

@dem-extra1

dem-extra1 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Antigravity agent report

Cross-harness review (delta-focused, Gemini 3.8 Flash (Medium) via Antigravity agy 1.3.5, standing in while Argon quota is exhausted, read-only plan mode) at e39a2cf

This supersedes my read of 5d77ff6 and covers the compare 5d77ff6...e39a2cf (two files, two small hunks), with my four findings and the author's reply in the prompt.
Fixed: the shim's headings are now ## Sets {#sec-shim-sets} and ## Functions {#sec-shim-functions}, so they no longer share an id with the fragments' []{#sets} and []{#functions} anchors; the shim's comment now says that the fragments no longer open with a section heading, so a host page writes its own; and the filter's header comment now says "every later heading deeper than level 2" and "The fragments that use this filter have no other level 2 heading".
The author also reports that linear-algebra-vectors.qmd rendered to slides, PDF and DOCX without errors, with "Vectors" as the title slide followed by "Special vectors" and "Orthogonality" as level 2 sections (and as sections in the PDF); that covers my finding about the slide structure for the vectors page, and the matrices and indicator-functions pages use the same filter.
The model reported that the ids follow the lab's sec- convention, that the comments are accurate, and that nothing else changed; it found nothing.
I read the hunks and agree.
I rendered nothing myself.

Verdict

VERDICT: CLEAN

Reviewed-Commit: e39a2cf

Posted by Claude Code (AI agent) --- not written by a human.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.

2026-11-02 03:14 UTC

@dem-extra1
dem-extra1 merged commit 0c0c47c into main Nov 2, 2026
39 checks passed
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.

Remove the repeated title heading from five split-out pages

2 participants