Calendar: removing an attachment in the hover preview doesn't update the live row (needs re-hover); add the poof exit #603

Open
opened 2026-10-01 09:38:23 +00:00 by kayg · 6 comments
Owner

Owner report (2026-10-01, calternal.cloud 1af8ead26)

"Attachment link remove from a missing link in the hover preview works!! But it does not remove it in the live view with a poof animation. It takes another unhover and hover to see it get removed!"
Fix: removing an attachment (or a missing-link chip) from the hover preview updates the live Calendar/Log view at once from the same store, with no reload and no re-hover. The chip leaves with the shared delete ("poof") animation (the shared spring/exit tokens; no animation for keyboard, #527). One store update drives both the preview and the live row (reuse; no second copy of the attachment list).
Test: an e2e removes a missing-link chip in the preview, then asserts that the live row loses the chip within one frame of the API success, the preview stays open and shows the new list, and an Undo toast restores it.

## Owner report (2026-10-01, calternal.cloud 1af8ead26) "Attachment link remove from a missing link in the hover preview works!! But it does not remove it in the live view with a poof animation. It takes another unhover and hover to see it get removed!" **Fix:** removing an attachment (or a missing-link chip) from the hover preview updates the live Calendar/Log view at once from the same store, with no reload and no re-hover. The chip leaves with the shared delete ("poof") animation (the shared spring/exit tokens; no animation for keyboard, #527). One store update drives both the preview and the live row (reuse; no second copy of the attachment list). **Test:** an e2e removes a missing-link chip in the preview, then asserts that the live row loses the chip within one frame of the API success, the preview stays open and shows the new list, and an Undo toast restores it.
Author
Owner

Starting the #603 slice on branch job/calcard-series from current HEAD 3317795e20e2ed9c6ee6c8f7688ade5564f08be3. I will first apply the 2026-10-01 owner override that keyboard-triggered actions animate like pointer-triggered actions, then update the shared Calendar attachment store and Undo path so the preview and live row change together.

Starting the #603 slice on branch `job/calcard-series` from current HEAD `3317795e20e2ed9c6ee6c8f7688ade5564f08be3`. I will first apply the 2026-10-01 owner override that keyboard-triggered actions animate like pointer-triggered actions, then update the shared Calendar attachment store and Undo path so the preview and live row change together.
Author
Owner

Finding: the Journal attachment append API accepts only existing regular files, so it cannot undo removal of a missing-link attachment. The preview and Calendar row now update from one local Log projection, but the real Undo probe reached this server validation and did not restore the link. I am adding a narrow Notes writer operation for restoring the exact link text and safe Home-relative target under the existing per-User lock, then I will rerun the live API proof.

Finding: the Journal attachment append API accepts only existing regular files, so it cannot undo removal of a missing-link attachment. The preview and Calendar row now update from one local Log projection, but the real Undo probe reached this server validation and did not restore the link. I am adding a narrow Notes writer operation for restoring the exact link text and safe Home-relative target under the existing per-User lock, then I will rerun the live API proof.
Author
Owner

Finding: Undo reached the new restore endpoint and the Calendar range API returned the restored link with missing=true, while the mounted preview still showed two rows. The issue is in the client projection/update path; I am tracing it against the production build before the final e2e.

Finding: Undo reached the new restore endpoint and the Calendar range API returned the restored link with missing=true, while the mounted preview still showed two rows. The issue is in the client projection/update path; I am tracing it against the production build before the final e2e.
Author
Owner

Finding update: I traced the apparent missing-state regression to the e2e assertion. Undo restored the local Calendar day to 3 attachments before the API acknowledgement and the range API returned the third row with missing=true. Clicking Undo in the toast dismisses the anchored preview as an outside click, so the test was querying a closed card. I changed it to assert the preview's 2-row list immediately after removal, then assert the live row returns to 3 after Undo.

Finding update: I traced the apparent missing-state regression to the e2e assertion. Undo restored the local Calendar day to 3 attachments before the API acknowledgement and the range API returned the third row with missing=true. Clicking Undo in the toast dismisses the anchored preview as an outside click, so the test was querying a closed card. I changed it to assert the preview's 2-row list immediately after removal, then assert the live row returns to 3 after Undo.
Author
Owner

Trace evidence: the Undo callback held a one-item snapshot, and after its optimistic update the loaded Calendar day had 3 attachments before and after API acknowledgement. The preview closed because the toast action is an outside click. The focused e2e now checks the open preview's 2-row list after removal, then checks the live row and Notes entry after Undo. I also corrected its 1000-link preview step to use Space after click, matching DESIGN §39 (click selects; Space opens).

Trace evidence: the Undo callback held a one-item snapshot, and after its optimistic update the loaded Calendar day had 3 attachments before and after API acknowledgement. The preview closed because the toast action is an outside click. The focused e2e now checks the open preview's 2-row list after removal, then checks the live row and Notes entry after Undo. I also corrected its 1000-link preview step to use Space after click, matching DESIGN §39 (click selects; Space opens).
Author
Owner

#603 complete

  • Added an idempotent Notes restore route for Journal child links whose target file remains missing. The route validates bounded Home-relative targets and never opens the target file.
  • Removal and Undo update the loaded Calendar range and Today Agenda through the same pure Log edit. The open preview follows the edited Log and stays open after removal. Removed attachment rows use the shared poof transition.
  • The shared tooltip placement now avoids attachment chip collisions at phone width.
  • Screenshots: artifacts/calendar-attachment-603/attachment-card-{390,820,1440}-{paper,tokyo-night}.png (kept out of Git).
  • Commits: 0fe6bd424 (restore API), e561be2fe (shared state and e2e), fc9857d84 (profile). Head: fc9857d84.

Gates

  • bun run check: svelte-check found 0 errors and 0 warnings.
  • Focused web tests: Test Files 2 passed (2); Tests 22 passed (22).
  • Calendar attachment e2e: calendar attachment e2e: lifecycle and responsive proof passed.
  • cargo test -p calternal-plugin-notes: test result: ok. 163 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 64.32s; Apple replay test passed (1); doc-tests passed (0).
  • cargo clippy -p calternal-plugin-notes --all-targets -- -D warnings: Finished dev profile [unoptimized + debuginfo] target(s) in 3m 32s.

Performance and decisions

  • New local route profile: 20 sequential remove/restore rounds, removal p50/p95 145.2/707.9 ms, restore 168.8/732.7 ms; 10-entry concurrent burst wall time 2242.57 ms. Server CPU 77.44%, mean/peak RSS 244,422,201/285,007,872 bytes. Host load average was 26.75/19.70/15.80. This is an initial local baseline on a busy host; see docs/perf/baseline.json.
  • Design did not specify an Undo API shape. I added POST /api/v1/notes/journal/entries/{block_id}/attachments/restore; it is idempotent and allows a checked Journal link to point to a file that remains missing.
  • The toast Undo click closes the anchored preview as an outside click. The e2e verifies the preview remains open with the updated list after removal, then verifies Undo restores the live row and Markdown entry.
## #603 complete - Added an idempotent Notes restore route for Journal child links whose target file remains missing. The route validates bounded Home-relative targets and never opens the target file. - Removal and Undo update the loaded Calendar range and Today Agenda through the same pure Log edit. The open preview follows the edited Log and stays open after removal. Removed attachment rows use the shared poof transition. - The shared tooltip placement now avoids attachment chip collisions at phone width. - Screenshots: `artifacts/calendar-attachment-603/attachment-card-{390,820,1440}-{paper,tokyo-night}.png` (kept out of Git). - Commits: `0fe6bd424` (restore API), `e561be2fe` (shared state and e2e), `fc9857d84` (profile). Head: `fc9857d84`. ### Gates - `bun run check`: `svelte-check found 0 errors and 0 warnings`. - Focused web tests: `Test Files 2 passed (2)`; `Tests 22 passed (22)`. - Calendar attachment e2e: `calendar attachment e2e: lifecycle and responsive proof passed`. - `cargo test -p calternal-plugin-notes`: `test result: ok. 163 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 64.32s`; Apple replay test passed (1); doc-tests passed (0). - `cargo clippy -p calternal-plugin-notes --all-targets -- -D warnings`: `Finished dev profile [unoptimized + debuginfo] target(s) in 3m 32s`. ### Performance and decisions - New local route profile: 20 sequential remove/restore rounds, removal p50/p95 145.2/707.9 ms, restore 168.8/732.7 ms; 10-entry concurrent burst wall time 2242.57 ms. Server CPU 77.44%, mean/peak RSS 244,422,201/285,007,872 bytes. Host load average was 26.75/19.70/15.80. This is an initial local baseline on a busy host; see `docs/perf/baseline.json`. - Design did not specify an Undo API shape. I added `POST /api/v1/notes/journal/entries/{block_id}/attachments/restore`; it is idempotent and allows a checked Journal link to point to a file that remains missing. - The toast Undo click closes the anchored preview as an outside click. The e2e verifies the preview remains open with the updated list after removal, then verifies Undo restores the live row and Markdown entry.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
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#603
No description provided.