Files
loki/scripts/test
910183c46e fix(projects): a locked private zone hides milestones, it doesn't delete them (#169)
Found by opening HamsterCheek on prod. The page said "No goals are linked
to this project" and the kickoff hero offered to plan the milestones —
for a project that has had five milestones in the database since 15:05
on 2026-08-04.

getProjectDetail substitutes `linkedGoals: []` whenever the private zone
is PIN-locked. Nothing downstream can tell that apart from a project that
genuinely has no roadmap, so:

- the Plan section stated a falsehood,
- missingKickoffSetup planned the "milestones" step, and one press of
  "Make it happen" would have generated a SECOND roadmap on top of the
  first, and
- a kickoff dispatch would have briefed the agent with no roadmap and
  aimed it at "first working, runnable state" — rebuilding milestone one
  for a project that is two milestones in.

Empty and withheld are different facts, so they get different values:
getProjectDetail now returns `goalsLocked` alongside `linkedGoals`. The
plan step is only planned when goals are genuinely absent, the Plan
section says they are hidden and links to /unlock, and a kickoff dispatch
refuses rather than briefing an agent from a roadmap it cannot see.

Every other consumer of isPrivateZoneLocked in this repo already renders
an explicit locked state (LockedZoneBanner, PrivateZoneDataGate, the
Today cards). This was the one place that silently faked the data.

npm run verify green: project-kickoff 63/63, project-dispatch-prompt
32/32, 150 home tests, tsc clean, 0 lint errors.

Co-authored-by: test <test@test>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 17:54:35 +00:00
..