mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 12:27:09 +01:00
Dogfooding report on a project profile, three findings, one root cause between
the first two.
1. "No recent activity yet" on a project with a week of work behind it. The
FleetCrown→OrangeCat link was never broken: timeline_events held 17
published updates for that project. The card read project_updates — a table
with zero rows platform-wide, no writer anywhere in the codebase, and no
migration. Every project on the platform read as idle. Recent Activity now
reads timeline_events, the one store activity lands in, and renders the
publish-bus attribution ("via FleetCrown") with its deep link back.
2. Fourteen days in Draft with nothing on the page saying so. Projects were the
only entity type without the owner bar; products and services have shown
"only visible to you — publish it to go live" all along. Reused that
component rather than adding a second banner.
The status rule behind both — public iff active or completed — was written
out twice and matches the projects_public_read RLS policy, so it is now one
exported predicate the API and the page share.
3. No field for the current status of the work. `status` is the lifecycle and
cannot answer "what is happening right now". Adds projects.work_status
(nullable text, migration applied to the box before this ships), surfaced
under About and editable in the project form. It had to be added to the
update whitelist and the create payload too — the Zod schema alone would
have let it save silently as nothing.
An owner now also sees their own draft's activity; before, the one person who
could act on it was shown the same "idle" as everyone else. Visitors still see
nothing until the project is published, and a draft still 404s for them.
Verified in the running app against production data: owner sees 10 FleetCrown
updates on the reported draft (was empty); a signed-out visitor on an active
project sees 11 with attribution; the bar reads "Preview — this project is
draft and only visible to you. Publish it to go live."; work_status round-trips
PUT → DB → "Current status" on the page, and was cleared again afterwards so no
test content was left behind. Anonymous on the draft: 404, no bar.
npm run verify: exit 0 — tsc clean, lint 0 errors, 223 suites / 2224 tests.
Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>