Publish starship play on the site - #27
Merged
Merged
Conversation
This was referenced Aug 31, 2026
The site carried none of Starships of the Galaxy, which is half of SW5e, and the six types it needs are now in sw5e-database. This maps them, gives them navigation, and gives each one a list that can actually be used. The mapping is where the work is. These are the only canonical documents that were never a flat row, so this is the only place canonical.mjs shapes rather than renames: a base size arrives with a six-row tier table, six roles and two dice pools, a deployment with a rank table, and both are rendered as tables rather than flattened into prose. The tier table's third column is named by the document, because every hull calls its signature die something different. A rule chapter is titled rather than named, so it goes through `common` with its title and has its duplicate opening chapter heading stripped, since the page already prints that as its h1. Two lists needed more than columns. Modifications are 257 rows and nobody scrolls 257 rows, so grade and type become facets and the hull requirement is lifted out of the prerequisite prose into a column and a facet of its own: 35 of them are gated on ship size, and "what can my Small ship fit?" is otherwise unanswerable. Ventures get the same treatment for their two real gates, the deployment whose rank is required and the class whose levels are. The starship types are canonical-only. The archive has their files, but three of them lost their structured columns in the 2022 scrape, and the canonical documents only have hull dice, tier tables, roles and ammunition damage because the import read them back out of the rules chapters. Mapping the flat records here would publish a starship section that cannot say how much hull a Small ship has, so normalize.mjs records them with no archive file instead. The container job compares every one of the six indexes against the content image it was built from, with an absolute floor as well as the derived count: two numbers agreeing on zero would pass against an image with no starships in it at all, which is the state this work exists to end.
christopherfowers
force-pushed
the
feat/starship-content
branch
from
August 31, 2026 00:57
06720ba to
e29969d
Compare
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.
The site published none of Starships of the Galaxy — half of SW5e, and the
gap the owner called out by name. sw5e-database now carries all 453 items
(christopherfowers/sw5e-database#16) and the API serves them
(christopherfowers/sw5e-api#28); this is the half a reader can actually see.
/starship-base-sizes/starship-deployments/starship-equipment/starship-modifications/starship-ventures/starship-rulesBuilt against the real content set, the site prerenders 2,273 routes, which
is the count
react-router.config.tsand the container job independentlyarrive at.
Mapping
These are the only canonical documents that were never a flat row, so this is
the only place
canonical.mjsshapes rather than renames:roles with their armour, shields, reactor, coupling, speed and turning. The
tier table's third column is named by the document, because every hull calls
its signature die something different (a Tiny ship rolls Swarm Tactics, a
Gargantuan one Superior Firepower). The shields column is dropped for the
three sizes whose roles are launched without any, rather than printed as six
dashes.
class and no damage roll, and ammunition shows both damage scales and the
launchers that fire it.
commonwith the title, and the body's duplicate opening chapter heading is stripped
because the page already prints it as the
h1.Lists that survive their own size
Nobody scrolls 257 rows, so the two large types get real filters rather than a
longer table:
requirement is lifted out of the prerequisite prose into a column and a facet
of its own: 35 of the 257 are gated on it, the clause is buried in a sentence,
and "what can my Small ship fit?" is unanswerable without it. Selecting
Medium or larger takes the table from 257 rows to 14. Four of the five
columns sort.
required and the character class whose levels are.
Why the archive path does not carry these
normalize.mjsrecords the six types with no archive file. The archive hastheir files, but three of them lost their structured columns to the 2022
scrape — every numeric field on all six base sizes is zero, and every piece of
ammunition carries a name and a price and nothing else. The canonical documents
have hull dice, tier tables, roles and ammunition damage only because the import
read them back out of the rules chapters. Mapping the flat records here would
publish a starship section that cannot say how much hull a Small ship has. The
committed fixture is built from the archive, so the six indexes are empty in it
and render as
maneuversused to.Tests
scripts/lib/canonical.test.mjs— twelve cases on the crossings thatsilently break: the tier table's data-named column, the dropped shields
column, both ammunition damage scales, the per-category stat blocks, the
hull requirement being lifted out of the prerequisite and not repeated in
it, and a chapter's stripped heading.
e2e/starships.spec.ts— all six routes prerendered with their own markuprather than the SPA shell (the failure mode that still returns 200 and still
type-checks), every one reachable from the header, and the nav strip's fade
still present now that nineteen destinations overflow every viewport.
it was built from, with an absolute floor as well as the derived count.
Sequencing
The
imagejob builds fromghcr.io/christopherfowers/sw5e-database:latest,so this job stays red until sw5e-database#16 has merged and published its
content image. That is observed rather than predicted: on the current run
every other check passes, the site builds and prerenders six empty starship
indexes without complaint, and the single failing step is the one asserting the
floors — the assertion refusing a starship-free catalogue, working as intended.
Everything else is green:
verify(typecheck, lint, 329 unit tests, the build,92 end-to-end tests), the API contract job, and CodeQL.
Merge order: sw5e-database → wait for its release → sw5e-api → this.