Skip to content

feat(story): browse main and event stories as chapter cards - #100

Merged
yonglanws merged 14 commits into
StarMoe-org:mainfrom
yonglanws:feat/story-chapter-grid
Nov 5, 2026
Merged

yonglanws merged 14 commits into
StarMoe-org:mainfrom
yonglanws:feat/story-chapter-grid

Conversation

@yonglanws

Copy link
Copy Markdown
Contributor

What

The main and event story lists used to render every chapter as a full-width banner followed by its episodes, so a long event list took many screens to scan. They now show one compact card per chapter, and clicking a card opens the chapter on its own page, which holds the previous chapter view (banner, copy, cast, main/another/extra episode runs).

Routes and data

  • New dynamic route /story/:category/:id (main | event) with breadcrumbs, entity SEO, sitemap entries and a Markdown representation. A chapter under the other section 404s.
  • src/lib/story/chapters.ts aggregates each chapter: earliest start, main-run cast (another episodes no longer replace it), episode count and total length.
  • normalizeStories now takes a story's endAt from its event, so event cards read ongoing/ended instead of permanent.

UI

  • Event list: three columns at the content width; search, sort and band filters (every band of the build, plus a mixed option when the data has chapters without a band).
  • Event cards follow the reference layout: number pill, band icon and name, title, blurb and a calendar date range.
  • The shell caps page content at 1280px (max-w-7xl) inside the area right of the navigation drawer; the footer panel aligns to the same column.
  • Bond, birthday and other stories are unchanged.

Verification

  • bun run lint, bun run check, bun run check:search-seo pass.
  • bun test tests/: 1001 pass, 1 skip, 1 failure. The failure is the Haneoka compiled-WASM test against a stale local .haneoka/dist; it is environmental and unrelated.
  • Manual checks: both list pages, card → chapter → back, cross-category 404, /story/event/:id.md, sitemap entries, 375 / 1024 / 1280 / 1920 widths.

Not included

  • A character filter was prototyped and removed: event master data has no lead-character field (the chapter description only names one in prose), so there is no stable value to filter by.

The main and event lists showed every chapter as a full-width banner with its episodes, so a long event list took many screens to scan. They now show one compact card per chapter, and the chapter's existing view moved to its own page.

- add /story/:category/:id (category = main | event) with breadcrumbs, entity SEO, sitemap entries and a markdown representation
- event cards show the event's end date: normalizeStories fills endAt from MasterEvent, so the status badge reads ongoing/ended instead of permanent
- chapter summaries aggregate the earliest start, the main cast (another episodes no longer replace it), the episode count and the total length
- the event filter searches and sorts chapters
The event story filter offered search and sort but not the band, which is how readers browse events. It now has the same band icon row the event list uses, plus a mixed option for chapters without a band.

- event cards label a chapter without a band as mixed
- reset clears the band selection with the other event filters
The filter built its band row from the chapters on screen, so bands without an event in the build did not appear. The story page now hands the explorer the build's bands instead.

- StoryServerPage loads the band list for the event section and passes it to the explorer
- the mixed option stays, and event cards still label a chapter without a band as mixed
The list page already names the category, so the chip on every banner repeated it and covered the artwork.
- an event-number pill and the band's icon sit above the title
- the title is larger and the chapter blurb follows it
- the date row gets a calendar icon and long-form dates

The day-only range helper is gone: cards show full dates now.
The band chip is now a pill with the icon and the band name. The card grid follows the content column rather than the window, so the docked filter sheet switches to two columns and the name is not cut off.
The content-column grid goes back to the window breakpoints; the column behavior will be handled separately.
Follows the reference site's layout: the event page caps its content at 1280px and the card grid uses four columns from the xl breakpoint, three from md and two from sm.

The event card is compacted for the narrower column: smaller padding, id and title, no episode count (the chapter page keeps it), and the band pill stays beside the number.
The shell keeps its full width (the navigation drawer stays where it is); the page content inside main is now centred in a max-w-7xl column, as the reference site's container does. The footer panel aligns to the same column.
The event filter now shows the characters the event chapters feature, in the story table's order; picking one keeps the chapters whose cast includes it. The event list also drops to three cards per row, filling the content column.
The character section lists every band of the build. Picking one shows that band's characters among the event chapters; no band picked means no character row. Selecting another band drops characters that no longer fit.
The face row only held characters that appear in the loaded event chapters, so a band with no event in the build (MyGO, Ave Mujica) looked empty. The row now comes from the build's character table, so every band lists its members.
The event story tables do not mark a lead character; the chapter description only names one in prose. Filtering by the whole cast picked up characters who are not the event's protagonist, so the character section, its state, the character list loading and the story.ui.characters strings are gone.
The chapter path parser decoded an already-decoded pathname, so a stray percent (e.g. /story/event/100%25) threw a URIError and answered 500 instead of 404. The registry matching already decodes parameters; the id check rejects the rest.
@yonglanws
yonglanws merged commit d9b9c2b into StarMoe-org:main Nov 5, 2026
2 checks passed
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