An endpoint that makes optional properties required forces the model to
send visual even for a text card, with every source left blank.
prepare_visual always rejects an unnamed source, so mastery_quiz failed
on every call and no answer card appeared (#2427).
Treat a visual whose sources name no knowledge base, asset, path, hash
or figure as absent, for single cards and group leaves, as #2170 does
for blank resume ids and empty groups. A visual naming any source still
goes through prepare_visual unchanged.
search() and linked_objects() fed the caller's text straight into a LIKE
pattern without an ESCAPE clause, so "%" matched every object, "_" matched
every object with a character, and linked_objects("100%") also linked the
object that stores 1000.
Escape the value once and declare ESCAPE '\' on every clause, matching
the other LIKE call sites in the repository.
Signed-off-by: Eapp1e <163811520+Eapp1e@users.noreply.github.com>
The web client restates answer_by on every turn and sends "" when Dito
answers (sideChatTurnConfig, QuizFollowupContext). TurnRequest only
accepted an omitted value or partner:/subagent:, so every Dito side chat
failed with "Command does not match the turn protocol."
Read a blank value as None. The field stays in fields_set, so
to_payload() still carries it and the stored hand-off is cleared as the
client intends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first visit stored the detected palette and never listened for
prefers-color-scheme changes, so the theme stopped tracking the OS and
Settings had no System choice.
Do not write that fallback. Subscribe while the preference is missing or
"system", and add a System option in Appearance. New accounts default to
system so Apply does not freeze the snow palette.
Keep learner-facing explanations visible across finish checks, persistence, and replay. Remove mastery prose heuristics and prioritize learner objections.
Coordinate service shutdown and descendant cleanup, and preserve video lesson identity and playable results across chat completion and reload.
Remove course pages, APIs and the course_study capability. Add anchored note
threads and reviewed learning-block generation, queued and withdrawable chat
messages, quote attachments, side chats, and the calendar/favorites/navigation
updates.
Keep preview's existing backend architecture. Wire the new features through
its Python application and existing chat engine, retain legacy selected-text
requests, persist mid-turn messages in replay, and restore note context when
regenerating. Leave stored user data intact.
Validate frontend contracts, dependency boundaries, types, 1290 node tests,
840 rendered tests, lint, localization and the production build. Exercise
session/notes/API regressions, 53 chat-engine tests and 20 Python/native
integration tests with isolated runtime data.
A provider that normalises optional properties into required ones leaves the
model no way to leave a field out, so a preview arrived with `preview_id: 0`,
`module_order: []`, `module_id: ""` and empty edit arrays beside the edits it
did intend. Every one of those was read as a real instruction: the preview
answered "Use preview_id only with action commit." before planning, an empty
`module_order` asked for a reorder no path can satisfy, and a commit carrying
blank edit fields was refused for edits it never made. A blank `action` hit the
same wall from the other side.
Read the revision arguments as omission at the tool boundary, one level deep —
a nested `prerequisite_ids: []` still clears a relationship — and read a blank
`action` as the omitted action, which is the documented direct-revision path.
An empty `module_order` now means "keep the order unchanged": no path can
satisfy an empty order, and this replaces the earlier refusal of `[]` alone,
which a required-field provider sends on every content-only preview. Advertise
`null` plus a minimum of 1 for `preview_id`, so a strict provider has a genuine
absence value instead of a placeholder.
Five new regressions in tests/capabilities/test_mastery_reviewed_revision.py
went red first. A 19-case adversarial matrix over both branches loosens only
the placeholder forms: commit with real edits or a real order, a stray positive
preview id, an unknown action and blank entries nested inside `modules` are
refused identically before and after. 29 pass in the file; 1733 across the
capabilities, learning, tools and agentic-guard suites.
SolvePlanTool always replaced the session's plan, so calling it again
wiped finished steps and skipped the max_replans gate, which only
solve_replan consults. Once a turn has a plan, solve_plan now returns
plan_exists with the current progress and points the model at
solve_replan; the session is left untouched.
Closes#2015
The card can show the options in a different order than the tutor
registered them, so the bare letter in the "(they answered "D")" seed
pointed at a different option in the tutor's context than on the
learner's screen.
build_grade_result now carries the picked option's text as learner_body,
and the loop's grade seed appends it to the letter.