@jskit-ai/assistant-core 0.2.22 → 0.2.24

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - The avatar's Show and Minimise buttons set no fixed height: they are 40dp icon buttons with material-web's 48dp touch target, so `jskit check m3` passes on `AssistantConversationElement`.
5
6
  - The goal menu closes when Cancel succeeds, as it does after Start; Pause and Resume keep it open.
6
7
  - `AssistantConversationElement` has an `avatar-thumbnail` slot, with the `{ size, height }` scope of the other avatar slots: while the avatar is hidden, the **Show avatar** button draws its content instead of the anonymous account icon, such as a still miniature of the avatar, clipped to the button's round 32-pixel disc. The button keeps its label, title and 44-pixel target, and shows the icon as before without the slot.
7
8
  - A delivered Codex turn is held as not yet started only until Codex reports it: a `turn/started` that arrives before the `turn/start` answer counts, and a thread read listing exactly that turn as completed or failed settles a turn whose notifications were missed, so its answer is no longer kept waiting for a notification that never comes.
@@ -8,10 +8,10 @@
8
8
  "build": "vite build"
9
9
  },
10
10
  "dependencies": {
11
- "@jskit-ai/assistant-core": "0.2.22",
11
+ "@jskit-ai/assistant-core": "0.2.24",
12
12
  "@jskit-ai/http-runtime": "0.2.10",
13
13
  "@jskit-ai/kernel": "0.2.10",
14
- "@jskit-ai/material-web": "0.1.0",
14
+ "@jskit-ai/material-web": "0.1.2",
15
15
  "vue": "^3.5.13",
16
16
  "vuetify": "^4.0.0",
17
17
  "@jskit-ai/connectors-core": "0.2.11",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/assistant-core",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test --test-concurrency=1"
@@ -220,6 +220,6 @@
220
220
  }
221
221
  },
222
222
  "devDependencies": {
223
- "@jskit-ai/material-web": "0.1.0"
223
+ "@jskit-ai/material-web": "0.1.2"
224
224
  }
225
225
  }
@@ -8,7 +8,7 @@
8
8
  <slot name="avatar-control" :size="avatarSize" :height="avatarHeight" />
9
9
  <v-btn
10
10
  icon="$accountCircle" size="small"
11
- variant="text" :width="44" :min-width="44" :min-height="44"
11
+ variant="text" :width="44" :min-width="44"
12
12
  class="assistant-conversation__avatar-size"
13
13
  :aria-label="t('jskit.assistant.chat.showAvatar')" :title="t('jskit.assistant.chat.showAvatar')"
14
14
  :aria-expanded="avatarSize !== 'hidden'" @click="toggleAvatar"
@@ -26,7 +26,7 @@
26
26
  <slot name="avatar-tools" :size="avatarSize" :height="avatarHeight" />
27
27
  <v-btn
28
28
  icon="$minus" size="small" variant="text" color="primary"
29
- :width="40" :min-width="40" :min-height="44" class="assistant-conversation__avatar-size"
29
+ :width="40" :min-width="40" class="assistant-conversation__avatar-size"
30
30
  :aria-label="t('jskit.assistant.chat.minimiseAvatar')" :title="t('jskit.assistant.chat.minimiseAvatar')" :aria-expanded="true"
31
31
  @click="toggleAvatar"
32
32
  >
@@ -369,7 +369,6 @@ defineExpose({ focus: () => input.value?.focus(), submit, stop });
369
369
  .assistant-conversation__avatar { position: absolute; top: var(--assistant-conversation-warning-bottom, 0px); right: 0; z-index: 3; max-width: 100%; min-width: 0; }
370
370
  .assistant-conversation__avatar-controls { position: absolute; top: 0; right: 100%; display: flex; align-items: center; justify-content: flex-end; min-height: 44px; }
371
371
  .assistant-conversation__avatar--hidden .assistant-conversation__avatar-controls { right: 0; }
372
- .assistant-conversation__avatar-size { min-width: 44px; min-height: 44px; }
373
372
  .assistant-conversation__avatar-size-disc { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; background: rgba(var(--v-theme-on-surface), .08); }
374
373
  .assistant-conversation__avatar-size-disc--minimise { background: rgba(var(--v-theme-primary), .12); }
375
374
  .assistant-conversation__avatar-presentation { display: flex; flex-direction: column; align-items: center; min-width: 0; }
@@ -1124,7 +1124,9 @@ test("an optional avatar clamps in a short conversation without consuming its pr
1124
1124
  assert.ok((await input.boundingBox()).height >= 40);
1125
1125
  const avatarExpanded = await sizeControl.getAttribute("aria-expanded") === "true";
1126
1126
  assert.equal(avatarButton.width, avatarExpanded ? 40 : 44, "Expanded minimise is compact; collapsed Show retains its wider target");
1127
- assert.ok(avatarButton.height >= 44, "Avatar visibility retains its original target height");
1127
+ assert.equal(Math.round(avatarButton.height), 40, "Avatar visibility is a 40dp icon button, with no fixed height");
1128
+ const avatarTarget = await sizeControl.evaluate((element) => Number.parseFloat(window.getComputedStyle(element, "::before").height));
1129
+ assert.ok(avatarTarget >= 48, "Avatar visibility keeps Material's 48dp touch target");
1128
1130
  assert.ok(toolBounds.width >= 48 && toolBounds.height >= 48, "Avatar tools retain a reachable touch target");
1129
1131
  await expect.poll(async () => (await body.boundingBox()).height, { message: "The short container retains readable history" }).toBeGreaterThanOrEqual(100);
1130
1132
  assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth));
@@ -1174,7 +1176,9 @@ test("an optional avatar clamps in a short conversation without consuming its pr
1174
1176
  await expect(sizeControl).toBeVisible();
1175
1177
  const showBounds = await sizeControl.boundingBox();
1176
1178
  assert.equal(showBounds.width, 44, "Collapsed Show retains its original wider target");
1177
- assert.ok(showBounds.height >= 44);
1179
+ assert.equal(Math.round(showBounds.height), 40, "Collapsed Show keeps the small icon button's height");
1180
+ assert.ok(await sizeControl.evaluate(element => Number.parseFloat(getComputedStyle(element, "::before").height)) >= 48,
1181
+ "Collapsed Show keeps a 48dp touch target");
1178
1182
  const collapsedControls = await page.locator(".assistant-conversation__avatar-controls").boundingBox();
1179
1183
  assert.equal(collapsedControls.y, chatBounds.y, "The collapsed controls stay at the chat top");
1180
1184
  assert.equal(showBounds.y + showBounds.height / 2, collapsedControls.y + collapsedControls.height / 2,
@@ -60,3 +60,11 @@ test("the hidden avatar's Show button shows the avatar-thumbnail slot, or the ac
60
60
  assert.match(fallback, /<i data-icon="\$accountCircle"[^>]*><\/i>/u);
61
61
  assert.doesNotMatch(fallback, /fixture-thumbnail/u);
62
62
  });
63
+
64
+ test("the avatar's Show and Minimise buttons set no fixed height, so material-web gives them the 48dp touch target", () => {
65
+ const source = readFileSync(new URL(elementUrl), "utf8");
66
+ const buttons = [...source.matchAll(/<v-btn\b[^>]*>/gu)].map(([tag]) => tag).filter((tag) => tag.includes("assistant-conversation__avatar-size"));
67
+ assert.equal(buttons.length, 2);
68
+ for (const tag of buttons) assert.doesNotMatch(tag, /(?:^|\s):?(?:min-)?height=/u);
69
+ assert.doesNotMatch(source, /\.assistant-conversation__avatar-size\s*\{[^}]*height/u);
70
+ });