feat(create): PROG-115 default new actions to backlog, one shared defaulting path#93
Merged
Conversation
The DB schema and API fallback already said backlog, but every client
creation surface — the create dialog, the Outline capture, the Agenda
quick-add — hardcoded status "todo", so raw intake skipped the backlog
and polluted To do.
Mint DEFAULT_ACTION_STATUS ("backlog") in src/shared/constants.ts and
make it the single source for the API fallback, the store, and the
dialog's initial pick. DRY the surfaces at the defaulting path rather
than the UI: ActionCreateInput now requires only title + focusId, and
store.createAction resolves every omitted field once (arc/parent null,
status backlog, priority none, estimate/due null) before building both
the optimistic row and the POST body from the same values, so the temp
row can't disagree with what the server stores. Call sites keep only
the fields they mean.
Side effect: the Agenda quick-add now creates backlog (not todo)
actions — still visible there, since the Agenda lists every non-closed
status. REFERENCE §2/§5 updated; rationale in docs/decisions/PROG-115.md.
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.
Every create-action surface now starts a new action in backlog instead of To do — promotion to
todobecomes a deliberate act, matching the DB schema and API fallback that already said backlog.What changed
DEFAULT_ACTION_STATUS("backlog") minted insrc/shared/constants.ts— referenced by the API's fallback, the client store, and the create dialog's initial pick, so the default lives in one place.ActionCreateInputnow requires onlytitle + focusId;store.createActionresolves every omitted field once (arc/parent → null, status → backlog, priority → none, estimate/due → null) and builds both the optimistic temp row and the POST body from the same resolved values — the optimistic UI can no longer drift from what the server stores. Call sites shed their copy-pastedstatus/priority/estimateboilerplate and keep only the fields they actually mean.backlogactions now — still visible in its bucket, since the Agenda lists every non-closed status.docs/decisions/PROG-115.md.Verified
tsc -bclean, 170 unit tests pass, and a Playwright drive confirmed all four paths: the create dialog opens on Backlog and its created action lands in backlog; an Outline capture creates backlog; the Agenda quick-add creates a dated backlog action that stays visible in its bucket; a barePOST /api/actions(no status) returns backlog.