fix(plan): pass ALL cards to RoadmapBuilder so dated bars survive

The Timeline tab was filtering cards to !targetDate before handing
them to RoadmapBuilder. The builder then computed its dated subset
from that pre-filtered list, so the timeline always received zero
dated cards regardless of what was in the database — the timeline
always rendered the empty-state hint even when the user had cards
dated weeks ago.

The bands view (Now/Next/Later) still does its own per-view filter
above the builder, so the builder receives the full set. Pass cards
through unfiltered and let the builder split them internally — the
tray gets the !targetDate subset, the timeline gets the rest.
This commit is contained in:
Dave 2026-09-17 12:31:59 +02:00
parent 2a57d29279
commit 0d4b62b0b4

View file

@ -24,13 +24,6 @@ export function RoadmapTabs({
// Bands exclude Inbox and Done; the builder shows everything else.
const banded = cards.filter((card) => card.band !== null);
// The tray shows cards with no target date. Done cards never reach this
// list — they have a target date set — so the band filter is defensive
// only and the type checker is happy with `card.band !== null` for the
// "still pending triage" case.
const unscheduled = cards.filter(
(card) => !card.targetDate
);
return (
<div className="space-y-5">
@ -61,8 +54,11 @@ export function RoadmapTabs({
{tab === "bands" ? (
<BandView cards={banded} inboxCount={inboxCount} />
) : (
// Pass ALL cards (not just unscheduled). The builder splits them into
// tray vs timeline internally — the timeline needs to see the dated
// cards that the tabs page itself filters out of the bands view.
<RoadmapBuilder
cards={unscheduled}
cards={cards}
canReschedule={canReschedule}
/>
)}