Translate only an actual active-SHA uniqueness conflict into a safe 409 response. Preserve both records and their bytes so restoring the earlier entry can be retried after deleting the replacement; unrelated database failures still propagate.
AI-assisted: implemented and validated with OpenAI Codex; isolated API and real SQLite constraints, no user workspace writes.
Persist a structured selection_source beside the assistant prompt, and use
the legacy sidebar prompt's containing message, role and selection to
disambiguate repeated text. Scan every user message for a quote, refuse to
guess between several, and make the backfill conditional so a concurrent move
or detach wins.
Serialize PocketBase preference merges with a lock that spans event loops,
not one asyncio lock per loop, and validate client-supplied anchors on turns
and organization updates. Detach threads when the message they point at is
deleted.
quoted_message_id now follows the create_target rule: the key's presence
is authoritative. A value moves the thread, an explicit null clears it,
and omitting the key leaves the stored anchor untouched. A new selection
moves the thread to the passage just asked about.
The message-level popover gains a detach action that clears the anchor
through the organization PATCH without deleting the conversation, and a
deliberate clear also stops the legacy backfill from re-attaching it.
Threads created before the attribution existed kept only the passage:
selection threads store it in tutor_selected_text, newer side chats as a
quote attachment. Match that passage against the parent transcript with
the Markdown projection selection grounding uses, and record the source
only when exactly one message contains it.
The scan is recorded per thread and runs when the thread list is read,
so it happens once; touch=false keeps the thread's place in the list.
The lazy router index and pip --report plan.json are written as UTF-8,
but were read with the locale default; build_router_index.py now writes
UTF-8 explicitly so the read and write sides share one contract.
After each reply the chat composer shows a predicted next line as its
placeholder, and Tab accepts it. When the assistant has just asked a
question, such as a quiz in chat, the likeliest next line is the answer,
so the hint gives it away. There was no way to turn it off.
Add an `ask_hint_enabled` switch to the per-user starter settings
(Settings -> Conversation -> Composer), on by default. When it is off,
`get_ask_hint` returns an empty hint before reading the session or the
cache, so no LLM call is made and no line cached while it was on leaks
through.
A PUT that omits the field keeps the stored value, so an older client or
a settings draft saved before this change cannot turn the hint back on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Editing a persisted message and resending a saved failed turn both replayed
the failed turn's saved request verbatim, so the new turn silently ran on
the previous model and the previous reply language.
- An edit keeps the original request's context (attachments, references,
parent, capability, tools, config) but takes the model and the reply
language from the current session state (#2106).
- A Resend of a saved failed turn sends the current model and reply
language in the regenerate overrides. The backend already prefers those
over the saved snapshot, and the recovered model is now written back to
the conversation, so the choice survives a reload (#2105).
- An unconfirmed submission is still retried with its own parameters: the
server may already hold that submission id, and a changed request would
no longer match it.
A failed GET /api/settings left Appearance on "system". Applying any
later UI change wrote that placeholder and replaced an explicit local
palette.
Seed the form from the stored preference, and omit theme from Apply
until the server has confirmed one.
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.
Add a tab-separated Anki import from a note page and from the review
queue so learners can File -> Import cards into a deck named after the
note. Re-importing uses stable card GUIDs and does not include review
scheduling.
Download one calendar or every visible calendar as an RFC 5545 .ics file,
including recurring series, occurrence exceptions, reminders, and a rail
action that fetches the file through the existing authenticated API.
content_disposition neutralized quotes and backslashes in the ASCII
filename= fallback but left C0 control characters untouched. A filename
containing CR/LF produced a header value with a raw newline — a malformed
header / response-splitting shape that the ASGI server rejects (500). Strip
control chars like the sibling partners.helpers.safe_filename already does.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
The Image description model dropdown filters /api/settings/llm-options on
supports_vision, but the endpoint only emitted declared_vision, which no
frontend code reads, so the list was always empty.
Emit supports_vision per model, preferring the catalog's own capability
declaration and falling back to supports_vision(provider, model) for the
provider/MODEL_OVERRIDES defaults. The declaration has to win here: the
process-global override table only refreshes on the next runtime
resolution, so reading it alone left a freshly declared model hidden in a
newly started process -- the same asymmetry the issue reports. This is the
rule lightrag/roles.py already applies.
Signed-off-by: cgycorey <cgycorey@users.noreply.github.com>