Repository navigation
fix(memory): say when the lessons list could not be loaded - #35413
Conversation
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the "Lesson added, but the list could not be refreshed" state. The error-state screenshots also show a dismiss ✕ that HEAD does not render, so they show a different revision. Evidence gaps
Notes
[UX-REVIEWED] 4adb8f0 Description read[DESCRIPTION-READ] 62ac94712c650f49fcd8dc7fb52e42fca9e6f3620e65fad2c8ee16b38a788768 That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the fix catches the failed read where it happens, the newest-read rule stops a stale result from showing, and screenshots of this revision are attached. Notes
[DESIGN-REVIEWED] 4adb8f0 Description read[DESCRIPTION-READ] 0419719c328b8f936b958e86f054c5b1ae3ed2b7b4194a11dea95e4d0d3c9aea That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: every item traces to #35412 or to a race the new notice would otherwise create, and the delete/edit read sites (lines 382, 630) already handle their own failures. What this change shipsInventory (6 items) — 6 justifiedIntent: when the lessons list can't be read, the Memory tab should say so instead of claiming there are no lessons. FIX.
[FIRST-PRINCIPLES-REVIEWED] 4adb8f0 Description read[DESCRIPTION-READ] 6250e717aad863563715689686766d460c87bb21d0b8836a4716ece691161efa That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: ApproveWhy: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. Approve. If Core behaviour
The earlier blocking finding is fixed
Overlapping reads
An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
b462f69 to
2a0f08e
Compare
2a0f08e to
3a14d3f
Compare
3a14d3f to
4adb8f0
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approving. I read the MemoryTab.tsx hunk in full and the new test file. The locale hunks only add the two keys.
- A failed
GET /api/lessonsno longer leaves "No lessons yet" over lessons that may exist. The notice says which step failed (loadvsadd), and the empty state is withheld only while that error stands over an empty list. - The ordering guard is right.
showLessonscapturescurrent + 1, which is exactly the seq theloadLessonsit starts takes, so only the newest read may set the list or the notice. The test pins the slow-older-failure case. - Dropping the duplicate first read from the settings effect is safe, because the refresh effect already runs on mount.
- No regex, and no backend change.




Problem / Motivation
Goal: a lessons list that could not be read says so.
MemoryTab.tsxcalledloadLessons()with no catch on open, on refresh and after an Add. A failedGET /api/lessonsleftlessonsempty, so the card showed "No lessons yet" over lessons that may exist, and the rejection went unhandled. After a stored Add, a failed re-read cleared the draft and left the old list with no notice.Why it matters
"No lessons yet" tells the person their corrections are gone when only the read failed.
Not a goal
What changed (motivation → approach → change)
lessonsLoadErrornotice (ErrorNotice, no agent hand-off, like its neighbours) is titled "Could not load the lessons" for an open or refresh read, and "Lesson added, but the list could not be refreshed" after a stored Add. A later successful read clears it.en.manual.jsonand every catalog, plusen-XA.Backwards compatibility
Compatible: no API change; one fewer duplicate
GET /api/lessonson open.Tests
New
website/src/test/MemoryTabLessonsLoadError.test.tsx: a failed load shows the notice and not "No lessons yet"; a stored Add with a failed re-read says it was added; a later good read clears the notice; a slow older failure does not land over a newer good read; an open editor keeps its draft when a refresh then fails. The first three fail on main and pass here. All 8 test files that loadMemoryTabpass (167 tests), withsrc/i18n(style and parity tests vs main), tsc, eslint,i18n:checkand the restyle ratchet.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Rendered the real
MemoryTabin Chromium withGET /api/lessonsanswering 500: before, the Lessons card shows the empty state; after, the error notice. English and German.Screenshots / video
Before (en):
After (en):
Before (de):
After (de):
Related Issues
Fixes #35412
Sibling sweep
Swept: grep -n "loadLessons()" website/src/pages/overview/MemoryTab.tsx
Sibling: the delete and edit refreshes -- already handled. Open PRs #35348 and #35343 also edit this file on other lines (no line overlap, checked with git merge-tree).
Pattern harvest
Not generalizable: one list read without a catch.
Checklist