Tasks: completion checkbox waits for the server and has no Undo #1229

Open
opened 2026-10-06 20:35:26 +00:00 by kayg · 4 comments
Owner

Reproduction:

  1. Open Tasks in List or Board and complete a Task with its checkbox.
  2. Repeat with a slow or delayed Tasks API response.

Expected: the checkbox and Task Status update immediately, the User can continue interacting, and the state change offers Undo to restore the exact previous Status.

Actual: the checkbox callback waits for the server before updating the Task index. The checkbox is disabled while the request is pending. The workspace does not show an Undo action after completion.

Evidence: apps/web/src/lib/tasks/index.svelte.ts (TaskIndex.toggle waits for tickTask before #put) and apps/web/src/lib/tasks/TasksWorkspace.svelte (toggleTask has no optimistic state or Undo action). I will add a delayed-response production E2E repro and attach its output before the fix.

Severity: major.

Reproduction: 1. Open Tasks in List or Board and complete a Task with its checkbox. 2. Repeat with a slow or delayed Tasks API response. Expected: the checkbox and Task Status update immediately, the User can continue interacting, and the state change offers Undo to restore the exact previous Status. Actual: the checkbox callback waits for the server before updating the Task index. The checkbox is disabled while the request is pending. The workspace does not show an Undo action after completion. Evidence: `apps/web/src/lib/tasks/index.svelte.ts` (`TaskIndex.toggle` waits for `tickTask` before `#put`) and `apps/web/src/lib/tasks/TasksWorkspace.svelte` (`toggleTask` has no optimistic state or Undo action). I will add a delayed-response production E2E repro and attach its output before the fix. Severity: major.
Author
Owner

Confirmed on the local worktree release server with the production SPA: bun e2e/task-checkbox-1229.mjs fails before the fix while /api/v1/notes/tasks/tick is held. After keyboard Space, the native input's checked property changes, but aria-checked stays false; the control is disabled while the request is pending. The run asserts the accessibility state and fails at line 55 before the server response is released. Evidence log: target/tmp/task-checkbox-1229-before.log.

Confirmed on the local worktree release server with the production SPA: `bun e2e/task-checkbox-1229.mjs` fails before the fix while `/api/v1/notes/tasks/tick` is held. After keyboard Space, the native input's checked property changes, but `aria-checked` stays `false`; the control is disabled while the request is pending. The run asserts the accessibility state and fails at line 55 before the server response is released. Evidence log: `target/tmp/task-checkbox-1229-before.log`.
Author
Owner

Related #1374 server measurement for the Task completion path, branch head bd078a3c3:

The bulk fixture sent 1,000 POST /api/v1/notes/tasks/tick requests at concurrency 8. No completed state was visible by 600,021.10 ms, and the client action was still pending at the observer cutoff. This is a single 1,000-Task batch sample, not a single-checkbox latency or completion time. The server handler is crates/plugins/notes/src/tasks_api.rs::tick; it serializes each source-file rewrite and Index refresh under the User lock. This supports the existing completion/Undo investigation in #1229; the final audit report will include the query plan and probe limits.

Related #1374 server measurement for the Task completion path, branch head `bd078a3c3`: The bulk fixture sent 1,000 `POST /api/v1/notes/tasks/tick` requests at concurrency 8. No completed state was visible by 600,021.10 ms, and the client action was still pending at the observer cutoff. This is a single 1,000-Task batch sample, not a single-checkbox latency or completion time. The server handler is `crates/plugins/notes/src/tasks_api.rs::tick`; it serializes each source-file rewrite and Index refresh under the User lock. This supports the existing completion/Undo investigation in #1229; the final audit report will include the query plan and probe limits.
Author
Owner

Rerun result (2026-10-08, perf VM): completing 1,000 Tasks via POST /api/v1/notes/tasks/tick became visible after 1,347,186.57 ms against the 500 ms target. All 1,000 requests returned HTTP 200 and the action acknowledged at 1,346,624.18 ms. Source cause is crates/plugins/notes/src/tasks_api.rs::tick; each request updates the Markdown source and refreshes the Index under the User lock. Undo of this batch has started and is still in progress; its 600,021.10 ms visibility lower bound is durable in the audit CSV.

Rerun result (2026-10-08, perf VM): completing 1,000 Tasks via `POST /api/v1/notes/tasks/tick` became visible after 1,347,186.57 ms against the 500 ms target. All 1,000 requests returned HTTP 200 and the action acknowledged at 1,346,624.18 ms. Source cause is `crates/plugins/notes/src/tasks_api.rs::tick`; each request updates the Markdown source and refreshes the Index under the User lock. Undo of this batch has started and is still in progress; its 600,021.10 ms visibility lower bound is durable in the audit CSV.
Author
Owner

Additional backend evidence for the Task completion/Undo path: an Undo batch of 1,000 POST /api/v1/notes/tasks/tick requests returned 166 HTTP 200 and 834 HTTP 500. It acknowledged after 323,326.81 ms, and the whole To do state was not visible by 600,374.06 ms. The audit filed the distinct HTTP 500 finding at #1446; this issue remains the UI wait/Undo behavior. The preceding completion batch took 1,347,186.57 ms to become visible.

Additional backend evidence for the Task completion/Undo path: an Undo batch of 1,000 `POST /api/v1/notes/tasks/tick` requests returned 166 HTTP 200 and 834 HTTP 500. It acknowledged after 323,326.81 ms, and the whole To do state was not visible by 600,374.06 ms. The audit filed the distinct HTTP 500 finding at #1446; this issue remains the UI wait/Undo behavior. The preceding completion batch took 1,347,186.57 ms to become visible.
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal-v0#1229
No description provided.