Skip to content

[#201] Discovery page with tabs and story cards#60

Merged
realproject7 merged 3 commits intomainfrom
task/201-discovery-page
Mar 14, 2026
Merged

[#201] Discovery page with tabs and story cards#60
realproject7 merged 3 commits intomainfrom
task/201-discovery-page

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Create /discover route with four tabs: Trending, New, Rising, Completed
  • New tab (default): active storylines sorted by creation time
  • Completed tab: sunset storylines sorted by plot count
  • Trending/Rising: fall back to recency with note about Phase 5 trading data
  • Reusable StoryCard component with title, writer, plot count, agent badge
  • Reusable TabNav component with active state styling

Files Changed

  • src/app/discover/page.tsx — Discovery page with tab routing via searchParams
  • src/components/StoryCard.tsx — Reusable story card linking to /story/[id]
  • src/components/TabNav.tsx — Reusable tab navigation component

Test plan

  • tsc --noEmit passes
  • eslint passes
  • Tabs switch via ?tab= query param
  • StoryCard links to /story/[storylineId]
  • Completed tab filters for sunset stories
  • Hidden content excluded from all queries

Fixes #201

🤖 Generated with Claude Code

- Create /discover route with Trending, New, Rising, Completed tabs
- New tab: active storylines sorted by creation time (default)
- Completed tab: sunset storylines sorted by plot count
- Trending/Rising: fall back to recency until trading data (Phase 5)
- Create StoryCard component: title, truncated writer address, plot count,
  agent badge, sunset indicator, links to /story/[id]
- Create TabNav component: reusable tab navigation with active state styling
- Terminal aesthetic throughout

Fixes #201

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: REQUEST CHANGES

Summary

The discovery page structure is close, but the reusable story card does not yet satisfy the ticket requirements because it omits the genre tag.

Findings

  • [medium] StoryCard is missing the genre tag called for in the assignment.
    • File: src/components/StoryCard.tsx:1
    • Suggestion: Add a genre tag field to the card output, or if the data is not available yet, wire an explicit placeholder/fallback backed by the source of truth so the card shape matches the required design.

Decision

Requesting changes because the PR does not fully implement the requested story card fields for P4-1.

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

Clean discovery page implementation. Findings:

  1. Tab routingsearchParams parsed with type-safe validation, defaults to "new". Correct Next.js App Router pattern with Promise<> type for async searchParams.
  2. Query logic — Completed tab filters sunset=true, sorted by plot count (most prolific first). New/Trending/Rising filter sunset=false, sorted by recency. Hidden content excluded. Limit 50 — reasonable default.
  3. Trending/Rising placeholder — falls back to recency with inline note about Phase 5. Clean approach per the roadmap (P4-2c).
  4. StoryCard — reusable, links to /story/[storylineId], shows title, truncated address, plot count, agent badge, sunset indicator. Consistent with the story page styling from PR #59.
  5. TabNav — generic reusable component with readonly string[] tabs prop. Active state uses negative margin border trick for clean tab indicator.
  6. CI green.

No issues found.

Genre tag is optional — renders when provided, ready to wire once
the genre field is added to the storylines schema (writer-assigned at genesis).

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: REQUEST CHANGES

Summary

The follow-up adds a genre prop to StoryCard, but the discovery page still never passes a genre value, so the required tag still does not appear in the actual UI.

Findings

  • [medium] The genre tag path is still not wired into the rendered discovery cards.
    • File: src/app/discover/page.tsx:65
    • Suggestion: Pass a concrete genre value into StoryCard from the page query results, or explicitly implement the agreed fallback text in the rendered card so the discovery UI includes the required tag.

Decision

Keeping changes requested because the assigned story-card requirement is still not satisfied in the shipped page output.

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 Re-review: APPROVED

Genre prop addition is clean — optional genre?: string, renders a bordered tag when provided, no impact when omitted. Consistent styling with the agent badge. CI green.

Default to "fiction" until genre field is added to storylines schema
and writer-assigned at genesis.

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 resolves the missing story-card field by rendering a genre tag in the discovery UI, and the repository check is now passing. The discovery page remains aligned with the assigned P4-1 scope.

Findings

  • None.

Decision

Approving because the tabs, query behavior, reusable components, and required card fields are now implemented in the shipped page output, with lint-and-typecheck green.

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 Re-review: APPROVED

Default genre="fiction" passed to StoryCard in discover page — reasonable placeholder until the genre field is added to the schema. CI green.

@realproject7 realproject7 merged commit 305ab3e 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