feat(studio): dual-source roadmap — local Postgres layer (CS-76 phase A) - #36
Merged
Merged
Conversation
- add RoadmapCard model: the editable pre-PR layer (backlog/blocked/in-progress) - getKanbanBoard assembles git (done archive) + Postgres (local), git-wins precedence - saveKanbanBoard persists only local cards to Postgres; git board never rewritten from UI - lock git-owned cards in the UI: non-draggable, read-only modal, drop-guard - require a CS number on card creation (identity/upsert key); reject duplicates - one-time backfill script to seed the local layer from cs-board.json - unit tests for assembleBoard, isLocalColumn, and the local persistence routing
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase A of CS-76: the Studio roadmap becomes dual-source. Postgres now owns the editable pre-PR layer (Backlog / Bloqueado / Em andamento); the git board (
docs/cs-board.json) remains the authoritativedonearchive, written only by the roadmap-sync Action. The UI never rewrites the git board — the two writers stop fighting.Changes
RoadmapCardmodel (Prisma): local layer keyed bycsNumber(the upsert/join identity)assembleBoard(lib/kanban.ts, pure + tested): merges gitdonecards with local cards, git-wins precedence when a CS was promotedgetKanbanBoard: reads git file + Postgres in parallel and assemblessaveKanbanBoard: persists only local-column cards to Postgres (upsert by CS + prune removed); git file untouchedscripts/roadmap-backfill-local.mjs(idempotent, ON CONFLICT DO NOTHING) — already run on dev: 17 cards seededChecklist
References
CS-76 (phase A of 3 — phase B adds the GitHub source + Revisão column, phase C server-side enforcement + AGENTS.md)