Fix model labels and catalog-backed setup initialization

This commit is contained in:
amosblomqvist
2026-10-26 19:43:09 +02:00
parent 3dc88472ee
commit 683eb93bcc
10 changed files with 389 additions and 210 deletions
+4 -4
View File
@@ -123,9 +123,9 @@ describe("prefillFromSlots — the SetupDialog prefill (BYOK wave)", () => {
assert.deepEqual(pre, {});
});
it("a pin whose model left the federated catalog does not prefill (lapsed key)", () => {
it("a disconnected saved identity still prefills without selectable metadata", () => {
const pre = prefillFromSlots(catalog, { strong: { model: { provider: "gone", id: "vanished" } }, cheap: null, vision: null });
assert.deepEqual(pre, {});
assert.deepEqual(pre, { strong: { provider: "gone", id: "vanished" } });
});
it("provider collisions never cross-pollute (same id, different provider)", () => {
@@ -158,9 +158,9 @@ describe("prefillLevelFromPin — the setup dialog's level prefill (chunk 2)", (
});
});
describe("setupStage — unchanged by the BYOK wave", () => {
describe("setupStage — unknown is not keyless", () => {
it("keys first (owner ordering), pickers when a provider is keyed", () => {
assert.equal(setupStage(null), "keys");
assert.equal(setupStage(null), "loading");
assert.equal(setupStage([{ id: "x", keyPresent: false }]), "keys");
assert.equal(setupStage([{ id: "x", keyPresent: true }]), "pickers");
});