Reader-first: math-truncation fix, doc meta, and SlideEngine navigation - #65
Open
zereraz wants to merge 3 commits into
Open
Reader-first: math-truncation fix, doc meta, and SlideEngine navigation#65zereraz wants to merge 3 commits into
zereraz wants to merge 3 commits into
Conversation
- SKILL.md: add favicon to delivery rules + final checklist, plus a KaTeX '<'-escaping note that prevents formula truncation - templates: add the data-URI favicon to all 4 reference templates - extension.ts: ensureFavicon() deterministically injects the favicon after </title> (or into <head>) on render unless an icon link already exists, so pages get it even if the agent omits it The favicon is a self-contained data-URI SVG (node-graph glyph, dark/accent palette), consistent with the self-contained-HTML requirement.
- scripts/update-fork.sh: --check / --apply / --continue with agent-friendly exit codes (10 behind, 20 conflict); merges upstream into main preserving local commits, pushes, and runs 'pi update' to refresh the install - commands/update-visual-explainer.md: /update-visual-explainer command that checks first, applies if behind, and has the agent resolve conflicts keeping both upstream behavior and our additive customizations - docs/MANAGED-FORK.md: remotes, philosophy (on-demand > automatic), usage
render (extension.ts):
- fixDisplayMath(): escape < and > inside $$...$$ so the HTML parser can't
truncate formulas like y_{<t} (the recurring KaTeX bug), idempotent + lossless
- ensureDocMeta(): inject lang, viewport, theme-color if missing
- render pipeline now: fixDisplayMath -> ensureDocMeta -> ensureFavicon
SlideEngine (slide-deck.html template):
- deep-link hashes (#slide-N) + hashchange nav
- resume where you left off (localStorage per path)
- reading percent in the counter
- outline overlay (press O) with clickable slide titles
- keyboard help panel (press ?)
SKILL.md:
- reader-first defaults: TL;DR-first, recap, <abbr> glossary, no motion-gated
content, a11y (no color-only, reduced-motion, >=16px); checklist updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves the reading/consuming experience and hardens render.
render (extension.ts) — auto-applied, idempotent, lossless:
fixDisplayMath()escapes</>inside$$...$$so the HTML parser can't truncate formulas likey_{<t}(KaTeX decodes the entities back). Fixes a recurring silent-failure.ensureDocMeta()injectslang, viewport, andtheme-colorwhen missing.SlideEngine (slide-deck.html) — for pages read over multiple sittings:
#slide-N) + back/forward navO) with clickable slide titles?)SKILL.md — reader-first defaults (TL;DR-first, recap,
<abbr>glossary, no motion-gated content, a11y) + checklist.All additive; no API change.