Skip to content

Release v1.209.1 — the printable documentation's table of contents lists its chapters and sections - #594

Merged
tesseractAZ merged 2 commits into
mainfrom
fix/docs-toc
Nov 25, 2026
Merged

tesseractAZ merged 2 commits into
mainfrom
fix/docs-toc

Conversation

@tesseractAZ

@tesseractAZ tesseractAZ commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

The printable documentation (the .docx and .pdf built on every pull request and attached to every Release) showed "Table of Contents" over nothing. Pandoc writes the contents as an empty Word field, which only Microsoft Word fills, and the PDF came from a plain LibreOffice conversion that does not update indexes. Both files now carry the contents.

No code the add-on runs changes.

Changes

  • The .docx. scripts/build-docs-docx.py caches one linked entry per level-1 and level-2 heading in the field (80 in this release), level 2 indented, with no page numbers. The field stays, so Word still rebuilds it with page numbers. The build fails if a heading has no bookmark to link to or the entries do not number the headings.
  • The .pdf. A new scripts/build-docs-pdf.py renders it for the pull-request check and the Release alike: LibreOffice updates the contents twice, then exports. It fails unless the contents lists every level-1 and level-2 heading with a page number, in order. It runs LibreOffice in a throwaway profile and work directory, handles LibreOffice's first-start rewrite of the macro registry, has its own 200 s deadline inside the workflows' 240 s, and leaves nothing behind on success, failure or a signal.
  • Workflows. ci.yml's docs job and images.yml's release step call the script. The release step stays best-effort; the pull-request job is the hard gate.
  • Words. The workflow comments, the build script's header, README and docs/reference/12 say what the build now does.

Verification

  • cd server && npm test: 7,127 tests, 0 failures, in both time zones, locally. CI's test job has neither pandoc nor LibreOffice, so four of them skip there and it counts 7,123 passing, the figure the README carries.
  • server/ type-checks, both projects; web/ type-checks and builds
  • python3 scripts/check-no-secrets.py; python3 scripts/validate-addon-config.py (the version only)
  • node scripts/check-mutant-anchors.mjs: 6,679 anchors across 158 harnesses
  • node scripts/check-docs.mjs --check; node scripts/check-doc-claims.mjs --tests 7127: 11 of 11
  • A real build: the .docx caches 80 entries (7 level-1, 73 level-2) and the PDF's contents lists 80, each on the page it names, pages 4 to 606
  • Mutation harnesses: mutate-v1188-0.mjs group P (150, 56 new) and mutate-v1187-3i.mjs (53, 4 new), every mutant killed in a full run; the six other harnesses with an anchor in a changed file, 177 of 177 killed
  • An independent checker rebuilt both files and tried to make the gate pass on a broken document; its eight findings are fixed
  • LibreOffice's Basic macro runtime on the Ubuntu runner with libreoffice-writer --no-install-recommends: this PR's docs job built the PDF with its contents.
  • Not opened in Microsoft Word (not available); the field keeps Word's own stored-contents layout.

Release

  • ecoflow_panel/config.yaml 1.209.0 to 1.209.1; ## 1.209.1 in ecoflow_panel/CHANGELOG.md (1.208.0 rolled to the archive).

🤖 Generated with Claude Code

tesseractAZ and others added 2 commits November 24, 2026 16:35
…sts its chapters and sections

Pandoc writes the contents as an empty Word field that only Word fills, and
the release PDF came from a plain LibreOffice conversion that does not
update indexes, so every printable showed "Table of Contents" over nothing.

The .docx now caches one linked entry per level-1 and level-2 heading. The
PDF is rendered by scripts/build-docs-pdf.py, which has LibreOffice update
the contents before exporting and fails unless the contents lists every
heading with a page number. Both workflows call it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI counts the tests that pass, and its test job has neither pandoc nor
LibreOffice, so the four tests that need them skip there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tesseractAZ
tesseractAZ merged commit 42125db into main Nov 25, 2026
16 checks passed
@tesseractAZ
tesseractAZ deleted the fix/docs-toc branch November 25, 2026 00:16
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