Plurality Wiki · Frontend audit · round 1
A careful walk-through of the 86-page static site built in wiki/frontend/dist/, testing Markdown rendering, wikilink resolution, math typesetting, and interactive behaviour. Auditor: Claude, 2026-04-17.
| Severity | Issue | Count |
|---|---|---|
| fail | LaTeX is rendered as raw $$…$$ text, not math | 5 pages (Gini, Atkinson, Theil, NSW, EF1) |
| fail | Broken relative link ../../raw/papers/_parsed/ on ontology page | 1 link |
| warn | Unresolved wikilinks rendered as dead-link spans | 48 spans across 7 pages |
| warn | Unprocessed [[_ontology §1]] literal wikilinks in AIR page | 5 occurrences |
| warn | Duplicate title: frontmatter title & H1 both rendered at large size | All 86 pages |
| warn | Graph: node labels overlap hub nodes when simulation settles | graph page |
| warn | Search result rendering concatenates family+title+title+excerpt | search page |
| warn | Home "10 metric families" grid shows 11 cards + a "Hub" card | home |
| warn | Empty grid cell on home when family count is odd (11) | home |
| warn | §8 Institutional design & §11 Post-deployment have blank card bodies | home |
| warn | No branded 404 page (raw SimpleHTTPServer error shows) | 404s |
| pass | Masthead, typography, and page layout render correctly | all pages |
| pass | Backlinks block ("Mentioned in") populated on every page | all pages |
| pass | Citation sources resolve to /sources/*.txt when available | 41 valid sources |
| pass | Graph legend enumerates all 12 families (incl. §11 + Hub) | graph page |
| pass | Masthead drawer (Menu) opens and closes | all pages |
| pass | Client-side search returns relevant results | search page |
Full 20-step tour of the frontend, captured with agent-browser while the Python static-file server served dist/ on :8000.
$$...$$ shows as literal textThe 5 pages with math (Gini, Atkinson, Theil, Nash Social Welfare, EF1) ship their formulas as $$ … $$ wrapped in a <p> tag. No KaTeX or MathJax pipeline is installed. Why this happened: the BRIEF.md didn't call out math, so the plan didn't include a math renderer. The synthesis pages were written with proper LaTeX expecting it to render.
$$G = \frac{1}{2n^{2}\mu} \sum_{i} \sum_{j} |y_{i} - y_{j}|$$ instead of rendered math. Range annotation and Italic title survive fine.
A_{\varepsilon} = 1 - \frac{1}{\mu}\left[…\right]^{1/(1-\varepsilon)} raw.
\forall i,j ; \exists g \in A_{j} : … raw.Fix: add remark-math + rehype-katex to astro.config.mjs, pull in KaTeX CSS in BaseLayout.astro. ~15 lines.
../../raw/papers/_parsed/ on ontology pageThe rendered _ontology.md has an anchor pointing to ../../raw/papers/_parsed/ — a directory listing link that made sense in the source markdown but does not exist under dist/. Astro's check-links hook was configured to pass on absolute root URLs but missed relative-to-current-page hrefs.
Fix: either (a) rewrite the reference in _ontology.md to /sources/, or (b) have the wikilinks plugin also intercept markdown [text](../../raw/papers/_parsed/…) links.
[[_ontology §1]] wikilinks on AIR pageThe post-deployment-cluster page aggregated-individual-reporting.md contains 5 wikilinks of the form [[_ontology §1]] (slug with a literal space + §n). The resolver regex expects [[slug]] or [[slug|label]], so these pass through as literal [[…]] in the rendered HTML.
[[_ontology §1]] strings (off-screen here; inspected in HTML source).Fix: relax the wikilink regex to accept spaces + §\d+, then resolve them to /ontology/#section-slug.
The §11 post-deployment cluster references concepts/* and sources/* pages that don't exist yet — the cluster was written before the corresponding concept/source pages were created. The renderer honours the plan's dead-link styling (muted, no underline), so this is not a bug in the renderer — it's a content-layer gap. Top labels: sources/dai-2025-reporting-database (6×), concepts/ex-ante-policy (5×), concepts/reporting-database-problem (4×), concepts/sequential-hypothesis-test-for-harm (4×).
AIR, individual reports, sequential tests are rendered as <span class="dead-link"> per the plan. Works as designed, but 48 of them across the §11 family looks messy.Fix: create the 14 missing concept + source pages under wiki/pages/concepts/ and wiki/pages/sources/, or update the §11 pages to inline the definitions.
The PageLayout renders the frontmatter title as a large <h1> in the sidebar + the markdown body's first H1 (also large). Because the synthesis pages start with # Metric Name that matches the frontmatter title, users see the title rendered twice at identical size, stacked.
Fix: strip the first H1 from the markdown body at render time, or make the body H1 render at a smaller size.
When the force simulation settles, the two largest hub nodes (_ontology, _mve-stack) draw their <text> labels directly on top of themselves, occluding the node circle. Since node size is proportional to inbound-link count and the hub has 63 edges, it's always the biggest node — and always the one most covered by its own label.
Fix: only render labels on hover, or offset label by r + 6px below the node, or show labels only for nodes above a size threshold.
Every result row reads like meta Bridging-based ranking Bridging-based ranking Generalisation of the Pol.is bridging score…. The family key (meta, bridging, …) is a raw identifier, not a label, and the title is repeated because it's both in the result title slot and the FlexSearch-matched snippet.
Fix: format search hits as <div><h4>{title}</h4><p class="family">{familyLabel}</p><p class="excerpt">{snippet}</p></div> instead of joining with spaces.
When §11 Post-deployment evaluation was added and a new hub family was introduced, the homepage family-card grid started iterating over all families in sections.ts. Result: 12 cards, of which one has an empty body ("HUB" with no description) and two (§8, §11) have almost no description. The section title still reads "10 metric families".
Fix: (a) exclude the hub family from the home grid, (b) update the section title to "11 metric families", (c) add a one-sentence description for §8 and §11 to the FAMILIES map or pull from _ontology.md.
Visiting a non-existent URL returns the raw Python HTTP server error. On a static host (Netlify, GitHub Pages) this would show the host's default error page instead of our site's layout.
Fix: add src/pages/404.astro with a minimal "not found, back to home / ontology" layout. Astro emits it as dist/404.html automatically.
_ontology.md with italicised tradition names, and two call-to-action links. Near-perfect execution of the atmos.earth restraint cue.
/sources/small-2023-polis-llms.txt and /sources/fish-2024-generative-social-choice.txt.
sections.ts. The patch worked.
cd wiki/frontend npm run build python3 -m http.server 8000 -d dist & # Static analysis (both ran from project root): python3 tests/scripts/check-links.py # internal-link integrity python3 tests/scripts/check-content.py # wikilink/math/deadlink scan # Interactive tour + screen recording: bash tests/scripts/tour.sh # runs the 20-step tour, records WebM