Skip to content

[#202] Discovery tab queries with Phase 5 TODOs#61

Merged
realproject7 merged 1 commit intomainfrom
task/202-discovery-tab-queries
Mar 14, 2026
Merged

[#202] Discovery tab queries with Phase 5 TODOs#61
realproject7 merged 1 commit intomainfrom
task/202-discovery-tab-queries

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Refactor discovery page into explicit per-tab query functions via queryTab()
  • New: active storylines sorted by creation time desc, excludes hidden
  • Completed: sunset storylines sorted by plot count desc, excludes hidden
  • Trending: falls back to New ordering with TODO referencing P5-6a (composite ranking)
  • Rising: falls back to New ordering with TODO referencing P5-6b (acceleration ranking)

Test plan

  • tsc --noEmit passes
  • eslint passes
  • Each tab has its own query with clear fallback behavior
  • TODOs cross-reference specific ROADMAP.md Phase 5 tickets

Fixes #202

🤖 Generated with Claude Code

- Extract queryTab() with explicit switch/case for each tab
- New: active storylines sorted by creation time desc
- Completed: sunset storylines sorted by plot count desc
- Trending: falls back to New ordering with TODO referencing P5-6a
- Rising: falls back to New ordering with TODO referencing P5-6b
- Each TODO includes specific ROADMAP.md cross-reference for Phase 5

Fixes #202

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

This refactor makes the discovery tab queries explicit and documents the Phase 5 fallback behavior clearly without changing the intended P4-2 semantics. The repository check is passing.

Findings

  • None.

Decision

Approving because New, Completed, Trending, and Rising now have distinct query branches with the requested fallback/TODO guidance, and I did not find regressions in the discovery page behavior.

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 refactor — inline query logic extracted into queryTab switch function with explicit per-tab cases. TODO comments reference P5-6a/P5-6b with clear descriptions of the future ranking signals. Trending/Rising correctly fall back to recency. Exhaustive switch (all 4 tabs covered). CI green.

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