@burdenoff/fe-libs 2026.1115.11 → 2026.1115.12

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.
@@ -186,6 +186,7 @@ export * from './ui/composer/AssistantModeSelector';
186
186
  export * from './ui/composer/AssistantModeMenu';
187
187
  export * from './ui/composer/modeMenuKeys';
188
188
  export * from './ui/composer/modeSwitchPlan';
189
+ export * from './ui/composer/pageBoxClass';
189
190
  export * from './ui/composer/imeEnter';
190
191
  export * from './ui/composer/AssistantVoiceButton';
191
192
  export * from './ui/composer/AssistantVoiceSelector';
@@ -1,20 +1,24 @@
1
1
  import { usePrefersReducedMotion as e } from "./usePrefersReducedMotion.js";
2
- import { Sparkles as t } from "lucide-react";
3
- import { jsx as n } from "react/jsx-runtime";
2
+ import { useAssistantPageLayout as t } from "./assistantPageLayout.js";
3
+ import { Sparkles as n } from "lucide-react";
4
+ import { jsx as r } from "react/jsx-runtime";
4
5
  // src/shared/assistant/ui/AssistantAvatar.tsx
5
- var r = "mt-0.5 flex size-6 flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-action-primary-bg/25 to-action-primary-bg/5 text-action-primary-bg", i = () => {
6
- let i = e();
7
- return /* @__PURE__ */ n("div", {
6
+ var i = "mt-0.5 flex size-6 flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-action-primary-bg/25 to-action-primary-bg/5 text-action-primary-bg", a = " boff-orb boff-orb--avatar", o = ({ pageLayout: t }) => {
7
+ let o = e();
8
+ return /* @__PURE__ */ r("div", {
8
9
  "aria-hidden": "true",
9
10
  "data-testid": "assistant-avatar",
10
11
  "data-active": "true",
11
- className: r + (i ? "" : " motion-safe:animate-pulse"),
12
- children: /* @__PURE__ */ n(t, { className: "size-3.5" })
12
+ className: i + (o ? "" : " motion-safe:animate-pulse") + (t ? `${a}${o ? "" : " boff-pulse boff-ripple"}` : ""),
13
+ children: /* @__PURE__ */ r(n, { className: "size-3.5" })
13
14
  });
14
- }, a = ({ active: e = !1 }) => e ? /* @__PURE__ */ n(i, {}) : /* @__PURE__ */ n("div", {
15
- "aria-hidden": "true",
16
- "data-testid": "assistant-avatar",
17
- className: r,
18
- children: /* @__PURE__ */ n(t, { className: "size-3.5" })
19
- });
20
- export { a as AssistantAvatar };
15
+ }, s = ({ active: e = !1 }) => {
16
+ let s = t();
17
+ return e ? /* @__PURE__ */ r(o, { pageLayout: s }) : /* @__PURE__ */ r("div", {
18
+ "aria-hidden": "true",
19
+ "data-testid": "assistant-avatar",
20
+ className: i + (s ? a : ""),
21
+ children: /* @__PURE__ */ r(n, { className: "size-3.5" })
22
+ });
23
+ };
24
+ export { s as AssistantAvatar };
@@ -2923,6 +2923,7 @@ var ga = () => () => {}, _a = () => "off", va = { overflowY: "auto" }, ya = ({ v
2923
2923
  onSelect: F ? nd : Gu
2924
2924
  } : void 0,
2925
2925
  suspendDictation: J || F && !ya,
2926
+ entrance: I && dd,
2926
2927
  onVoiceStateChange: q.ids || Ma ? hu : void 0,
2927
2928
  modeReadOnly: Ma || void 0,
2928
2929
  voiceSessionActive: F ? $.active : void 0,
@@ -76,6 +76,11 @@ interface Props {
76
76
  onStopTurn?: () => void;
77
77
  /** The platform shell label for the Stop control (`assistantChrome.stopTurn`). */
78
78
  stopTurnLabel?: string;
79
+ /**
80
+ * ★ BOFF-14753: a message that arrived while the page was open rises in (M5).
81
+ * Set by the list on the /assistant page only; history never animates.
82
+ */
83
+ entering?: boolean;
79
84
  }
80
85
  /**
81
86
  * Purely decorative "still typing" caret: hidden from assistive tech (the list's
@@ -8,56 +8,57 @@ import { AssistantRichContent as a } from "../openui/AssistantRichContent.js";
8
8
  import { useAssistantGenerativeUi as o } from "../openui/generativeUi.js";
9
9
  import { stripOpenUiBlocks as s } from "../openui/segments.js";
10
10
  import { AssistantPendingWriteCard as ee } from "./AssistantPendingWriteCard.js";
11
- import { AssistantMessageAttachments as te } from "./AssistantMessageAttachments.js";
12
- import { AssistantFocusBadge as c } from "./composer/AssistantFocusChip.js";
13
- import { readMessageFocus as l } from "../askAbout/focus.js";
14
- import { AssistantSpeakButton as ne } from "./AssistantSpeakButton.js";
15
- import { useAssistantStorageFolders as re } from "../product.js";
16
- import { useAssistantSpeech as ie } from "./AssistantSpeechProvider.js";
17
- import { AssistantToolActivity as ae, parseToolActivity as oe } from "./AssistantToolActivity.js";
18
- import { AssistantTurnActivity as se } from "./AssistantTurnActivity.js";
19
- import { usePrefersReducedMotion as u } from "./usePrefersReducedMotion.js";
20
- import { getAssistantDisplayContent as ce, isAssistantMessageLive as le } from "../displayContent.js";
21
- import { downloadAssistantArtifact as ue } from "../api.js";
22
- import { useAssistantTr as d } from "../i18n.js";
23
- import { useI18n as de } from "../../providers/shell/I18nProvider.js";
24
- import { languageConfirmationCopy as fe } from "../appControls/languageReply.js";
25
- import { copyToClipboard as pe } from "../clipboard.js";
26
- import { useMemo as f, useRef as p, useState as m } from "react";
27
- import { Check as h, Copy as g, RotateCcw as _, Square as me } from "lucide-react";
11
+ import { AssistantMessageAttachments as c } from "./AssistantMessageAttachments.js";
12
+ import { AssistantFocusBadge as te } from "./composer/AssistantFocusChip.js";
13
+ import { readMessageFocus as ne } from "../askAbout/focus.js";
14
+ import { AssistantSpeakButton as re } from "./AssistantSpeakButton.js";
15
+ import { useAssistantStorageFolders as ie } from "../product.js";
16
+ import { useAssistantSpeech as l } from "./AssistantSpeechProvider.js";
17
+ import { AssistantToolActivity as u, parseToolActivity as ae } from "./AssistantToolActivity.js";
18
+ import { AssistantTurnActivity as oe } from "./AssistantTurnActivity.js";
19
+ import { usePrefersReducedMotion as d } from "./usePrefersReducedMotion.js";
20
+ import { useAssistantPageLayout as f } from "./assistantPageLayout.js";
21
+ import { getAssistantDisplayContent as se, isAssistantMessageLive as ce } from "../displayContent.js";
22
+ import { downloadAssistantArtifact as p } from "../api.js";
23
+ import { useAssistantTr as le } from "../i18n.js";
24
+ import { useI18n as ue } from "../../providers/shell/I18nProvider.js";
25
+ import { languageConfirmationCopy as de } from "../appControls/languageReply.js";
26
+ import { copyToClipboard as fe } from "../clipboard.js";
27
+ import { useMemo as m, useRef as pe, useState as h } from "react";
28
+ import { Check as me, Copy as he, RotateCcw as g, Square as _ } from "lucide-react";
28
29
  import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
29
30
  // src/shared/assistant/ui/AssistantMessageItem.tsx
30
- function he(e) {
31
+ function ge(e) {
31
32
  return e.role === "assistant" ? e.metadata : void 0;
32
33
  }
33
- function ge(e) {
34
+ function _e(e) {
34
35
  return e?.artifacts ?? [];
35
36
  }
36
37
  function x(e) {
37
38
  return window.atob(e);
38
39
  }
39
- function _e(e, t, n) {
40
+ function ve(e, t, n) {
40
41
  let r = x(e), i = new Uint8Array(r.length);
41
42
  for (let e = 0; e < r.length; e += 1) i[e] = r.charCodeAt(e);
42
43
  let a = new Blob([i], { type: n }), o = URL.createObjectURL(a), s = document.createElement("a");
43
44
  s.href = o, s.download = t, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(o);
44
45
  }
45
46
  var S = () => {
46
- let e = u();
47
+ let e = d(), t = f();
47
48
  return /* @__PURE__ */ y("span", {
48
49
  "aria-hidden": "true",
49
50
  "data-testid": "assistant-streaming-caret",
50
- className: "ms-0.5 inline-block h-4 w-1.5 rounded-sm bg-text-secondary align-middle" + (e ? "" : " motion-safe:animate-pulse")
51
+ className: t ? `ms-0.5 inline-block h-4 rounded-sm align-middle boff-caret-glow${e ? " boff-still" : ""}` : "ms-0.5 inline-block h-4 w-1.5 rounded-sm bg-text-secondary align-middle" + (e ? "" : " motion-safe:animate-pulse")
51
52
  });
52
- }, C = ({ onApprovePendingWrite: u, approvingWriteRef: x = null, pendingWriteExpired: C = !1, pendingWriteApproved: ve = !1, pendingWriteGoAheadSent: ye = !1, message: w, processing: T, isStreaming: E, isFailed: D, isLastAssistant: O, isNewestAssistant: k, onRetry: A, legacyWriteCardHidden: j = !1, writeProposals: M, uiOffers: N, onStopTurn: P, stopTurnLabel: F = "Stop" }) => {
53
- let be = e(), I = d(), { locale: xe } = de(), L = fe(w, I), R = L ? L.translated ? xe : "en" : w.metadata?.lang, z = L ? `${w.id}:language:${R}` : w.id, B = p(z), Se = re(), { getAccessToken: Ce, getWorkspaceToken: we } = t(), V = ie(), [Te, H] = m(null), [Ee, U] = m(!1), W = w.role === "user", G = f(() => he(w), [w]), K = f(() => ge(G), [G]), q = T === void 0 ? E ? {
53
+ }, C = ({ onApprovePendingWrite: d, approvingWriteRef: x = null, pendingWriteExpired: C = !1, pendingWriteApproved: ye = !1, pendingWriteGoAheadSent: be = !1, message: w, processing: T, isStreaming: E, isFailed: D, isLastAssistant: O, isNewestAssistant: k, onRetry: A, legacyWriteCardHidden: j = !1, writeProposals: M, uiOffers: N, onStopTurn: P, stopTurnLabel: xe = "Stop", entering: Se = !1 }) => {
54
+ let Ce = e(), we = f(), F = Se ? " boff-rise-sm" : "", I = le(), { locale: Te } = ue(), L = de(w, I), R = L ? L.translated ? Te : "en" : w.metadata?.lang, z = L ? `${w.id}:language:${R}` : w.id, B = pe(z), Ee = ie(), { getAccessToken: De, getWorkspaceToken: Oe } = t(), V = l(), [ke, H] = h(null), [Ae, U] = h(!1), W = w.role === "user", G = m(() => ge(w), [w]), K = m(() => _e(G), [G]), q = T === void 0 ? E ? {
54
55
  status: "streaming",
55
56
  messageId: w.id,
56
57
  updatedAt: w.timestamp
57
- } : null : T, J = ce(w, q, I), { steps: Y, text: X } = f(() => W ? {
58
+ } : null : T, J = se(w, q, I), { steps: Y, text: X } = m(() => W ? {
58
59
  steps: [],
59
60
  text: w.content
60
- } : J.kind === "output" ? oe(J.text) : {
61
+ } : J.kind === "output" ? ae(J.text) : {
61
62
  steps: [],
62
63
  text: ""
63
64
  }, [
@@ -65,21 +66,21 @@ var S = () => {
65
66
  w.content,
66
67
  J.kind,
67
68
  J.text
68
- ]), Z = o(), Q = f(() => Z ? s(X) : X, [Z, X]), De = () => {
69
- pe(X).then((e) => {
69
+ ]), Z = o(), Q = m(() => Z ? s(X) : X, [Z, X]), je = () => {
70
+ fe(X).then((e) => {
70
71
  e && (U(!0), setTimeout(() => U(!1), 2e3));
71
72
  });
72
- }, Oe = async (e) => {
73
+ }, Me = async (e) => {
73
74
  if (!G?.sandboxId || !G.sessionId) return;
74
75
  let t = new URLSearchParams(window.location.search).get("workspace") ?? "";
75
76
  if (t) {
76
77
  H(e.path);
77
78
  try {
78
- let n = await ue(G.sandboxId, t, G.sessionId, e.path, G.mode, {
79
- accessToken: Ce(),
80
- workspaceToken: we()
79
+ let n = await p(G.sandboxId, t, G.sessionId, e.path, G.mode, {
80
+ accessToken: De(),
81
+ workspaceToken: Oe()
81
82
  });
82
- _e(n.contentBase64, n.filename, n.mimeType);
83
+ ve(n.contentBase64, n.filename, n.mimeType);
83
84
  } finally {
84
85
  H(null);
85
86
  }
@@ -89,7 +90,7 @@ var S = () => {
89
90
  minute: "2-digit"
90
91
  });
91
92
  if (w.role === "system") return /* @__PURE__ */ y("div", {
92
- className: "flex justify-center px-2 py-1",
93
+ className: `flex justify-center px-2 py-1${F}`,
93
94
  "data-testid": "assistant-message-system",
94
95
  children: w.metadata?.localAction?.kind === "navigate" ? /* @__PURE__ */ y("div", {
95
96
  className: "max-w-[90%] break-words rounded-lg border border-border-subtle bg-bg-sunken/60 px-3 py-2 text-center text-xs leading-relaxed text-text-muted",
@@ -101,15 +102,15 @@ var S = () => {
101
102
  })
102
103
  });
103
104
  if (W) {
104
- let e = w.metadata?.attachments ?? [], t = l(w.metadata?.askAbout);
105
+ let e = w.metadata?.attachments ?? [], t = ne(w.metadata?.askAbout);
105
106
  return /* @__PURE__ */ y("div", {
106
- className: "flex justify-end",
107
+ className: `flex justify-end${F}`,
107
108
  "data-testid": "assistant-message-user",
108
109
  children: /* @__PURE__ */ b("div", {
109
110
  className: "max-w-[85%]",
110
111
  children: [
111
112
  w.content && /* @__PURE__ */ y("div", {
112
- className: "rounded-2xl rounded-br-md bg-action-primary-bg/12 px-3.5 py-2.5 text-[15px] leading-relaxed text-text-primary",
113
+ className: `rounded-2xl rounded-br-md bg-action-primary-bg/12 px-3.5 py-2.5 text-[15px] leading-relaxed text-text-primary${we ? " boff-tint-bubble" : ""}`,
113
114
  children: /* @__PURE__ */ y("p", {
114
115
  className: "whitespace-pre-wrap",
115
116
  children: w.content
@@ -118,9 +119,9 @@ var S = () => {
118
119
  t ? /* @__PURE__ */ y("div", {
119
120
  className: "mt-1 flex justify-end",
120
121
  "data-testid": "assistant-message-focus",
121
- children: /* @__PURE__ */ y(c, { focus: t })
122
+ children: /* @__PURE__ */ y(te, { focus: t })
122
123
  }) : null,
123
- /* @__PURE__ */ y(te, { attachments: e }),
124
+ /* @__PURE__ */ y(c, { attachments: e }),
124
125
  /* @__PURE__ */ y("div", {
125
126
  className: "mt-1 pe-1 text-end text-[10px] text-text-muted",
126
127
  children: $
@@ -130,22 +131,22 @@ var S = () => {
130
131
  });
131
132
  }
132
133
  return /* @__PURE__ */ b("div", {
133
- className: "flex gap-2.5",
134
+ className: `flex gap-2.5${F}`,
134
135
  "data-testid": "assistant-message-assistant",
135
136
  children: [/* @__PURE__ */ y(r, { active: E }), /* @__PURE__ */ b("div", {
136
137
  className: "min-w-0 flex-1",
137
138
  children: [
138
- Y.length > 0 && /* @__PURE__ */ y(ae, {
139
+ Y.length > 0 && /* @__PURE__ */ y(u, {
139
140
  steps: Y,
140
- live: le(w, q)
141
+ live: ce(w, q)
141
142
  }),
142
143
  G?.pendingWrite && !j ? /* @__PURE__ */ y(ee, {
143
144
  pendingWrite: G.pendingWrite,
144
- onApprove: u,
145
+ onApprove: d,
145
146
  approving: x !== null && x === G.pendingWrite.reference,
146
147
  expired: C,
147
- approved: ve,
148
- goAheadSent: ye,
148
+ approved: ye,
149
+ goAheadSent: be,
149
150
  awaitingTurn: !!E
150
151
  }) : null,
151
152
  M,
@@ -156,7 +157,7 @@ var S = () => {
156
157
  streaming: !!E
157
158
  })
158
159
  }),
159
- J.kind === "working" && /* @__PURE__ */ y(se, { processing: q }),
160
+ J.kind === "working" && /* @__PURE__ */ y(oe, { processing: q }),
160
161
  J.kind === "stopped" && /* @__PURE__ */ y("p", {
161
162
  className: "text-[15px] leading-relaxed text-text-secondary",
162
163
  "data-testid": "assistant-turn-stopped",
@@ -170,10 +171,10 @@ var S = () => {
170
171
  onClick: P,
171
172
  className: "flex items-center gap-1 rounded-md border border-border-subtle px-2 py-1 text-[11px] text-text-secondary transition-colors hover:bg-bg-elevated hover:text-text-primary",
172
173
  "data-testid": "assistant-stop-turn",
173
- children: [/* @__PURE__ */ y(me, {
174
+ children: [/* @__PURE__ */ y(_, {
174
175
  className: "size-3 fill-current",
175
176
  "aria-hidden": "true"
176
- }), /* @__PURE__ */ y("span", { children: F })]
177
+ }), /* @__PURE__ */ y("span", { children: xe })]
177
178
  })
178
179
  }) : null,
179
180
  N,
@@ -185,7 +186,7 @@ var S = () => {
185
186
  }), /* @__PURE__ */ y("div", {
186
187
  className: "flex flex-wrap gap-2",
187
188
  children: K.map((e) => {
188
- let t = `${e.name}${e.type === "directory" ? ".tar.gz" : ""}`, r = Te === e.path;
189
+ let t = `${e.name}${e.type === "directory" ? ".tar.gz" : ""}`, r = ke === e.path;
189
190
  return /* @__PURE__ */ y(n, {
190
191
  label: t,
191
192
  disabled: r,
@@ -197,8 +198,8 @@ var S = () => {
197
198
  path: e.path,
198
199
  filename: t
199
200
  },
200
- defaultFolderPath: Se.artifacts,
201
- onDownload: () => Oe(e)
201
+ defaultFolderPath: Ee.artifacts,
202
+ onDownload: () => Me(e)
202
203
  }, e.path);
203
204
  })
204
205
  })]
@@ -208,16 +209,16 @@ var S = () => {
208
209
  children: [
209
210
  X && /* @__PURE__ */ y("button", {
210
211
  type: "button",
211
- onClick: De,
212
+ onClick: je,
212
213
  className: "flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] text-text-muted transition-colors hover:bg-bg-elevated hover:text-text-secondary",
213
214
  "aria-label": I("message.copy", "Copy message"),
214
215
  "data-testid": "assistant-message-copy",
215
- children: Ee ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(h, { className: "size-3 text-status-success-text" }), /* @__PURE__ */ y("span", { children: I("message.copied", "Copied") })] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(g, { className: "size-3" }), /* @__PURE__ */ y("span", { children: I("message.copyShort", "Copy") })] })
216
+ children: Ae ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(me, { className: "size-3 text-status-success-text" }), /* @__PURE__ */ y("span", { children: I("message.copied", "Copied") })] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(he, { className: "size-3" }), /* @__PURE__ */ y("span", { children: I("message.copyShort", "Copy") })] })
216
217
  }),
217
218
  Q.trim() && V.isSupported && (() => {
218
219
  let e = V.blockedFor(z) ?? V.disabledReason, t = V.isSpeaking(w.id) || V.isSpeaking(B.current), n = !!e && !!k, r = n ? `speak-reason-${w.id}` : void 0, i = n ? null : V.deviceFallbackFor(z), a = i ? `speak-fallback-${w.id}` : void 0;
219
220
  return /* @__PURE__ */ b(v, { children: [
220
- /* @__PURE__ */ y(ne, {
221
+ /* @__PURE__ */ y(re, {
221
222
  isSpeaking: t,
222
223
  disabled: e !== null,
223
224
  disabledReason: e,
@@ -247,7 +248,7 @@ var S = () => {
247
248
  className: `flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-colors hover:bg-bg-elevated ${D ? "text-status-error-text" : "text-text-muted hover:text-text-secondary"}`,
248
249
  "aria-label": I("message.retry", "Retry"),
249
250
  "data-testid": "assistant-message-retry",
250
- children: [/* @__PURE__ */ y(_, { className: "size-3" }), /* @__PURE__ */ y("span", { children: I("message.retry", "Retry") })]
251
+ children: [/* @__PURE__ */ y(g, { className: "size-3" }), /* @__PURE__ */ y("span", { children: I("message.retry", "Retry") })]
251
252
  })
252
253
  ]
253
254
  }),
@@ -258,7 +259,7 @@ var S = () => {
258
259
  children: [
259
260
  w.tokens.input + w.tokens.output,
260
261
  " ",
261
- be.tokens
262
+ Ce.tokens
262
263
  ]
263
264
  })]
264
265
  })
@@ -5,72 +5,85 @@ import { useLiveOverlay as r } from "../liveOverlay.js";
5
5
  import { approvalFollowUpReplyIds as i, approvedPendingWriteIds as a, goAheadSentReplyIds as o } from "../liveTurns.js";
6
6
  import { scrollToEndWithin as s } from "./scrollWithin.js";
7
7
  import { PAGE_SCROLL_GUTTER as c, useAssistantPageLayout as l } from "./assistantPageLayout.js";
8
- import { Fragment as u, useEffect as d, useRef as f } from "react";
9
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
+ import { Fragment as u, useEffect as d, useRef as f, useState as p } from "react";
9
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
10
10
  // src/shared/assistant/ui/AssistantMessageList.tsx
11
- var h = 250, g = ({ onApprovePendingWrite: h, approvingWriteRef: g = null, approvableMessageId: _ = null, retryableMessageId: v = null, messages: y, processing: b, streamingMessageId: x, failedMessageId: S, onRetry: C, renderWriteProposals: w, hidesLegacyWriteCard: T, renderUiOffers: E, onStopTurn: D, stopTurnLabel: O, decorate: k }) => {
12
- let A = n(), j = l(), M = (() => {
13
- for (let e = y.length - 1; e >= 0; --e) if (y[e].role === "assistant") return y[e].id;
11
+ var g = 250;
12
+ function _(e) {
13
+ return new Set(e.map((e) => e.id));
14
+ }
15
+ var v = ({ onApprovePendingWrite: g, approvingWriteRef: v = null, approvableMessageId: y = null, retryableMessageId: b = null, messages: x, processing: S, streamingMessageId: C, failedMessageId: w, onRetry: T, renderWriteProposals: E, hidesLegacyWriteCard: D, renderUiOffers: O, onStopTurn: k, stopTurnLabel: A, decorate: j }) => {
16
+ let M = n(), N = l(), P = x[0]?.id ?? null, [F, I] = p(() => ({
17
+ firstMessageId: P,
18
+ ids: _(x)
19
+ }));
20
+ F.firstMessageId !== P && I({
21
+ firstMessageId: P,
22
+ ids: F.firstMessageId === null && x.length <= 2 ? F.ids : _(x)
23
+ });
24
+ let L = (() => {
25
+ for (let e = x.length - 1; e >= 0; --e) if (x[e].role === "assistant") return x[e].id;
14
26
  return null;
15
- })(), N = a(y), P = o(y), F = i(y), I = f(null);
27
+ })(), R = a(x), z = o(x), B = i(x), V = f(null);
16
28
  d(() => {
17
- let e = I.current;
29
+ let e = V.current;
18
30
  if (e && e.scrollHeight - e.scrollTop - e.clientHeight < 100) {
19
31
  let n = t();
20
32
  s(e, { behavior: n ? "auto" : "smooth" });
21
33
  }
22
- }, [y, x]);
23
- let L = r((e) => e.byMessageId), R = x === null ? null : L[x]?.content ?? null, z = k ? y.map((e, t) => k(e, t, y)) : null, B = z?.[z.length - 1]?.content ?? null, V = f(0), H = f(null), U = R ?? B;
34
+ }, [x, C]);
35
+ let H = r((e) => e.byMessageId), U = C === null ? null : H[C]?.content ?? null, W = j ? x.map((e, t) => j(e, t, x)) : null, G = W?.[W.length - 1]?.content ?? null, K = f(0), q = f(null), J = U ?? G;
24
36
  return d(() => {
25
- if (U === null) return;
37
+ if (J === null) return;
26
38
  let e = () => {
27
- H.current = null, V.current = Date.now();
28
- let e = I.current;
39
+ q.current = null, K.current = Date.now();
40
+ let e = V.current;
29
41
  e && e.scrollHeight - e.scrollTop - e.clientHeight < 100 && s(e, { behavior: "auto" });
30
- }, t = V.current + 250 - Date.now();
31
- t <= 0 ? e() : H.current === null && (H.current = setTimeout(e, t));
32
- }, [U]), d(() => () => {
33
- H.current !== null && clearTimeout(H.current);
42
+ }, t = K.current + 250 - Date.now();
43
+ t <= 0 ? e() : q.current === null && (q.current = setTimeout(e, t));
44
+ }, [J]), d(() => () => {
45
+ q.current !== null && clearTimeout(q.current);
34
46
  }, []), d(() => {
35
- I.current && s(I.current, { behavior: "instant" });
36
- }, []), /* @__PURE__ */ m("div", {
37
- ref: I,
38
- className: j ? `scrollbar-slim flex-1 space-y-4 overflow-y-auto py-3 ${c}` : "scrollbar-slim flex-1 space-y-4 overflow-y-auto p-3",
47
+ V.current && s(V.current, { behavior: "instant" });
48
+ }, []), /* @__PURE__ */ h("div", {
49
+ ref: V,
50
+ className: N ? `scrollbar-slim flex-1 space-y-4 overflow-y-auto py-3 ${c}` : "scrollbar-slim flex-1 space-y-4 overflow-y-auto p-3",
39
51
  role: "log",
40
52
  "aria-live": "polite",
41
53
  "aria-relevant": "additions",
42
- "aria-busy": x !== null,
43
- "aria-label": A("messageList.ariaLabel", "Conversation messages"),
44
- children: [y.map((t, n) => {
45
- let r = z?.[n], i = r?.content === void 0 ? t : {
54
+ "aria-busy": C !== null,
55
+ "aria-label": M("messageList.ariaLabel", "Conversation messages"),
56
+ children: [x.map((t, n) => {
57
+ let r = W?.[n], i = r?.content === void 0 ? t : {
46
58
  ...t,
47
59
  content: r.content
48
- }, a = r?.content === void 0 ? R : null, o = N.has(i.id), s = !o && (i.id === _ || i.id === x);
49
- return /* @__PURE__ */ m(u, { children: [/* @__PURE__ */ p(e, {
50
- onApprovePendingWrite: s ? h : void 0,
51
- approvingWriteRef: g,
60
+ }, a = r?.content === void 0 ? U : null, o = R.has(i.id), s = !o && (i.id === y || i.id === C);
61
+ return /* @__PURE__ */ h(u, { children: [/* @__PURE__ */ m(e, {
62
+ onApprovePendingWrite: s ? g : void 0,
63
+ approvingWriteRef: v,
52
64
  pendingWriteApproved: o,
53
- pendingWriteGoAheadSent: P.has(i.id),
65
+ pendingWriteGoAheadSent: z.has(i.id),
54
66
  pendingWriteExpired: !o && !s,
55
- message: i.id === x && a !== null ? {
67
+ message: i.id === C && a !== null ? {
56
68
  ...i,
57
69
  content: a
58
70
  } : i,
59
- processing: b,
60
- isStreaming: i.id === x,
61
- isFailed: i.id === S,
62
- isLastAssistant: i.id === v,
63
- isNewestAssistant: i.id === M,
64
- onRetry: F.has(i.id) ? void 0 : C,
65
- legacyWriteCardHidden: T?.(i) ?? !1,
66
- writeProposals: w?.(i),
67
- uiOffers: E?.(i),
68
- ...i.id === x && D !== void 0 ? {
69
- onStopTurn: D,
70
- stopTurnLabel: O
71
+ processing: S,
72
+ isStreaming: i.id === C,
73
+ isFailed: i.id === w,
74
+ isLastAssistant: i.id === b,
75
+ isNewestAssistant: i.id === L,
76
+ entering: N && !F.ids.has(i.id),
77
+ onRetry: B.has(i.id) ? void 0 : T,
78
+ legacyWriteCardHidden: D?.(i) ?? !1,
79
+ writeProposals: E?.(i),
80
+ uiOffers: O?.(i),
81
+ ...i.id === C && k !== void 0 ? {
82
+ onStopTurn: k,
83
+ stopTurnLabel: A
71
84
  } : {}
72
85
  }), r?.below] }, i.id);
73
- }), /* @__PURE__ */ p("div", {})]
86
+ }), /* @__PURE__ */ m("div", {})]
74
87
  });
75
88
  };
76
- export { g as AssistantMessageList, h as LIVE_SCROLL_GAP_MS };
89
+ export { v as AssistantMessageList, g as LIVE_SCROLL_GAP_MS };
@@ -19,6 +19,8 @@ import { AssistantConversationProcessing } from '../conversation';
19
19
  export declare const TurnActivityLine: FC<{
20
20
  shown: string;
21
21
  label: string;
22
+ /** ★ BOFF-14753: a light sweeps across the words until the first one arrives (M4). */
23
+ shimmer?: boolean;
22
24
  }>;
23
25
  /**
24
26
  * What a live turn is doing, drawn from its processing state (BOFF-7277).
@@ -1,32 +1,35 @@
1
1
  import { useAssistantTr as e } from "../i18n.js";
2
2
  import { usePrefersReducedMotion as t } from "./usePrefersReducedMotion.js";
3
- import { elapsedSince as n, startPhraseTicker as r, turnActivityCopy as i, turnActivityStage as a } from "../turnActivity.js";
4
- import { useEffect as o, useState as s } from "react";
5
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
3
+ import { useAssistantPageLayout as n } from "./assistantPageLayout.js";
4
+ import { elapsedSince as r, startPhraseTicker as i, turnActivityCopy as a, turnActivityStage as o } from "../turnActivity.js";
5
+ import { useEffect as s, useState as c } from "react";
6
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
7
  // src/shared/assistant/ui/AssistantTurnActivity.tsx
7
- var u = ({ shown: e, label: t }) => /* @__PURE__ */ l("p", {
8
+ var d = ({ shown: e, label: t, shimmer: n = !1 }) => /* @__PURE__ */ u("p", {
8
9
  className: "relative text-[15px] leading-relaxed text-text-secondary",
9
10
  "data-testid": "assistant-turn-activity",
10
- children: [/* @__PURE__ */ c("span", {
11
+ children: [/* @__PURE__ */ l("span", {
11
12
  "aria-hidden": "true",
13
+ className: n ? "boff-shimmer-text" : void 0,
12
14
  "data-testid": "assistant-turn-activity-shown",
13
15
  children: e
14
- }), /* @__PURE__ */ c("span", {
16
+ }), /* @__PURE__ */ l("span", {
15
17
  className: "sr-only start-0 top-0",
16
18
  "data-testid": "assistant-turn-activity-label",
17
19
  children: t
18
20
  })]
19
- }), d = ({ processing: n }) => {
20
- let r = e(), o = t(), s = f(a(n) === "thinking" && !o && typeof n?.stageStartedAt == "number" ? n.stageStartedAt : null), l = i(r, n, s);
21
- return l ? /* @__PURE__ */ c(u, {
22
- shown: l.shown,
23
- label: l.label
21
+ }), f = ({ processing: r }) => {
22
+ let i = e(), s = t(), c = n(), u = p(o(r) === "thinking" && !s && typeof r?.stageStartedAt == "number" ? r.stageStartedAt : null), f = a(i, r, u);
23
+ return f ? /* @__PURE__ */ l(d, {
24
+ shown: f.shown,
25
+ label: f.label,
26
+ shimmer: c && !s
24
27
  }) : null;
25
28
  };
26
- function f(e) {
27
- let [t, i] = s(() => Date.now());
28
- return o(() => {
29
- if (e !== null) return r(e, i);
30
- }, [e]), n(e, t);
29
+ function p(e) {
30
+ let [t, n] = c(() => Date.now());
31
+ return s(() => {
32
+ if (e !== null) return i(e, n);
33
+ }, [e]), r(e, t);
31
34
  }
32
- export { d as AssistantTurnActivity, u as TurnActivityLine };
35
+ export { f as AssistantTurnActivity, d as TurnActivityLine };
@@ -71,6 +71,11 @@ interface Props {
71
71
  * problem, and the tab's own voice conversation needs the microphone.
72
72
  */
73
73
  suspendDictation?: boolean;
74
+ /**
75
+ * ★ BOFF-14753: the page's new chat — the box rises in with the start page (M1).
76
+ * Only meaningful with the page layout; the panel never animates in.
77
+ */
78
+ entrance?: boolean;
74
79
  /**
75
80
  * Told what holds the voice conversation back here (BOFF-9341): a Send
76
81
  * saving its attachments, and dictation holding the microphone. The rest of