Toasts show internal file names ('20260928-buy-milk-2529fc75.md') instead of the item title #586

Open
opened 2026-10-01 07:18:59 +00:00 by kayg · 5 comments
Owner

Owner screenshot (2026-10-01): toast "Moved "20260928-buy-milk-2529fc75.md" to the Trash"

Deleting a task shows its internal file name (date + slug + ID + .md): jargon, and not what the User called it.
Fix: toasts, confirmations and undo messages name items by their display title ("Moved "Buy milk" to the Trash"), never by internal file names, for tasks, notes, log entries and events. Real files in Files keep their file name. Use one shared helper for "display name of an item" (check whether one exists, e.g. in the inspector or search rows).
Test: a unit test for the helper + an e2e that deletes a task and asserts the toast text. Web gates.

## Owner screenshot (2026-10-01): toast "Moved "20260928-buy-milk-2529fc75.md" to the Trash" Deleting a **task** shows its internal file name (date + slug + ID + `.md`): jargon, and not what the User called it. **Fix:** toasts, confirmations and undo messages name items by their **display title** ("Moved "Buy milk" to the Trash"), never by internal file names, for tasks, notes, log entries and events. Real files in Files keep their file name. Use one shared helper for "display name of an item" (check whether one exists, e.g. in the inspector or search rows). Test: a unit test for the helper + an e2e that deletes a task and asserts the toast text. Web gates.
Author
Owner

Starting issue #586 on branch job/toastname-586, based at cc25c441b7a974185622a1dee853cf38686d2b67. I am tracing the shared item labels and delete/undo flows before making the change.

Starting issue #586 on branch `job/toastname-586`, based at `cc25c441b7a974185622a1dee853cf38686d2b67`. I am tracing the shared item labels and delete/undo flows before making the change.
Author
Owner

Finding: the shared Files Trash helper receives only paths and builds its success toast from baseName(path), so it cannot use a Task's title. The Calendar Task projection already carries both title and source; Note deletion separately uses its title. I am checking the shared Inspector and Task route for the user-facing delete adapter, then I will route the display title through one shared helper while keeping real Files filename-based.

Finding: the shared Files Trash helper receives only paths and builds its success toast from `baseName(path)`, so it cannot use a Task's title. The Calendar Task projection already carries both `title` and `source`; Note deletion separately uses its title. I am checking the shared Inspector and Task route for the user-facing delete adapter, then I will route the display title through one shared helper while keeping real Files filename-based.
Author
Owner

Finding: the Calendar Task preview and item menus had no Trash action. trashItems is the existing shared Trash/Undo flow and labels from file basenames, while Log deletion and Note Trash have separate feedback. I am adding a Task Trash action for standalone file Tasks only, routing it through trashItems with the shared display-name helper. Inline Tasks stay in their parent Note because their source is not a standalone file. The same helper will supply title based duplicate and Undo copy for Tasks, Notes, Log entries and Events; Files callers continue to use filenames.

Finding: the Calendar Task preview and item menus had no Trash action. `trashItems` is the existing shared Trash/Undo flow and labels from file basenames, while Log deletion and Note Trash have separate feedback. I am adding a Task Trash action for standalone file Tasks only, routing it through `trashItems` with the shared display-name helper. Inline Tasks stay in their parent Note because their source is not a standalone file. The same helper will supply title based duplicate and Undo copy for Tasks, Notes, Log entries and Events; Files callers continue to use filenames.
Author
Owner

Production screenshots

390 px, light

390 px, dark

820 px, light

820 px, dark

1440 px, light

1440 px, dark

## Production screenshots ![390 px, light](https://git.kayg.org/attachments/ab70c1e8-0650-42fc-a1a1-00322d6aea97) ![390 px, dark](https://git.kayg.org/attachments/8e59c49b-35eb-473e-ae59-1edb8375f31b) ![820 px, light](https://git.kayg.org/attachments/7ef6677a-0ecb-4c81-9746-0e994a0e4eb5) ![820 px, dark](https://git.kayg.org/attachments/8622cbe9-2948-4089-99cd-75af716e7a6a) ![1440 px, light](https://git.kayg.org/attachments/6e8475a1-96ba-449d-811a-341800433db4) ![1440 px, dark](https://git.kayg.org/attachments/af799e59-9f64-44c8-be63-6ae29b3785df)
Author
Owner

Forgejo #586 complete

Head: 093db3ec12a26d1d9ed303853ee733fbc5e79ccd (093db3ec1).

Built

  • Added the shared itemDisplayName helper. Task, Note, Log entry and Event feedback uses the visible title. Files feedback keeps the real filename.
  • Used title-based copy in create, edit, move, duplicate, Trash and Undo feedback. Note Trash and Log deletion use the same helper.
  • Added Move to Trash to Calendar Task previews and item menus for standalone file Tasks. Inline Tasks stay in their parent Note. Task Undo refreshes the Calendar and says Restored “Buy milk”.
  • Added the helper unit test, rendered Task-action tests, source guard tests, and the real-production E2E. Six screenshots at 390, 820 and 1440 px in light and dark themes are attached in the previous comment.
  • Extended the existing Toast profile with semantic Task titles and measured it once.

Files

apps/web/src/lib/itemDisplayName.ts, apps/web/src/lib/itemDisplayName.test.ts, apps/web/src/lib/calendar/ItemPreview.svelte.test.ts, apps/web/src/lib/calendar/edits.ts, apps/web/src/lib/calendar/model.test.ts, apps/web/src/lib/composer/Composer.svelte, apps/web/src/lib/composer/Composer.svelte.test.ts, apps/web/src/lib/files/transfer.ts, apps/web/src/lib/notes/NoteView.svelte, apps/web/src/routes/calendar/[view]/[date]/+page.svelte, apps/web/e2e/task-delete-toast-586.mjs, apps/web/package.json, packages/ui/src/components/calendar/AgendaList.svelte, packages/ui/src/components/calendar/ItemPreview.svelte, packages/ui/src/components/calendar/model.ts, bench/toast-ring-539.mjs.

Gates (verbatim success output)

bun run check:

$ node scripts/check-user-storage.mjs && node scripts/check-type-tokens.mjs && node scripts/check-motion-tokens.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
User browser caches use userStorage; only documented device/public-link exceptions remain.
Text sizes and UI shape values use shared role tokens.
UI transitions and animation options use shared motion tokens or documented exceptions.
Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/toastname-586/apps/web
Getting Svelte diagnostics...

svelte-check found 0 errors and 0 warnings

bun run test:

$ vitest run

 Test Files  149 passed (149)
      Tests  1016 passed (1016)
   Start at  17:44:02
   Duration  67.90s (transform 44%, environment 21%, import 16%, tests 14%, setup 5%)

Production build output: ✓ built in 29.46s; Wrote site to "build".

E2E output:

Task Trash title and Undo: PASS; six production screenshots saved in /home/kayg/Developer/calternal-wt/toastname-586/artifacts/task-delete-toast-586

Local server build for E2E: Finished dev profile [unoptimized + debuginfo] target(s) in 5m 11s.

Performance

The perf VM lock could not be acquired, so I ran the extended Toast profile locally. Current host load was 8.03, 8.2, 10.6; the initial #539 baseline host load was 38.09, 36.65, 36.99.

Workload Viewport Baseline p50 / p95 Current p50 / p95 Baseline CPU / RSS Current CPU / RSS
Average, 15 toasts 390 px 17.0 / 118.5 ms 21.2 / 40.2 ms 63.0% / 454,299,648 B 104.2% / 470,605,824 B
Burst, 50 toasts 390 px 2,339.8 / 2,339.8 ms 568.3 / 568.3 ms 26.5% / 521,445,376 B 50.2% / 534,556,672 B
Average, 15 toasts 1440 px 37.6 / 126.8 ms 34.3 / 43.5 ms 70.0% / 535,625,728 B 75.8% / 553,095,168 B
Burst, 50 toasts 1440 px 1,012 / 1,012 ms 389.7 / 389.7 ms 76.5% / 612,655,104 B 130.6% / 622,256,128 B

All current p95 samples are lower. RSS is 1.6–3.6% above baseline, below the 15% memory budget. CPU was higher in this local run; the baseline and current host loads differ, and the profile has no CPU regression budget.

Decisions and gaps

  • DESIGN §31 defines standalone and inline Tasks but does not specify a Calendar Trash control. I added Trash to standalone Task previews and item menus; inline Tasks remain in their parent Note.
  • Empty title fallbacks are Untitled, Untitled task, Untitled entry and Untitled event.
  • No functional gaps found. No Rust source changed, so Rust lint/test gates were not run. cargo build -p calternal-server passed for the local E2E.
# Forgejo #586 complete Head: `093db3ec12a26d1d9ed303853ee733fbc5e79ccd` (`093db3ec1`). ## Built - Added the shared `itemDisplayName` helper. Task, Note, Log entry and Event feedback uses the visible title. Files feedback keeps the real filename. - Used title-based copy in create, edit, move, duplicate, Trash and Undo feedback. Note Trash and Log deletion use the same helper. - Added Move to Trash to Calendar Task previews and item menus for standalone file Tasks. Inline Tasks stay in their parent Note. Task Undo refreshes the Calendar and says `Restored “Buy milk”`. - Added the helper unit test, rendered Task-action tests, source guard tests, and the real-production E2E. Six screenshots at 390, 820 and 1440 px in light and dark themes are attached in the previous comment. - Extended the existing Toast profile with semantic Task titles and measured it once. ## Files `apps/web/src/lib/itemDisplayName.ts`, `apps/web/src/lib/itemDisplayName.test.ts`, `apps/web/src/lib/calendar/ItemPreview.svelte.test.ts`, `apps/web/src/lib/calendar/edits.ts`, `apps/web/src/lib/calendar/model.test.ts`, `apps/web/src/lib/composer/Composer.svelte`, `apps/web/src/lib/composer/Composer.svelte.test.ts`, `apps/web/src/lib/files/transfer.ts`, `apps/web/src/lib/notes/NoteView.svelte`, `apps/web/src/routes/calendar/[view]/[date]/+page.svelte`, `apps/web/e2e/task-delete-toast-586.mjs`, `apps/web/package.json`, `packages/ui/src/components/calendar/AgendaList.svelte`, `packages/ui/src/components/calendar/ItemPreview.svelte`, `packages/ui/src/components/calendar/model.ts`, `bench/toast-ring-539.mjs`. ## Gates (verbatim success output) `bun run check`: ```text $ node scripts/check-user-storage.mjs && node scripts/check-type-tokens.mjs && node scripts/check-motion-tokens.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json User browser caches use userStorage; only documented device/public-link exceptions remain. Text sizes and UI shape values use shared role tokens. UI transitions and animation options use shared motion tokens or documented exceptions. Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/toastname-586/apps/web Getting Svelte diagnostics... svelte-check found 0 errors and 0 warnings ``` `bun run test`: ```text $ vitest run Test Files 149 passed (149) Tests 1016 passed (1016) Start at 17:44:02 Duration 67.90s (transform 44%, environment 21%, import 16%, tests 14%, setup 5%) ``` Production build output: `✓ built in 29.46s`; `Wrote site to "build"`. E2E output: ```text Task Trash title and Undo: PASS; six production screenshots saved in /home/kayg/Developer/calternal-wt/toastname-586/artifacts/task-delete-toast-586 ``` Local server build for E2E: `Finished `dev` profile [unoptimized + debuginfo] target(s) in 5m 11s`. ## Performance The perf VM lock could not be acquired, so I ran the extended Toast profile locally. Current host load was `8.03, 8.2, 10.6`; the initial #539 baseline host load was `38.09, 36.65, 36.99`. | Workload | Viewport | Baseline p50 / p95 | Current p50 / p95 | Baseline CPU / RSS | Current CPU / RSS | |---|---:|---:|---:|---:|---:| | Average, 15 toasts | 390 px | 17.0 / 118.5 ms | 21.2 / 40.2 ms | 63.0% / 454,299,648 B | 104.2% / 470,605,824 B | | Burst, 50 toasts | 390 px | 2,339.8 / 2,339.8 ms | 568.3 / 568.3 ms | 26.5% / 521,445,376 B | 50.2% / 534,556,672 B | | Average, 15 toasts | 1440 px | 37.6 / 126.8 ms | 34.3 / 43.5 ms | 70.0% / 535,625,728 B | 75.8% / 553,095,168 B | | Burst, 50 toasts | 1440 px | 1,012 / 1,012 ms | 389.7 / 389.7 ms | 76.5% / 612,655,104 B | 130.6% / 622,256,128 B | All current p95 samples are lower. RSS is 1.6–3.6% above baseline, below the 15% memory budget. CPU was higher in this local run; the baseline and current host loads differ, and the profile has no CPU regression budget. ## Decisions and gaps - DESIGN §31 defines standalone and inline Tasks but does not specify a Calendar Trash control. I added Trash to standalone Task previews and item menus; inline Tasks remain in their parent Note. - Empty title fallbacks are `Untitled`, `Untitled task`, `Untitled entry` and `Untitled event`. - No functional gaps found. No Rust source changed, so Rust lint/test gates were not run. `cargo build -p calternal-server` passed for the local E2E.
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#586
No description provided.