Repository navigation
Studio: make Stop loading actually stop a model that is still downloading - #11727
NilayYadav wants to merge 4 commits into
Conversation
…nslothai#11741) * studiobench: compare a code fence one arm scrolled past on its text The UI parity gate failed on backend-only pull requests (unslothai#11724, unslothai#11727, and others on 2026-09-23) with differences like msg15(assistant):1847269->2150610c on model_change, reasoning_toggle, select_all_copy, settings and image_upload at r100K. Those are not rendering differences. code-fence-defer.tsx (unslothai#9462, the default since unslothai#9567) renders a fence as a plain shell until it first comes within a viewport of the reader, then highlights it for the rest of the mount. After reasoning_toggle the r100K film leaves the viewport either near the tail (scrollTop ~50,740) or about 20,000px higher, at random per cell on one build (78 of 172 cells across 43 recorded payloads), and the higher landing latches the fences of msg11/13/15 until thread_reopen remounts them. A null control whose cells all landed low measured those actions stable, so the result's latch noise was scored as a regression. The same noise also made a null that did see it excuse settings and model_change outright, which hid real changes there. scene/parity.js now reads, in the same walk that produces the unchanged per-message digest, each fence's latch state, full digest and text digest (whitespace dropped, since streamdown emits one span per line and the shell one text node), plus the message with every fence replaced by a marker. analysis/parity.fence_latch_residue treats a message as differing only by latch when everything outside its fences matches, every fence latched on both arms or neither matches in full, and every fence latched on one arm only matches on its text. Nothing is excused when one arm latched no fence anywhere, which is what a build whose fences never upgrade looks like. A latch-only pair is a MATCH, counted and printed, so it costs no coverage; payloads recorded before this carry no fence fields and score exactly as before. The selftest replays both failing runs from their recorded CI payloads, shows they fail as recorded and pass once the latch is recorded, and injects genuine differences (a message with no fences, a change outside a latched message's fences, a highlighting change on a fence both arms latched, fences that never upgrade) that must still fail. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * studiobench: keep a fence's spacing and language in the latch comparison The one-sided fence comparison dropped every whitespace character, so `x = 1` and `x=1`, an indentation change or a space inside a string read as the same fence, and it never looked at the language, so a fence that changed language but kept its body read as latch-only too. Drop line breaks only, the one thing that differs between the shell and the highlighted form, keep the rest of the text as it is, and record and compare each fence's data-language. * studiobench: read a fence's text as lines, not a run of characters Dropping every newline made a line break moved within the code, `a\nbc` against `ab\nc`, read as the same fence. Read both forms as lines: the shell's text split on newlines, and the highlighted fence one line per element directly inside its <code>, a blank line's lone newline dropped. Join them with one newline and drop trailing blank lines, which the shell trims. * studiobench: compare a fence's text as written, without prose placeholders The time and id placeholders are there for UI prose. Applied to a one-sided fence's source they made `"295ms"` against `"310ms"`, or two different timestamp or id literals, read as the same code. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…er became resident
Review + UI evidencePinned head: Stop during an in-
Review fixes pushed
Rejected: a same-model load that is queued behind the Stop could be evicted. From the chat tab that can't happen, because Stop holds the model lifecycle lease until CI: upstream 51/51 pass. The earlier "Parity verdict" red was harness noise, fixed by #11741 and #11772. Staged on fresh |
…nslothai#11741) * studiobench: compare a code fence one arm scrolled past on its text The UI parity gate failed on backend-only pull requests (unslothai#11724, unslothai#11727, and others on 2026-09-23) with differences like msg15(assistant):1847269->2150610c on model_change, reasoning_toggle, select_all_copy, settings and image_upload at r100K. Those are not rendering differences. code-fence-defer.tsx (unslothai#9462, the default since unslothai#9567) renders a fence as a plain shell until it first comes within a viewport of the reader, then highlights it for the rest of the mount. After reasoning_toggle the r100K film leaves the viewport either near the tail (scrollTop ~50,740) or about 20,000px higher, at random per cell on one build (78 of 172 cells across 43 recorded payloads), and the higher landing latches the fences of msg11/13/15 until thread_reopen remounts them. A null control whose cells all landed low measured those actions stable, so the result's latch noise was scored as a regression. The same noise also made a null that did see it excuse settings and model_change outright, which hid real changes there. scene/parity.js now reads, in the same walk that produces the unchanged per-message digest, each fence's latch state, full digest and text digest (whitespace dropped, since streamdown emits one span per line and the shell one text node), plus the message with every fence replaced by a marker. analysis/parity.fence_latch_residue treats a message as differing only by latch when everything outside its fences matches, every fence latched on both arms or neither matches in full, and every fence latched on one arm only matches on its text. Nothing is excused when one arm latched no fence anywhere, which is what a build whose fences never upgrade looks like. A latch-only pair is a MATCH, counted and printed, so it costs no coverage; payloads recorded before this carry no fence fields and score exactly as before. The selftest replays both failing runs from their recorded CI payloads, shows they fail as recorded and pass once the latch is recorded, and injects genuine differences (a message with no fences, a change outside a latched message's fences, a highlighting change on a fence both arms latched, fences that never upgrade) that must still fail. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * studiobench: keep a fence's spacing and language in the latch comparison The one-sided fence comparison dropped every whitespace character, so `x = 1` and `x=1`, an indentation change or a space inside a string read as the same fence, and it never looked at the language, so a fence that changed language but kept its body read as latch-only too. Drop line breaks only, the one thing that differs between the shell and the highlighted form, keep the rest of the text as it is, and record and compare each fence's data-language. * studiobench: read a fence's text as lines, not a run of characters Dropping every newline made a line break moved within the code, `a\nbc` against `ab\nc`, read as the same fence. Read both forms as lines: the shell's text split on newlines, and the highlighted fence one line per element directly inside its <code>, a blank line's lone newline dropped. Join them with one newline and drop trailing blank lines, which the shell trims. * studiobench: compare a fence's text as written, without prose placeholders The time and id placeholders are there for UI prose. Applied to a one-sided fence's source they made `"295ms"` against `"310ms"`, or two different timestamp or id literals, read as the same code. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
Thank you for the PR! Closing this as superseded by #11697. When this PR was opened, Stop in chat sent a plain The unscoped path this PR changes is now only reached by the Loaded Models and API Monitor unload buttons and external API clients. If that turns out to matter for a still-downloading model, it would be better as a small follow-up scoped to those callers. |

Clicking Stop in chat while a model is still downloading does not stop it. The download keeps going, the model loads into the GPU anyway, and picking another model gets refused with "Another model is already loading".
Now Stop cancels the download straight away.