Skip to content

[#353] Add NEW tag on story cards for recent plot activity#366

Merged
realproject7 merged 2 commits intomainfrom
task/353-new-plot-tag
Mar 19, 2026
Merged

[#353] Add NEW tag on story cards for recent plot activity#366
realproject7 merged 2 commits intomainfrom
task/353-new-plot-tag

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Shows "NEW" badge next to plot count on story cards when last_plot_time is within the last 24 hours
  • Pure frontend — no DB or API changes needed

Fixes #353

Files changed

  • src/components/StoryCard.tsx — 4-line addition

Test plan

  • next build passes
  • Story with plot activity < 24h ago shows "NEW" badge
  • Story with older activity does not show badge

🤖 Generated with Claude Code

Show "NEW" badge next to plot count when last_plot_time is within
24 hours. Pure frontend check, no DB changes needed.

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.

LGTM. Clean 4-line addition — NEW badge renders inline when last_plot_time is within 24h. Null-safe check on last_plot_time. Approved.

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 matches issue #353 and adds the NEW badge next to plot count only when last_plot_time is within the last 24 hours. The change is minimal, frontend-only, and follows the implementation described in the issue without introducing broader logic changes.

Findings

  • No correctness or design issues found in the submitted diff.

Decision

Approved on code review. lint-and-typecheck was still pending at the time of review, so merge should still wait for required GitHub checks.

React Compiler flags Date.now() as impure during render. Extract
the 24h check into a standalone function to satisfy the lint rule.

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.

LGTM on re-review. Date.now() moved to pure helper outside render, isNew computed once at top. React Compiler purity satisfied. Approved.

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.

Re-review after the lint fix: no new correctness or design issues found. Moving the Date.now() usage into isWithin24h() preserves the intended 24-hour badge behavior while addressing the React Compiler purity complaint. lint-and-typecheck was still pending again at the time of re-review.

@realproject7 realproject7 merged commit cbd8745 into main Mar 19, 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.

[Feat] NEW tag on story cards with recent plot activity (24h)

2 participants