feat(task-board): task-based flow behind taskBasedFlow flag - #5938
Open
guitavano wants to merge 5 commits into
Open
feat(task-board): task-based flow behind taskBasedFlow flag#5938guitavano wants to merge 5 commits into
taskBasedFlow flag#5938guitavano wants to merge 5 commits into
Conversation
Operate a repo-bound site entirely in terms of Tasks, hiding Git (branches/PRs/sync). All gated behind the org flag `taskBasedFlow` (off by default), toggleable in Settings → Organization → Experimental. Web - Task pill replaces the branch picker in the workspace header, with the task board as source of truth: names the current task, filters by column, switches tasks, and creates new ones (describe → agent, or edit manually → fresh CMS branch). Each task gets its own branch. - New-task dialog (describe / edit manually); manual edit opens a fresh branch straight in the CMS (chat closed, `?cms=1` auto-opens the editor). - Hides Git surfaces under the flag: branch picker, Sync, open-in-board. - Repo selector in the task dialog properties. API - `task_board_items` gains `repo_owner`/`repo_name` (migration 169) so a task is scoped to its site; threaded through storage, create/update tools, schemas. - Repo-backed tasks advance to In Review only via the PR-open hook, never on thread-finish (In Review with no PR is the wrong state) — keyed on the task's `repoOwner` (CMS threads carry no repo metadata). - `TASK_BOARD_ITEM_UPDATE` gains `linkPr` (mirrors `linkThreadId`) so the CMS submit-for-review flow — which opens PRs outside a run — links the PR and advances the task to In Review. Tests: unit for the review-advance gate + repo helpers; real-Postgres for repo round-trip, repo-named no-advance-on-finish, and PR link+advance. Note: `tool-io.ts` was hand-patched (contract generator is degraded in this env) — re-run `generate:tool-contracts` in a full env to confirm. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Conflicts resolved: - migrations: renumbered task-board-item-repo 169 → 170 (main added its own 169-task-board-merge-failed-activity); both registered. - shouldAdvanceToReview (semantic): main kept the thread-finish backstop that advances agent-run tasks to In Review (so a missed PR-open detection doesn't strand them In Progress). Reconciled: only `repoOwner`-named (CMS/site) tasks are held back from advancing on finish — the CMS flow opens the PR and advances the card itself, and a finished CMS edit may have no PR. Agent-run tasks keep main's backstop. Dropped the earlier `hasPreview` gate (which would have removed the backstop for Super Agent tasks) and its tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sync after #5970 merged (repo-as-task-property + selector). Reconciled to main's convention: - Task's repo scope is a single `repo` column ("owner/name"), not the repoOwner/repoName pair — adopted main's version everywhere, incl. the task pill (filter + create now use the `owner/name` slug). - Kept #5938's `linkPr` on TASK_BOARD_ITEM_UPDATE (CMS submit-for-review) — its repoOwner/repoName is the PR's identity (task_board_item_prs), untouched by the `repo` change. - Dropped the orphaned shouldAdvanceToReview repo-gate tests: main's merge of #5970 did NOT include the review-gate change, so #5938 no longer carries it (see PR note — needs a decision). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Operate a repo-bound site entirely in terms of Tasks, hiding Git (branches, PRs, sync). All gated behind the org flag
taskBasedFlow(off by default), toggleable in Settings → Organization → Experimental.Web
generateBranchName); "edit manually" opens a fresh branch straight in the CMS (chat closed,?cms=1auto-opens the editor).API
task_board_itemsgainsrepo_owner/repo_name(migration 169) so a task is scoped to its site; threaded through storage, create/update tools, and schemas.repoOwner, since CMS threads carry no repo metadata of their own.TASK_BOARD_ITEM_UPDATEgainslinkPr(mirrorslinkThreadId) so the CMS submit-for-review flow — which opens PRs outside an agent run — links the PR and advances the task to In Review.Testing
bun run fmtclean;tscclean inapps/api,apps/web,packages/shared; lint clean on touched files.Notes / follow-ups
packages/shared/src/tools/tool-io.tswas hand-patched (the contract generator is degraded in this dev env). Re-runbun run --cwd=apps/api generate:tool-contractsin a full env to confirm output matches.linkPronTASK_BOARD_ITEM_UPDATEmirrors the existinglinkThreadId; open to moving it to a dedicated un-gatedTASK_BOARD_ITEM_PR_LINKif preferred (discussed).🤖 Generated with Claude Code
Summary by cubic
Task-based flow behind the
taskBasedFloworg flag: the workspace operates in Tasks (not branches), each task gets its own branch and optional repo scope, and the CMS submit-for-review path links the PR and moves the task to In Review. All Git surfaces stay hidden under the flag.Adds
taskBasedFlowtoggle in Settings → Organization → Experimental.Replaces the branch picker with a task pill for repo-bound agents: shows the current task, filters by column, switches tasks, and creates new tasks via prompt (agent run) or manual edit (fresh CMS branch; chat closed;
?cms=1opens the editor). Each task starts on a fresh branch.Hides Git surfaces under the flag (branch picker, Sync, open-in-board).
Task dialog includes a repo selector; tasks store a single
reposlug (owner/name) for scoping.TASK_BOARD_ITEM_UPDATEacceptslinkPrto associate a PR and set status to In Review; the publish dialog calls this when it opens a PR (idempotent).Migration
repo(owner/name) totask_board_items(migration 170).bun run --cwd=apps/api generate:tool-contracts.Written for commit c12fafc. Summary will update on new commits.