@burdenoff/fe-libs 2026.1117.7 → 2026.1118.1

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.
@@ -1,3 +1,4 @@
1
+ import { ShellSidebarAppearance } from './types';
1
2
  export interface SidebarSearchTriggerProps {
2
3
  onOpen: () => void;
3
4
  /** Kbd chip text, e.g. "Ctrl K". No chip when absent. */
@@ -5,5 +6,11 @@ export interface SidebarSearchTriggerProps {
5
6
  /** Icon-only tile for the collapsed rail. */
6
7
  collapsed?: boolean;
7
8
  className?: string;
9
+ /**
10
+ * BOFF-15168: `floating` makes the field 32 px with a sunken fill and a
11
+ * hairline border, beside the floating sidebar's 32 px New button. The
12
+ * collapsed tile is the same in both. Default: the field of before.
13
+ */
14
+ appearance?: ShellSidebarAppearance;
8
15
  }
9
- export declare function SidebarSearchTrigger({ onOpen, shortcut, collapsed, className, }: SidebarSearchTriggerProps): import('react').JSX.Element;
16
+ export declare function SidebarSearchTrigger({ onOpen, shortcut, collapsed, className, appearance, }: SidebarSearchTriggerProps): import('react').JSX.Element;
@@ -6,15 +6,21 @@ var i = "outline-none focus-visible:ring-2 focus-visible:ring-focus-ring", a = (
6
6
  e,
7
7
  i,
8
8
  t
9
- ].filter(Boolean).join(" ");
10
- function o({ onOpen: i, shortcut: o, collapsed: s = !1, className: c }) {
11
- let l = e(), u = l("common.search", "Search");
12
- return s ? /* @__PURE__ */ n("button", {
9
+ ].filter(Boolean).join(" "), o = {
10
+ default: "inline-flex h-5 flex-shrink-0 items-center rounded border border-border-subtle bg-bg-sunken px-1.5 font-sans text-caption text-text-muted",
11
+ floating: "inline-flex h-5 flex-shrink-0 items-center rounded border border-border-subtle bg-bg-surface px-1.5 font-sans text-caption text-text-muted"
12
+ }, s = {
13
+ default: "flex h-control-sm min-w-0 flex-1 items-center gap-2 rounded-button border border-border-subtle bg-bg-elevated px-2.5 text-start text-body-sm text-text-muted transition-colors hover:bg-bg-sunken",
14
+ floating: "flex h-8 min-w-0 flex-1 items-center gap-2 rounded-button border border-border-subtle bg-bg-sunken px-2.5 text-start text-body-sm text-text-muted transition-colors hover:border-border-default"
15
+ };
16
+ function c({ onOpen: i, shortcut: c, collapsed: l = !1, className: u, appearance: d = "default" }) {
17
+ let f = e(), p = f("common.search", "Search");
18
+ return l ? /* @__PURE__ */ n("button", {
13
19
  type: "button",
14
20
  onClick: i,
15
- "aria-label": u,
21
+ "aria-label": p,
16
22
  "data-testid": "shell-search-trigger",
17
- className: a("flex size-10 items-center justify-center rounded-button text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary", c),
23
+ className: a("flex size-10 items-center justify-center rounded-button text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary", u),
18
24
  children: /* @__PURE__ */ n(t, {
19
25
  className: "size-4",
20
26
  "aria-hidden": "true"
@@ -22,9 +28,9 @@ function o({ onOpen: i, shortcut: o, collapsed: s = !1, className: c }) {
22
28
  }) : /* @__PURE__ */ r("button", {
23
29
  type: "button",
24
30
  onClick: i,
25
- "aria-label": o ? l("appShell.searchHint", "Search ({{shortcut}})", { shortcut: o }) : u,
31
+ "aria-label": c ? f("appShell.searchHint", "Search ({{shortcut}})", { shortcut: c }) : p,
26
32
  "data-testid": "shell-search-trigger",
27
- className: a("flex h-control-sm min-w-0 flex-1 items-center gap-2 rounded-button border border-border-subtle bg-bg-elevated px-2.5 text-start text-body-sm text-text-muted transition-colors hover:bg-bg-sunken", c),
33
+ className: a(s[d], u),
28
34
  children: [
29
35
  /* @__PURE__ */ n(t, {
30
36
  className: "size-3.5 flex-shrink-0",
@@ -32,14 +38,14 @@ function o({ onOpen: i, shortcut: o, collapsed: s = !1, className: c }) {
32
38
  }),
33
39
  /* @__PURE__ */ n("span", {
34
40
  className: "min-w-0 flex-1 truncate",
35
- children: u
41
+ children: p
36
42
  }),
37
- o && /* @__PURE__ */ n("kbd", {
43
+ c && /* @__PURE__ */ n("kbd", {
38
44
  "aria-hidden": "true",
39
- className: "inline-flex h-5 flex-shrink-0 items-center rounded border border-border-subtle bg-bg-sunken px-1.5 font-sans text-caption text-text-muted",
40
- children: o
45
+ className: o[d],
46
+ children: c
41
47
  })
42
48
  ]
43
49
  });
44
50
  }
45
- export { o as SidebarSearchTrigger };
51
+ export { c as SidebarSearchTrigger };
@@ -64,5 +64,12 @@ export interface WorkspaceMenuProps {
64
64
  * Absent or false: the menu of before.
65
65
  */
66
66
  searchableLists?: boolean;
67
+ /**
68
+ * BOFF-15168: `card` draws the trigger as a card (a hairline border, a
69
+ * raised fill, 12 px corners, 44 px tall: its two lines are set tight), as
70
+ * the floating sidebar's header shows it. Absent or `default`: the trigger
71
+ * of before.
72
+ */
73
+ appearance?: 'default' | 'card';
67
74
  }
68
75
  export declare function WorkspaceMenu(props: WorkspaceMenuProps): import('react').JSX.Element;
@@ -11,8 +11,20 @@ import { Check as v, ChevronDown as y, ChevronsUpDown as b, Folders as x, Landma
11
11
  import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
12
12
  import * as k from "@radix-ui/react-scroll-area";
13
13
  // src/chrome/shell/WorkspaceMenu.tsx
14
- var A = "rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", j = "h-control-sm gap-2.5 rounded-button px-2.5 focus:bg-bg-sunken", M = "px-2.5 pb-1 pt-2 text-caption font-semibold uppercase tracking-wider text-text-muted", N = "max-h-80 overflow-y-auto rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay";
15
- function P(e) {
14
+ var A = "rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", j = {
15
+ default: "group flex min-w-0 items-center gap-2.5 rounded-button p-1 text-start outline-none transition-colors hover:bg-bg-sunken focus-visible:ring-2 focus-visible:ring-focus-ring data-[state=open]:bg-bg-elevated",
16
+ card: "group flex min-w-0 items-center gap-2.5 rounded-card border border-border-default bg-text-primary/6 p-1.25 pe-2 text-start outline-none transition-colors hover:border-border-strong hover:bg-text-primary/8 focus-visible:ring-2 focus-visible:ring-focus-ring data-[state=open]:border-border-strong data-[state=open]:bg-text-primary/8"
17
+ }, M = {
18
+ default: {
19
+ name: "block truncate text-body-sm font-semibold text-text-primary",
20
+ org: "block truncate text-xs text-text-muted"
21
+ },
22
+ card: {
23
+ name: "block truncate text-body-sm font-semibold leading-tight text-text-primary",
24
+ org: "block truncate text-xs leading-tight text-text-secondary"
25
+ }
26
+ }, N = "h-control-sm gap-2.5 rounded-button px-2.5 focus:bg-bg-sunken", P = "px-2.5 pb-1 pt-2 text-caption font-semibold uppercase tracking-wider text-text-muted", F = "max-h-80 overflow-y-auto rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay";
27
+ function I(e) {
16
28
  let t = e.trim().charAt(0).toUpperCase() || "?";
17
29
  return /* @__PURE__ */ D("span", {
18
30
  "aria-hidden": "true",
@@ -20,16 +32,16 @@ function P(e) {
20
32
  children: t
21
33
  });
22
34
  }
23
- var F = [];
24
- function I(e) {
35
+ var L = [];
36
+ function R(e) {
25
37
  return e ? /* @__PURE__ */ D(v, {
26
38
  className: "ms-auto size-4 flex-shrink-0 text-accent-primary",
27
39
  "aria-hidden": "true"
28
40
  }) : null;
29
41
  }
30
- function L({ id: e, testId: t, current: n, onPick: r, icon: a, label: o, rowProps: s }) {
42
+ function z({ id: e, testId: t, current: n, onPick: r, icon: a, label: o, rowProps: s }) {
31
43
  return /* @__PURE__ */ O(i, {
32
- className: j,
44
+ className: N,
33
45
  onSelect: () => r(),
34
46
  "data-testid": t,
35
47
  "aria-current": n ? "true" : void 0,
@@ -40,13 +52,13 @@ function L({ id: e, testId: t, current: n, onPick: r, icon: a, label: o, rowProp
40
52
  className: "min-w-0 flex-1 truncate",
41
53
  children: o
42
54
  }),
43
- I(n)
55
+ R(n)
44
56
  ]
45
57
  }, e);
46
58
  }
47
- function R(e, t, n) {
59
+ function B(e, t, n) {
48
60
  return /* @__PURE__ */ O(i, {
49
- className: j,
61
+ className: N,
50
62
  onSelect: () => n(),
51
63
  "data-testid": e,
52
64
  children: [/* @__PURE__ */ D(w, {
@@ -58,16 +70,16 @@ function R(e, t, n) {
58
70
  })]
59
71
  });
60
72
  }
61
- function z(e, t) {
73
+ function V(e, t) {
62
74
  return /* @__PURE__ */ D("div", {
63
75
  role: "presentation",
64
- className: M,
76
+ className: P,
65
77
  ...t ? { id: t } : {},
66
78
  children: e
67
79
  });
68
80
  }
69
- var B = "max-h-[calc(var(--size-controlHeight-sm)*6.5)] pe-2.5 [&>div]:block! focus-visible:outline-none", V = "pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2 text-text-muted", H = "px-2.5 py-2 text-body-sm text-text-muted", U = "max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-auto";
70
- function W({ labelledBy: e, testId: t, rows: n, search: r }) {
81
+ var H = "max-h-[calc(var(--size-controlHeight-sm)*6.5)] pe-2.5 [&>div]:block! focus-visible:outline-none", U = "pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2 text-text-muted", W = "px-2.5 py-2 text-body-sm text-text-muted", G = "max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-auto";
82
+ function K({ labelledBy: e, testId: t, rows: n, search: r }) {
71
83
  return /* @__PURE__ */ O("div", {
72
84
  role: "group",
73
85
  "aria-labelledby": e,
@@ -77,7 +89,7 @@ function W({ labelledBy: e, testId: t, rows: n, search: r }) {
77
89
  r && /* @__PURE__ */ O("div", {
78
90
  className: "relative px-1 pb-1",
79
91
  children: [/* @__PURE__ */ D(T, {
80
- className: V,
92
+ className: U,
81
93
  "aria-hidden": "true"
82
94
  }), /* @__PURE__ */ D(u, {
83
95
  type: "search",
@@ -96,7 +108,7 @@ function W({ labelledBy: e, testId: t, rows: n, search: r }) {
96
108
  type: "auto",
97
109
  className: "relative overflow-hidden",
98
110
  children: [/* @__PURE__ */ D(k.Viewport, {
99
- className: B,
111
+ className: H,
100
112
  "data-testid": t,
101
113
  children: n
102
114
  }), /* @__PURE__ */ D(d, {})]
@@ -105,15 +117,15 @@ function W({ labelledBy: e, testId: t, rows: n, search: r }) {
105
117
  role: "status",
106
118
  "data-testid": `shell-workspace-nomatch-${r.name}`,
107
119
  children: r.noMatch ? /* @__PURE__ */ D("p", {
108
- className: H,
120
+ className: W,
109
121
  children: r.noMatch
110
122
  }) : null
111
123
  })
112
124
  ]
113
125
  });
114
126
  }
115
- function G(e, { name: t, testId: n, plainTestId: r, rows: i }) {
116
- return e.searchable ? W({
127
+ function q(e, { name: t, testId: n, plainTestId: r, rows: i }) {
128
+ return e.searchable ? K({
117
129
  labelledBy: `${e.labelIds}-${t}`,
118
130
  testId: n,
119
131
  rows: i,
@@ -124,32 +136,32 @@ function G(e, { name: t, testId: n, plainTestId: r, rows: i }) {
124
136
  children: i
125
137
  });
126
138
  }
127
- function K(e) {
128
- let { props: t, lists: n, shellLabel: r, labelIds: i, orgLabel: a, searchable: o } = e, { activeWorkspaceId: s, onSelectWorkspace: c, onNewWorkspace: l } = t, u = n.workspaces, d = u.shown.map((e) => L({
139
+ function J(e) {
140
+ let { props: t, lists: n, shellLabel: r, labelIds: i, orgLabel: a, searchable: o } = e, { activeWorkspaceId: s, onSelectWorkspace: c, onNewWorkspace: l } = t, u = n.workspaces, d = u.shown.map((e) => z({
129
141
  id: e.id,
130
142
  testId: `shell-workspace-item-${e.id}`,
131
143
  current: e.id === s,
132
144
  onPick: () => {
133
145
  e.id !== s && c(e.id);
134
146
  },
135
- icon: P(e.name),
147
+ icon: I(e.name),
136
148
  label: e.name,
137
149
  rowProps: u.rowProps
138
150
  }));
139
151
  return /* @__PURE__ */ O(E, { children: [
140
- z(r("shell.workspaceMenu.workspacesIn", "Workspaces in {{org}}", { org: a }), o ? `${i}-workspaces` : void 0),
141
- G(e, {
152
+ V(r("shell.workspaceMenu.workspacesIn", "Workspaces in {{org}}", { org: a }), o ? `${i}-workspaces` : void 0),
153
+ q(e, {
142
154
  name: "workspaces",
143
155
  testId: "shell-workspace-workspaces",
144
156
  rows: d
145
157
  }),
146
- l && R("shell-workspace-new", r("shell.workspaceMenu.newWorkspace", "New workspace"), () => l())
158
+ l && B("shell-workspace-new", r("shell.workspaceMenu.newWorkspace", "New workspace"), () => l())
147
159
  ] });
148
160
  }
149
- function q(e) {
161
+ function Y(e) {
150
162
  let { props: t, projects: n, lists: r, shellLabel: i, labelIds: o, searchable: s } = e, { activeWorkspaceId: c, activeProjectId: l, onSelectProject: u, onSelectWorkspaceWide: d } = t, { onNewProject: f } = t, p = n.length > 0 && u !== void 0, m = f !== void 0 && !!c;
151
163
  if (!p && !m) return null;
152
- let h = r.projects, g = !!c && d !== void 0 && !h.filtering, _ = /* @__PURE__ */ O(E, { children: [g && L({
164
+ let h = r.projects, g = !!c && d !== void 0 && !h.filtering, _ = /* @__PURE__ */ O(E, { children: [g && z({
153
165
  id: "workspace-wide",
154
166
  testId: "shell-workspace-all-projects",
155
167
  current: !l,
@@ -163,32 +175,32 @@ function q(e) {
163
175
  }),
164
176
  label: i("contextSwitcher.allProjectsWorkspaceWide", "All projects (workspace-wide)"),
165
177
  rowProps: h.rowProps
166
- }), h.shown.map((e) => L({
178
+ }), h.shown.map((e) => z({
167
179
  id: e.id,
168
180
  testId: `shell-workspace-project-${e.id}`,
169
181
  current: e.id === l,
170
182
  onPick: () => {
171
183
  e.id !== l && u?.(e.id);
172
184
  },
173
- icon: P(e.name),
185
+ icon: I(e.name),
174
186
  label: e.name,
175
187
  rowProps: h.rowProps
176
188
  }))] });
177
189
  return /* @__PURE__ */ O(E, { children: [
178
190
  /* @__PURE__ */ D(a, { className: "my-1.5" }),
179
- z(i("contextSwitcher.project", "Project"), s ? `${o}-projects` : void 0),
180
- p && G(e, {
191
+ V(i("contextSwitcher.project", "Project"), s ? `${o}-projects` : void 0),
192
+ p && q(e, {
181
193
  name: "projects",
182
194
  testId: "shell-workspace-projects",
183
195
  plainTestId: "shell-workspace-projects",
184
196
  rows: _
185
197
  }),
186
- m && R("shell-workspace-new-project", i("shell.workspaceMenu.newProject", "New project"), () => f?.())
198
+ m && B("shell-workspace-new-project", i("shell.workspaceMenu.newProject", "New project"), () => f?.())
187
199
  ] });
188
200
  }
189
- function J(t, n) {
201
+ function X(t, n) {
190
202
  return /* @__PURE__ */ O(o, { children: [/* @__PURE__ */ O(c, {
191
- className: j,
203
+ className: N,
192
204
  "data-testid": "shell-workspace-org-trigger",
193
205
  indicator: /* @__PURE__ */ D(b, {
194
206
  className: "size-4 flex-shrink-0 text-text-muted",
@@ -204,14 +216,14 @@ function J(t, n) {
204
216
  }), /* @__PURE__ */ D(s, {
205
217
  sideOffset: 6,
206
218
  "data-testid": "shell-workspace-org-menu",
207
- className: e(N, "w-64"),
219
+ className: e(F, "w-64"),
208
220
  children: n
209
221
  })] });
210
222
  }
211
- function Y(e) {
223
+ function Z(e) {
212
224
  let { props: t, lists: n, shellLabel: r, labelIds: i, orgLabel: o, searchable: s } = e, { organizations: c, activeOrganizationId: l, onSelectOrganization: u } = t;
213
225
  if (c.length === 0) return null;
214
- let d = n.organizations, f = d.shown.map((e) => L({
226
+ let d = n.organizations, f = d.shown.map((e) => z({
215
227
  id: e.id,
216
228
  testId: `shell-workspace-org-${e.id}`,
217
229
  current: e.id === l,
@@ -227,38 +239,38 @@ function Y(e) {
227
239
  }));
228
240
  return /* @__PURE__ */ O(E, { children: [
229
241
  /* @__PURE__ */ D(a, { className: "my-1.5" }),
230
- z(r("shell.workspaceMenu.organization", "Organization"), s ? `${i}-organizations` : void 0),
231
- s ? W({
242
+ V(r("shell.workspaceMenu.organization", "Organization"), s ? `${i}-organizations` : void 0),
243
+ s ? K({
232
244
  labelledBy: `${i}-organizations`,
233
245
  testId: "shell-workspace-orgs",
234
246
  rows: f,
235
247
  search: d.search
236
- }) : J(o, f)
248
+ }) : X(o, f)
237
249
  ] });
238
250
  }
239
- function X({ props: t, shellLabel: n }) {
251
+ function Q({ props: t, shellLabel: n }) {
240
252
  let { currentProduct: r, products: l, onSelectProduct: u } = t, d = l.filter((e) => e.id !== r.id);
241
253
  return /* @__PURE__ */ O(E, { children: [
242
254
  /* @__PURE__ */ D(a, { className: "my-1.5" }),
243
- z(n("shell.workspaceMenu.product", "Product")),
255
+ V(n("shell.workspaceMenu.product", "Product")),
244
256
  /* @__PURE__ */ O(i, {
245
- className: j,
257
+ className: N,
246
258
  "aria-current": "true",
247
259
  "data-testid": `shell-workspace-product-${r.id}`,
248
260
  children: [
249
261
  /* @__PURE__ */ D("span", {
250
262
  className: "flex size-5 flex-shrink-0 items-center justify-center",
251
- children: r.logo ?? P(r.name)
263
+ children: r.logo ?? I(r.name)
252
264
  }),
253
265
  /* @__PURE__ */ D("span", {
254
266
  className: "min-w-0 flex-1 truncate",
255
267
  children: r.name
256
268
  }),
257
- I(!0)
269
+ R(!0)
258
270
  ]
259
271
  }),
260
272
  d.length > 0 && /* @__PURE__ */ O(o, { children: [/* @__PURE__ */ O(c, {
261
- className: j,
273
+ className: N,
262
274
  "data-testid": "shell-workspace-switch-product",
263
275
  children: [/* @__PURE__ */ D(C, {
264
276
  className: "size-4 flex-shrink-0 text-text-secondary",
@@ -270,14 +282,14 @@ function X({ props: t, shellLabel: n }) {
270
282
  }), /* @__PURE__ */ D(s, {
271
283
  sideOffset: 6,
272
284
  "data-testid": "shell-workspace-product-menu",
273
- className: e(N, "w-64"),
285
+ className: e(F, "w-64"),
274
286
  children: d.map((e) => /* @__PURE__ */ O(i, {
275
- className: j,
287
+ className: N,
276
288
  onSelect: () => u(e.id),
277
289
  "data-testid": `shell-workspace-product-${e.id}`,
278
290
  children: [/* @__PURE__ */ D("span", {
279
291
  className: "flex size-5 flex-shrink-0 items-center justify-center",
280
- children: e.icon ?? P(e.name)
292
+ children: e.icon ?? I(e.name)
281
293
  }), /* @__PURE__ */ D("span", {
282
294
  className: "min-w-0 flex-1 truncate",
283
295
  children: e.name
@@ -286,41 +298,41 @@ function X({ props: t, shellLabel: n }) {
286
298
  })] })
287
299
  ] });
288
300
  }
289
- function Z(i) {
290
- let { logo: a, workspaceName: o, orgName: s, workspaces: c, organizations: u } = i, { activeWorkspaceId: d, onSelectWorkspace: f, activeOrganizationId: p } = i, v = i.compact ?? !1, b = i.searchableLists ?? !1, x = i.projects ?? F, S = t(), [C, w] = _(!1), T = g(), E = m(b, {
301
+ function $(i) {
302
+ let { logo: a, workspaceName: o, orgName: s, workspaces: c, organizations: u } = i, { activeWorkspaceId: d, onSelectWorkspace: f, activeOrganizationId: p } = i, v = i.compact ?? !1, b = i.searchableLists ?? !1, x = i.appearance ?? "default", S = i.projects ?? L, C = t(), [w, T] = _(!1), E = g(), k = m(b, {
291
303
  workspaces: c,
292
- projects: x,
304
+ projects: S,
293
305
  organizations: u
294
306
  });
295
307
  h({
296
- open: C,
297
- setOpen: w,
308
+ open: w,
309
+ setOpen: T,
298
310
  workspaces: c,
299
311
  activeWorkspaceId: d,
300
312
  onSelectWorkspace: f
301
313
  });
302
- let k = u.find((e) => e.id === p)?.name ?? s, j = {
314
+ let N = u.find((e) => e.id === p)?.name ?? s, P = {
303
315
  props: i,
304
- projects: x,
305
- lists: E,
306
- shellLabel: S,
307
- labelIds: T,
308
- orgLabel: k,
316
+ projects: S,
317
+ lists: k,
318
+ shellLabel: C,
319
+ labelIds: E,
320
+ orgLabel: N,
309
321
  searchable: b
310
322
  };
311
323
  return /* @__PURE__ */ O(n, {
312
- open: C,
324
+ open: w,
313
325
  onOpenChange: (e) => {
314
- w(e), e || E.clear();
326
+ T(e), e || k.clear();
315
327
  },
316
328
  modal: !1,
317
329
  children: [/* @__PURE__ */ D(l, {
318
330
  asChild: !0,
319
331
  children: /* @__PURE__ */ O("button", {
320
332
  type: "button",
321
- "aria-label": S("shell.workspaceMenu.trigger", "Switch workspace: {{name}}", { name: o }),
333
+ "aria-label": C("shell.workspaceMenu.trigger", "Switch workspace: {{name}}", { name: o }),
322
334
  "data-testid": "shell-workspace-trigger",
323
- className: e("group flex min-w-0 items-center gap-2.5 rounded-button p-1 text-start outline-none transition-colors hover:bg-bg-sunken focus-visible:ring-2 focus-visible:ring-focus-ring data-[state=open]:bg-bg-elevated", v ? "w-full" : "flex-1"),
335
+ className: e(j[x], v ? "w-full" : "flex-1"),
324
336
  children: [
325
337
  /* @__PURE__ */ D("span", {
326
338
  className: "flex size-8 flex-shrink-0 items-center justify-center",
@@ -329,11 +341,11 @@ function Z(i) {
329
341
  /* @__PURE__ */ O("span", {
330
342
  className: "min-w-0 flex-1",
331
343
  children: [/* @__PURE__ */ D("span", {
332
- className: "block truncate text-body-sm font-semibold text-text-primary",
344
+ className: M[x].name,
333
345
  children: o
334
346
  }), /* @__PURE__ */ D("span", {
335
- className: "block truncate text-xs text-text-muted",
336
- children: k
347
+ className: M[x].org,
348
+ children: N
337
349
  })]
338
350
  }),
339
351
  /* @__PURE__ */ D(y, {
@@ -347,14 +359,14 @@ function Z(i) {
347
359
  align: "start",
348
360
  sideOffset: 6,
349
361
  "data-testid": "shell-workspace-menu",
350
- className: e(A, "w-[300px]", b && U),
362
+ className: e(A, "w-[300px]", b && G),
351
363
  children: [
352
- K(j),
353
- q(j),
354
- Y(j),
355
- X(j)
364
+ J(P),
365
+ Y(P),
366
+ Z(P),
367
+ Q(P)
356
368
  ]
357
369
  })]
358
370
  });
359
371
  }
360
- export { Z as WorkspaceMenu };
372
+ export { $ as WorkspaceMenu };
@@ -2,6 +2,17 @@ import { ComponentType, ReactNode } from 'react';
2
2
  export type ShellIcon = ComponentType<{
3
3
  className?: string;
4
4
  }>;
5
+ /**
6
+ * How the sidebar is drawn (BOFF-15168, opt-in).
7
+ *
8
+ * - `default`: the edge-to-edge panel with a border on its end edge, every
9
+ * product's sidebar.
10
+ * - `floating` (FluidGrids): a panel inset 8 px from the window's edges, with
11
+ * a hairline border and 16 px corners; 32 px rows whose current row is a
12
+ * raised fill with a hairline border (no accent wash or bar); section names
13
+ * in sentence case. The sidebar keeps its width (272 px, the rail 64 px).
14
+ */
15
+ export type ShellSidebarAppearance = 'default' | 'floating';
5
16
  export interface ShellNavBadge {
6
17
  value: number | string;
7
18
  tone: 'accent' | 'neutral';
@@ -106,3 +106,39 @@ export declare function planTurnAbort(args: {
106
106
  send: boolean;
107
107
  reason: TurnAbortReason;
108
108
  };
109
+ /**
110
+ * ★ BOFF-12936: why a turn was cancelled, as the exit that cancelled it says.
111
+ * The turn's timing report carries it as its outcome, in the spelling
112
+ * wspace-sandbox-svc's turn histograms allowlist (#178), so `stopped` means
113
+ * only that the person stopped it:
114
+ *
115
+ * - `stopped`: an explicit Stop (the transcript's or the composer's), or a tap
116
+ * on the voice orb;
117
+ * - `superseded`: newer speech replaced it, a correction heard while it was
118
+ * being prepared (`supersedeVoiceTurn`) or a spoken correction sent while it
119
+ * still held the conversation (`correctsInFlightTurn`);
120
+ * - `bargeIn`: the person talked over its answer (the hands-free interrupt);
121
+ * - `sandboxReleased`: the page stopped the sandbox it ran on, a reaped or
122
+ * replaced one (`trackAssistantSandboxTurn`).
123
+ */
124
+ export type TurnStopReason = 'stopped' | 'superseded' | 'bargeIn' | 'sandboxReleased';
125
+ /** …and `conversationDeleted`: its conversation was deleted while it ran. */
126
+ export type StoppedTurnOutcome = TurnStopReason | 'conversationDeleted';
127
+ /** One page's record of why each cancelled turn was cancelled (BOFF-12936). */
128
+ export interface TurnStopReasons {
129
+ /** Record why `turnId` was cancelled. The FIRST reason a turn is given stands. */
130
+ note(turnId: string, reason: TurnStopReason): void;
131
+ /**
132
+ * The outcome of a turn that ended without one of its own, forgetting the
133
+ * turn: the reason it was cancelled with; without one, `conversationDeleted`
134
+ * when its conversation is gone, and `stopped` otherwise.
135
+ */
136
+ settle(turnId: string, conversationExists: boolean): StoppedTurnOutcome;
137
+ }
138
+ /**
139
+ * More reasons than turns a page can have in flight. Every noted turn is in
140
+ * flight and settles in its own `finally`; the bound only keeps a turn that
141
+ * never settles from growing the record.
142
+ */
143
+ export declare const MAX_TURN_STOP_REASONS = 64;
144
+ export declare function createTurnStopReasons(): TurnStopReasons;
@@ -30,4 +30,21 @@ function n(e) {
30
30
  reason: "superseded"
31
31
  };
32
32
  }
33
- export { e as isTurnInFlight, t as planAbandonedTurn, n as planTurnAbort };
33
+ var r = 64;
34
+ function i() {
35
+ let e = /* @__PURE__ */ new Map();
36
+ return {
37
+ note(t, n) {
38
+ if (!e.has(t)) for (e.set(t, n); e.size > 64;) {
39
+ let t = e.keys().next();
40
+ if (t.done) break;
41
+ e.delete(t.value);
42
+ }
43
+ },
44
+ settle(t, n) {
45
+ let r = e.get(t);
46
+ return e.delete(t), r ?? (n ? "stopped" : "conversationDeleted");
47
+ }
48
+ };
49
+ }
50
+ export { r as MAX_TURN_STOP_REASONS, i as createTurnStopReasons, e as isTurnInFlight, t as planAbandonedTurn, n as planTurnAbort };
@@ -1,90 +1,4 @@
1
- /**
2
- * ★★ Where a turn's time goes — measured before anything is optimised
3
- * (BOFF-7801).
4
- *
5
- * First answers took 55–150s+ in production, and nobody could say which part
6
- * of that was the sandbox starting, a dead sandbox being probed, the model
7
- * thinking, the poll noticing, our own bookkeeping, or the voice fetching
8
- * audio. This records each milestone of a turn as it happens, so the slow part
9
- * is measured instead of guessed.
10
- *
11
- * The chain, in order:
12
- *
13
- * speechEnded the last time the heard words CHANGED (voice only)
14
- * graceStarted the correction grace began — the last result that re-armed
15
- * it; after speechEnded when the recogniser re-commits late
16
- * graceEnded the correction grace ran out; the turn was submitted
17
- * handedOver its attachments settled and it went to the panel (voice)
18
- * accepted the panel took the turn: the question is on screen
19
- * cleared the send-time checks passed (mode access, write consent)
20
- * attemptStarted this attempt at a runtime began (again, on a retry)
21
- * prewarmJoined the send is waiting on a first-keystroke pre-warm in its
22
- * mode that is BOOTING a sandbox — marked as it joins one
23
- * already booting, or as the warm it joined begins the boot
24
- * bootAdopted this attempt found a boot under way and is waiting it
25
- * out: a sandbox listed PROVISIONING/PENDING, or a service
26
- * that answered "not up yet" (the `adopted` runtime)
27
- * provisionStarted no reusable sandbox — making room for a new one starts here
28
- * createRequested the new sandbox was requested (after releasing old ones)
29
- * sandboxRunning the created sandbox is running (cold)
30
- * serviceReady the assistant service inside it answers (cold)
31
- * runtimeReady a sandbox and a session are ready to take the prompt
32
- * promptSent the sandbox accepted the prompt
33
- * lastQuietPoll the last poll that saw nothing — with firstOutput, the
34
- * UPPER bound of how late polling noticed the output
35
- * streamOpen the turn stream said `open` (BOFF-7914 S3); it can precede
36
- * `promptSent`, because the mint runs beside the prompt
37
- * streamRemint the stream was minted again after it ended; the FIRST
38
- * re-mint (the reasons are the `remintReasons` of the stream)
39
- * firstDelta the first live text of this turn that could be shown
40
- * firstOutput the first poll — or live render — that had anything to
41
- * show (a tool line too)
42
- * firstText the first poll that saw answer TEXT — prose not followed
43
- * by a tool call, confirmed when the turn completes, so
44
- * pre-tool narration does not count. In modes whose
45
- * narration IS the answer (BigConsole's build log), the
46
- * first narration: group reports by `mode`
47
- * streamIdle the bridge said the turn is idle (stream turns only)
48
- * answerDone the poll that saw the answer complete
49
- * complete the turn ended (after artifacts and the credit report)
50
- * speechQueued the answer was handed to the speech feed (BOFF-8062 C1):
51
- * a voice turn publishes it at `answerDone`, before the
52
- * artifacts and credit report — so `ttsStarted` and
53
- * `firstAudio` can precede `complete`
54
- * ttsStarted auto-speak handed the reply to the speech engine
55
- * firstAudio the engine reported sound actually started
56
- * audioEnded the auto-spoken reply finished playing
57
- *
58
- * ★ `graceStarted → graceEnded` is the 2s correction grace, and it is KEPT: it
59
- * stops a pause mid-sentence from submitting half a question. It is a segment
60
- * of its own so it can never be "optimised" away by accident — and the
61
- * recogniser's own endpointing (`speechEnded → graceStarted`, 0.5–1.5s and
62
- * longer on Android) is kept OUT of it, because that one can be optimised.
63
- *
64
- * ★ Filler is never output: the progress `content` is model output only
65
- * (BOFF-7277) and the waiting copy is drawn by the bubble from the stage.
66
- *
67
- * ★ `prewarmJoined` and `bootAdopted` are marked the moment the wait is KNOWN,
68
- * not once it pays off: the facts (`prewarm`, `runtime`) are only written
69
- * when the wait ends, so a turn the person gives up on mid-wait would
70
- * otherwise carry nothing to say it was waiting on a boot (BOFF-7801 review
71
- * round 3). Once the facts are written, they are the answer.
72
- *
73
- * ★ A turn whose first attempt fails recoverably is retried under the SAME id.
74
- * `restartAttempt` files the first attempt's marks under `attempts` so the
75
- * second records its own — mixed attempts are not a timeline.
76
- *
77
- * Times are `performance.now()` — monotonic, comparable within the page. The
78
- * event is visible to EVERY script on the page, so it carries timings and
79
- * coarse dimensions only: never message text, never tenant, user, workspace or
80
- * conversation ids. Delivery is asynchronous, so a listener never runs inside
81
- * the step it measures.
82
- *
83
- * ★ Anything that ACTS on a timeline (the production latency reporter,
84
- * `turnTimingReporter.ts`) subscribes with `subscribeTurnTimelines`, not the
85
- * window event: any script on the page can dispatch that event, so a listener
86
- * on it can be fed invented timings. Only this module calls subscribers.
87
- */
1
+ import { StoppedTurnOutcome } from './turnState';
88
2
  export declare const TURN_MILESTONES: readonly ["speechEnded", "lastSpeechFrame", "recognizerSpeechEnded", "graceStarted", "graceEnded", "handedOver", "accepted", "cleared", "attemptStarted", "prewarmJoined", "bootAdopted", "provisionStarted", "createRequested", "sandboxRunning", "serviceReady", "runtimeReady", "promptSent", "lastQuietPoll", "streamOpen", "streamRemint", "firstDelta", "firstOutput", "firstText", "streamIdle", "answerDone", "complete", "speechQueued", "ttsStarted", "firstAudio", "audioEnded"];
89
3
  export type TurnMilestone = (typeof TURN_MILESTONES)[number];
90
4
  /**
@@ -117,8 +31,14 @@ export type TurnRuntime = 'warm' | 'preopened' | 'new-session' | 'probed' | 'ado
117
31
  * - `timedOut`: the client's stream budget ran out before the answer finished.
118
32
  * Only `answered` turns carry `firstText`; a timed-out turn's unconfirmed text
119
33
  * is not recorded.
34
+ *
35
+ * ★ A turn that ended without an answer because it was cancelled says why
36
+ * (BOFF-12936, `TurnStopReason`): `stopped` only when the person stopped it,
37
+ * else `superseded`, `bargeIn`, `conversationDeleted` or `sandboxReleased`.
38
+ * wspace-sandbox-svc counts these four from #178 on; a service without them
39
+ * folds them into `other`.
120
40
  */
121
- export type TurnTimelineOutcome = 'answered' | 'timedOut' | 'refused' | 'failed' | 'stopped';
41
+ export type TurnTimelineOutcome = 'answered' | 'timedOut' | 'refused' | 'failed' | StoppedTurnOutcome;
122
42
  export interface TurnDimensions {
123
43
  channel: 'chat' | 'voice' | 'listen';
124
44
  mode: string;