feat(webapp): delete an empty session, no two series sessions on one day, untitled sessions read "Session N" (#1156) #1162

Merged
claude-bot merged 12 commits from feat/1156-delete-empty-session-series-duplicates into main 2026-10-13 04:56:03 +00:00
Collaborator

Closes #1156 (D298, D299, D300).

  • Delete an empty session (D298). POST /api/sessions/{id}/delete, GM only, audited, tells nobody. "Empty" is decided in one place (session_deletion.not_empty_reason) and errs toward not empty: any content on the row, any row in any table that points at the session (read from the schema, so later tables count), any vote, or any notification about it. Otherwise 409: "Something has happened on this session, so it can only be cancelled, which tells the table." DELETE /sessions/{id} still cancels.
  • A deleted series occurrence stays gone (D299). New table session_series_skips (migration e5f6a7b8c9d1, after e1159a1b2c3d); the materialiser skips those dates and never makes a session on a day one of the series' sessions already stands on. The move form says when the target day is taken; the Sessions list shows "Also that day: Session 16".
  • Untitled sessions read "Session N" (D300) in emails, calendar items, Discord posts, search and exports, through one helper per side (session_label.display_title, sessionLabel).

No change to /api/bot/* shapes; no contract bump.

Verified

On docker-test: the new test_delete_empty_session.py (37), the series, sessions, scheduling, notifications, calendar, bot, reminder, email, attention, home, this-week, votes and search modules, and tests/wiki plus test_admin.py (1651 passed). Alembic upgrade, downgrade -1, upgrade on a scratch database (before the re-point onto e1159a1b2c3d; not re-run since). Ruff, changelog and version checks. Frontend lint and full vitest (4019 passed).

Not run: the new journey e2e/j8-delete-an-empty-session.spec.js, a full backend suite, and anything after merging main (one conflict in quest_archive.py, resolved by hand). No render check yet of the Manage menu, the delete dialog, the Move form and the Sessions list at phone width; to do before merging.

🤖 Generated with Claude Code

Closes #1156 (D298, D299, D300). - **Delete an empty session** (D298). `POST /api/sessions/{id}/delete`, GM only, audited, tells nobody. "Empty" is decided in one place (`session_deletion.not_empty_reason`) and errs toward not empty: any content on the row, any row in any table that points at the session (read from the schema, so later tables count), any vote, or any notification about it. Otherwise 409: "Something has happened on this session, so it can only be cancelled, which tells the table." `DELETE /sessions/{id}` still cancels. - **A deleted series occurrence stays gone** (D299). New table `session_series_skips` (migration `e5f6a7b8c9d1`, after `e1159a1b2c3d`); the materialiser skips those dates and never makes a session on a day one of the series' sessions already stands on. The move form says when the target day is taken; the Sessions list shows "Also that day: Session 16". - **Untitled sessions read "Session N"** (D300) in emails, calendar items, Discord posts, search and exports, through one helper per side (`session_label.display_title`, `sessionLabel`). No change to `/api/bot/*` shapes; no contract bump. ## Verified On `docker-test`: the new `test_delete_empty_session.py` (37), the series, sessions, scheduling, notifications, calendar, bot, reminder, email, attention, home, this-week, votes and search modules, and `tests/wiki` plus `test_admin.py` (1651 passed). Alembic upgrade, downgrade -1, upgrade on a scratch database (before the re-point onto `e1159a1b2c3d`; not re-run since). Ruff, changelog and version checks. Frontend lint and full vitest (4019 passed). Not run: the new journey `e2e/j8-delete-an-empty-session.spec.js`, a full backend suite, and anything after merging main (one conflict in `quest_archive.py`, resolved by hand). No render check yet of the Manage menu, the delete dialog, the Move form and the Sessions list at phone width; to do before merging. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge main into feat/1156: series skips now follow the end-time repair migration
Some checks failed
CI / Backend lint (ruff) (pull_request) Successful in 53s
CI / Bot/backend version sync (pull_request) Successful in 37s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m44s
CI / Feedback site tests (pull_request) Successful in 55s
CI / Does this change touch the recording path? (pull_request) Successful in 32s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot tests and audit (pull_request) Successful in 2m21s
CI / Docker image build (pull_request) Successful in 2m48s
CI / Frontend (shard 2/2) (pull_request) Successful in 11m12s
CI / Frontend (shard 1/2) (pull_request) Successful in 16m27s
CI / End-to-end journeys (keyboard) (pull_request) Failing after 16m28s
CI / End-to-end journeys (desktop) (pull_request) Successful in 16m34s
CI / End-to-end journeys (phone) (pull_request) Successful in 13m1s
CI / Backend migration, tests, and audit (pull_request) Has been cancelled
c6242bed69
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(e2e): J8 activates controls the way each project does (#1156)
All checks were successful
CI / Backend lint (ruff) (pull_request) Successful in 38s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m34s
CI / Bot/backend version sync (pull_request) Successful in 30s
CI / Feedback site tests (pull_request) Successful in 58s
CI / Does this change touch the recording path? (pull_request) Successful in 27s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot tests and audit (pull_request) Successful in 3m0s
CI / Docker image build (pull_request) Successful in 3m23s
CI / Frontend (shard 2/2) (pull_request) Successful in 9m59s
CI / Frontend (shard 1/2) (pull_request) Successful in 12m34s
CI / End-to-end journeys (desktop) (pull_request) Successful in 15m21s
CI / End-to-end journeys (phone) (pull_request) Successful in 15m23s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 16m53s
CI / Backend migration, tests, and audit (pull_request) Successful in 39m15s
4920632fbb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge main into feat/1156
Some checks failed
CI / Backend lint (ruff) (pull_request) Successful in 58s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m15s
CI / Bot/backend version sync (pull_request) Successful in 48s
CI / Feedback site tests (pull_request) Successful in 1m30s
CI / Does this change touch the recording path? (pull_request) Successful in 30s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot tests and audit (pull_request) Successful in 2m20s
CI / Docker image build (pull_request) Successful in 5m43s
CI / Frontend (shard 2/2) (pull_request) Successful in 10m7s
CI / End-to-end journeys (desktop) (pull_request) Failing after 3m33s
CI / Frontend (shard 1/2) (pull_request) Successful in 17m28s
CI / Backend migration, tests, and audit (pull_request) Has been cancelled
CI / End-to-end journeys (phone) (pull_request) Has been cancelled
CI / End-to-end journeys (keyboard) (pull_request) Has been cancelled
084ca420ba
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-bot scheduled this pull request to auto merge when all checks succeed 2026-10-13 03:49:25 +00:00
ci: re-run after the runner ran out of disk
All checks were successful
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m12s
CI / Does this change touch the recording path? (pull_request) Successful in 22s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot/backend version sync (pull_request) Successful in 44s
CI / Backend lint (ruff) (pull_request) Successful in 53s
CI / Feedback site tests (pull_request) Successful in 55s
CI / Bot tests and audit (pull_request) Successful in 2m24s
CI / Docker image build (pull_request) Successful in 5m7s
CI / Frontend (shard 2/2) (pull_request) Successful in 10m22s
CI / Frontend (shard 1/2) (pull_request) Successful in 19m0s
CI / End-to-end journeys (phone) (pull_request) Successful in 14m32s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 15m32s
CI / End-to-end journeys (desktop) (pull_request) Successful in 15m38s
CI / Backend migration, tests, and audit (pull_request) Successful in 45m49s
ca4074488d
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-bot deleted branch feat/1156-delete-empty-session-series-duplicates 2026-10-13 04:56:04 +00:00
Sign in to join this conversation.
No description provided.