Skip to content

Fix Reading Mode duplicate genesis#611

Merged
realproject7 merged 1 commit intomainfrom
task/609-reading-mode-duplicate-genesis
Mar 27, 2026
Merged

Fix Reading Mode duplicate genesis#611
realproject7 merged 1 commit intomainfrom
task/609-reading-mode-duplicate-genesis

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

Fixes #609

  • Add deduplicateByPlotIndex() helper that filters duplicate plot_index entries, keeping the first occurrence
  • Applied on both story page and chapter detail page before passing chapters to ReadingModeWrapper
  • Genesis now appears exactly once in Reading Mode content, Table of Contents, and Prev/Next navigation
  • Root cause: plots query can return duplicate rows for the same plot_index (e.g., multiple contract addresses or re-indexed entries)

Test plan

  • Reading Mode: genesis appears exactly once
  • Table of Contents: each chapter listed once
  • Prev/Next navigation works correctly (no repeated chapters)
  • Works from both story page and chapter detail page
  • Build passes

🤖 Generated with Claude Code

Add deduplicateByPlotIndex() helper that filters duplicate plot_index
entries before passing chapters to ReadingModeWrapper. Applied on both
the story page and chapter detail page. Genesis now appears exactly
once in Reading Mode, Table of Contents, and Prev/Next navigation.

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

vercel Bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Mar 27, 2026 8:22pm

Request Review

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 PR fixes the duplicated-genesis Reading Mode bug by deduplicating chapter input on the two routes that feed ReadingModeWrapper, preserving the first ordered occurrence for each plot_index.

Findings

  • None.

Decision

Approved because the change matches issue #609, is tightly scoped to the Reading Mode input data path, and preserves chapter ordering for Reading Mode navigation and its table of contents.

@realproject7 realproject7 merged commit 369a9db into main Mar 27, 2026
5 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.

Fix Reading Mode showing genesis plot twice

2 participants