cursedbelt 6.34.0 → 6.37.0

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.
Files changed (48) hide show
  1. package/dist/react/components/FilterMenu.d.ts +41 -0
  2. package/dist/react/components/FilterMenu.d.ts.map +1 -0
  3. package/dist/react/components/FilterMenu.js +31 -0
  4. package/dist/react/components/FilterMenu.js.map +1 -0
  5. package/dist/react/index.d.ts +1 -0
  6. package/dist/react/index.d.ts.map +1 -1
  7. package/dist/react/index.js +1 -0
  8. package/dist/react/index.js.map +1 -1
  9. package/dist/react/map-frame/MapFrame.d.ts.map +1 -1
  10. package/dist/react/map-frame/MapFrame.js +26 -11
  11. package/dist/react/map-frame/MapFrame.js.map +1 -1
  12. package/dist/react/workspace-shell/PlaceHeader.d.ts +9 -1
  13. package/dist/react/workspace-shell/PlaceHeader.d.ts.map +1 -1
  14. package/dist/react/workspace-shell/PlaceHeader.js +2 -2
  15. package/dist/react/workspace-shell/PlaceHeader.js.map +1 -1
  16. package/dist/react/workspace-shell/WorkspaceShell.d.ts +12 -2
  17. package/dist/react/workspace-shell/WorkspaceShell.d.ts.map +1 -1
  18. package/dist/react/workspace-shell/WorkspaceShell.js +10 -7
  19. package/dist/react/workspace-shell/WorkspaceShell.js.map +1 -1
  20. package/dist/react/workspace-shell/shellSettings.d.ts +3 -1
  21. package/dist/react/workspace-shell/shellSettings.d.ts.map +1 -1
  22. package/dist/react/workspace-shell/shellSettings.js +8 -8
  23. package/dist/react/workspace-shell/shellSettings.js.map +1 -1
  24. package/dist/styles-areas/workspace-shell.css +3 -2
  25. package/dist/styles-utilities.css +3 -0
  26. package/dist/testing/designAudit.d.ts.map +1 -1
  27. package/dist/testing/designAudit.js +13 -1
  28. package/dist/testing/designAudit.js.map +1 -1
  29. package/dist/testing/shell.d.ts +4 -0
  30. package/dist/testing/shell.d.ts.map +1 -1
  31. package/dist/testing/shell.js +4 -0
  32. package/dist/testing/shell.js.map +1 -1
  33. package/package.json +2 -2
  34. package/scripts/styleAreas.ts +1 -0
  35. package/src/react/components/FilterMenu.spec.tsx +48 -0
  36. package/src/react/components/FilterMenu.tsx +82 -0
  37. package/src/react/index.ts +1 -0
  38. package/src/react/map-frame/MapFrame.box.spec.tsx +28 -0
  39. package/src/react/map-frame/MapFrame.tsx +45 -19
  40. package/src/react/workspace-shell/PlaceHeader.tsx +17 -3
  41. package/src/react/workspace-shell/WorkspaceShell.spec.tsx +45 -1
  42. package/src/react/workspace-shell/WorkspaceShell.tsx +32 -7
  43. package/src/react/workspace-shell/shellSettings.spec.tsx +8 -0
  44. package/src/react/workspace-shell/shellSettings.tsx +14 -8
  45. package/src/styles-areas/workspace-shell.css +3 -2
  46. package/src/styles-utilities.css +3 -0
  47. package/src/testing/designAudit.ts +10 -1
  48. package/src/testing/shell.ts +4 -0
@@ -46,6 +46,14 @@ export interface PlaceHeaderProps extends Omit<ComponentPropsWithoutRef<'header'
46
46
  actions?: ReactNode;
47
47
  /** Before the name: a Back that leads out of a page the place opened (Settings on a phone). */
48
48
  lead?: ReactNode;
49
+ /**
50
+ * `false`: below `sm` (640px) the name is read by a screen reader only, and its row goes to the actions (forge task 5936;
51
+ * the owner, 2026-11-24: *"we don't need the words … 'Review' … i want a single header row for the buttons"*). For a
52
+ * place whose phone header is a toolbar — a review grid's pick and verbs — where the bar's highlighted tab already says
53
+ * where the reader is. It stays the page's one h1, and `auditDesign`'s NAV-11 reads the declared choice rather than red a
54
+ * name its actions crowd out. Default `true`.
55
+ */
56
+ nameOnPhone?: boolean;
49
57
  }
50
58
 
51
59
  /**
@@ -54,7 +62,7 @@ export interface PlaceHeaderProps extends Omit<ComponentPropsWithoutRef<'header'
54
62
  */
55
63
  export const PLACE_NAME_FLOOR = '6rem';
56
64
 
57
- export function PlaceHeader({ title, meta, hint, actions, lead, className, ...rest }: PlaceHeaderProps) {
65
+ export function PlaceHeader({ title, meta, hint, actions, lead, nameOnPhone = true, className, ...rest }: PlaceHeaderProps) {
58
66
  return (
59
67
  <header
60
68
  {...rest}
@@ -72,8 +80,14 @@ export function PlaceHeader({ title, meta, hint, actions, lead, className, ...re
72
80
  <div data-cb-place-name='' className='flex min-w-0 flex-1 items-center gap-2'>
73
81
  {/* `.label` is FND-5's section name (semibold, tracked capitals); the place's name takes it at chrome's 13px and in
74
82
  the muted ink rather than `.label`'s faint, as orbgem's does: it is the page's name, read rather than skimmed. */}
75
- <h1 className='label m-0 min-w-0 truncate text-ui text-muted-foreground'>{title}</h1>
76
- {hint != null && hint !== false && <InfoHint label='About this place'>{hint}</InfoHint>}
83
+ <h1
84
+ className={cn('label m-0 min-w-0 truncate text-ui text-muted-foreground', !nameOnPhone && 'max-sm:sr-only')}
85
+ {...(nameOnPhone ? {} : { 'data-cb-place-name-phone': 'hidden' })}
86
+ >
87
+ {title}
88
+ </h1>
89
+ {/* The `?` goes with the name it explains: a phone that reads no name draws no `?` beside nothing. */}
90
+ {hint != null && hint !== false && (nameOnPhone ? <InfoHint label='About this place'>{hint}</InfoHint> : <span className='contents max-sm:hidden'><InfoHint label='About this place'>{hint}</InfoHint></span>)}
77
91
  {/* The meta's basis is 0, so it is drawn only in what the name leaves and never takes a sliver of the name's own
78
92
  width: a weighted shrink (999 against 1) still cut 0.06px from it, and an ellipsis then ate "als" (forge task 4999).
79
93
  🔴 It is a size container, and its text hides WHOLE below 5rem of it (the `meta` container size in styles.css) rather than truncating to one glyph: games'
@@ -1,5 +1,5 @@
1
1
  import { afterEach, beforeAll, beforeEach, describe, expect, mock, test } from 'bun:test';
2
- import { act, cleanup, fireEvent, render, screen } from '@testing-library/react';
2
+ import { act, cleanup, fireEvent, render, screen, within } from '@testing-library/react';
3
3
  import { useState } from 'react';
4
4
  import { Button } from '../components/Button.js';
5
5
  import { useKeyboardInset } from '../hooks/useKeyboardInset.js';
@@ -266,6 +266,35 @@ describe('the phone bar', () => {
266
266
  expect(title.textContent).not.toContain(' · ');
267
267
  });
268
268
 
269
+ test('phoneBar={false}: no bar, the page keeps the home indicator’s inset, and the header’s badge opens Back and EVERY place (forge task 5939)', () => {
270
+ const { onNavigate } = shell({ phoneBar: false, back: { name: () => 'Recent' }, children: <PlaceHeader title='Files' /> });
271
+ expect(bar().className.split(' ')).toContain('hidden');
272
+ expect(bar().className.split(' ')).not.toContain('flex');
273
+ expect(document.querySelector('main')?.className).toContain('max-md:pb-[env(safe-area-inset-bottom)]');
274
+ const header = document.querySelector('[data-cb-place-header]') as HTMLElement;
275
+ fireEvent.click(header.querySelector('button[aria-label^="Spec"]') as HTMLElement);
276
+ const sheet = screen.getByRole('dialog');
277
+ // A first visit has nothing behind it: Back is drawn, inert, and says so.
278
+ const backRow = sheet.querySelector('[data-back]') as HTMLElement;
279
+ expect(backRow).toBeTruthy();
280
+ expect(backRow.getAttribute('aria-disabled')).toBe('true');
281
+ // Every place, the bar's four included, with the open one marked.
282
+ for (const p of PLACES) expect(within(sheet).getByRole('button', { name: new RegExp(p.label) })).toBeTruthy();
283
+ expect(within(sheet).getByRole('button', { name: /Files/ }).getAttribute('aria-current')).toBe('page');
284
+ fireEvent.click(within(sheet).getByRole('button', { name: /Shared/ }));
285
+ expect(onNavigate.mock.calls[0]?.[0].id).toBe('shared');
286
+ });
287
+
288
+ test('the default keeps the bar, and More leaves out what the bar holds and has no Back of its own', () => {
289
+ shell({ back: { name: () => 'Recent' } });
290
+ expect(bar().className.split(' ')).toContain('flex');
291
+ expect(document.querySelector('main')?.className).not.toContain('safe-area-inset-bottom');
292
+ fireEvent.click(screen.getByRole('button', { name: 'More' }));
293
+ const sheet = screen.getByRole('dialog');
294
+ expect(sheet.querySelector('[data-back]')).toBeNull();
295
+ expect(within(sheet).queryByRole('button', { name: /^Files$/ })).toBeNull();
296
+ });
297
+
269
298
  test('a stored bar is the phone’s own, apart from the rail', () => {
270
299
  localStorage.setItem('cb-shell:spec:bar', 'albums,trash');
271
300
  shell();
@@ -541,6 +570,21 @@ describe('PlaceHeader', () => {
541
570
  expect(document.querySelector(misplaced)).not.toBeNull();
542
571
  });
543
572
 
573
+ test('nameOnPhone={false}: the name is a screen reader’s alone below 640px, still the one h1, its `?` gone with it, and marked for NAV-11 (forge task 5936)', () => {
574
+ render(<PlaceHeader title='Review' hint='Waiting for a person.' nameOnPhone={false} actions={<Button tooltip='Pick'>Pick</Button>} />);
575
+ const name = screen.getByRole('heading', { level: 1 });
576
+ expect(name.textContent).toBe('Review');
577
+ expect(name.className.split(' ')).toContain('max-sm:sr-only');
578
+ // The attribute auditDesign's NAV-11 reads: renamed here, the rule would red every such phone header.
579
+ expect(name.getAttribute('data-cb-place-name-phone')).toBe('hidden');
580
+ expect((document.querySelector('[data-cb-info-hint-trigger]')?.closest('.max-sm\\:hidden') ?? null) !== null).toBe(true);
581
+ cleanup();
582
+ render(<PlaceHeader title='Files' hint='Every file.' />);
583
+ const shown = screen.getByRole('heading', { level: 1 });
584
+ expect(shown.className).not.toContain('sr-only');
585
+ expect(shown.hasAttribute('data-cb-place-name-phone')).toBe(false);
586
+ });
587
+
544
588
  test('outside a shell it is the row alone, no badge', () => {
545
589
  render(<PlaceHeader title='Alone' />);
546
590
  expect(document.querySelector('[data-cb-place-header] button')).toBeNull();
@@ -17,7 +17,8 @@
17
17
  * - **Alt held by itself** draws each place's key on it; `alt+1…9` go to the rail's places in the reader's order.
18
18
  * - **Phone (under 768px):** no rail and no top bar of chrome. A labeled bottom bar of at most five places and More; More
19
19
  * is a sheet with the account, the places the bar leaves out, the other apps and the menu's doors. A place's header
20
- * draws the badge at its upper right through {@link ShellBadgeSlot}.
20
+ * draws the badge at its upper right through {@link ShellBadgeSlot}. An app may put the bar away (`phoneBar={false}`):
21
+ * the badge's sheet then holds Back and every place.
21
22
  *
22
23
  * - **Focus view (`alt+f`, the menu's Focus view, a phone held sideways):** the rail and the bar step aside and a small
23
24
  * handle in the lower left leads back; the shell answers it itself (`focusView.ts`), and a place reads or flips it
@@ -182,6 +183,15 @@ export interface WorkspaceShellProps extends Omit<ComponentPropsWithoutRef<'div'
182
183
  * rail's Back is `actions.back` and the bar has none.
183
184
  */
184
185
  back?: ShellBack;
186
+ /**
187
+ * `false`: a phone draws no bottom bar, and the badge at each place header's upper right is the one way around —
188
+ * its sheet lists Back, then EVERY place (not only the ones a bar would leave out), then the doors (forge task 5939;
189
+ * the owner, 2026-11-24: *"On iphone, hide the full bottom row that has the icons like back, home, notebook …"*). For
190
+ * an app whose phone screen is one picture and a thread (friend), where 56px of chrome costs more than a tap to the
191
+ * badge. The page keeps the home indicator's inset the bar used to hold. Settings → Rail and bar drops its bar list.
192
+ * Default `true`; a desk's rail is the same either way.
193
+ */
194
+ phoneBar?: boolean;
185
195
  /**
186
196
  * Live draws nothing; connecting and offline draw the dot — at the rail's foot on a desk, beside the badge in a place's
187
197
  * header on a phone (NAV-10, forge tasks 5032/5033) — with what it means on hover. Offline is muted, since the reader's
@@ -203,7 +213,7 @@ export function ShellBadgeSlot({ className, ...rest }: ComponentPropsWithoutRef<
203
213
  const badge = useContext(BadgeContext);
204
214
  if (!badge) return null;
205
215
  return (
206
- <div {...rest} className={cn('shrink-0 md:hidden', className)}>
216
+ <div {...rest} data-cb-shell-badge='' className={cn('shrink-0 md:hidden', className)}>
207
217
  {badge}
208
218
  </div>
209
219
  );
@@ -337,6 +347,7 @@ export function WorkspaceShell({
337
347
  actions = {},
338
348
  keyGroups = [],
339
349
  back,
350
+ phoneBar = true,
340
351
  connection = 'live',
341
352
  connectionLabel,
342
353
  onConnection,
@@ -704,14 +715,16 @@ export function WorkspaceShell({
704
715
  {/* Focused on a touchscreen, the handle stays and its room is kept, so nothing an app draws is under it and a
705
716
  page's last row scrolls clear (forge task 5070): sideways, a gutter where the rail's foot was, which costs
706
717
  width a wide screen has to spare and keeps the height focus view is for; upright, a strip at the foot. */}
707
- <main className={cn('min-h-0 flex-1 overflow-hidden', focused && FOCUS_ROOM)}>{children}</main>
718
+ {/* No bar on a phone (`phoneBar={false}`): the home indicator's inset the bar held is the page's own foot. */}
719
+ <main className={cn('min-h-0 flex-1 overflow-hidden', focused ? FOCUS_ROOM : !phoneBar && 'max-md:pb-[env(safe-area-inset-bottom)]')}>{children}</main>
708
720
  <nav
709
721
  ref={barRef}
710
722
  aria-label='Places'
711
- data-cb-shell-bar=''
723
+ // `away`: put away by the app on a phone, not broken — `auditDesign`'s NAV-3 then wants the header's badge instead.
724
+ data-cb-shell-bar={phoneBar ? '' : 'away'}
712
725
  className={cn(
713
726
  'h-[calc(3.5rem+env(safe-area-inset-bottom))] shrink-0 items-stretch border-0 border-t border-solid border-border bg-background pb-[env(safe-area-inset-bottom)] md:hidden',
714
- focused ? 'hidden' : 'flex',
727
+ focused || !phoneBar ? 'hidden' : 'flex',
715
728
  )}
716
729
  >
717
730
  {back && backTrailButton(true)}
@@ -728,7 +741,11 @@ export function WorkspaceShell({
728
741
  </div>
729
742
  <ShellDrawer open={moreOpen} onClose={() => setMoreOpen(false)} side='bottom' title={<MoreHead badge={badge} />}>
730
743
  <MoreSheet
731
- places={leftOut}
744
+ places={phoneBar ? leftOut : places}
745
+ // With no bar, the sheet holds the bar's Back: where it leads, inert with the reason where this visit came in.
746
+ {...(!phoneBar && back
747
+ ? { back: { label: backControl.label, onSelect: stepBack, icon: <SHELL_ICONS.back />, ...(backControl.nowhere ? { unavailableReason: backControl.label } : {}) } }
748
+ : {})}
732
749
  active={active}
733
750
  // A phone has no rail and rarely a keyboard: More's first row is its way into Search, as the rail's is under Back.
734
751
  search={{ label: 'Search', onSelect: () => acts.search?.(), icon: <SHELL_ICONS.search />, ...(acts.search ? {} : { unavailableReason: 'This app has no search yet' }) }}
@@ -838,8 +855,9 @@ function MoreHead({ badge }: { badge: ShellBadge }) {
838
855
  );
839
856
  }
840
857
 
841
- /** More, on a phone: Search, the places the bar leaves out, the menu's doors, the other apps. */
858
+ /** More, on a phone: Back when there is no bar, Search, the places the bar leaves out, the menu's doors, the other apps. */
842
859
  function MoreSheet({
860
+ back,
843
861
  search,
844
862
  places,
845
863
  active,
@@ -848,6 +866,7 @@ function MoreSheet({
848
866
  onPlace,
849
867
  onDoor,
850
868
  }: {
869
+ back?: ShellMenuDoor;
851
870
  search: ShellMenuDoor;
852
871
  places: readonly ShellPlace[];
853
872
  active: string | null;
@@ -864,6 +883,12 @@ function MoreSheet({
864
883
  );
865
884
  return (
866
885
  <div className='flex flex-col gap-2 pb-2'>
886
+ {back && (
887
+ <UnstyledButton data-back='' unavailableReason={back.unavailableReason} onClick={() => onDoor(back)} className={cn(ROW, back.unavailableReason && 'cursor-not-allowed opacity-50')}>
888
+ {back.icon}
889
+ {back.label}
890
+ </UnstyledButton>
891
+ )}
867
892
  <UnstyledButton unavailableReason={search.unavailableReason} onClick={() => onDoor(search)} className={cn(ROW, search.unavailableReason && 'cursor-not-allowed opacity-50')}>
868
893
  {search.icon}
869
894
  {search.label}
@@ -116,6 +116,14 @@ describe('Rail and bar', () => {
116
116
  expect(railNav.querySelector('[data-place="recent"]')).toBeNull();
117
117
  });
118
118
 
119
+ test('phoneBar: false — the page is the Rail, with no bar to arrange (forge task 5939)', () => {
120
+ render(<SettingsPlace groups={shellSettingsGroups({ storageKey: 'spec', places: PLACES, phoneBar: false })} at='layout' onAt={() => {}} />);
121
+ expect(list('On the rail')).toBeTruthy();
122
+ expect(screen.queryByRole('list', { name: "On a phone's bar" })).toBeNull();
123
+ expect(screen.getByRole('button', { name: 'Put the rail back as it came' })).toBeTruthy();
124
+ expect(screen.queryByText('Rail and bar')).toBeNull();
125
+ });
126
+
119
127
  test('a rail place moves within its end: the first cannot go up, the head’s last cannot pass into the foot', () => {
120
128
  settings('layout');
121
129
  expect(within(placeRow('On the rail', 'files')).getByRole('button', { name: 'Move Files up' }).hasAttribute('disabled')).toBe(true);
@@ -128,10 +128,12 @@ interface RailAndBarSettingProps {
128
128
  storageKey: string;
129
129
  /** The shell's `places`. */
130
130
  places: readonly ShellPlace[];
131
+ /** The shell's `phoneBar`: with none, only the rail is listed. */
132
+ phoneBar?: boolean;
131
133
  }
132
134
 
133
135
  /** The rail at a desk and the bar on a phone, each shown or put away and in the reader's order. */
134
- function RailAndBarSetting({ storageKey, places }: RailAndBarSettingProps) {
136
+ function RailAndBarSetting({ storageKey, places, phoneBar = true }: RailAndBarSettingProps) {
135
137
  const layout = useShellLayout(storageKey, places);
136
138
  const byId = new Map(places.map((p) => [p.id, p]));
137
139
  const headCount = layout.rail.filter((e) => !byId.get(e.id)?.foot).length;
@@ -160,6 +162,7 @@ function RailAndBarSetting({ storageKey, places }: RailAndBarSettingProps) {
160
162
  })}
161
163
  byId={byId}
162
164
  />
165
+ {phoneBar && (
163
166
  <PlaceList
164
167
  title="On a phone's bar"
165
168
  hint={`Beside More, at most ${BAR_MOST}. Every place is in More either way.`}
@@ -178,9 +181,10 @@ function RailAndBarSetting({ storageKey, places }: RailAndBarSettingProps) {
178
181
  })}
179
182
  byId={byId}
180
183
  />
184
+ )}
181
185
  <div>
182
- <Button variant='secondary' size='sm' leftIcon={<RotateCcw />} tooltip='The rail and the bar as this app first drew them' onClick={layout.reset}>
183
- Put both back as they came
186
+ <Button variant='secondary' size='sm' leftIcon={<RotateCcw />} tooltip={phoneBar ? 'The rail and the bar as this app first drew them' : 'The rail as this app first drew it'} onClick={layout.reset}>
187
+ {phoneBar ? 'Put both back as they came' : 'Put the rail back as it came'}
184
188
  </Button>
185
189
  </div>
186
190
  </div>
@@ -241,6 +245,8 @@ export interface ShellSettingsOptions {
241
245
  /** The shell's `storageKey` and `places`, for Rail and bar. */
242
246
  storageKey: string;
243
247
  places: readonly ShellPlace[];
248
+ /** The shell's `phoneBar`: `false` leaves the phone's bar out of Rail and bar, since there is none to arrange. */
249
+ phoneBar?: boolean;
244
250
  /** The app's own pages under Storage and data. */
245
251
  data?: readonly SettingsPage[];
246
252
  /** More of the app's own groups, after these. */
@@ -250,7 +256,7 @@ export interface ShellSettingsOptions {
250
256
  }
251
257
 
252
258
  /** The map every shell app's Settings place starts from. Page ids: `account`, `appearance`, `keyboard`, `layout`, `focus`, `about`. */
253
- export function shellSettingsGroups({ account, storageKey, places, data, more = [], buildProbeUrl }: ShellSettingsOptions): SettingsGroup[] {
259
+ export function shellSettingsGroups({ account, storageKey, places, phoneBar = true, data, more = [], buildProbeUrl }: ShellSettingsOptions): SettingsGroup[] {
254
260
  const groups: SettingsGroup[] = [];
255
261
  if (account?.length) groups.push({ title: 'You', pages: [{ id: 'account', title: 'Account', icon: <UserRound />, sections: account }] });
256
262
  groups.push({
@@ -273,14 +279,14 @@ export function shellSettingsGroups({ account, storageKey, places, data, more =
273
279
  },
274
280
  {
275
281
  id: 'layout',
276
- title: 'Rail and bar',
282
+ title: phoneBar ? 'Rail and bar' : 'Rail',
277
283
  icon: <PanelLeft />,
278
284
  sections: [
279
285
  {
280
286
  id: 'rail',
281
- title: 'Rail and bar',
282
- words: 'sidebar navigation places order hide show phone tab bar',
283
- render: () => <RailAndBarSetting storageKey={storageKey} places={places} />,
287
+ title: phoneBar ? 'Rail and bar' : 'Rail',
288
+ words: phoneBar ? 'sidebar navigation places order hide show phone tab bar' : 'sidebar navigation places order hide show',
289
+ render: () => <RailAndBarSetting storageKey={storageKey} places={places} phoneBar={phoneBar} />,
284
290
  },
285
291
  ],
286
292
  },
@@ -18,7 +18,7 @@
18
18
  * after an app's responsive variant (task 2124). An app that imports every area gets exactly
19
19
  * what `cursedbelt/styles-utilities.css` emits — proved rule by rule in
20
20
  * src/stylesAreas.spec.ts, which is also what fails when this file is stale.
21
- * 117 candidate(s).
21
+ * 118 candidate(s).
22
22
  *
23
23
  * Written by scripts/generateAreaStyles.ts (`bun run styles:areas`), which
24
24
  * `bun run build` runs. The map of what is in which area, and why the areas are
@@ -39,7 +39,8 @@
39
39
  @source inline("group-focus-within:opacity-100 group-focus-within:pointer-events-auto");
40
40
  @source inline("group-hover:pointer-events-auto h-14 h-[calc(3.5rem+env(safe-area-inset-bottom))]");
41
41
  @source inline("hover:[&>svg]:opacity-100 hover:bg-accent-solid/90 hover:bg-muted/60 items-stretch left-2.5");
42
- @source inline("left-[calc(env(safe-area-inset-left)+0.5rem)] list-none max-md:border-t-0 max-md:pt-0");
42
+ @source inline("left-[calc(env(safe-area-inset-left)+0.5rem)] list-none max-md:border-t-0");
43
+ @source inline("max-md:pb-[env(safe-area-inset-bottom)] max-md:pt-0");
43
44
  @source inline("md:[&:has(>[data-cb-place-actions]_[role=tablist])>[data-cb-place-name]]:min-w-24 md:bg-muted");
44
45
  @source inline("md:block md:border-r md:flex md:h-12 md:has-[[role=tablist]]:min-w-0");
45
46
  @source inline("md:has-[[role=tablist]]:shrink md:hidden md:px-6 md:px-8 md:py-6 md:shrink-0 md:text-foreground");
@@ -4877,6 +4877,9 @@
4877
4877
  .max-md\:pt-0 {
4878
4878
  padding-top: 0px;
4879
4879
  }
4880
+ .max-md\:pb-\[env\(safe-area-inset-bottom\)\] {
4881
+ padding-bottom: env(safe-area-inset-bottom);
4882
+ }
4880
4883
  }
4881
4884
  @media (width < 40rem) {
4882
4885
  .max-sm\:sr-only {
@@ -617,7 +617,13 @@ export function designProbe({ rules, allowProse, specimens }: ProbeArgs): Design
617
617
  // DRAWN, not `shown`: an open modal makes the page under it inert and aria-hidden (Radix's
618
618
  // hideOthers), so a drawer over a place read as a frame that broke while its rail sat painted
619
619
  // under the scrim — every binary-server drawer at 390 and 1440 (forge task 5110).
620
- if (!frame || !drawn(frame)) push('NAV-3', shell, `the shell's ${desk ? 'rail' : 'bar'} is not on screen at ${window.innerWidth}px`);
620
+ // A phone bar the app put away on purpose (`WorkspaceShell phoneBar={false}`, forge task 5939) frames nothing; the badge
621
+ // in the place header is then the way around, so it is the frame that must be drawn.
622
+ const away = !desk && frame?.getAttribute('data-cb-shell-bar') === 'away';
623
+ const badge = away ? shell.querySelector('[data-cb-shell-badge]') : null;
624
+ if (away) {
625
+ if (!badge || !drawn(badge)) push('NAV-3', shell, `the shell's bar is put away at ${window.innerWidth}px and no badge in a place header leads around`);
626
+ } else if (!frame || !drawn(frame)) push('NAV-3', shell, `the shell's ${desk ? 'rail' : 'bar'} is not on screen at ${window.innerWidth}px`);
621
627
  }
622
628
  const legacy = Array.from(document.querySelectorAll('nav, [role="navigation"], [data-cb-sidenav], [data-cb-topbar]')).find(
623
629
  (el) => !el.closest('[data-cb-shell]') && !el.closest(FLOATING) && shown(el),
@@ -831,6 +837,9 @@ export function designProbe({ rules, allowProse, specimens }: ProbeArgs): Design
831
837
  // exception above still counted as a title. Read even when it draws 0px wide: that is the worst case, not a hidden one.
832
838
  for (const h1 of document.querySelectorAll('[data-cb-place-header] h1')) {
833
839
  if (h1.closest('[hidden], [aria-hidden="true"], [inert]') || getComputedStyle(h1).display === 'none') continue;
840
+ // A name the place DECLARED a screen reader's alone on a phone (`PlaceHeader nameOnPhone={false}`, forge task 5936) gave its
841
+ // room to the actions on purpose; above 640px it is drawn, and read here like any other.
842
+ if (window.innerWidth < 640 && h1.getAttribute('data-cb-place-name-phone') === 'hidden') continue;
834
843
  const header = h1.closest('[data-cb-place-header]') as HTMLElement;
835
844
  if (!drawn(header)) continue;
836
845
  const name = (h1.textContent ?? '').replace(/\s+/g, ' ').trim();
@@ -29,6 +29,8 @@ export const BELT = {
29
29
  shell: '[data-cb-shell]',
30
30
  shellRail: '[data-cb-shell-rail]',
31
31
  shellBar: '[data-cb-shell-bar]',
32
+ /** The badge's slot in a place header — a phone's way around when the app puts its bar away (`phoneBar={false}`). */
33
+ shellBadge: '[data-cb-shell-badge]',
32
34
  connectionDot: '[data-cb-connection-dot]',
33
35
  focus: '[data-cb-focus]',
34
36
  focusSurface: '[data-cb-focus-surface]',
@@ -165,6 +167,8 @@ export function shell<L>(root: Locates<L>) {
165
167
  rail: root.locator(BELT.shellRail),
166
168
  /** The phone's bottom bar (`nav`, hidden from `md`). */
167
169
  bar: root.locator(BELT.shellBar),
170
+ /** The badge in a place header (phone widths); its button opens the shell's sheet. */
171
+ badge: root.locator(BELT.shellBadge),
168
172
  /** A place's link, rail and bar both: `place('films')`. */
169
173
  place: (id: string) => root.locator(`${BELT.shell} [data-place=${JSON.stringify(id)}]`),
170
174
  /** The place header across the top of the work. */