@poodle64/librarian 2026.9.3 → 2026.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,7 +41,9 @@
41
41
 
42
42
  // What the agent is being asked about — chat with this document, this
43
43
  // collection, or the whole library. Callers that have no narrower scope
44
- // pass neither name and only "All collections" ever renders.
44
+ // pass neither name, leaving "All collections" the sole entry — and a
45
+ // sole entry is not a choice, so `hasChoice` below hides it rather than
46
+ // rendering a chip with nothing to switch to.
45
47
  const choices = $derived(
46
48
  [
47
49
  documentName ? { id: 'document' as const, label: documentName } : null,
@@ -50,6 +52,12 @@
50
52
  ].filter((c) => c !== null)
51
53
  );
52
54
 
55
+ // A room with one shelf set has one scope, fixed by the caller never
56
+ // passing a name — no pick to make, so the row renders nothing rather
57
+ // than a chip that only ever reselects itself (design-system, the
58
+ // fixed-scope Composer defect).
59
+ const hasChoice = $derived(choices.length > 1);
60
+
53
61
  // Three chips in a narrow column clipped all three to fragments
54
62
  // ("defence-s…", "All colle…"). Wrapping beats truncating: a chip a reader
55
63
  // cannot finish reading is not a control, it is decoration.
@@ -76,20 +84,22 @@
76
84
  ></textarea>
77
85
 
78
86
  <div class="flex items-center gap-2 px-3 pb-2.5">
79
- <div class="flex min-w-0 flex-wrap items-center gap-1">
80
- {#each choices as choice (choice.id)}
81
- <button
82
- type="button"
83
- onclick={() => onscope(choice.id)}
84
- class="max-w-full truncate rounded-full px-2 py-0.5 text-xs transition-colors {scope ===
85
- choice.id
86
- ? 'bg-primary/15 text-foreground border-primary/40 border'
87
- : 'text-muted-foreground hover:text-foreground border border-transparent'}"
88
- >
89
- {choice.label}
90
- </button>
91
- {/each}
92
- </div>
87
+ {#if hasChoice}
88
+ <div class="flex min-w-0 flex-wrap items-center gap-1">
89
+ {#each choices as choice (choice.id)}
90
+ <button
91
+ type="button"
92
+ onclick={() => onscope(choice.id)}
93
+ class="max-w-full truncate rounded-full px-2 py-0.5 text-xs transition-colors {scope ===
94
+ choice.id
95
+ ? 'bg-primary/15 text-foreground border-primary/40 border'
96
+ : 'text-muted-foreground hover:text-foreground border border-transparent'}"
97
+ >
98
+ {choice.label}
99
+ </button>
100
+ {/each}
101
+ </div>
102
+ {/if}
93
103
  <span class="flex-1"></span>
94
104
  {#if running}
95
105
  <button
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poodle64/librarian",
3
- "version": "2026.9.3",
3
+ "version": "2026.9.5",
4
4
  "description": "Milton's conversation surface as a consumable Svelte 5 package: the stream client, transcript state and chat components (transcript, composer, markdown) every household app renders instead of rebuilding.",
5
5
  "type": "module",
6
6
  "license": "MIT",