* fix(batch): check the speech model when restoring, not in every pipeline run
#4623 added the missing-model check to the batch transcribe stage. Every
batch pipeline test that does not stub it then failed in CI's model-free
environment, leaving main red. Restored jobs are the only ones that skip
enqueue's check, so restore now checks once and shows such a job as failed
with Retry, leaving the pipeline as it was.
Also confines queue record paths to the batch folder after resolving them
(the CodeQL path alerts on the record writer) and reads test files as UTF-8.
* fix(batch): check the speech model inside the transcribe step itself
Review found that a job queued before its speech model was removed could
still download it, and that checking at restore can run before startup
swaps a missing saved model for an installed one. The check now runs in the
transcribe function, right before the backend loads, for every job: queued,
retried or restored. Pipeline tests that stub the guarded transcribe call
never reach it; the one test that runs it with a stubbed model opts out.
Queue record paths are checked after resolving but replaced and removed by
their own directory entry, so a link can't make a cleanup delete another
job's record.
* feat(desktop): restart a crashed engine, ask before quitting running work, keep the batch queue across restarts
- A local engine that crashed after it had started restarts on its own
(1, 3, 6, 12, 30 s); a sixth crash in ten minutes, or a crash before it
ever started, stays on the recovery screen.
- A quit the user starts asks first while the engine reports running work;
confirmed update installs, OS shutdown and relaunches do not ask.
- Unfinished batch jobs keep a record beside their upload and are queued
again, in order, on the next backend start.
- Interrupted audiobook/story renders are announced once after launch with
a Resume action.
* changelog: add fragment for #4623
* test(dub): wait for the voice search to take focus
* fix(desktop): close the gaps review found in job resume and the quit prompt
- Quitting during a generation, clone, design or transcription now asks
first: the engine reports open requests that do work, not just jobs.
- Restart on CPU withdraws a pending automatic restart before it saves the
device choice, so the engine cannot start on the old device.
- Batch queue records hold only the upload's name, so they carry no home
path and still restore after the data folder moves.
- A save racing a cancel, a job skipped as cancelled, or a record that
cannot be deleted no longer brings finished or cancelled work back.
- One malformed record is dropped on its own instead of stopping every
saved job from restoring.
- A queued or restored job whose speech model was removed fails with the
enqueue message instead of downloading it.
- The interrupted-render notice retries a failed check a few times.
* feat(stories): Final Cut-style timeline editing: skimming, magnetic drag, role mute/solo
- Skimmer: a line and timecode follow the pointer over the lanes; with a
matching render it plays a short grain there without moving the player.
S turns it on or off (remembered).
- Shift+Z (and a Fit button) fits the whole story in view.
- Drag a clip along the story to move its line; the other clips close up
live. Alt+Left/Right moves a focused clip's line one place.
- Each speaker lane can be muted or soloed for preview; renders still
include every speaker.
* changelog: add fragment for #4624
* fix(stories): keep order on small drags; hold role mute/solo for real line timings
A dragged clip's slot now comes from its leading edge, so a nudge never sends
a long clip past short neighbours. Role mute/solo is removed: renders report
only chapter durations, so speaker boundaries are estimates and muting would
cut the wrong speaker. It returns once renders report per-line timings. The
move hint now says the clip must be selected for Alt+arrows.
* fix(stories): don't skim over the pinned speaker names after scrolling
* fix(stories): leave a line in its chapter when its clip is dropped where it was, and hide the skimmer during a drag
* fix(audiocpp): name the missing system library when the self-check fails
* docs(changelog): add fragment
* docs(changelog): say the error names the missing library version
* chore: restore the gallery submodule pin
* fix(clone): keep the page title visible in a narrow header
* docs(changelog): add fragment
* test(clone): assert the narrow header keeps its title and action names
* chore: restore the gallery submodule pin
* fix(clone): drop the support label too in a narrow header
* test(electron): keep page preloading out of the dev server
* feat(longform): save a diagnostic bundle from a stalled or failed render
* docs(changelog): add fragment
* fix(longform): offer the diagnostic bundle only when the backend is local
* perf(dub): stop long dubs from slowing every visit to Dubbing
Opening Dubbing with a 600-cue dub took 160-440 ms and grew with the dub,
because the segment timeline mounted one interactive element per cue.
- Timeline: cues in view stay elements up to 120; past that only cues wide
enough to drag (plus focus, selection and a live drag) are elements, and
the rest are painted on a canvas. Clicking or double-clicking a painted
cue still selects or plays it; options carry aria-posinset/setsize.
- Pane and dock resize hooks start a remount from their last measured
size, so a page no longer renders twice before its first paint.
- Transcript overscan drops from 12 to 4 rows.
* docs(changelog): note faster Dubbing navigation (#4612)
* perf(ui): paint pages first and load heavy regions right after
Navigation rendered each page's heaviest region in the same task that
switched pages, so the app sat on the old page until all of it was built.
- useAfterPaint / AfterPaint: a region renders in a transition after the
page's first frame is on screen. Used for Dubbing's transcript rows,
Gallery's voice cards, the log lines and the OpenAPI reference.
- Every page's code loads one chunk per idle period after startup, so a
first visit no longer waits on its chunk. A test keeps the list in step
with the route tree.
- Language pickers checked every language against every supported name on
each render; supported lists are now indexed once.
* docs(changelog): describe faster page navigation (#4612)
* fix(dub): keep tiny cues double-clickable and split the timeline file
Review follow-ups on the timeline windowing:
- A click on the track hit-tests every cue, not only painted ones, so the
second click of a double-click still finds a sub-pixel cue after the
first click turned it into an element.
- Clicks in the 4 px strips above and below the cues scrub, as they do
around element cues.
- dub-timeline.tsx was over the 500-line component cap; the windowing,
canvases and hit test move to timeline-paint.ts and each element cue to
DubTimelineCue.
* perf(ui): keep Dubbing alive between visits and the API reference built
- KeepAliveOutlet keeps listed pages mounted under <Activity> after you
leave them. Going back to Dubbing shows it again with its scroll and work
in progress instead of rebuilding ~1,200 elements. Hidden pages run no
effects; KeptPage pauses their media (hiding leaves elements in the
document, where they would keep playing next to the bottom player) and
rebuilds a page whose content changed while hidden, so opening another dub
from Projects starts clean. Only Dubbing is listed; a page joins after its
route reads and mount-time state are audited.
- The Scalar reference is built once and moved back in on later visits;
building it validated and bundled the whole spec each time (~2.3 s freeze
at 4x CPU). It is released five minutes after the page closes (~35 MB).
* fix(ui): show a kept page only once its code has loaded, ahead of hidden pages
- The kept Dubbing page followed the address, which changes before the
router has loaded the page's code, so it rendered mid-load and React
reported a conditional use(). It now follows the router's loaded
matches, the same ones <Outlet> renders.
- The page you are on now comes first in the document, so first-match
lookups (document.querySelector in app code, landmarks, tests) find it
rather than hidden Dubbing.
- The sidebar and shell smokes count only visible sidebars and headings,
and accept that Dubbing reopens as it was left.
* fix(ui): keep kept Dubbing's state valid across hides and Settings visits
Review findings on #4612:
- Hiding kept Dubbing aborted Verify but left it disabled; the cleanup now
resets it too (useVerificationCancel).
- Hiding revoked the audition preview and uploaded-video URLs that the
page's state still used. Object URLs are now released when replaced or
when the page is really discarded (useOwnedObjectUrl), not on hide.
- Visiting Settings or Pro unmounted the workspace and so rebuilt Dubbing;
the workspace now stays mounted, hidden, while those pages show.
- Logs scroll to the newest line once deferred lines mount.
- A theme change re-renders the API reference in place instead of
detaching it, so focus inside it survives.
- The painted cue arrays stay the same while scrolling, so the canvas
layer is not rebuilt every frame.
#4606 left two browser checks on main red:
- longform-smoke clicked controls that moved: the narrator and cast
voices are pickers now, line actions open from the line's ⋯ button,
and text import lives under "Add lines from text".
- The UI crawler waited 30 s for a file input that an earlier upload had
re-rendered away. It now skips an input that is gone.
* ci(python): gate Ruff and ty on the rules the code already passes
Ruff and ty are pinned in the dev group (never installed for users: the
app syncs with --no-dev and Docker installs without groups). CI's first
Python shard and `bun run lint:py` run the same checks.
- Ruff checks runtime-bug rules: syntax, undefined names and exports,
f-strings without fields, invalid characters, dropped asyncio tasks.
- ty fails on any rule the code passes today; the 23 rules with a backlog
warn, so new instances of every other rule fail CI.
Fixes what the rules found:
- The setup warmup task was not referenced and could be garbage-collected
mid-load; it is now held until it finishes.
- A perf-budget test fake called time.sleep without importing time.
- The scam guard's invisible-character class is written as escapes.
- Type-only names (httpx, Callable) are imported under TYPE_CHECKING.
* changelog: add fragment for #4614
* build(python): let lint:py sync the pinned tools before running them
#4606 left main's Python tests red: the new route was missing from
tests/fixtures/api_routes.txt, and timeline clips used a literal
border-black/25, which the theme rule forbids. Clips now use the
design-system border-border/60.
* feat(stories): screenplay-style script editor with timecodes and icon controls
- Lines show an estimated start time and the speaker in a gutter, named only
when the speaker changes; characters get a colour bar, the narrator stays
neutral.
- Voice and speed chips appear under a line only when it overrides them;
defaults live in the hover toolbar.
- Auto-cast no longer invents speakers from one-off "Phrase: text" labels or
from pronouns ("she said" goes to the last named speaker), and its panel
folds away after a successful cast.
- Script and speed controls use icons with tooltips instead of text buttons
and help paragraphs; Cover and Loudness match the other setup sections.
* changelog: add fragment for #4605
* feat(stories): timeline dock with speaker tracks and a following playhead
- A dock pinned under the script holds the last render's play bar and one
track per speaker, each line a clip. Clicking a clip selects its line and
moves the playhead there; the ruler and lanes seek on click; zoom with the
buttons or +/-.
- Clip positions and the gutter timecodes come from the render's real chapter
durations (or its total length) once there is one, and from the word-rate
estimate before; the dock says when positions are estimates.
- The script highlights the line being played.
- The runtime under the script matches the timeline, including per-line
speeds.
* test(longform): check the script instructions behind their info button
* changelog: add fragment for #4606
* fix(stories): stop casting determiners and offer to fold old pronoun speakers
- "said our host" / "her mother replied" name the noun, not the determiner,
so auto-cast no longer creates speakers like "Our".
- Stories auto-cast before the pronoun fix kept members such as "She", "He"
and "I". The script now names them and offers one click to remove them and
give their lines to the last named speaker (first person to the narrator),
keeping each line's own voice override.
* fix(stories): make the timeline readable on long stories
- Lay the tracks out in pixels with the ruler pinned to the top and speaker
names pinned to the left, so both stay in view while scrolling.
- Clips too narrow to read show only their colour instead of a cut-off "L…";
the full line stays in the tooltip and accessible name.
- Ruler labels keep about 90 px apart at any zoom; zoom goes up to 32x and the
view follows the playhead.
- The track area can be resized from a handle (mouse or arrow keys); the
height is remembered and the area never pads past its tracks.
* perf(stories): keep long scripts fast and add a line inspector
- A keystroke re-rendered and re-measured every line: about 2 s per key in a
400-line story. Rows are now memoised (their handlers read the current
draft through a ref, so a skipped render can't write stale lines) and
off-screen rows skip layout with content-visibility. Typing drops to
~35 ms of script work per key; first load halves.
- A right-hand inspector shows the selected line's timing, speaker, voice and
speed, editable in place, or a per-speaker line/runtime summary.
- The Stories editor uses the full window width instead of max-w-6xl.
- The "older saved result" notice becomes a one-line row with its detail
in an info tooltip, instead of a large card in the sidebar footer.
* fix(stories): address review findings on the screenplay editor
- A pronoun after a screenplay label ("BOB: Hi." then "he said") now refers
to that speaker instead of an earlier prose one.
- Consecutive legacy lines stored with no speaker read as one speaker.
- Folding pronoun cast members also reassigns chapter markers that named
them, without a chapter counting as the last named speaker.
- The speed popup stays open while a line's first speed is set; the chip
moves under the text only after the popup closes.
- Disabled icon actions stay focusable so their tooltip still names them.
- The book speed explanation is a keyboard-reachable info button.
* fix(stories): address review findings on the timeline
- A render's timing maps only onto the script it was made from: renders now
save a timing key of the lines, and after edits the timeline falls back to
estimates and stops linking clips and highlights to the audio.
- [pause] markers count as silence, so pause-only lines and chapters keep
their place on the timeline.
- A failed chapter takes no time; a partial render without per-chapter
durations is not spread over the whole script.
- The time grid runs left to right in right-to-left languages, so the
playhead lines up with clips and ruler.
- Resize drags use pointer capture and end on cancel, lost capture or unmount.
- The inspector keeps an explicit unassigned speaker choice.
- A failed saved-audio check is shown, not only announced.
- Off-screen rows skip layout per column, so the hover toolbar isn't clipped.
* feat(stories): clip waveforms, playback keys and changed-line markers
- Clips show the render's waveform. A new GET /audio-peaks/{name} decodes a
saved output with ffmpeg at 1 kHz mono and returns its loudness outline,
cached per file version, so a long render costs the browser nothing.
- Editing-suite keys on the Stories page: Space play/pause, J back 5 s,
K pause, L play (again for faster), Home/End. Ignored in fields and with
modifiers; listed in an info button.
- Renders save a fingerprint per line, so lines edited, re-cast, re-timed or
added since the render get a marker, and the timeline counts them.
- The line toolbar shows on hover or when focus enters it, not while typing,
and sits inside the row. Rows skip layout off-screen again (column-level
skipping laid out every toolbar: 224 ms vs 111 ms per key in 400 lines).
* feat(stories): pick any gallery voice from the Stories voice lists
The cast, line and inspector voice lists only offered saved voices, so a
gallery voice took a trip to the Gallery page. They now share one picker:
a search box over the default, your voices and the whole Voice Gallery.
Your voices filter as you type; the gallery is searched on the backend,
loads 60 at a time as the list scrolls, and long lists mount only the rows
in view. Picking a gallery voice saves it to your voices (reusing an
earlier copy) and assigns the saved voice. Arrow keys and Enter pick.
* feat(stories): rework the paste box into "Add lines from text"
The panel was titled after a button ("Auto-cast"), its placeholder promised
sentence splitting whatever the mode, and both actions hid behind a button,
a scissors icon and two info tips.
- Heading and subtitle say what it does; a collapsed panel shows when text
is waiting.
- While empty it shows the three formats it recognises and an Open file
button; text files can be dropped on the box.
- While typing it previews the speakers found (in their cast colours, or
says everything goes to the narrator) and how many lines each action adds.
The parse runs deferred, so long pastes do not stall typing.
- Auto-cast is the primary action (Ctrl/Cmd+Enter); Split into lines is a
labelled button beside the split mode; a word count and Clear sit in the box.
* fix(stories): keep the speed help reachable while busy; NARRATOR lines never take a pronoun
- The busy state disabled the whole speed fieldset, which also took its help
tip out of the tab order; the slider and reset are disabled one by one now.
- An explicit NARRATOR: line became the referent for a later "she said",
casting that quote to the narrator; mergePronounCast already skipped it.
* fix(stories): address review findings on the timeline, line actions and voice picker
- Reaction-only lines ([laughter], [sigh]) took no time on the timeline, and a
chapter of them dropped out of the chapter count, shifting every later clip.
Estimates now come from the parser's spoken spans, reactions included.
- Changing a line's voice, its speaker's voice or the book voice left lines
unmarked as changed. Render keys (now v2) include each line's resolved voice,
so those lines are marked and the timeline stops mapping the old audio.
- Hovering a line put its action buttons over the first line of text. Rows now
keep an end strip for a ⋯ button; the actions expand from it only on hover or
focus of ⋯ or the actions themselves, or when ⋯ is pressed on touch screens.
- A gallery voice still saving when its picker closed could land later and
rebuild the cast from an old copy, erasing newer edits. Closing the picker
cancels it, and cast voice picks apply to the current cast.
* feat(sidebar): one line per setting in Stories, Audiobook and Batch dubbing
Title, voice, language and format (and Batch's target language, voice and
background switch) each sit on one row: muted icon and label on the left,
the control on the right, as Batch's engine row already did. The voice is a
compact button that opens the searchable voice list with the Voice Gallery;
Batch's presets appear there as their own group. Row labels are spans tied to
their fields, since the sidebar styles every label and legend as a heading.
* fix(stories): do not announce the speed help as unavailable while busy
aria-disabled on the speed group also marked its help button unavailable to
screen readers; the slider and reset carry their own disabled states.
* fix(stories): address timeline, voice picker and waveform review findings
- Time [slow]/[fast] spans at their own speed in line estimates.
- Only a render with a matching timing key maps onto the lines; resumed or
keyless renders keep estimates instead of seeking into edited text.
- Group timeline clips in linear time; ignore transport keys another
control already handled.
- The book voice picker offers no "engine default" row, which Generate
would refuse.
- Voice picker: keep loaded gallery pages when a later page fails, show the
gallery as loading until a new search settles so Enter can't pick a stale
result, and refresh profiles when a cancelled pick may have saved.
- Line actions: the hidden toolbar's box no longer reveals it or catches
clicks on the words.
- Waveform peaks rectify before the 1 kHz resample, so speech above 500 Hz
is no longer drawn as silence.
- Localize the import examples and the clip length; reword the timeline
estimate note; fix the Dutch "last render" wording.
* fix(stories): address the second round of timeline and picker review findings
- /audio-peaks needs the consumer tier: decoding a render is real work.
- The peak scan runs off the event loop.
- Timing keys include the output language, built by one timingContext()
helper shared by the saved key and the live comparison.
- Literal bracketed text ([Appendix]) gets time; only reactions are not words.
- A result recovered only by file name keeps estimated clips.
- With estimated clips the lanes don't seek, the playhead hides and the
clock shows the render's real length.
- Clips are reachable by keyboard (one tab stop, arrows/Home/End) and the
lanes no longer rebuild every waveform on each playback update.
- The waveform cache keeps the last four renders.
- A clip click selects its line even while the text is locked.
- A second pointer lifting no longer ends a resize drag.
- The inspector summary lists unassigned lines when there is no Narrator.
- Speeds use the app language's decimal mark everywhere they are shown.
- The voice picker says when the gallery failed to load, with Retry.
- The page's basics panel and result views move to their own files, so
the page stays under 500 lines.
* feat(stories): screenplay-style script editor with timecodes and icon controls
- Lines show an estimated start time and the speaker in a gutter, named only
when the speaker changes; characters get a colour bar, the narrator stays
neutral.
- Voice and speed chips appear under a line only when it overrides them;
defaults live in the hover toolbar.
- Auto-cast no longer invents speakers from one-off "Phrase: text" labels or
from pronouns ("she said" goes to the last named speaker), and its panel
folds away after a successful cast.
- Script and speed controls use icons with tooltips instead of text buttons
and help paragraphs; Cover and Loudness match the other setup sections.
* changelog: add fragment for #4605
* test(longform): check the script instructions behind their info button
* fix(stories): stop casting determiners and offer to fold old pronoun speakers
- "said our host" / "her mother replied" name the noun, not the determiner,
so auto-cast no longer creates speakers like "Our".
- Stories auto-cast before the pronoun fix kept members such as "She", "He"
and "I". The script now names them and offers one click to remove them and
give their lines to the last named speaker (first person to the narrator),
keeping each line's own voice override.
* fix(stories): address review findings on the screenplay editor
- A pronoun after a screenplay label ("BOB: Hi." then "he said") now refers
to that speaker instead of an earlier prose one.
- Consecutive legacy lines stored with no speaker read as one speaker.
- Folding pronoun cast members also reassigns chapter markers that named
them, without a chapter counting as the last named speaker.
- The speed popup stays open while a line's first speed is set; the chip
moves under the text only after the popup closes.
- Disabled icon actions stay focusable so their tooltip still names them.
- The book speed explanation is a keyboard-reachable info button.
* fix(stories): keep the speed help reachable while busy; NARRATOR lines never take a pronoun
- The busy state disabled the whole speed fieldset, which also took its help
tip out of the tab order; the slider and reset are disabled one by one now.
- An explicit NARRATOR: line became the referent for a later "she said",
casting that quote to the narrator; mergePronounCast already skipped it.
* fix(stories): do not announce the speed help as unavailable while busy
aria-disabled on the speed group also marked its help button unavailable to
screen readers; the slider and reset carry their own disabled states.
* fix(player): keep audio playing when you move to another page
Inline players stopped as soon as their page closed. A player that is
playing when a navigation unmounts it now hands its clip, title and position
to the app-wide bottom player, which carries on from the same moment. Other
unmounts (a closed preview, a deleted take) still stop.
Many players play blob URLs that their page revokes on unmount. Revokes now
all go through revokeObjectUrl, which waits while a URL is held: a playing
player and the bottom player's current clip hold theirs. A test keeps direct
URL.revokeObjectURL calls out of the renderer.
* changelog: add fragment for #4609
* fix(player): hand playback off even when the old page updates after the address changes
The player re-read the address on every render, so a playback update from the
outgoing page (still mounted while the next one loads) recorded the new
address, and the unmount check then saw no navigation and let the audio stop.
The page's route is now taken once at mount and compared by path, so query
changes within a page still count as the same page.
* fix(dev): free Windows dev ports and keep dev servers from breaking each other
- The Windows process check joined its PowerShell lines with "; ", which put
a ";" straight after "@{" and never parsed, so any leftover listener on a
dev port made `bun dev` fail. Lines are now joined with newlines; a process
that exits mid-check counts as gone, and failures quote PowerShell's error.
- The web UI and smoke-test Vite servers shared `bun dev`'s dependency cache,
so starting one re-optimised the bundles the running app was loading and
left its window empty. Each now has its own cache directory.
* changelog: add fragment for #4604
* fix(dev): spawn the real Bun so npm-installed Bun works on Windows
bunCommand() prefers the running Bun, then npm_execpath, then the executable behind a Windows npm shim on PATH. A missing Bun gives an install hint from every script that spawns it, and a test guards against bare bun/bunx spawns. Builds on the report and first fix in #4525.
* Add changelog fragment for the Bun spawn fix
* Report which Sortformer piece is missing and document the macOS setup
* Add changelog fragment for #4599
* Update diarisation status tests for the missing field and cover the model override in the docs
* Re-run CI on the merged branch
* fix(diagnostics): do not report Windows shutdown or installer exits as crashes
Windows may end the process as soon as the session-end handler returns, and
installers force-kill the app shortly after asking it to close, so the async
orderly quit often never retired the session marker and the next launch
reported an unclean_exit. Retire this process's own marker synchronously on
session-end and at the start of an orderly quit, and keep liveness refreshes
from restoring it. A process that dies any other way is still reported.
* Name the changelog fragment after the pull request
* fix(diagnostics): keep a pending marker write from outliving session end
A marker write that passed the end check before endSession() could still
rename a fresh active marker into place, and the later async removal may
never run once Windows ends the process. Check right before the rename and
remove synchronously as it completes. Document that close to tray followed
by an installer kill, and a windowless app at Windows shutdown, are still
reported, and accept CRLF checkouts in the source-order test.
* fix(diagnostics): publish the session marker through renameWithRetry
The pending-write guard wrapped node:fs rename directly, which the
rename-retry guard test forbids (Windows antivirus retries). Check
publishability before the plain renameWithRetry and again as it settles;
only microtasks run in between, so an ended session still never keeps
the marker.
* fix(ios): restart model transfers that stall at 0 B/s (#4587)
Background URLSession retries timed-out tasks silently until the resource
timeout (7 days here) and treats tasks started while the app is in the
background as discretionary. The parallel scheduler only creates the tail
range after the first two 64 MiB ranges finish, which commonly happens while
the app is backgrounded, so Kitten's last range could wait indefinitely at
80%. The transport then reattached that same OS task by key on every retry,
pause/resume and relaunch, so the stall repeated every time.
ModelStore now runs each range wait under a stall watchdog: when the
transport reports no new byte for its idle interval (120 s for the background
transport) during awake time, the wait is abandoned as a retryable network
failure and the next source is tried. The background transport cancels the
abandoned task with resume data instead of suspending it, so the retry starts
a fresh task from the received bytes. Android already fails a stalled read via
OkHttp's 120 s read timeout and moves to the next source.
* Add iOS and Android to the issue forms
Phone reports had to pick a desktop OS and install method; the forms now
offer iOS, Android, the phone app install and on-device compute.
* Name the changelog fragment after the pull request
* fix(ios): do not count connectivity waits as stalled model transfers
The stall watchdog treated a background task waiting for Wi-Fi (or for any
connection) as stalled, abandoned it and spent all five retry rounds. The
resulting timeout paused the download with an error, so restoring Wi-Fi no
longer resumed it. The watchdog now restarts its interval whenever the
connection the policy requires is unavailable, and counts only steps that
were connected from start to end. The app passes its connectivity state.
* fix(mobile): demote a stalled model source and qualify resumed bytes
A source that stalled or dropped the connection kept its earlier measured
rate, so when both sources had rates the next range or attempt could wait a
full stall interval on it again. iOS and Android now set that source's rate to
zero on a network failure (not on HTTP retry statuses) and order demoted
sources last until they deliver again.
The docs, contract and changelog no longer claim received bytes are always
kept: completed ranges are, while an abandoned range continues only from
resume data the system provides.
* fix(mobile): end a source's demotion when it delivers again
A demoted source that answered too quickly to sample a rate stayed at
rate 0 and kept going last for later files. A validated answer now clears
the demotion on iOS and Android, with a test on each.
* test(ios): widen the stall window in the demoted-source test
A slow CI runner pushed the mirror's 200 ms answer past the 0.3 s stall
window, scrambling the expected host order.
* test(mobile): keep the demotion-recovery order fixed on slow runners
The recovered source could be sampled as slower than the mirror on a slow
runner; give the mirror a clearly slower measured rate on iOS and Android.
* fix(setup): keep a cancelled runtime repair cancelled and log why a venv is unusable
Cancel on the setup progress screen calls restart(). When that install was
the automatic repair of an existing runtime (or a first run whose install
marker now counts as an earlier install), start() either launched the same
install again or, once a repair had been attempted this launch, reported
"automatic repair did not finish". The renderer classifies that message as
BROKEN_VENV, so a user's Cancel was reported as a broken environment within
10 s of the restart.
- runtime-repair: a cancelled setup is left to the setup screen (Resume),
never restarted on the user's behalf or reported as a failed repair.
- backend: restart() during an install marks it cancelled; an explicit
setup run clears the mark.
- runtime-readiness: report why a project is not usable (missing
interpreter, missing pyvenv.cfg, unfinished install, other version, or the
failing import); the supervisor logs it before repairing, so a repair
that does not help still says why.
* Name the changelog fragment after the pull request
* fix(setup): address review on the broken-venv recovery
- torch-choice wiring test accepts the readiness reason callback, still
requiring rememberTorchVariant() right after the ready branch records the
project; the callback is now a named noteReason(project).
- The "not usable" reason is written to the setup log directly (pushLog only
feeds it while installing) and stays in the log tail when the automatic
repair resets it.
- The setup failure handler reads the install marker before writing any
state and re-checks the generation, so a Cancel during that await keeps
its Resume screen.
- Only ENOENT/ENOTDIR count as a missing interpreter or pyvenv.cfg; other
stat errors (EACCES, EPERM, EIO) are named with their code.
* fix(setup): show the unusable-runtime reason only for the runtime it describes
The retained reason now carries its project; setup for a moved runtime
location drops it instead of showing the old location's diagnosis.
* fix(setup): recheck the start generation and keep readiness reasons honest
- start(): read the install, Windows ROCm and interrupted state first, then
return if a restart() or shutdown() overtook this start, before writing
any status or starting a repair.
- runtime-readiness: name a build mismatch only when the ready marker
proves it; keep this decision's Windows ROCm verification failure as the
reason; otherwise use a neutral reason. No extra native probe runs.
* fix(ios): restart model transfers that stall at 0 B/s (#4587)
Background URLSession retries timed-out tasks silently until the resource
timeout (7 days here) and treats tasks started while the app is in the
background as discretionary. The parallel scheduler only creates the tail
range after the first two 64 MiB ranges finish, which commonly happens while
the app is backgrounded, so Kitten's last range could wait indefinitely at
80%. The transport then reattached that same OS task by key on every retry,
pause/resume and relaunch, so the stall repeated every time.
ModelStore now runs each range wait under a stall watchdog: when the
transport reports no new byte for its idle interval (120 s for the background
transport) during awake time, the wait is abandoned as a retryable network
failure and the next source is tried. The background transport cancels the
abandoned task with resume data instead of suspending it, so the retry starts
a fresh task from the received bytes. Android already fails a stalled read via
OkHttp's 120 s read timeout and moves to the next source.
* Add iOS and Android to the issue forms
Phone reports had to pick a desktop OS and install method; the forms now
offer iOS, Android, the phone app install and on-device compute.
* Name the changelog fragment after the pull request
* fix(diagnostics): do not report Windows shutdown or installer exits as crashes
Windows may end the process as soon as the session-end handler returns, and
installers force-kill the app shortly after asking it to close, so the async
orderly quit often never retired the session marker and the next launch
reported an unclean_exit. Retire this process's own marker synchronously on
session-end and at the start of an orderly quit, and keep liveness refreshes
from restoring it. A process that dies any other way is still reported.
* Name the changelog fragment after the pull request
* fix(setup): keep a cancelled runtime repair cancelled and log why a venv is unusable
Cancel on the setup progress screen calls restart(). When that install was
the automatic repair of an existing runtime (or a first run whose install
marker now counts as an earlier install), start() either launched the same
install again or, once a repair had been attempted this launch, reported
"automatic repair did not finish". The renderer classifies that message as
BROKEN_VENV, so a user's Cancel was reported as a broken environment within
10 s of the restart.
- runtime-repair: a cancelled setup is left to the setup screen (Resume),
never restarted on the user's behalf or reported as a failed repair.
- backend: restart() during an install marks it cancelled; an explicit
setup run clears the mark.
- runtime-readiness: report why a project is not usable (missing
interpreter, missing pyvenv.cfg, unfinished install, other version, or the
failing import); the supervisor logs it before repairing, so a repair
that does not help still says why.
* Name the changelog fragment after the pull request
* fix(diagnostics): keep a pending marker write from outliving session end
A marker write that passed the end check before endSession() could still
rename a fresh active marker into place, and the later async removal may
never run once Windows ends the process. Check right before the rename and
remove synchronously as it completes. Document that close to tray followed
by an installer kill, and a windowless app at Windows shutdown, are still
reported, and accept CRLF checkouts in the source-order test.
* fix(setup): address review on the broken-venv recovery
- torch-choice wiring test accepts the readiness reason callback, still
requiring rememberTorchVariant() right after the ready branch records the
project; the callback is now a named noteReason(project).
- The "not usable" reason is written to the setup log directly (pushLog only
feeds it while installing) and stays in the log tail when the automatic
repair resets it.
- The setup failure handler reads the install marker before writing any
state and re-checks the generation, so a Cancel during that await keeps
its Resume screen.
- Only ENOENT/ENOTDIR count as a missing interpreter or pyvenv.cfg; other
stat errors (EACCES, EPERM, EIO) are named with their code.
* fix(ios): do not count connectivity waits as stalled model transfers
The stall watchdog treated a background task waiting for Wi-Fi (or for any
connection) as stalled, abandoned it and spent all five retry rounds. The
resulting timeout paused the download with an error, so restoring Wi-Fi no
longer resumed it. The watchdog now restarts its interval whenever the
connection the policy requires is unavailable, and counts only steps that
were connected from start to end. The app passes its connectivity state.
* fix(diagnostics): publish the session marker through renameWithRetry
The pending-write guard wrapped node:fs rename directly, which the
rename-retry guard test forbids (Windows antivirus retries). Check
publishability before the plain renameWithRetry and again as it settles;
only microtasks run in between, so an ended session still never keeps
the marker.
* fix(setup): show the unusable-runtime reason only for the runtime it describes
The retained reason now carries its project; setup for a moved runtime
location drops it instead of showing the old location's diagnosis.
* fix(setup): recheck the start generation and keep readiness reasons honest
- start(): read the install, Windows ROCm and interrupted state first, then
return if a restart() or shutdown() overtook this start, before writing
any status or starting a repair.
- runtime-readiness: name a build mismatch only when the ready marker
proves it; keep this decision's Windows ROCm verification failure as the
reason; otherwise use a neutral reason. No extra native probe runs.
* fix(mobile): demote a stalled model source and qualify resumed bytes
A source that stalled or dropped the connection kept its earlier measured
rate, so when both sources had rates the next range or attempt could wait a
full stall interval on it again. iOS and Android now set that source's rate to
zero on a network failure (not on HTTP retry statuses) and order demoted
sources last until they deliver again.
The docs, contract and changelog no longer claim received bytes are always
kept: completed ranges are, while an abandoned range continues only from
resume data the system provides.
* fix(mobile): end a source's demotion when it delivers again
A demoted source that answered too quickly to sample a rate stayed at
rate 0 and kept going last for later files. A validated answer now clears
the demotion on iOS and Android, with a test on each.
* test(ios): widen the stall window in the demoted-source test
A slow CI runner pushed the mirror's 200 ms answer past the 0.3 s stall
window, scrambling the expected host order.
* test(mobile): keep the demotion-recovery order fixed on slow runners
The recovered source could be sampled as slower than the mirror on a slow
runner; give the mirror a clearly slower measured rate on iOS and Android.
A same-host redirect is still a destination the accelerator discovered, so a
private answer for it stays a terminal refusal. Track provenance (hop 0 of the
HEAD chain, and GETs to the starting URL when no redirect happened) instead of
comparing hosts.
The segmented downloader's address-pinned transport refused the Hub's own
download URL when the local resolver answered with non-public addresses (a
VPN or proxy app in fake-IP mode answers 198.18.x.x) or did not finish
(resolver only works through the proxy, timeouts). Those UnsafeURLErrors were
terminal, so the install stopped even though the Hub metadata requests had
just succeeded through the same network.
Cancelling a sibling range's wire lookup after one range failed also marked
the policy scope as interrupted, turning an ordinary range failure into a
terminal "destination validation was interrupted" refusal.
Both reached opt-in failure reports as ValueError (UnsafeURLError subclasses
it). Now the wire lookup of the starting origin, or any lookup that does not
complete, raises AcceleratorUnavailable and the install falls back to
snapshot_download at once with the reason logged; wire lookups no longer mark
the interruption scope. A redirect target that resolves privately and an
interrupted redirect check still stop the install.
A release that lands while whisperx is loading an aligner bumped nothing,
so the load put the released weights back into the cache after Unload
had reported success. Releases now bump a generation under a lock and an
overtaken load returns its result without caching it.
release_align_models() can clear the cache from another thread between
load_align_model's check and its read, or between its write and its
return, raising KeyError out of a transcription. Read once and return
the local result. The loaded-models row for the shared aligner now takes
its name from the translation layer.
Releasing the warm transcription ASR only dropped the instance. MLX
Whisper keeps its weights in a library-level singleton, MLX keeps a buffer
cache, and the wav2vec2 aligners sit in a module-level cache no engine's
unload reached, so after transcription and Unload all the backend kept
~18 GB of GPU memory while listing no loaded model.
- The warm release now frees the shared aligners and, unless dictation
shares it, the MLX Whisper singleton; engine unloads release aligners.
- Resident aligners are listed as asr-aligner, unloadable, and included
in Unload all.
- free_vram clears MLX's buffer cache when MLX is loaded.
Fixes#4573
Drop the admin session's store id from the whoami response: it is the
hash revocation is keyed on and no client needs it. Document and test that
a remote caller with no credential gets 401 from the credential gate when
an API key or share PIN is configured. Regenerate the mobile OpenAPI
contract and route inventory, and drop the BOM from the changelog fragment.
Redraw until the new PIN differs from the current one so a rotation always
invalidates the leaked value and its ov_pin cookies. Regenerate the mobile
OpenAPI contract and route inventory for the new endpoint, and drop the
BOM and missing final newlines from the new files.
The only way to change a share PIN was to disable sharing and enable it
again: that closes the socket, drops every connected guest and can move the
port, because enable() looks for a free one.
rotate_pin() issues a new PIN on the running listener under the same lifecycle
lock, keeps the port and the address list, republishes the app state, and
resets the PIN guard so a guest locked out under the old PIN starts clean. The
old PIN (and the ov_pin cookie carrying it) fails the next request, which
bounces that guest to the PIN form.
Exposed as POST /system/network/rotate-pin next to enable/disable, so it
inherits the same loopback-only control surface and returns 409 while sharing
is off. docs/sharing.md now says the PIN can be rotated while sharing stays on.
Tests: tests/test_network_share_rotate.py drives the real enable/disable
lifecycle against a fake uvicorn server and asserts the same task and server
object survive rotation, the port and addresses are unchanged, the state is
republished, the guard is reset, and the route answers the new PIN or 409.
The capability document advertises the auth routes, and the 403 text already
differs per tier, but a client could only discover its own tier by provoking
an error on a real route. whoami answers the question directly for every
tier, anonymous included, with kind, capabilities, transport and the admin
session's opaque credential id -- never a token, a PIN or a key.
The response runs through the existing /api/auth cache-control rule
(no-store), and the route joins the frozen dependency-free GET inventory with
its reason, so the authz census keeps its guarantee that a new open GET is a
reviewed decision.
Tests: loopback (native capabilities), cookie session (admin_session +
credential_id, no token in the body), API key, and an anonymous remote caller
with no key configured.