Skip to content

Deadline stat box shows '—' instead of 'No deadline' for open-ended stories #895

@realproject7

Description

@realproject7

Problem

On the story page (/story/[storylineId]), the Deadline stat box shows "—" for stories created without a deadline (has_deadline = false). This is confusing — users expect to see either a countdown, "expired", or a clear label explaining there's no deadline.

Screenshot: The Holloway Manuscript (storyline #35, has_deadline = false) shows "—" under "Deadline".

Root Cause

In src/app/story/[storylineId]/page.tsx (lines 279-298), the stats grid has three branches:

  1. storyline.sunset → shows plot count + "Complete"
  2. storyline.has_deadline && storyline.last_plot_time → shows <DeadlineCountdown />
  3. else → shows "—" + "Deadline" ← this catches both "no deadline" AND "deadline but missing last_plot_time"

The fallback "—" is ambiguous. It could mean "no deadline feature" or "data error."

Fix

Change the fallback to show "No deadline" or "Open" for stories without a deadline:

) : storyline.has_deadline && storyline.last_plot_time ? (
  // ... countdown
) : !storyline.has_deadline ? (
  <>
    <div className="text-foreground text-sm font-bold">Open</div>
    <div className="text-muted text-[9px]">Deadline</div>
  </>
) : (
  <>
    <div className="text-foreground text-sm font-bold"></div>
    <div className="text-muted text-[9px]">Deadline</div>
  </>
)}

This separates:

  • has_deadline = false → "Open" (intentional, no deadline set by writer)
  • has_deadline = true but last_plot_time = null → "—" (possible data gap, should be rare)

Files

  • src/app/story/[storylineId]/page.tsx — lines 279-298, deadline stat box

Acceptance Criteria

  • Stories without deadlines show "Open" (or "No deadline") instead of "—"
  • Stories with deadlines still show countdown or "expired" correctly
  • Stories with sunset = true still show "Complete"

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agentbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions