Repository navigation
feat(action-center): edit, add and delete an action's tasks - #814
Merged
Merged
Conversation
A task's text lived only in code. `task_key` indexes the per-kind templates the generator writes and the drawer renders through i18n, so there was nowhere to put a sentence a person typed — the list was whatever the generator decided, permanently. `title` is that place. A generated task keeps its key and no title; adding or renaming one writes a title, which wins at render time while the key stays behind so which template a task grew from is still answerable. `task_key` becomes nullable, guarded by a check that a row always has one of the two to render from. `unique (action_id, task_key)` needs no change: Postgres treats nulls as distinct, so an action holds as many user-added tasks as someone types while still refusing a duplicate template. Deleting closes the gap in `position`, because the drawer numbers the rows and a hole would show. Renaming happens in place — the text is one line and a dialog for one line is a detour — with Escape abandoning and Enter or blur committing. `blocked` becomes `canceled`. Blocked meant "still to do, held up"; canceled means "not going to happen", and it now leaves the progress denominator instead of holding an action below 100% forever while it waits for something that may never arrive. One row carried the old value, which is the cheapest this rename will ever be. action_tasks reopens to members for insert and delete, scoped to their own organization with the predicate the select and update policies already use. 00082 closed these outright after finding them open to every signed-in user; this is the narrow, intentional version of that permission, and it exists because the Tasks tab now writes. actions and action_events stay closed. Applied to the hosted database. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01SQ2H6mSd9JDpmqonk2VWBj
This was referenced Sep 15, 2026
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
An action's task list was whatever the generator decided, permanently. This makes it editable: rename a task, add one of your own, delete one — and call a task off rather than declaring it stuck.
Where the text lives
A task's text lived only in code.
task_keyindexes the per-kind templates the generator writes, and the drawer renderst(actionCenter.actionTasks.<task_key>). There was nowhere to put a sentence a person typed.titleis that place:task_keybecomes nullable, guarded by a check that a row always has one of the two to render from.unique (action_id, task_key)needs no change — Postgres treats nulls as distinct, so an action holds as many user-added tasks as someone types while still refusing a duplicate template.Deleting closes the gap in
position, because the drawer numbers the rows and a hole would show. Renaming happens in place rather than in a dialog: the text is one line, Escape abandons, Enter or blur commits, and an empty value is treated as abandonment rather than as a request to blank the task out.Blocked becomes Canceled
Blocked meant "still to do, held up". Canceled means "not going to happen" — and it now leaves the progress denominator instead of holding an action below 100% forever while it waits for something that may never arrive. Both the list row's progress bar and the drawer's count read it the same way.
One row carried the old value, which is the cheapest this rename will ever be.
Permissions
action_tasksreopens to members for insert and delete, scoped to their own organization with the same predicate the select and update policies already use. #813 closed these outright after finding them open to every signed-in user; this is the narrow, intentional version of that permission, and it exists because the Tasks tab now writes.actionsandaction_eventsstay closed.Every mutation logs an
action_event(task_added,task_renamed,task_deleted), so the History tab keeps its full trail, and bumps the action'supdated_atso the table's Updated column tracks real work. That stamp bump was inline in one place and is now a sharedtouchAction.Related issue
None — requested directly.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsDatabase
00083_action_task_editing— already applied to the hosted database. Addstitle, makestask_keynullable, renames theblockedstatus value, and scopes the two write policies. All 76 existing task rows are intact and render exactly as before.How to test
Open an action, then the Tasks tab:
Run from
web/:Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdsupabase/schema.sqlregenerated withbash supabase/build-schema.shyarn lintpasses (run fromweb/) — 0 errorsyarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)🤖 Generated with Claude Code
https://claude.ai/code/session_01SQ2H6mSd9JDpmqonk2VWBj