Model configuration was one layer replicated seven times: every service
stored its own profile with its own credentials, so a single OpenRouter
key had to be pasted into five separate pages. This release splits that
in two — a **connection** holds one vendor credential and links it down
to every service that vendor can serve, and a **task model** takes the
calls nobody asks for (naming a conversation, writing the composer's
starting points) off the model picked for actual reasoning. Both are
opt-in; existing per-service profiles resolve exactly as before.
Around that: Settings drops the card grid for a persistent searchable
navigator whose landing page answers "what state am I in" instead of
repeating the directory; Mastery Path files study conversations under
their topic and opens them in the tutor rather than dropping them on
/home; the sidebar folds features into More and reorders by drag; the
reading companion is rebuilt from /home's own chat components; and the
LightRAG engine talks to the SDK directly, so its extra no longer drags
MinerU in transitively.
Also back-merges PR #1041 (Anthropic SDK 1.x temperature via extra_body)
and PR #741 (owner-only auth secret/token files), which had been merged
straight into main and never flowed back to dev.
Release notes: assets/releases/ver1-6-1.md
Gates: pre-commit 15/15, ruff clean, pytest 5802 passed, web 450 node
tests, eslint 0 errors, docs build clean.
The Mastery Path sidebar, composer and progress ring, in four changes.
Study conversations are filed under their topic. They were already ordinary
chat sessions carrying `mastery_path_id`, so the sidebar had everything it
needed and used none of it: they sat loose among the recents, and a click
opened them on /home, which drops the outline, the waypoint header and the
tutor's own composer. `lib/mastery-session.ts` answers both questions in one
place, because a sidebar that files a conversation under a heading and then
navigates somewhere else is worse than one that does neither. Grouped
conversations are exempt from the eight-row cut on recents: a heading that
says "4" while listing two of them is worse than a slightly longer list.
The composer placeholder is written by the task model. "Ask your tutor about
X" was the third appearance of that waypoint on screen and proposed nothing,
and a learner who is stuck is stuck on what to ask. So it offers one question
the tutor's last message did not already answer, and Tab takes it. It is a
question and never an answer -- on a mastery path the learner produces the
understanding, so anything not ending in a question mark is dropped. Nothing
waits on the call: the static placeholder stands until a hint arrives, and a
failure just leaves it standing.
`/topics/index` exists because the sidebar refreshes on every stream end and
`/topics` answers with each path's whole knowledge map and source excerpts.
It is declared above `/topics/{path_id}`, which matches any single segment.
The connected-agent and persona chips reach every surface sharing the
composer. StandaloneComposer already filtered subagents out of the knowledge
picker, commented "they are their own composer control" -- and then never
mounted that control, so a connected agent was unreachable from Mastery Path,
Immersive Reading and quiz follow-ups alike. Owning the split once lifts all
three, and keeps them on the same composer the chat page renders.
The progress ring stops competing with the card it sits on. A bare "7" is an
id or a step number, not a measurement; `--primary` is what buttons and links
are, and the card is itself one; and a 2.5px round cap at low percentages
reads as a stuck spinner. Ink hairline, a real unit, and `--primary` kept for
the one moment it means something.
Course becomes the container the other learning surfaces hang off, rather
than a dashboard that could only read them:
- the composer carries (and can change) which course a conversation
belongs to, so Course Study is reachable without leaving chat
- a conversation inherits the course's mode, persona and knowledge bases
- course conventions reach every course-bound turn, in every mode
- Mastery Path and Immersive Reading read ?course=, scope to it, and
attach what is built there
- hand-off refs are validated against the subsystem that owns them
- the sidebar groups conversations by course
A course held the right model — the syllabus that gives progress a
denominator, resources as references, conventions apart from the
assistant's own notes — but almost nothing crossed the edges between it
and the surfaces it was supposed to contain.
Getting in. Course Study was offered in the composer's mode menu while
the only way to bind a course was a link on the course page, so choosing
it there produced a conversation identical to an inert one, and the mode
advised pressing a button that did not exist. The composer now carries
the binding next to the mode: shown whenever there is one, and offered
as an unfinished field in Course Study when there is not. `_course_id`
rides every turn, so detaching detaches and the pill can never drift
from what the turn actually saw.
What a conversation inherits. `default_capability` and `default_persona`
were stored, validated and returned by the API while changing nothing:
`_apply_course_defaults` only fills fields a payload *omits*, and this
composer always sent all of them. They are applied client-side now,
along with the course's knowledge bases, where the learner can watch the
mode and material become the course's before they type. The dialog grows
the editor they never had.
Conventions. "Every conversation in this course starts knowing these" was
true only if the model happened to call `course_overview`. They ride in
the per-turn summary now, and — because the promise is not scoped to one
mode — in the system prompt of any course-bound turn.
Coming back. Mastery Path and Immersive Reading now read `?course=`,
scope themselves to it, and attach whatever is built there; the tiles and
hand-offs pass it; the picker offers to start one. A course could only
ever reference what already existed, so filling a new one meant leaving,
building, and remembering to return.
Hand-offs. A target with no ref stored an opening line for an index that
never consumes it, which then surfaced weeks later in an unrelated path.
An unresolvable ref was passed straight through: observed live, a
syllabus unit id ("u2") sent as a mastery path, producing a card pointing
at a page that does not exist. Refs are checked against the subsystem
that owns them — existence, not membership, since a path built outside
this course routes perfectly well.
Also: the sidebar groups conversations by course, so filing them is
finally readable; a course-scoped notebook console no longer shows
another course's notes beside a list saying there are none (the clear
raced an in-flight detail fetch that landed after it); a hand-off the
model also printed as prose is not rendered twice; a provider error is no
longer stored as a conversation's permanent title; `/space/courses` goes,
having been an unreferenced copy of `/courses`; and the Visualize mode
description gets its missing Chinese.
Promotes the three multi-leaf settings categories (Models, Chat,
Partners & Agents) to a continuously-scrolling page each, Feishu-style:
the category itself becomes a top-level nav row and its leaves become
a collapsible sub-list whose links are same-page anchors instead of
separate routes, so switching between them scrolls instead of
remounting. The category root pages (models/chat/agents) now render
every leaf stacked via a new CategoryScroll component with rect-based
scrollspy (no IntersectionObserver, per prior findings that it does
not reliably fire in this app's render surfaces).
Three things from a look at the new model pages.
The next section's rule was drawn on top of the cards: the grid and the
panels below it were siblings, so the container's spacing never applied
between them.
Cards that open now look like it — a chevron in the lower right that
shifts on hover, a border and tint that lift, a press that registers.
They read as panels that happened to be clickable, which is the same as
not clickable. Search cards draw no chevron, because they have no models
to open into, so the two kinds are told apart before you click.
And the task model was wrong twice over. It asked which model should
name conversations and which should write the starting points, as if
anyone would answer those differently — both are short, frequent, and
want the same small fast model. It is one setting now. It also asked for
that model through a flat dropdown, when it is the same kind of thing as
the LLM and deserves the same shape: the catalog carries a `task`
service, so the whole provider/model editor applies to it unchanged, and
a provider already set up for chat can be brought over instead of typed
again. Empty stays the default and the common case — both calls then
resolve the LLM exactly as before, and the page says so and shows which
model that currently is.
Two tests stopped hardcoding the list of services and derive it, so the
next one to be added needs only its own test written.
A model page opened on a form. Which provider it was editing lived in a
sticky list beside it, the provider's models were a row of chips above
their own fields, and clicking anything in either one also changed what
the app was running on — the page had no way to show you a provider
without adopting it.
It is two levels of cards now. The page lists the providers configured
for its service; opening one drills into its models; each card expands in
place to edit what it holds. Adding and deleting live where the thing
being added belongs, and a back row names where you are.
The move needed browsing and using to come apart, which is the fix I said
last week was too big to reach for. The context's mutators take an
optional profile/model id and keep their old meaning without one, so no
existing caller changed; the editor binds them to whatever is on screen,
which is why ~300 lines of field editors moved between levels untouched.
"In use" is now stated on the card that has it and offered on every other
one, instead of being whatever you clicked last.
That also retires the warning strip from the connections deep link. It
had to exist because following the link adopted the profile it landed on;
now it just opens that provider's panel and changes nothing.
Search keeps one level — it has no models to drill into — and its cards
say so by not being openable.
Every section was a bordered, tinted panel wrapping rows that already
separated themselves with hairlines — the same content divided twice, and
the densest concentration of boxes anywhere in the app. The rest of
DeepTutor divides with hairlines and whitespace; Settings now does too.
`SettingSection` drops the panel for a single top rule, which is also
what keeps sections holding custom content (theme tiles, previews) from
coming apart. The model pages' two main panes become titled sections with
the same underline, so a page reads as three sections rather than three
stacked cards. Rows tighten from py-4 to py-3.5 and lose the padding the
box used to require.
Boxes that survived are the ones that are meant to interrupt: the
"opened from Connections" notice, the add-connection panel, the Codex
sign-in card, the network status block. The profile list keeps a
container because it is a navigator, not content — retinted to the same
accent the app sidebar uses.
The settings column was invented rather than borrowed, and it showed.
Measuring it against `SidebarShell` — the same kind of element, on screen
in the same app, all day — the differences were all in the wrong
direction:
- No icons at all, so a 23-row column was a wall of text with nothing to
aim at while scanning. Every page already declares an icon in
`settings-nav.ts`; none of them were being drawn.
- Rows a half-step tighter and smaller than the app's (12.5px/py-1.5/md
against 13.5px/py-2/lg), which read as cramped rather than compact.
- The active row tinted with `--muted`; the app uses `--accent`.
- Idle rows in `--muted-foreground` while group labels were medium-weight
at 70% — so the labels were heavier than the pages under them and the
hierarchy read upside down. Group labels now match the "Recents"
heading: 11.5px, normal weight, 60%.
Also two measurements off the rest of Settings. The radius scale had five
tiers with `rounded-2xl` used exactly once outside the tour overlay, so
the status strip joins the `xl` tier and the scale is four clean steps.
And the overview's title was 24px where every other settings page is 22px.
Shadows were counted too and left alone: all seven are on controls — a
toggle knob, segmented-control selection, a tooltip — not stacked on
cards, which is the pattern worth removing.
Auditing the refactor against the old surface turned up one thing it had
genuinely dropped and several it had thinned out.
The navigator is hidden below `md`, and the breadcrumb went with the
refactor — so on a phone, landing on a settings page left no way to reach
any other one. A compact native select now carries the same map there.
Three things the deleted hub and sub-hub grids used to show came back:
- Each model service's state. The sub-hub tiles had a four-way chip —
test passed / test failed / configured / not set — and only "failed"
survived, as a dot in the navigator. The overview lists all seven
services with that chip plus what each one actually resolves to, which
is more than the tiles said.
- The browser-facing API base, previewed on the old Network card. It is
the first thing to check on a Docker or LAN install.
- The one-line description under each page name, now the row's tooltip.
The tour copy still described blocks on a hub that no longer exists.
Also fixes a pre-existing break the audit surfaced rather than caused:
the profile list and the editor beside it were a hard two-column grid
with no breakpoint, so every model settings page overflowed its container
on a phone with fields cut off mid-input. They stack now.
Settings was a folder tree. The hub listed seven categories, four of them
opened a second grid, and the page you wanted was the third click — then
changing something in another category meant climbing back to the root,
because a breadcrumb was the only navigation on the page. Two dozen pages
and no search.
Now there is one persistent column listing every page, with the current
one marked, and a filter over it. Every comparable product — VS Code,
Slack, GitHub, Stripe, Dify, Open WebUI — keeps the map on screen; this
one hid it behind the route you happened to be on.
Consequences:
- The three sub-hubs (models, chat, agents) were grids that only repeated
those links, so they redirect to their first page. The routes stay
bookmarkable.
- The breadcrumb is gone: the column shows where you are, and a trail
ending in the page title directly above the page title said one thing
twice.
- `/settings` was a directory of the seven categories. It answers "what
state am I in" instead: how many model services are set up, what needs
attention (a draft waiting, a service that failed its last test), what
is actually in use, and what is still unconfigured.
- The guided tour walked the hub blocks, which no longer exist; it walks
the navigator, which is present on every route.
Two things surfaced along the way. Antigravity CLI is a supported
subagent everywhere else — backend kind, icon, label, its own settings
page — but was missing from the nav, so that page was reachable only by
typing the URL; Gemini CLI is retired and this is what replaced it.
And deleting a provider profile took its key and every model under it
with no confirmation, from a control sitting one hairline below the list
you click through to switch profiles; it asks first now.
Save Draft and Apply were the same write. Both persisted to the live files
and both invalidated the runtime caches, so nothing but their labels told
them apart — and Save Draft only ever wrote the model catalog, while half
the settings pages (memory, starting points, network, attachments,
document parsing) keep their state outside it.
The result was silent data loss, reproducible in four steps: open Starting
points, change 20 to 44, press Save Draft, read "Draft saved" — the server
still had 20, and navigating away lost the edit with no warning. The
button was enabled, because `hasUnsavedChanges` counted extension state
that `saveCatalog` never touched.
So a draft is now a place rather than a label. One envelope holding the
catalog and a payload per page, stored beside the live settings and read
by nothing else:
Save draft → envelope written, runtime untouched
Apply → live files written, envelope cleared
Discard → envelope dropped, back to what is live
Two other losses closed along the way. Unsaved page state now lives on the
provider instead of the page, so moving around inside Settings keeps it —
a settings page unmounts on every navigation, which is why the edit
vanished. And an edit that exists nowhere else warns before the tab is
closed or reloaded.
The toolbar had no way to say "there is a draft waiting", so a draft saved
yesterday would have sat there unexplained; it now reports which of the
three states you are in. The storage path moved into that line's tooltip —
self-hosted users occasionally want to know which file backs a page, but
it is a developer fact and was on screen for everyone.
Three changes to how Connections hands off to the service pages.
Task models sits next to LLM in the Models grid rather than at the end —
it configures the same thing, so it belongs beside it.
The services a connection supplies are now links, not labels, and each
carries the profile it feeds (`?profile=<id>`). A service with several
providers configured would otherwise open on whichever one happened to be
selected, which is not where the click was aimed.
Selecting a profile in the service editor is also what puts it in use, so
arriving from a connection announces the switch instead of making it
quietly: a strip says applying will adopt this profile, with one click
back to the one that was selected before. Landing on a profile that is
already the active one says nothing and changes nothing.
Also fixes a latent race the deep link surfaced: the mount effect depends
on `loadSettings`, which closes over `t`, whose identity changes once i18n
resolves — so settings loaded a second time a moment after mount and
re-cloned `draft` from the server, discarding anything edited in that
window. Guarded to run once; `reloadSettings` stays the deliberate re-read.
Model configuration was one layer replicated seven times: every service
stored its own profile with its own credentials, so a single OpenRouter
key had to be pasted into five separate pages. Every comparable product
(Dify, Open WebUI, Cherry Studio, RAGFlow) splits this in two — a
credential entered once, then a per-purpose assignment — so this adds
that split without disturbing what already works.
Connections
A connection holds one vendor credential (api_key / api_version /
extra_headers, plus an optional endpoint override). Linking creates one
ordinary profile per service that can use it, and the credential is
mirrored down on save rather than resolved on read — so every consumer
of the catalog keeps reading self-contained profiles and a linked
profile resolves exactly like a hand-typed one. Rotating the key in one
place reaches every linked profile; deleting a connection unlinks
rather than wipes. Anyone wanting a different key per service simply
never makes a connection.
Which services a vendor can serve is derived from the six provider
tables that already exist (new `connection_targets` in GET /settings),
so the web app keeps no second copy and adding a vendor to a service
table is enough to make it connectable.
Task models
Naming a conversation and writing the three home-screen starting points
are LLM calls nobody asked for — short, frequent, and fine on a small
fast model. Both can now be pinned to their own configured model from
Settings > Models > Task models. Unpinned is the default and a true
no-op: the title still follows the turn's own model and the starters
the active one, exactly as before. A pin at a deleted profile reverts
to inheriting rather than stranding the call.
PR #975 repaired Markdown prose, but mastery ask_user prompts still rendered dense \\uXXXX runs literally. Decode the same non-ASCII escapes when normalising card intro/prompt/header/options so learners see Chinese stems (#973).
Short selections such as rc carried only the raw token and an opaque parent session id. Capture the containing message id, resolve it from the parent session, and provide both the source message and exact selection to the tutor prompt.