Skip to content

RFC-011 — Science page · render pipeline & content authoring

Orrery · Closed RFC · v0.1 · May 2026

Status: Closed (v0.5.0) Author: product Closed by: ADR-034 (KaTeX server-render), ADR-035 (hand-coded SVG diagram pipeline), ADR-036 (cross-screen ?-chip pattern) Slice gate: v0.5.0 (encyclopedia + explorers release) Why this is an RFC (historical context): PRD-008 locks the what (in-app encyclopedia, six tabs, ~40 sections, ?-chip cross-link from existing screens — actually shipped with 8 tabs and 54 sections in v0.5.0). It did not lock the how — math rendering, diagram authoring, and the cross-screen UX of the ? chip each had multiple defensible answers with real trade-offs. Each open question below was resolved via ADR alongside the implementation.


Context

The simulator already references ~90 distinct scientific concepts across docs and code (full inventory in PRD-008 §appendix). The user-visible terminology surfaces today are:

  • /plan porkchop axes + colour bar
  • /fly HUD (∆v · MET · v∞ · velocity · distance)
  • /missions FLIGHT tab (C3 · v∞ · TLI · TMI · TCM · EDL · ∆v totals)
  • /explore planet panels (Keplerian elements · semi-major axis · eccentricity · orbital period)
  • /earth orbit-altitude regimes (LEO · MEO · GEO · L2)
  • /moon (and the new /mars per PRD-009) — landing-site narratives that mention free-return, direct-ascent, gravity assist

Today every one of these terms is undefined in-app. The reader either knows the term or must leave the app to look it up. PRD-008 closes that gap with /science.

Three implementation questions are independent of content and worth resolving up front: math rendering, diagram authoring, and the cross-screen ?-chip wiring.


Open Questions

OQ-1 — How do we render math in section bodies?

The app references formulas like v = √(μ·(2/r − 1/a)) (vis-viva), Δv = Isp·g·ln(m₀/m_f) (Tsiolkovsky), r = a·(1 − e²)/(1 + e·cos ν) (Kepler conic). They must render cleanly in dark theme, scale on mobile, and not blow up the JS payload.

OptionBundleRender pathProsCons
A. KaTeX (server-rendered at build)~70 KB minified gzipped CSS, 0 KB JS at runtime (HTML output baked in at prerender)Compile-timeFast, no client lib, simple authoring (LaTeX source in JSON)KaTeX rendering only at build; no client-side math edits possible (we don't need them anyway)
B. KaTeX (client-side)~70 KB JS + CSSRuntimeSame renderer; trivial drop-in if we ever need dynamic mathAdds 70 KB to client bundle; payload regression for a feature ≤80% of users will reach
C. MathJax v3~250 KB+RuntimeMost complete LaTeX support; handles edge cases KaTeX can't3.5× larger than KaTeX; we don't need the edge cases
D. Hand-rolled SVG per formula~0 (SVG inlined)Compile-timeBullet-proof; pixel-perfectAuthoring nightmare; one-off per formula; brittle when the formula changes

Recommendation: A — KaTeX server-rendered at build. SvelteKit's prerender step compiles each section's formula_latex field into HTML once; the client never loads KaTeX. We get LaTeX authoring ergonomics without any runtime cost. Any edge case KaTeX can't handle becomes an inline SVG (option D) for that one formula.


OQ-2 — How do we author the diagrams?

PRD-008 commits to ≥ 1 visual element per section. Photos cover ~half (NASA / ESA / Wikimedia). The other half are diagrams — Hohmann transfer geometry, conic sections, porkchop colour-bar key, Keplerian elements illustration, free-return trajectory diagram, etc. ~30 needed for V1.

OptionAuthoringCost / diagramStyle consistencyMaintenance
A. Hand-drawn Inkscape SVG (committed source)Open Inkscape, draw, export, commit .svg to static/diagrams/science/30–60 min eachHigh (single author, single style)High — every change is hand-edits
B. Hand-drawn Figma → SVG exportFigma file as source of truth; export per diagram20–40 min eachHighFigma file lives outside repo; harder to PR-review
C. Hand-coded SVG in JSONEach section's JSON carries inline <svg> markup60+ min eachVariableBest for tiny diagrams; awful for anything geometric
D. Generated via D3 / chart lib at buildTypeScript build step renders a programmatic SVG1–2 hr to author the specHighest (programmatic = perfectly consistent)Best — code-review the spec, regenerate any time
E. AI-generatedPrompt → image → curate5 min eachInconsistent; licensing unclearOff the table per PA §principles ("attribution is design")

Recommendation: A for V1. Inkscape SVG with the source .svg files committed to the repo. Cheapest to start; we can migrate any single diagram to D (programmatic) if it gets reused or needs to track data. Option E is rejected — we do not generate scientific diagrams via AI.

The build script scripts/validate-diagrams.ts will fail if any section declares a diagram field with no matching SVG file — same fail-fast contract as the existing data-validation pipeline (ADR-019).


OQ-3 — ?-chip UX on existing screens

Every HUD label that names a concept covered in /science gets a ? chip. The interaction model has three options:

OptionHover tooltipClick action
A. Click → navigate to /scienceNoneFull page navigation to /science/[tab]/[section]
B. Hover tooltip + click → navigateThe section's intro sentence (≤ 80 chars) on desktop hoverSame as A
C. Click → mini-modal popover with the section abstractNonePopover with intro + a "read more" button into /science

Trade-off. A is the simplest contract and matches the existing LEARN tab pattern (links, no popovers). B adds desktop polish at zero mobile cost. C is "Wikipedia preview"-style but introduces a new component (the popover) and means every chip click on mobile becomes a context-loss modal — exactly what the PRD wants to avoid.

Recommendation: B. The hover tooltip is a desktop-only convenience that doesn't change the contract on mobile (where there's no hover). Click-navigates on both. The intro sentence is already in the JSON — surfacing it as a title attribute is one line of code.


OQ-4 — Should V1 ship a glossary view (alphabetical)?

PRD-008 V1 is tab-organised reading. A glossary is a flat alphabetical lookup ("show me Vis-viva regardless of which tab it's under"). Cmd-K covers the search use case; the glossary is for browsing.

OptionUXCost
A. Tab-only (no glossary)Six tabs, each section under one tab0 (already in PRD)
B. Tabs + alphabetical sidebar toggleSwitch between "by topic" and "A–Z" views+2 days
C. Tabs + a separate /science/all flat listURL-addressable glossary mode+1 day

Recommendation: A for V1, defer C to V1.5. The Cmd-K search lands at the same destination as a glossary entry; we don't need both in V1. C is clean to add later as a static prerendered route.


OQ-5 — Translation cadence

40 sections × ≤ 200 words ≈ 8 000 source words per locale. With ADR-033's LLM-only first-pass workflow that's a half-day batch per locale.

Question: does each new locale ship /science simultaneously with the rest of its UI strings, or as a follow-up wave?

OptionRisk
A. Atomic — a locale ships only when /science is also done in that localeSlows down each locale's launch by ~half a day
B. Decoupled/science falls back to en-US per ADR-017 until the locale is readyFaster launches; readers see English on /science even when the rest of the UI is in their language
C. Coupled to the LEARN tabs only — /science ships per locale alongside the mission editorial overlaysMid-ground; ties /science to the same translation budget that already exists for missions

Recommendation: B. ADR-017's fallback contract already handles partial-locale state without breaking. A new locale can launch fast; /science follows when the translator is ready.


OQ-6 — Section atomicity: one concept per URL, or one tab per URL?

OptionURL examplesPros
A. One section per URL/science/orbits/vis-viva, /science/orbits/keplers-lawsMaximum deep-linkability; ?-chip lands precisely
B. One tab per URL with anchors/science/orbits#vis-vivaSingle page per tab → faster reading flow
C. Both (A is the canonical URL; tab-page redirects to first section)/science/orbits/ redirects to /science/orbits/vis-vivaFlexibility

Recommendation: A. The ?-chip's whole value is "land the user on the exact concept in one click." Anchors work but lose the "section is a unit" feeling. The tab page (/science/orbits/) becomes a section-list index — useful as a navigable menu, not a reading surface.


OQ-7 — Diagram licensing / attribution chain

Per PA §principles ("attribution is design"), every visual element must have a clear licence + credit. PRD-008 commits to "Public-domain or CC-BY only."

OptionDiagram source rules
A. Strict — only NASA / ESA / Wikimedia public-domain, no third-party CC-BYSmallest pool but zero attribution risk
B. CC-BY allowed with credit — any CC-BY licence with credit captured per assetWider pool; tracks attribution per file
C. Original SVGs onlyLock the visual style; everything attributable to the project

Recommendation: B for photos, C for geometric diagrams. Photos: Wikimedia + NASA + CC-BY academic figures, attribution captured in the section's JSON. Geometric diagrams: original SVGs (per OQ-2 option A) so the visual style of the encyclopedia is the project's own.


Decision criteria

We accept a recommendation when:

  1. The bundle-size impact (KaTeX, diagrams, science content JSON) is auditable and < 200 KB initial-load delta.
  2. The cross-link UX (? chip) does not regress mobile flow on existing screens.
  3. The build-time validation guarantees every published section has the visual it declares.
  4. The translation pipeline composes cleanly with ADR-017 / ADR-033 — no new translator workflow.
  5. The decision is reversible at the per-section level (we can change one diagram or one formula without revisiting the whole framework).

Closure path

This RFC closes with three ADRs:

  • ADR-034 — Math rendering: KaTeX server-rendered at build.
  • ADR-035 — Diagram authoring pipeline: hand-drawn Inkscape SVG, sources committed to static/diagrams/science/.
  • ADR-036?-chip cross-screen pattern: click navigates, hover tooltip on desktop, no popover modal.

Glossary (OQ-4) deferred. Translation cadence (OQ-5) noted in RFC body, no ADR — the en-US fallback is the policy.


Orrery · RFC-011 · v0.1 · Open. Comments welcome on each OQ.

Orrery — architecture documentation · MIT · No tracking