Skip to content

fix(desktop): keep a background review from touching a new course or a used roadmap - #284

Merged
gael55x merged 3 commits into
mainfrom
fix/background-review-guards
Nov 12, 2026
Merged

gael55x merged 3 commits into
mainfrom
fix/background-review-guards

Conversation

@gael55x

@gael55x gael55x commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #279, from a review after it merged.

Problems

  1. A review's save_roadmap makes its course active (core saveRoadmap, activate defaults to true). A learner who left a fresh roadmap untouched and researched a new course could have the old draft's review save afterwards and make the old course active again. The new research then failed its done check or showed the old roadmap.
  2. When a review's agent survived its cancel, only the first edit was refused. The review had already left running, so the next edit or Approve saved, and the agent could still overwrite an approved course.
  3. The draft is readable as soon as research saves it, before the review starts. An edit or Approve in that window let the review start afterwards and save over it, or change an approved course.

Fixes

  • Starting research for a new course stops every running review first and waits until its agent is gone.
  • saveConcepts remembers courses whose review couldn't be stopped and refuses every later save of them.
  • A review starts only on the draft research just wrote, if the learner hasn't edited or approved it and it is still the active draft.
  • Desktop DESIGN §4.9 and the handoff note say so.

Verified

  • Each problem has a test that failed first: a new research stops the last review and stays the draft; no review after an edit or Approve in that window; the second edit and Approve also refused.
  • npm run typecheck and the full desktop suite in desktop/: 1112 passed, 11 skipped.

…a used roadmap

A review's save makes its course active, so researching a new course
now stops the last draft's review first. No review starts once the
learner has edited or approved the draft, and once a review's agent
survives its cancel every later edit and Approve is refused, not just
the first.
…ong as before the background review

The mock finished research after two reads once the review moved to the
background, so the accessibility e2e sometimes missed the research screen
on a slow runner.
@gael55x
gael55x merged commit 68b380d into main Nov 12, 2026
7 checks passed
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.

2 participants