Calendar: default Event calendar has no synced Settings choice #827

Open
opened 2026-10-02 13:20:43 +00:00 by kayg · 13 comments
Owner

Source finding from #427 on origin/dev c4a61e8cf090170f35b1bed3350d9de20c83ecd5. No product changes or rendered proof in this source-only review.

DESIGN §30 C14 requires future plans in the chosen CalDAV calendar, with a default calendar in Settings. §35 requires per-User synced preferences.

Evidence: apps/web/src/lib/composer/Composer.svelte:197 defines the browser key calternal.composer.calendar. Lines 659–670 load that key and fall back to the first calendar. Lines 684–690 save the choice only through userStorage, with the comment "A per-viewer convenience only." apps/web/src/lib/calendar/prefs.ts:36–42 defines the persisted Calendar preferences without a default-calendar ID. apps/web/src/routes/settings/calendars/CalendarsSection.svelte renders Calendar visibility and other preferences but no default Event calendar control.

Observed: A calendar choice in the Composer does not establish the decided per-User default. Another Installation can create a future Event in a different first-listed calendar.

Expected: Add one default writable-calendar choice to Calendar Settings and its shared preference contract. Use its stable ID for future Event creation. Keep a deliberate per-Event override. If the default becomes unavailable, require a valid choice with a plain explanation.

Test idea: Connect two writable calendars. Set the second as default, then create future plans on another Installation and after a cold reload. Check the provider calendar ID. Disable the default and test the recovery flow. Past or current creation must remain a Log entry.

Duplicate check: Searched all initial issue titles and the default-calendar body search. Read #40 and #179. #40 covers provider connection and caching; #179 covers date/time formatting. No specific synced default-calendar Settings ticket was found.

Source finding from #427 on origin/dev `c4a61e8cf090170f35b1bed3350d9de20c83ecd5`. No product changes or rendered proof in this source-only review. DESIGN §30 C14 requires future plans in the chosen CalDAV calendar, with a default calendar in Settings. §35 requires per-User synced preferences. Evidence: `apps/web/src/lib/composer/Composer.svelte:197` defines the browser key calternal.composer.calendar. Lines 659–670 load that key and fall back to the first calendar. Lines 684–690 save the choice only through userStorage, with the comment "A per-viewer convenience only." `apps/web/src/lib/calendar/prefs.ts:36–42` defines the persisted Calendar preferences without a default-calendar ID. `apps/web/src/routes/settings/calendars/CalendarsSection.svelte` renders Calendar visibility and other preferences but no default Event calendar control. Observed: A calendar choice in the Composer does not establish the decided per-User default. Another Installation can create a future Event in a different first-listed calendar. Expected: Add one default writable-calendar choice to Calendar Settings and its shared preference contract. Use its stable ID for future Event creation. Keep a deliberate per-Event override. If the default becomes unavailable, require a valid choice with a plain explanation. Test idea: Connect two writable calendars. Set the second as default, then create future plans on another Installation and after a cold reload. Check the provider calendar ID. Disable the default and test the recovery flow. Past or current creation must remain a Log entry. Duplicate check: Searched all initial issue titles and the default-calendar body search. Read #40 and #179. #40 covers provider connection and caching; #179 covers date/time formatting. No specific synced default-calendar Settings ticket was found.
Author
Owner

Starting #827 and #828 on branch job/gaps-827, based on dev at c4a61e8cf0. I am tracing the shared User settings, Event creation paths and Saved place Undo patterns before implementation.

Starting #827 and #828 on branch job/gaps-827, based on dev at c4a61e8cf090170f35b1bed3350d9de20c83ecd5. I am tracing the shared User settings, Event creation paths and Saved place Undo patterns before implementation.
Author
Owner

Finding: the synced CalendarPreferences type and GET/PUT contract in crates/plugins/calendar/src/items.rs have no default Event calendar field. POST /api/v1/calendar/events currently requires calendar_id, and the Composer stores its choice in calternal.composer.calendar in browser storage. The fix will add a server preference and resolve omitted IDs in the server API.

Finding: the synced CalendarPreferences type and GET/PUT contract in crates/plugins/calendar/src/items.rs have no default Event calendar field. POST /api/v1/calendar/events currently requires calendar_id, and the Composer stores its choice in calternal.composer.calendar in browser storage. The fix will add a server preference and resolve omitted IDs in the server API.
Author
Owner

Finding: Composer sent the first visible calendar as an explicit Event destination when /calendar/preferences failed to load. That could override a saved synced default during a temporary read failure. Composer now keeps the selection empty until the User chooses a calendar; the server still resolves omitted calendar_id requests from the synced setting. The regression suite covers the server resolution and the production browser flow.

Finding: Composer sent the first visible calendar as an explicit Event destination when `/calendar/preferences` failed to load. That could override a saved synced default during a temporary read failure. Composer now keeps the selection empty until the User chooses a calendar; the server still resolves omitted `calendar_id` requests from the synced setting. The regression suite covers the server resolution and the production browser flow.
Author
Owner

A source search found that copying a read-only subscribed Event still selected the first writable Calendar. That create path now reads the synced choice for its user-facing destination check and omits calendar_id on the write, so the server resolves the current default. The Calendar data regression test confirms that a delegated destination is omitted while an explicit per-Event override is preserved.

A source search found that copying a read-only subscribed Event still selected the first writable Calendar. That create path now reads the synced choice for its user-facing destination check and omits `calendar_id` on the write, so the server resolves the current default. The Calendar data regression test confirms that a delegated destination is omitted while an explicit per-Event override is preserved.
Author
Owner

Create-path review found that Composer loaded the synced default but still sent its ID as an explicit Event override. A stale preference read or a change from another Installation could therefore route an Event to an old Calendar. Composer now omits calendar_id unless the User deliberately picks an Event-specific override; the end-to-end flow checks both the request body and the provider destination.

Create-path review found that Composer loaded the synced default but still sent its ID as an explicit Event override. A stale preference read or a change from another Installation could therefore route an Event to an old Calendar. Composer now omits `calendar_id` unless the User deliberately picks an Event-specific override; the end-to-end flow checks both the request body and the provider destination.
Author
Owner

Implementation decisions where DESIGN is silent: Users with no stored default keep the existing first visible Calendar on an enabled account behavior. A saved default that is now hidden, disabled, or missing returns a clear 409 on delegated Event creation so the Event does not silently move elsewhere. An explicit calendar_id remains an Event-level override. Composer and subscribed-Event copy omit the destination when they follow the synced default, leaving the server authoritative at write time.

Implementation decisions where DESIGN is silent: Users with no stored default keep the existing first visible Calendar on an enabled account behavior. A saved default that is now hidden, disabled, or missing returns a clear 409 on delegated Event creation so the Event does not silently move elsewhere. An explicit `calendar_id` remains an Event-level override. Composer and subscribed-Event copy omit the destination when they follow the synced default, leaving the server authoritative at write time.
Author
Owner

Implemented and committed the #827 Calendar default Event destination slice on job/gaps-827.

Head: aefe09443caab758c15a6cf8ca08ecde89c3b176 (includes the single required merge from origin/dev). The feature commits are b0b0b6747 (synced default and create routing), 875b8cd6d (Saved place Undo), and bf4963f2f (shared User-flow and hot-path harness).

Built: a per-User default_event_calendar_id in Calendar preferences; server-side routing for creates without calendar_id; an existing Settings row for the choice; Composer default display with server delegation unless the User picks an Event override; and subscribed-Event copy routing. Added regression tests, the cross-issue production e2e script, adversarial probes, and a performance profile.

Files: crates/plugins/calendar/src/items.rs, crates/plugins/calendar/src/routes.rs, apps/web/src/lib/calendar/{data.ts,data.test.ts,prefs.ts,prefs.test.ts}, apps/web/src/lib/composer/Composer.svelte, apps/web/src/routes/calendar/[view]/[date]/+page.svelte, apps/web/src/routes/settings/calendars/CalendarsSection.svelte, apps/web/e2e/{harness.mjs,gaps-827-828.mjs}, apps/web/package.json, tests/adversarial/calendar_event_tags.mjs, tests/adversarial/{authz_matrix.py,xuser_matrix.py}, crates/calternal-server/src/location.rs, apps/web/src/lib/location/{location.svelte.ts,location.test.ts}, apps/web/src/routes/settings/account/LocationGroup.svelte, tests/adversarial/appearance_auto_scheme.mjs, and bench/gaps-827-828.mjs.

Gate output:

  • cargo fmt --check: exit 0, no output.
  • Focused web regressions:
    Test Files  3 passed (3)
         Tests  42 passed (42)
    
  • bun run check before generated OpenAPI artifacts:
    svelte-check found 16 errors and 0 warnings in 7 files
    error: script "check" exited with code 1
    
    The remaining diagnostics are generated-client mismatches for the new preference field, optional Event destination, and restore route.
  • cargo test -p calternal-plugin-calendar default_event_calendar_preference_round_trips did not finish. I stopped its cold dependency build at the four-hour job limit. Clippy, the complete Rust crate gates, server gates, and full bun run test are not run.

Known gaps: OpenAPI and TypeScript client generation is not committed; production build and the combined e2e are not run; no screenshots are attached; the adversarial round and performance profile are not run, and docs/perf/baseline.json has no measurement for this profile. cargo clean ran and apps/web/build is absent.

UX gaps closed: the Settings row has real loading/error recovery; normal Event creates delegate to the server's current default, while a deliberate Composer selection remains an override; Saved place removal uses optimistic state and restores the same identity and order. The e2e script covers keyboard, touch, all three widths, both themes, and macOS emulation, but that evidence is not yet run.

UX gaps left: visual review and screenshots, full keyboard/touch browser verification, restore failure/retry in a real browser, and all user-flow assertions remain unverified because production e2e did not run.

Decisions outside DESIGN: a User with no saved default uses the first visible Calendar on an enabled account. An unavailable saved default returns 409 on delegated creation rather than moving the Event elsewhere. Explicit calendar_id remains an Event override. These decisions are also recorded in the earlier issue comments.

Implemented and committed the #827 Calendar default Event destination slice on `job/gaps-827`. **Head:** `aefe09443caab758c15a6cf8ca08ecde89c3b176` (includes the single required merge from `origin/dev`). The feature commits are `b0b0b6747` (synced default and create routing), `875b8cd6d` (Saved place Undo), and `bf4963f2f` (shared User-flow and hot-path harness). **Built:** a per-User `default_event_calendar_id` in Calendar preferences; server-side routing for creates without `calendar_id`; an existing Settings row for the choice; Composer default display with server delegation unless the User picks an Event override; and subscribed-Event copy routing. Added regression tests, the cross-issue production e2e script, adversarial probes, and a performance profile. **Files:** `crates/plugins/calendar/src/items.rs`, `crates/plugins/calendar/src/routes.rs`, `apps/web/src/lib/calendar/{data.ts,data.test.ts,prefs.ts,prefs.test.ts}`, `apps/web/src/lib/composer/Composer.svelte`, `apps/web/src/routes/calendar/[view]/[date]/+page.svelte`, `apps/web/src/routes/settings/calendars/CalendarsSection.svelte`, `apps/web/e2e/{harness.mjs,gaps-827-828.mjs}`, `apps/web/package.json`, `tests/adversarial/calendar_event_tags.mjs`, `tests/adversarial/{authz_matrix.py,xuser_matrix.py}`, `crates/calternal-server/src/location.rs`, `apps/web/src/lib/location/{location.svelte.ts,location.test.ts}`, `apps/web/src/routes/settings/account/LocationGroup.svelte`, `tests/adversarial/appearance_auto_scheme.mjs`, and `bench/gaps-827-828.mjs`. **Gate output:** - `cargo fmt --check`: exit 0, no output. - Focused web regressions: ``` Test Files 3 passed (3) Tests 42 passed (42) ``` - `bun run check` before generated OpenAPI artifacts: ``` svelte-check found 16 errors and 0 warnings in 7 files error: script "check" exited with code 1 ``` The remaining diagnostics are generated-client mismatches for the new preference field, optional Event destination, and restore route. - `cargo test -p calternal-plugin-calendar default_event_calendar_preference_round_trips` did not finish. I stopped its cold dependency build at the four-hour job limit. Clippy, the complete Rust crate gates, server gates, and full `bun run test` are not run. **Known gaps:** OpenAPI and TypeScript client generation is not committed; production build and the combined e2e are not run; no screenshots are attached; the adversarial round and performance profile are not run, and `docs/perf/baseline.json` has no measurement for this profile. `cargo clean` ran and `apps/web/build` is absent. **UX gaps closed:** the Settings row has real loading/error recovery; normal Event creates delegate to the server's current default, while a deliberate Composer selection remains an override; Saved place removal uses optimistic state and restores the same identity and order. The e2e script covers keyboard, touch, all three widths, both themes, and macOS emulation, but that evidence is not yet run. **UX gaps left:** visual review and screenshots, full keyboard/touch browser verification, restore failure/retry in a real browser, and all user-flow assertions remain unverified because production e2e did not run. **Decisions outside DESIGN:** a User with no saved default uses the first visible Calendar on an enabled account. An unavailable saved default returns 409 on delegated creation rather than moving the Event elsewhere. Explicit `calendar_id` remains an Event override. These decisions are also recorded in the earlier issue comments.
Author
Owner

Follow-up documentation correction: the e2e now says Composer delegates the synced default to the server, matching the request body. Latest branch head is e1797072f43292cd1a0121e8ba74210177325146; the earlier report's other gate and completion status is unchanged.

Follow-up documentation correction: the e2e now says Composer delegates the synced default to the server, matching the request body. Latest branch head is `e1797072f43292cd1a0121e8ba74210177325146`; the earlier report's other gate and completion status is unchanged.
Author
Owner

Started the verification round on branch job/gaps-827. Base SHA: 440e19dce2. Current head: e1797072f4. I will merge current origin/dev once before final gates.

Started the verification round on branch job/gaps-827. Base SHA: 440e19dce23040ac8ebaae88f0469b6535b1afcb. Current head: e1797072f43292cd1a0121e8ba74210177325146. I will merge current origin/dev once before final gates.
Author
Owner

Finding during the #827 verification at merged head 088dc1663: cargo clippy -p calternal-plugin-calendar --all-targets -- -D warnings fails to compile. crates/plugins/calendar/src/items.rs:898 and :906 call private view::Failure::database; route tests around routes.rs:2590 cannot resolve CalendarState or resolve_event_calendar through their current module imports/visibility. This is a compiler failure before lint checks. I am tracing the module boundaries and will fix it before rerunning the crate gates.

Finding during the #827 verification at merged head 088dc1663: cargo clippy -p calternal-plugin-calendar --all-targets -- -D warnings fails to compile. crates/plugins/calendar/src/items.rs:898 and :906 call private view::Failure::database; route tests around routes.rs:2590 cannot resolve CalendarState or resolve_event_calendar through their current module imports/visibility. This is a compiler failure before lint checks. I am tracing the module boundaries and will fix it before rerunning the crate gates.
Author
Owner

Verification finding: bun run check failed with 16 errors and 0 warnings in 7 files. The CalendarPreferences web type omits default_event_calendar_id; the ApiPath union omits POST /api/v1/location/places/{id}/restore; and the Event POST body still requires calendar_id although #827 makes it optional. Errors are in prefs.ts, location.svelte.ts, data.ts, Composer.svelte, calendar page, CalendarsSection.svelte and prefs.test.ts. I am tracing the OpenAPI source and generated types before fixing.

Verification finding: bun run check failed with 16 errors and 0 warnings in 7 files. The CalendarPreferences web type omits default_event_calendar_id; the ApiPath union omits POST /api/v1/location/places/{id}/restore; and the Event POST body still requires calendar_id although #827 makes it optional. Errors are in prefs.ts, location.svelte.ts, data.ts, Composer.svelte, calendar page, CalendarsSection.svelte and prefs.test.ts. I am tracing the OpenAPI source and generated types before fixing.
Author
Owner

Status

Partial verification report. I stopped at the shared job's ~4-hour cap. No push or deploy was made. The worktree is clean.

Branch: job/gaps-827
Base: 440e19dce23040ac8ebaae88f0469b6535b1afcb
Head: 5b125885f82395b3a200ef109a80f897216244af

Built

The feature slices were already committed on this branch: a User-synced default Event calendar and an Undo action for a removed Saved place. This verification round added commit 5b125885f to fix Calendar test compilation: it makes the existing safe SQL failure mapper crate-visible and imports the Calendar state and resolver in the existing default-calendar test.

Files changed in the branch:

  • Web: apps/web/e2e/gaps-827-828.mjs, apps/web/e2e/harness.mjs, apps/web/package.json, apps/web/src/lib/calendar/data.ts, apps/web/src/lib/calendar/data.test.ts, apps/web/src/lib/calendar/prefs.ts, apps/web/src/lib/calendar/prefs.test.ts, apps/web/src/lib/composer/Composer.svelte, apps/web/src/lib/location/location.svelte.ts, apps/web/src/lib/location/location.test.ts, apps/web/src/routes/calendar/[view]/[date]/+page.svelte, apps/web/src/routes/settings/account/LocationGroup.svelte, apps/web/src/routes/settings/calendars/CalendarsSection.svelte.
  • Rust: crates/calternal-server/src/location.rs, crates/plugins/calendar/src/items.rs, crates/plugins/calendar/src/routes.rs, crates/plugins/calendar/src/view.rs.
  • Evidence and generated behavior: bench/gaps-827-828.mjs, tests/adversarial/appearance_auto_scheme.mjs, tests/adversarial/authz_matrix.py, tests/adversarial/calendar_event_tags.mjs, tests/adversarial/xuser_matrix.py.
  • docs/DESIGN.md changed in the requested merge from origin/dev.

Gate output

cargo fmt --check after the fix returned no output and exit code 0.

Focused Calendar regression test output:

Finished `test` profile [unoptimized + debuginfo] target(s) in 46m 40s
Running unittests src/lib.rs (/mnt/hdd/targets/jobs/gaps-827/debug/deps/calternal_plugin_calendar-a66e8b6f58fd0184)

running 1 test
test routes::tests::omitted_event_calendar_uses_synced_default ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 85 filtered out; finished in 20.64s

cargo clippy -p calternal-plugin-calendar --all-targets -- -D warnings was first blocked by the shared sccache daemon using another worktree's removed temp directory. With RUSTC_WRAPPER= it then found five compile errors before the fix. The focused test passed after the fix, but Clippy was not rerun before the time cap. Its pre-fix terminal output was:

error: could not compile `calternal-plugin-calendar` (lib test) due to 5 previous errors

bun run check output:

svelte-check found 16 errors and 0 warnings in 7 files
error: script "check" exited with code 1

The web errors show that generated API types are stale: CalendarPreferences lacks default_event_calendar_id, the generated paths omit POST /api/v1/location/places/{id}/restore, and Event creation still requires calendar_id. I did not regenerate contracts/openapi.json or packages/api-client/src/generated.ts.

UX gaps and known gaps

  • I did not run the focused Vitest files or the full crate tests.
  • I did not capture or attach the requested Settings-row and Undo-toast screenshots. The existing e2e script covers macOS emulation, 390/820/1440 px, both themes, pointer, keyboard and touch; it remains to be run against the production build.
  • The Calendar and Server Clippy/test gates remain incomplete after the compile fix. Web type checking remains red until the generated API contract is refreshed and checked.
  • No UX gap is declared closed in this verification round because the interactive e2e flow was not run.
  • cargo clean removed /mnt/hdd/targets/jobs/gaps-827; apps/web/.svelte-kit was removed. apps/web/build was absent.

Decisions

No new product decision was made. The code fix uses pub(crate) for the SQL mapper so sibling Calendar code can reuse the existing safe transient-error handling without exposing a public API. Product behavior continues to follow DESIGN §30, §35 and §47.

For the merge round

  1. Regenerate the server contract and typed client from the current server source. Run cargo run -p calternal-server -- openapi, bun run --cwd packages/api-client generate, python3 scripts/action_registry.py, then python3 scripts/parity_matrix.py. Confirm the generated contract includes the default Event calendar, optional calendar_id, and Saved place restore route.
  2. Run the remaining Rust gates with RUSTC_WRAPPER=, CARGO_PROFILE_DEV_DEBUG=line-tables-only, CARGO_INCREMENTAL=0, CARGO_BUILD_JOBS=4, and TMPDIR=$PWD/target/tmp: cargo clippy -p calternal-plugin-calendar --all-targets -- -D warnings, cargo test -p calternal-plugin-calendar, cargo clippy -p calternal-server --all-targets -- -D warnings, and cargo test -p calternal-server.
  3. Run bun run check from apps/web, then bunx vitest run src/lib/calendar/data.test.ts src/lib/calendar/prefs.test.ts src/lib/location/location.test.ts --maxWorkers=2 from apps/web.
  4. Build the production web app and run bun e2e/gaps-827-828.mjs from apps/web with CALTERNAL_SERVER_BIN=/mnt/hdd/targets/jobs/gaps-827/debug/calternal-server. It must prove the default Event calendar saves and reloads, Event creation uses it, Saved place Undo restores the same place and order by pointer/keyboard/touch, and capture all 12 macOS-emulated screenshots (three widths by two themes for both surfaces). Attach those screenshots to #827.
  5. The merge-round full web suite bun run test from apps/web must pass. Run bash tests/adversarial/run.sh against the real local server to prove the XUser, authz and hostile-input/concurrency matrices pass. These broader suites were not run in this job per the verification policy.
## Status Partial verification report. I stopped at the shared job's ~4-hour cap. No push or deploy was made. The worktree is clean. Branch: `job/gaps-827` Base: `440e19dce23040ac8ebaae88f0469b6535b1afcb` Head: `5b125885f82395b3a200ef109a80f897216244af` ## Built The feature slices were already committed on this branch: a User-synced default Event calendar and an Undo action for a removed Saved place. This verification round added commit `5b125885f` to fix Calendar test compilation: it makes the existing safe SQL failure mapper crate-visible and imports the Calendar state and resolver in the existing default-calendar test. Files changed in the branch: - Web: `apps/web/e2e/gaps-827-828.mjs`, `apps/web/e2e/harness.mjs`, `apps/web/package.json`, `apps/web/src/lib/calendar/data.ts`, `apps/web/src/lib/calendar/data.test.ts`, `apps/web/src/lib/calendar/prefs.ts`, `apps/web/src/lib/calendar/prefs.test.ts`, `apps/web/src/lib/composer/Composer.svelte`, `apps/web/src/lib/location/location.svelte.ts`, `apps/web/src/lib/location/location.test.ts`, `apps/web/src/routes/calendar/[view]/[date]/+page.svelte`, `apps/web/src/routes/settings/account/LocationGroup.svelte`, `apps/web/src/routes/settings/calendars/CalendarsSection.svelte`. - Rust: `crates/calternal-server/src/location.rs`, `crates/plugins/calendar/src/items.rs`, `crates/plugins/calendar/src/routes.rs`, `crates/plugins/calendar/src/view.rs`. - Evidence and generated behavior: `bench/gaps-827-828.mjs`, `tests/adversarial/appearance_auto_scheme.mjs`, `tests/adversarial/authz_matrix.py`, `tests/adversarial/calendar_event_tags.mjs`, `tests/adversarial/xuser_matrix.py`. - `docs/DESIGN.md` changed in the requested merge from `origin/dev`. ## Gate output `cargo fmt --check` after the fix returned no output and exit code `0`. Focused Calendar regression test output: ```text Finished `test` profile [unoptimized + debuginfo] target(s) in 46m 40s Running unittests src/lib.rs (/mnt/hdd/targets/jobs/gaps-827/debug/deps/calternal_plugin_calendar-a66e8b6f58fd0184) running 1 test test routes::tests::omitted_event_calendar_uses_synced_default ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 85 filtered out; finished in 20.64s ``` `cargo clippy -p calternal-plugin-calendar --all-targets -- -D warnings` was first blocked by the shared sccache daemon using another worktree's removed temp directory. With `RUSTC_WRAPPER=` it then found five compile errors before the fix. The focused test passed after the fix, but Clippy was not rerun before the time cap. Its pre-fix terminal output was: ```text error: could not compile `calternal-plugin-calendar` (lib test) due to 5 previous errors ``` `bun run check` output: ```text svelte-check found 16 errors and 0 warnings in 7 files error: script "check" exited with code 1 ``` The web errors show that generated API types are stale: `CalendarPreferences` lacks `default_event_calendar_id`, the generated paths omit `POST /api/v1/location/places/{id}/restore`, and Event creation still requires `calendar_id`. I did not regenerate `contracts/openapi.json` or `packages/api-client/src/generated.ts`. ## UX gaps and known gaps - I did not run the focused Vitest files or the full crate tests. - I did not capture or attach the requested Settings-row and Undo-toast screenshots. The existing e2e script covers macOS emulation, 390/820/1440 px, both themes, pointer, keyboard and touch; it remains to be run against the production build. - The Calendar and Server Clippy/test gates remain incomplete after the compile fix. Web type checking remains red until the generated API contract is refreshed and checked. - No UX gap is declared closed in this verification round because the interactive e2e flow was not run. - `cargo clean` removed `/mnt/hdd/targets/jobs/gaps-827`; `apps/web/.svelte-kit` was removed. `apps/web/build` was absent. ## Decisions No new product decision was made. The code fix uses `pub(crate)` for the SQL mapper so sibling Calendar code can reuse the existing safe transient-error handling without exposing a public API. Product behavior continues to follow DESIGN §30, §35 and §47. ## For the merge round 1. Regenerate the server contract and typed client from the current server source. Run `cargo run -p calternal-server -- openapi`, `bun run --cwd packages/api-client generate`, `python3 scripts/action_registry.py`, then `python3 scripts/parity_matrix.py`. Confirm the generated contract includes the default Event calendar, optional `calendar_id`, and Saved place restore route. 2. Run the remaining Rust gates with `RUSTC_WRAPPER=`, `CARGO_PROFILE_DEV_DEBUG=line-tables-only`, `CARGO_INCREMENTAL=0`, `CARGO_BUILD_JOBS=4`, and `TMPDIR=$PWD/target/tmp`: `cargo clippy -p calternal-plugin-calendar --all-targets -- -D warnings`, `cargo test -p calternal-plugin-calendar`, `cargo clippy -p calternal-server --all-targets -- -D warnings`, and `cargo test -p calternal-server`. 3. Run `bun run check` from `apps/web`, then `bunx vitest run src/lib/calendar/data.test.ts src/lib/calendar/prefs.test.ts src/lib/location/location.test.ts --maxWorkers=2` from `apps/web`. 4. Build the production web app and run `bun e2e/gaps-827-828.mjs` from `apps/web` with `CALTERNAL_SERVER_BIN=/mnt/hdd/targets/jobs/gaps-827/debug/calternal-server`. It must prove the default Event calendar saves and reloads, Event creation uses it, Saved place Undo restores the same place and order by pointer/keyboard/touch, and capture all 12 macOS-emulated screenshots (three widths by two themes for both surfaces). Attach those screenshots to #827. 5. The merge-round full web suite `bun run test` from `apps/web` must pass. Run `bash tests/adversarial/run.sh` against the real local server to prove the XUser, authz and hostile-input/concurrency matrices pass. These broader suites were not run in this job per the verification policy.
Author
Owner

Crate and web gates on job/gaps-827, run by Claude:

  • cargo fmt --check: exit 0
  • clippy -D warnings: calternal-server and calternal-plugin-calendar exit 0
  • cargo test -p calternal-plugin-calendar: test result: ok. 86 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.36s (+ 1, 3, 0 in the other binaries, all ok)
  • cargo test -p calternal-server — real failure, fails alone 2/2:
    thread 'location::tests::removed_saved_place_can_be_restored_at_its_previous_position' (2764625) panicked at crates/calternal-server/src/location.rs:1000:9:
    test result: FAILED. 107 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 7.72s
    
    Expected order [Home, Work, Gym after move], got [Home, Gym after move, Work]. Cause: restore_place inserts at index in the in-memory list, but calternal_location::PlacesDocument::rewrite (crates/calternal-location/src/lib.rs) keeps existing sections in place and appends every new place at the end of Places.md. So the restored place always goes last; the index is lost on write. The 201 response reports the place, but a reload shows the wrong order. Not fixed here: the fix belongs in the byte-preserving rewrite (insert the new section before the heading of the next kept place), which this branch does not own and which needs its own care for same-offset replacements (rename + insert). Needs a follow-up on this branch.
  • bun run check first run: COMPLETED 1989 FILES 16 ERRORS 0 WARNINGS 7 FILES_WITH_PROBLEMS — default_event_calendar_id, optional calendar_id and /api/v1/location/places/{id}/restore were missing from the generated client.
  • Fix: 691a2fb86 chore(api): regenerate contract and client for Calendar default and place restore (#827) (calternal-server openapi + bun run generate). Re-run: COMPLETED 1989 FILES 0 ERRORS 0 WARNINGS 0 FILES_WITH_PROBLEMS
  • bunx vitest run src/lib/calendar/data.test.ts src/lib/calendar/prefs.test.ts src/lib/location/location.test.ts --maxWorkers=2: Test Files 3 passed (3) / Tests 42 passed (42)

Not ready for the merge round until the Saved-place restore order is persisted (server test above).

Crate and web gates on `job/gaps-827`, run by Claude: - `cargo fmt --check`: exit 0 - clippy `-D warnings`: calternal-server and calternal-plugin-calendar exit 0 - `cargo test -p calternal-plugin-calendar`: `test result: ok. 86 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.36s` (+ 1, 3, 0 in the other binaries, all ok) - `cargo test -p calternal-server` — **real failure, fails alone 2/2**: ``` thread 'location::tests::removed_saved_place_can_be_restored_at_its_previous_position' (2764625) panicked at crates/calternal-server/src/location.rs:1000:9: test result: FAILED. 107 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 7.72s ``` Expected order `[Home, Work, Gym after move]`, got `[Home, Gym after move, Work]`. Cause: `restore_place` inserts at `index` in the in-memory list, but `calternal_location::PlacesDocument::rewrite` (crates/calternal-location/src/lib.rs) keeps existing sections in place and **appends** every new place at the end of `Places.md`. So the restored place always goes last; the index is lost on write. The 201 response reports the place, but a reload shows the wrong order. Not fixed here: the fix belongs in the byte-preserving `rewrite` (insert the new section before the heading of the next kept place), which this branch does not own and which needs its own care for same-offset replacements (rename + insert). Needs a follow-up on this branch. - `bun run check` first run: `COMPLETED 1989 FILES 16 ERRORS 0 WARNINGS 7 FILES_WITH_PROBLEMS` — `default_event_calendar_id`, optional `calendar_id` and `/api/v1/location/places/{id}/restore` were missing from the generated client. - Fix: 691a2fb86 `chore(api): regenerate contract and client for Calendar default and place restore (#827)` (`calternal-server openapi` + `bun run generate`). Re-run: `COMPLETED 1989 FILES 0 ERRORS 0 WARNINGS 0 FILES_WITH_PROBLEMS` - `bunx vitest run src/lib/calendar/data.test.ts src/lib/calendar/prefs.test.ts src/lib/location/location.test.ts --maxWorkers=2`: `Test Files 3 passed (3)` / `Tests 42 passed (42)` Not ready for the merge round until the Saved-place restore order is persisted (server test above).
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#827
No description provided.