Skip to content

Event change history (spec 010) - #24

Merged
Wjouter merged 5 commits into
mainfrom
010-event-change-history
Nov 12, 2026
Merged

Wjouter merged 5 commits into
mainfrom
010-event-change-history

Conversation

@Wjouter

@Wjouter Wjouter commented Nov 12, 2026

Copy link
Copy Markdown
Owner

What

Every change in the feed now opens the full history of its lesson.

  • Feed: the corner shows when a change was found ("3 hours ago", an exact date after 24 h); each change is a link.
  • Card and page: a plain click opens a card over the feed (shallow routing, native <dialog>; Esc, close, backdrop and Back each step back once and return focus). Reload, Ctrl/middle-click or "Open as page" gives the full page at /changes/{id}.
  • History view: current or last known details, every kept change newest first with before → after values, a "Show all" toggle for changes hidden by filters (?all=0|1 survives reload), a 20-entry cap on the card, history-start and retention notes. English and Dutch.
  • API: GET /api/me/changes/{id}/history. A missing change and a change on a timetable you don't follow give the same 404.
  • Migration 006: index (calendar_id, event_key, id) and calendar.baseline_at, set when a link creates the calendar and on a features re-baseline.
  • Long lists: holidays list every room and class; the summary keeps the first 3 items and "and N more", the full lists sit under More details.

Why

Students could see that a lesson changed, but not what happened to it before. Spec, plan and research are in specs/010-event-change-history/.

Testing

  • Backend: 481 passed, 6 skipped (6 new HistoryTests; OwnershipTests has the new route).
  • Frontend: 174 vitest tests, svelte-check 0 errors, production build OK.
  • Manual walkthrough (quickstart.md steps 1–20) passed; notes at the end of quickstart.md.

For the reviewer

  • Step 20 (speed) ran on dev data with one lesson grown to 101 rows (page 44–67 ms, index used, 0.19 ms), plus an index check with 100 000 rows. Not measured on a whole-school database.
  • The "Show all" toggle also shows when nothing in the lesson is hidden; that follows research R7 but could be hidden later.
  • Long before/after values in change entries are not shortened yet.

🤖 Generated with Claude Code

Wjouter and others added 5 commits November 11, 2026 23:48
Spec (with clarifications and design-review decisions), plan, research
R1–R12, data model, API and page contracts, and quickstart for issue #23:
found time in the feed, a history card over the feed and a full history
page per lesson, with the filter toggle, the 20-entry card cap and the
calendar-style current details.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add tasks.md for event change history.
- Drop the dark theme from FR-019: the app has a light theme only.
- Add opensCard() with a vitest case per condition, so the card/navigate
  click rule has an automated check (constitution workflow rule).
- Move hidden-row filtering into US2 (T014a, T019); the card cap counts
  after the filter (FR-009a).
- FR-011: history-start note when the oldest kept entry is not "new",
  judged over all kept entries; tested once in historyView.
- FR-016: identical "not found" applies to signed-in students; signed-out
  visitors are sent to sign-in for every id.
- SC-003: quickstart and T034 record API and page load time for a
  100-row lesson; T005 checks all 100 rows come back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each feed change opens the full history of its lesson: a card over the
feed on a plain click, or the /changes/{id} page on reload or a new tab.

- GET /api/me/changes/{id}/history with current or last known details,
  history start and retention; same 404 for missing and not followed
- migration 006: history index and calendar.baseline_at, set on add and
  on a re-baseline
- feed shows when each change was found and links to its history
- "Show all" toggle, 20-entry cap on the card, en and nl texts

T034 (manual walkthrough) stays open: a few steps were not run by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Holidays list every room and class, which made the current details
block very long. The summary now keeps the first 3 items and "and N
more"; the full lists move to More details.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Steps 3, 7, 8, 15, 16 and 20 run on real check data; step 20 on dev
data with one lesson grown to 101 rows, not whole-school size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Wjouter
Wjouter merged commit 2e42a94 into main Nov 12, 2026
6 checks passed
@Wjouter Wjouter linked an issue Nov 12, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend: UX redesign following reference screenshots

1 participant