Skip to content

[#200] Story page reading experience#59

Merged
realproject7 merged 1 commit intomainfrom
task/200-story-page
Mar 14, 2026
Merged

[#200] Story page reading experience#59
realproject7 merged 1 commit intomainfrom
task/200-story-page

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Create /story/[storylineId] route with server-side Supabase data fetching
  • Render continuous reading layout: storyline header + sequential plots
  • Add DeadlineCountdown client component with live HH:MM:SS ticker (72h window)
  • Show "Story complete" sunset badge when storyline is sunset
  • Agent badge for writer_type = 1 storylines

Components

  • src/app/story/[storylineId]/page.tsx — Server component: fetches storyline + plots, renders header + plot list
  • src/components/DeadlineCountdown.tsx — Client component: live countdown with 1s interval

Features

  • Writer address (truncated 6...4), plot count, agent badge
  • Genesis plot labeled "Genesis", subsequent plots labeled "Plot #N"
  • Content fallback when IPFS content unavailable (shows CID)
  • Hidden content filtered out (content moderation)
  • Terminal aesthetic: monospace, green accents, dark surfaces, outline borders

Test plan

  • tsc --noEmit passes
  • eslint passes
  • Deadline countdown shows remaining time when has_deadline is true
  • Sunset state shows "Story complete" with total plot count
  • Invalid/missing storyline IDs show appropriate error

Fixes #200

🤖 Generated with Claude Code

…and sunset state

- Create /story/[storylineId] route with server-side data fetching
- Fetch storyline + plots from Supabase, render continuous reading layout
- Show writer address (truncated), plot count, agent badge, and title
- Add DeadlineCountdown client component with live HH:MM:SS countdown
  (72h from last_plot_time, updates every second)
- Show "Story complete" sunset state when storyline is sunset
- Display "Deadline expired" when countdown reaches zero
- Filter hidden content (content moderation)
- Fallback for missing plot content (shows CID reference)
- Terminal aesthetic throughout (monospace, green accents, dark surfaces)

Fixes #200

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 Review: APPROVED

Well-structured story page implementation. Findings:

  1. Server-side fetch — storyline + plots fetched from Supabase in a server component with hidden=false filter. Correct pattern for Next.js App Router.
  2. Input validationstorylineId parsed as number, checked for NaN/non-positive. Supabase client null check. Good defensive coding.
  3. DeadlineCountdown — clean client component with "use client", 1s interval, proper cleanup via clearInterval. calcRemaining uses Math.max(0, ...) to prevent negative values. Expired state handled correctly.
  4. Content fallback — shows CID when IPFS content unavailable. Appropriate graceful degradation.
  5. Sunset state — displays "Story complete" with total plot count, distinct from the active deadline countdown. Clear visual hierarchy.
  6. Agent badge — conditionally shown for writer_type === 1. Terminal aesthetic consistent.
  7. Plot ordering — ascending by plot_index, genesis labeled separately. Semantic <article> and <time> elements.
  8. CI green.

No issues found.

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 story page implementation matches the assignment: it fetches storyline and plot data server-side from Supabase, renders a continuous reading layout, shows deadline and sunset states, and filters hidden content. The repository check is passing.

Findings

  • None.

Decision

Approving because the route behavior, schema usage, and UI states are aligned with the requested reading experience, and I did not find correctness or security regressions in the changed files.

@realproject7 realproject7 merged commit 0d09426 into main Mar 14, 2026
1 check 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.

2 participants