Skip to content

[#186] Story page: genesis + table of contents#227

Merged
realproject7 merged 2 commits intomainfrom
task/186-story-toc
Mar 16, 2026
Merged

[#186] Story page: genesis + table of contents#227
realproject7 merged 2 commits intomainfrom
task/186-story-toc

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Genesis plot (index 0) displayed prominently at top with full content
  • Table of contents for remaining chapters:
    • Chapter title (or "Chapter {N}" fallback for untitled plots)
    • Content preview (~100 chars, truncated with ellipsis)
    • Date
    • Each row links to /story/[storylineId]/[plotIndex] for full reading
  • Sidebar preserved: price chart, trading, donate, rating, share
  • Mobile responsive layout

Test plan

  • Story with genesis only — shows genesis content, no TOC
  • Story with chapters — genesis at top, TOC below with clickable rows
  • Chapters with titles show title; without show "Chapter N"
  • Preview text truncated at ~100 chars with ellipsis
  • TOC links go to correct /story/[id]/[plotIndex] URLs
  • Sidebar widgets still functional
  • Mobile layout (375px) responsive

Fixes #186

🤖 Generated with Claude Code

- Genesis plot (index 0) displayed prominently at top with full content
- Remaining chapters shown as a table of contents with:
  - Chapter title (or "Chapter {N}" fallback for untitled plots)
  - Content preview (~100 chars, truncated)
  - Date
  - Links to /story/[storylineId]/[plotIndex] for full reading
- Sidebar preserved: price chart, trading, donate, rating, share
- Mobile responsive (flex layout)

Fixes #186

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2b: APPROVE

Clean story page restructure:

  • Genesis: Prominently displayed at top with full content, ViewTracker wired
  • Table of Contents: Chapters as linked rows with title (fallback "Chapter N"), 100-char preview with ellipsis, date
  • Data split: find for genesis (index 0), filter for chapters (index > 0) — clean separation
  • ViewTracker correctly omitted from ToC: Chapters are navigation links, view tracking happens on individual chapter pages
  • Null safety: Genesis guarded with fallback "No plots yet" message

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES

Summary

The genesis/TOC split is directionally right, but this PR introduces chapter links to a route that does not exist yet. That makes the new table of contents non-functional on the current branch.

Findings

  • [high] TOC links point to a missing plot-detail route
    • File: src/app/story/[storylineId]/page.tsx:291
    • Suggestion: either land the /story/[storylineId]/[plotIndex] route together with these links, or defer clickable TOC navigation until #187 exists. Right now the app only has src/app/story/[storylineId]/page.tsx and src/app/story/[storylineId]/og/route.tsx, so every TOC row links to a page that 404s.

Decision

Requesting changes because issue #186 requires each TOC row to link to the plot detail page, and this branch currently ships dead links instead of working navigation.

New route /story/[storylineId]/[plotIndex] with:
- Breadcrumb navigation back to story page
- Chapter header with title (or fallback), author, date
- Full plot content
- Prev/Next navigation + "Table of Contents" link
- OG metadata per chapter
- SSR with revalidate=120
- ViewTracker for per-plot view counting

Addresses T2a review feedback on PR #227.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The follow-up change resolves the blocker by adding the missing plot-detail route, so the new table-of-contents links are now functional instead of dead. The story page now presents genesis separately, lists chapter rows with title/fallback, preview, and date, and the linked chapter pages are present on the same branch.

Findings

  • None.

Decision

Approving because the previously blocking navigation gap is resolved and GitHub lint-and-typecheck passes on the updated head.

@realproject7 realproject7 merged commit 77963f9 into main Mar 16, 2026
1 check passed
realproject7 added a commit that referenced this pull request Mar 16, 2026
/story/[id]/0 now redirects to /story/[id] (genesis is displayed
on the main story page). All other acceptance criteria from #187
were already implemented in PR #227.

Fixes #187

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

[P9-3] Story main page: Genesis + table of contents

2 participants