mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-19 12:49:32 +01:00
fix(local-model): a switch ends on the list of models, not on the one-button screen
Seen on a MacBook (M5 Pro, 2026-11-12): pressing Use on a model in "Models on this Mac" ran the switch and then showed the screen that ends an install, "X is ready on this Mac" with Start a session alone. The list was gone, so deleting the model just switched away from meant closing the window and opening it again. That screen is right after a download: the person installed a model and wants a session. A switch is pressed IN the list by someone who is tidying it. A switch is a job without a `model` step, so the window now tells the two apart from the job it just watched and ends a switch on the whole installed screen: the list with "In use" on the other row, Add a model, Stop and Remove. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
db81d55fc9
commit
9c2ba35f38
3 files changed
+56
-6
No files matched your search
@@ -520,14 +520,20 @@ Object.assign(CodemanApp.prototype, {
|
||||
/**
|
||||
* Called with the `install` object that is about to replace the one on screen. An install
|
||||
* that was running and is installed now finished in front of the person: the window then
|
||||
* shows the screen that ends it (see `justInstalled`). Any other state ends that moment.
|
||||
* shows the screen that ends it (see `justInstalled`). A switch is the exception: it ends
|
||||
* on the whole installed screen, list of models included. Any other state ends that moment.
|
||||
*/
|
||||
_noteLocalModelInstall(next) {
|
||||
const ui = this._localModelWindowState();
|
||||
const before = localModelInstall(this._localModelStatus).state;
|
||||
const last = localModelInstall(this._localModelStatus);
|
||||
const before = last.state;
|
||||
const after = next && typeof next.state === 'string' ? next.state : 'idle';
|
||||
// A switch downloads nothing (its job has no `model` step). The person pressed Use in the
|
||||
// list of models, so it ends on that list, with "In use" on the other row: the screen
|
||||
// that ends an install would take the list away from someone who came to tidy it.
|
||||
const switched = Array.isArray(last.steps) && !last.steps.includes('model');
|
||||
if (after !== 'installed') ui.justInstalled = false;
|
||||
else if (before === 'installing' && ui.open) ui.justInstalled = true;
|
||||
else if (before === 'installing' && ui.open) ui.justInstalled = !switched;
|
||||
},
|
||||
|
||||
_localModelRefused() {
|
||||
@@ -560,8 +566,9 @@ Object.assign(CodemanApp.prototype, {
|
||||
*/
|
||||
confirmDelete: null,
|
||||
/**
|
||||
* The install finished while this window was open: the screen that ends it shows
|
||||
* "Start a session" alone. Stop and Remove belong to the window opened later.
|
||||
* An install (a job that downloaded a model) finished while this window was open:
|
||||
* the screen that ends it shows "Start a session" alone. Stop and Remove belong to
|
||||
* the window opened later. Never set by a switch (`_noteLocalModelInstall`).
|
||||
*/
|
||||
justInstalled: false,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user