Skip to content

[#977] Fix stories incorrectly showing as Active#979

Merged
realproject7 merged 3 commits intomainfrom
task/977-active-deadline-bug
Apr 24, 2026
Merged

[#977] Fix stories incorrectly showing as Active#979
realproject7 merged 3 commits intomainfrom
task/977-active-deadline-bug

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Root cause: getStoryStatus() only checked deadline expiry when has_deadline = true, but older stories indexed before the flag existed have has_deadline = false despite having the 7-day deadline mechanism
  • Fix: check deadline expiry for any story with a last_plot_time, regardless of has_deadline flag
  • All stories in the PlotLink protocol have a 7-day deadline — has_deadline is an unreliable DB field

Fixes #977

Test plan

  • Stories with expired deadlines show "Expired" badge (not "Active")
  • Stories with has_deadline = false but old last_plot_time show "Expired"
  • Truly active stories (recent last_plot_time) still show "Active"
  • Completed (sunset) stories still show "Completed"
  • Trending sort active-first ordering respects the fix

🤖 Generated with Claude Code

…dline flag

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

vercel Bot commented Apr 24, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Apr 24, 2026 0:59am

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

Summary

The getStoryStatus() fix itself looks aligned with the issue, but the PR is not merge-ready because CI is failing immediately on an out-of-sync lockfile. Both lint-and-typecheck and e2e stop at npm ci.

Findings

  • [medium] package-lock.json is not in sync with package.json, so required checks fail before any tests run. GitHub Actions reports npm ci failure with Missing: utf-8-validate@5.0.10 from lock file, which means this PR currently cannot pass the project's standard verification gate.
    • File: package-lock.json
    • Suggestion: Re-sync the lockfile against the current dependency graph and push the updated package-lock.json so npm ci succeeds again.

Decision

Requesting changes because the PR's checks are red due to the lockfile mismatch, even though the code change itself appears directionally correct.

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 did not resolve the blocking CI problem. Both required jobs still fail at npm ci with the same lockfile error, so the PR remains not merge-ready.

Findings

  • [medium] package-lock.json is still out of sync after the attempted regeneration. GitHub Actions is still failing with Missing: utf-8-validate@5.0.10 from lock file in both lint-and-typecheck and e2e, so the verification gate remains red.
    • File: package-lock.json
    • Suggestion: Regenerate the lockfile in a way that preserves the missing dependency entry expected by npm ci, then re-run checks before re-requesting review.

Decision

Keeping this in request-changes because the lockfile issue is still unresolved and required CI is still failing before tests run.

…all)

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 status-logic fix in lib/story-status.ts addresses the root cause described in issue #977 by treating any story with an old last_plot_time as deadline-governed, regardless of the unreliable historical has_deadline flag. The blocking lockfile problem also appears resolved: CI is no longer failing immediately on npm ci, and the required checks are now running normally.

Findings

  • No blocking findings.

Decision

Approving because the functional fix is correct and the previous CI blocker from the out-of-sync lockfile has been cleared. Checks were still pending at review time.

@realproject7 realproject7 merged commit 0464e0e into main Apr 24, 2026
4 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.

[Bug] Stories incorrectly showing as 'Active' — deadline expired but status says 'Open'

2 participants