Calendar Activity shows Note/Task files as raw text-card thumbnails (frontmatter visible) #662

Open
opened 2026-10-02 04:33:23 +00:00 by kayg · 5 comments
Owner

Owner report (2026-10-02)

"I opened the task note and it became AN ACTUAL NOTE in the calendar!" The Calendar time grid now shows the Task note "Pay Electricity Bill" at 09:47 as a file thumbnail: a text card rendering the raw file, including the frontmatter (calternal-id: 46b85435…, title: …, status: todo, created: 2026-10-02, [ ] Pay Electricity Bill).

Cause chain

  1. Opening the note wrote it (#661), so its mtime moved to 09:47.
  2. The Calendar Activity lane (#589) shows "files changed at this time", and it treats a Markdown Note/Task file like any other file. It renders the generic text-card thumbnail, which prints raw frontmatter.

Expected

  • Notes, Tasks, Daily notes and plugin-owned Markdown never appear as file Activity. They already have their own Calendar representation: a Task item, a Journal/Log entry, or a note mention. Use the owned-paths registry (#606) and the Notes/Tasks index to exclude them.
  • If DESIGN wants "notes edited today" on the Calendar at all, show them as a note item (title, icon, opens the note), never as a file thumbnail.
  • Text-card thumbnails never render YAML frontmatter. Strip it everywhere text cards are made (Files grid, Calendar, search previews, Quick Look). This touches the thumbnail render kinds from #510.

Tests

e2e: create and edit a Task note and a plain note, open Calendar; assert no file Activity item exists for them and the Task item shows once. Unit test: a text-card thumbnail of a Markdown file with frontmatter contains no frontmatter keys.

## Owner report (2026-10-02) "I opened the task note and it became AN ACTUAL NOTE in the calendar!" The Calendar time grid now shows the Task note "Pay Electricity Bill" at 09:47 as a **file thumbnail**: a text card rendering the raw file, including the frontmatter (`calternal-id: 46b85435…`, `title: …`, `status: todo`, `created: 2026-10-02`, `[ ] Pay Electricity Bill`). ## Cause chain 1. Opening the note wrote it (#661), so its mtime moved to 09:47. 2. The Calendar Activity lane (#589) shows "files changed at this time", and it treats a Markdown Note/Task file like any other file. It renders the generic text-card thumbnail, which prints raw frontmatter. ## Expected - **Notes, Tasks, Daily notes and plugin-owned Markdown never appear as file Activity.** They already have their own Calendar representation: a Task item, a Journal/Log entry, or a note mention. Use the owned-paths registry (#606) and the Notes/Tasks index to exclude them. - If DESIGN wants "notes edited today" on the Calendar at all, show them as a **note item** (title, icon, opens the note), never as a file thumbnail. - **Text-card thumbnails never render YAML frontmatter.** Strip it everywhere text cards are made (Files grid, Calendar, search previews, Quick Look). This touches the thumbnail render kinds from #510. ## Tests e2e: create and edit a Task note and a plain note, open Calendar; assert no file Activity item exists for them and the Task item shows once. Unit test: a text-card thumbnail of a Markdown file with frontmatter contains no frontmatter keys.
Author
Owner

Starting #662 work on branch job/calimg-589. Base SHA: 3f258302a0. I will trace the Notes/Tasks indexes and existing owned-path registry, then add regression coverage for Activity exclusion and frontmatter-free text cards.

Starting #662 work on branch job/calimg-589. Base SHA: 3f258302a0f2d6418ff60c9ce22cbb33e008ca99. I will trace the Notes/Tasks indexes and existing owned-path registry, then add regression coverage for Activity exclusion and frontmatter-free text cards.
Author
Owner

Initial code finding: Calendar item SQL reads all visible rows, and projection excludes a Daily note only after the join; a Task or plugin-owned Markdown file can therefore become a generic file item. sends the first 8 KiB directly to the text-card line parser, so a YAML frontmatter block reaches the thumbnail. I am tracing the Notes/Tasks classifications and plugin path declarations to apply the existing ownership source and add regression coverage.

Initial code finding: Calendar item SQL reads all visible rows, and projection excludes a Daily note only after the join; a Task or plugin-owned Markdown file can therefore become a generic file item. sends the first 8 KiB directly to the text-card line parser, so a YAML frontmatter block reaches the thumbnail. I am tracing the Notes/Tasks classifications and plugin path declarations to apply the existing ownership source and add regression coverage.
Author
Owner

Finding for #662: origin/dev at c4a61e8c does not include the OwnedPathRegistry change from #606, so Calendar could not consume the registry named in this issue. I am adding the small shared registry contract and the declared System, Notes/Tasks, Money and Photos paths, then passing it to Calendar. Calendar will filter only Markdown under declared paths, while Photos media remains visible. Task Markdown is also excluded by the Notes task_items index.

Finding for #662: origin/dev at c4a61e8c does not include the OwnedPathRegistry change from #606, so Calendar could not consume the registry named in this issue. I am adding the small shared registry contract and the declared System, Notes/Tasks, Money and Photos paths, then passing it to Calendar. Calendar will filter only Markdown under declared paths, while Photos media remains visible. Task Markdown is also excluded by the Notes task_items index.
Author
Owner

#662 is implemented on head 421dd6373. Calendar uses the shared Plugin-owned path registry and Notes/Tasks indexes to keep Task source Markdown, Daily notes and declared Plugin Markdown out of generic file Activity. Notes stay typed. The shared text-card renderer strips YAML frontmatter, including an incomplete opening block at the 8 KiB read limit. The real-server E2E passed for an edited Task, an edited Note and Markdown under Money. Files tests passed (148 passed, 1 ignored); Calendar tests passed (84 unit, 1 cache and 3 protocol); the Notes suite has one unrelated router-context failure (166 passed, 1 failed, 404 vs expected 200), reported without changing its expectation. Full gates and the finding are in the #589 final report. This issue remains open.

#662 is implemented on head `421dd6373`. Calendar uses the shared Plugin-owned path registry and Notes/Tasks indexes to keep Task source Markdown, Daily notes and declared Plugin Markdown out of generic file Activity. Notes stay typed. The shared text-card renderer strips YAML frontmatter, including an incomplete opening block at the 8 KiB read limit. The real-server E2E passed for an edited Task, an edited Note and Markdown under Money. Files tests passed (148 passed, 1 ignored); Calendar tests passed (84 unit, 1 cache and 3 protocol); the Notes suite has one unrelated router-context failure (166 passed, 1 failed, 404 vs expected 200), reported without changing its expectation. Full gates and the finding are in the #589 final report. This issue remains open.
Author
Owner

Independent review of b45b1f1d7 found a shared Task visibility gap in the new Activity exclusion. crates/plugins/calendar/src/items.rs:565 excludes Task files for every owner in the Activity query. The Task day query at crates/plugins/notes/src/tasks_api.rs:715 is scoped to the current User. The Activity query includes authorized Share roots, so a recipient's shared Task now appears in neither projection. DESIGN §54 says recipients can read shared items through every surface. Add authorized shared Tasks to the typed Calendar projection before excluding their source paths from generic Activity, and add a two-User Share test.

Independent review of `b45b1f1d7` found a shared Task visibility gap in the new Activity exclusion. `crates/plugins/calendar/src/items.rs:565` excludes Task files for every owner in the Activity query. The Task day query at `crates/plugins/notes/src/tasks_api.rs:715` is scoped to the current User. The Activity query includes authorized Share roots, so a recipient's shared Task now appears in neither projection. DESIGN §54 says recipients can read shared items through every surface. Add authorized shared Tasks to the typed Calendar projection before excluding their source paths from generic Activity, and add a two-User Share test.
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#662
No description provided.