paseo-office 0.2.0 → 0.2.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.
Files changed (138) hide show
  1. package/OVERVIEW.md +27 -0
  2. package/README.md +65 -134
  3. package/client/action-button.tsx +4 -1
  4. package/client/activity-panel.tsx +6 -4
  5. package/client/agent-appearance.tsx +257 -0
  6. package/client/agent-card.tsx +2 -1
  7. package/client/agent-picker-text.ts +23 -4
  8. package/client/agent-picker.tsx +5 -8
  9. package/client/board-sheet.tsx +48 -16
  10. package/client/board-text.ts +12 -2
  11. package/client/brand.ts +1 -0
  12. package/client/chat-chrome.tsx +318 -0
  13. package/client/chat-compose-tools.tsx +314 -0
  14. package/client/chat-dictation.tsx +133 -0
  15. package/client/chat-more.tsx +119 -0
  16. package/client/chat-panel.tsx +401 -146
  17. package/client/chat-quick.tsx +198 -0
  18. package/client/chat-text.ts +25 -6
  19. package/client/column-sheet.tsx +93 -23
  20. package/client/conversation-model.ts +19 -5
  21. package/client/duty-sheet.tsx +321 -0
  22. package/client/duty-text.ts +20 -0
  23. package/client/fullscreen-header.tsx +28 -13
  24. package/client/fullscreen-theme.ts +38 -0
  25. package/client/host-details.tsx +269 -0
  26. package/client/host-styles.ts +129 -0
  27. package/client/host-switches.tsx +197 -73
  28. package/client/incidents-card.tsx +2 -1
  29. package/client/janitor-card.tsx +1 -1
  30. package/client/library-card.tsx +2 -1
  31. package/client/list-text.ts +8 -6
  32. package/client/lobby-board.tsx +73 -53
  33. package/client/machine-card.tsx +225 -85
  34. package/client/messenger-styles.ts +216 -0
  35. package/client/new-agent-form.tsx +153 -61
  36. package/client/new-agent-model.ts +2 -0
  37. package/client/notes-card.tsx +111 -83
  38. package/client/notes-days.tsx +1 -1
  39. package/client/office-brand-context.ts +44 -0
  40. package/client/office-column.tsx +2 -1
  41. package/client/office-keyboard.ts +79 -0
  42. package/client/office-link.ts +7 -1
  43. package/client/office-mark.tsx +29 -0
  44. package/client/office-modal.tsx +440 -0
  45. package/client/office-settings.tsx +75 -30
  46. package/client/office-state.ts +12 -2
  47. package/client/office-surface.tsx +591 -81
  48. package/client/pixel/actors.ts +2 -1
  49. package/client/pixel/art.ts +33 -19
  50. package/client/pixel/pixel-office.tsx +2 -2
  51. package/client/prompt-coach.tsx +152 -0
  52. package/client/qa-card.tsx +2 -1
  53. package/client/review-card.tsx +2 -1
  54. package/client/room-board.tsx +26 -2
  55. package/client/scene-picker.tsx +158 -0
  56. package/client/scene-previews.ts +10 -0
  57. package/client/session-pane.tsx +25 -5
  58. package/client/session-panel-detail.tsx +238 -0
  59. package/client/session-panel.tsx +222 -137
  60. package/client/session-styles.ts +224 -1
  61. package/client/session-transcript.tsx +243 -0
  62. package/client/sessions-panel.tsx +181 -22
  63. package/client/sessions-text.ts +18 -0
  64. package/client/settings-sections.tsx +126 -0
  65. package/client/sidebar-launcher.ts +29 -0
  66. package/client/ssh-hosts.tsx +331 -0
  67. package/client/ssh-metrics.ts +76 -0
  68. package/client/standup-card.tsx +2 -1
  69. package/client/structure-view.tsx +20 -3
  70. package/client/styles.ts +170 -62
  71. package/client/team-chat-preview.tsx +96 -0
  72. package/client/transcript-styles.ts +90 -0
  73. package/client/use-device-switch.ts +21 -12
  74. package/client/use-duty-actions.ts +43 -0
  75. package/client/use-group-photo.ts +48 -0
  76. package/client/use-new-agent.ts +4 -0
  77. package/client/use-street.ts +8 -0
  78. package/client/workspace-office-tools.tsx +102 -0
  79. package/client/workspace-overlay-route.web.ts +47 -0
  80. package/client/workspace-overlay.tsx +195 -0
  81. package/client/world/adapter.ts +37 -2
  82. package/client/world/escape.ts +58 -0
  83. package/client/world/use-world-feed.ts +6 -2
  84. package/client/world/workspace-dock.ts +6 -0
  85. package/client/world/world-api.ts +45 -4
  86. package/client/world/world-bridge-page.ts +14 -3
  87. package/client/world/world-bridge.ts +50 -5
  88. package/client/world/world-frame.web.ts +8 -0
  89. package/client/world/world-view-native.tsx +31 -10
  90. package/client/world/world-view-shared.ts +36 -7
  91. package/client/world/world-view.tsx +93 -21
  92. package/docs/office.md +148 -58
  93. package/index.client.tsx +13 -6
  94. package/index.server.ts +125 -9
  95. package/package.json +2 -1
  96. package/server/activity.ts +42 -19
  97. package/server/agent-tools.ts +11 -5
  98. package/server/board-service.ts +381 -10
  99. package/server/brand-logo.ts +34 -0
  100. package/server/chat-group.ts +83 -0
  101. package/server/chat-service.ts +406 -62
  102. package/server/chat-store.ts +1 -4
  103. package/server/directory.ts +22 -7
  104. package/server/duty-service.ts +230 -0
  105. package/server/group-photo.ts +39 -0
  106. package/server/home-departure.ts +47 -0
  107. package/server/hub.ts +43 -1
  108. package/server/live-ports.ts +114 -18
  109. package/server/lobby-pickup.ts +170 -0
  110. package/server/machine/details.ts +91 -0
  111. package/server/mention-queue.ts +14 -0
  112. package/server/office.ts +110 -6
  113. package/server/paths.ts +9 -0
  114. package/server/ssh/LICENSE.paseo +211 -0
  115. package/server/ssh/client.ts +401 -0
  116. package/server/ssh/discovery.ts +230 -0
  117. package/server/ssh/installed.ts +104 -0
  118. package/server/ssh/monitor.ts +104 -0
  119. package/server/ssh/pid-files.ts +194 -0
  120. package/server/ssh/read.ts +136 -0
  121. package/server/subagent-names.ts +4 -0
  122. package/server/words.generated.ts +1 -1
  123. package/server/world.generated.ts +1 -1
  124. package/shared/appearance.ts +43 -0
  125. package/shared/branding.ts +53 -0
  126. package/shared/chat-words.ts +2 -2
  127. package/shared/contracts.ts +135 -4
  128. package/shared/duties.ts +100 -0
  129. package/shared/host-details.ts +25 -0
  130. package/shared/lobby-assignment.ts +34 -0
  131. package/shared/model.ts +9 -1
  132. package/shared/names.ts +2 -0
  133. package/shared/settings.ts +14 -3
  134. package/shared/ssh.ts +34 -0
  135. package/shared/upstream/README.md +1 -3
  136. package/shared/upstream/chat-engine.d.ts +4 -0
  137. package/shared/upstream/prompt-coach.d.ts +6 -0
  138. package/shared/upstream/prompt-coach.js +178 -0
@@ -1,6 +1,9 @@
1
+ import { useOfficeBrand } from "./office-brand-context.js";
2
+ import { OfficeMark } from "./office-mark.js";
1
3
  import { useCallback, useEffect, useRef, useState, type ReactNode } from "react";
2
4
  import { Text, View } from "react-native";
3
5
  import { useSettings, type SettingsState } from "@getpaseo/plugin/client";
6
+ import { SettingsSections, settingsLayout } from "./settings-sections.js";
4
7
  import { SettingField } from "./setting-field.js";
5
8
  import { WeatherFields, type WeatherSetting } from "./weather-settings.js";
6
9
  import type { IncidentsState, WakeState } from "../shared/contracts.js";
@@ -17,6 +20,10 @@ type HostSettings = SettingsState<typeof officeHostSettings.schema>;
17
20
  export type HostValues = Extract<HostSettings, { status: "ready" }>["values"];
18
21
  /** A host setting, as its control is labelled. */
19
22
  type HostSetting =
23
+ | "Office name"
24
+ | "Logo URL"
25
+ | "Brand color"
26
+ | "Archive idle sessions"
20
27
  | "Agent tools"
21
28
  | "Notes folder"
22
29
  | "Time zone"
@@ -70,6 +77,7 @@ export interface HostSwitchesProps {
70
77
  incidents: TrackerState | undefined;
71
78
  /** The device's own switch: last in the row, so on a phone it wraps to the line above the view. */
72
79
  weather?: import("../shared/contracts.js").WeatherState | undefined;
80
+ language?: ReactNode;
73
81
  children?: ReactNode;
74
82
  }
75
83
 
@@ -87,6 +95,7 @@ export function HostSwitches({
87
95
  scheduleError,
88
96
  incidents,
89
97
  weather,
98
+ language,
90
99
  children,
91
100
  }: HostSwitchesProps) {
92
101
  const settings = useSettings(officeHostSettings);
@@ -175,82 +184,113 @@ export function HostSwitches({
175
184
  wakeProblem,
176
185
  settings.status === "error" ? failureText("Read the office settings", settings.error) : null,
177
186
  saveProblem("Agent tools"),
178
- deviceProblem,
179
187
  ].filter((problem): problem is string => problem !== null);
180
188
  return (
181
- <>
182
- <View style={styles.headerControls}>
183
- <LabeledSwitch
184
- label="Wake agents"
185
- note={summary}
186
- value={wantedWakes ?? wakesOn}
187
- onChange={toggleWakes}
188
- styles={styles}
189
- />
190
- <LabeledSwitch
191
- label="Agent tools"
192
- value={wantedTools ?? stored?.agentTools ?? null}
193
- onChange={toggleTools}
194
- styles={styles}
195
- />
196
- {children}
197
- </View>
198
- <View style={styles.headerFields}>
199
- <FloorPlanRow
200
- value={storedPlan(stored)}
201
- onSave={savePlan}
202
- problem={saveProblem(FLOOR_PLAN_LABEL)}
203
- styles={styles}
204
- />
205
- </View>
206
- <View style={styles.headerFields}>
207
- <SettingField
208
- label="Notes folder"
209
- hint="Where the stand-up notes are written. Empty turns them off."
210
- value={stored?.notesFolder ?? null}
211
- onSave={saveFolder}
212
- problem={saveProblem("Notes folder")}
213
- styles={styles}
214
- />
215
- <SettingField
216
- label="Time zone"
217
- hint="For the 8:00 run. Empty uses this host's."
218
- value={stored?.notesTimeZone ?? null}
219
- onSave={saveTimeZone}
220
- problem={timeZoneProblem}
221
- styles={styles}
222
- />
223
- <NotesDays
224
- value={stored?.notesDays ?? null}
225
- onSave={saveDays}
226
- problem={saveProblem(NOTES_DAYS_LABEL)}
227
- styles={styles}
228
- />
229
- </View>
230
- <TrackerFields
231
- values={stored}
232
- incidents={incidents}
233
- change={change}
234
- saveProblem={saveProblem}
235
- styles={styles}
236
- />
237
- <WeatherFields
238
- values={stored}
239
- weather={weather}
240
- change={change}
241
- saveProblem={saveProblem}
242
- styles={styles}
243
- />
244
- {problems.length > 0 ? (
245
- <View style={styles.headerProblems}>
246
- {problems.map((problem) => (
247
- <Text key={problem} accessibilityRole="alert" style={styles.actionError}>
248
- {problem}
189
+ <SettingsSections
190
+ styles={styles}
191
+ appearance={
192
+ <>
193
+ {children}
194
+ <BrandFields values={stored} change={change} saveProblem={saveProblem} styles={styles} />
195
+ <View style={styles.headerFields}>
196
+ <FloorPlanRow
197
+ value={storedPlan(stored)}
198
+ onSave={savePlan}
199
+ problem={saveProblem(FLOOR_PLAN_LABEL)}
200
+ styles={styles}
201
+ />
202
+ </View>
203
+ <View style={styles.headerFields}>{language}</View>
204
+ {deviceProblem && (
205
+ <Text accessibilityRole="alert" style={styles.actionError}>
206
+ {deviceProblem}
249
207
  </Text>
250
- ))}
251
- </View>
252
- ) : null}
253
- </>
208
+ )}
209
+ </>
210
+ }
211
+ automation={
212
+ <>
213
+ <View style={settingsLayout.block}>
214
+ <Text style={styles.sheetLabel}>Agents</Text>
215
+ <View style={settingsLayout.strip}>
216
+ <LabeledSwitch
217
+ label="Wake agents"
218
+ note={summary}
219
+ value={wantedWakes ?? wakesOn}
220
+ onChange={toggleWakes}
221
+ styles={styles}
222
+ />
223
+ <LabeledSwitch
224
+ label="Agent tools"
225
+ value={wantedTools ?? stored?.agentTools ?? null}
226
+ onChange={toggleTools}
227
+ styles={styles}
228
+ />
229
+ </View>
230
+ </View>
231
+ <ArchiveSetting
232
+ values={stored}
233
+ change={change}
234
+ saveProblem={saveProblem}
235
+ styles={styles}
236
+ />
237
+ <Text style={styles.sheetLabel}>Stand-up schedule</Text>
238
+ <View style={styles.headerFields}>
239
+ <SettingField
240
+ label="Notes folder"
241
+ hint="Where the stand-up notes are written. Empty turns them off."
242
+ value={stored?.notesFolder ?? null}
243
+ onSave={saveFolder}
244
+ problem={saveProblem("Notes folder")}
245
+ styles={styles}
246
+ />
247
+ <SettingField
248
+ label="Time zone"
249
+ hint="For the 8:00 run. Empty uses this host's."
250
+ value={stored?.notesTimeZone ?? null}
251
+ onSave={saveTimeZone}
252
+ problem={timeZoneProblem}
253
+ styles={styles}
254
+ />
255
+ <NotesDays
256
+ value={stored?.notesDays ?? null}
257
+ onSave={saveDays}
258
+ problem={saveProblem(NOTES_DAYS_LABEL)}
259
+ styles={styles}
260
+ />
261
+ </View>
262
+ {problems.length > 0 ? (
263
+ <View style={styles.headerProblems}>
264
+ {problems.map((problem) => (
265
+ <Text key={problem} accessibilityRole="alert" style={styles.actionError}>
266
+ {problem}
267
+ </Text>
268
+ ))}
269
+ </View>
270
+ ) : null}
271
+ </>
272
+ }
273
+ services={
274
+ <>
275
+ <Text style={styles.sheetLabel}>Issue trackers</Text>
276
+ <TrackerFields
277
+ values={stored}
278
+ incidents={incidents}
279
+ change={change}
280
+ saveProblem={saveProblem}
281
+ styles={styles}
282
+ />
283
+ <Text style={styles.sheetLabel}>Weather service</Text>
284
+ <WeatherFields
285
+ values={stored}
286
+ weather={weather}
287
+ change={change}
288
+ saveProblem={saveProblem}
289
+ styles={styles}
290
+ />
291
+ </>
292
+ }
293
+ />
254
294
  );
255
295
  }
256
296
 
@@ -355,3 +395,87 @@ function TrackerFields({ values, incidents, change, saveProblem, styles }: Track
355
395
  </>
356
396
  );
357
397
  }
398
+
399
+ function ArchiveSetting({
400
+ values: stored,
401
+ change,
402
+ saveProblem,
403
+ styles,
404
+ }: Omit<TrackerFieldsProps, "incidents">) {
405
+ const toggle = useCallback(
406
+ (next: boolean) => void change("Archive idle sessions", { archiveOnDeparture: next }),
407
+ [change],
408
+ );
409
+ const problem = saveProblem("Archive idle sessions");
410
+ return (
411
+ <View style={settingsLayout.block}>
412
+ {stored && (
413
+ <LabeledSwitch
414
+ label="Archive idle sessions"
415
+ value={stored.archiveOnDeparture}
416
+ onChange={toggle}
417
+ styles={styles}
418
+ />
419
+ )}
420
+ <Text style={styles.fieldHint}>
421
+ Off by default. When a worker goes home for the night or after evening drinks, an open 3D
422
+ floor can archive its idle session on this host. Sessions awaiting approval or a working
423
+ subagent stay active. Archived sessions leave the active list and keep their history.
424
+ </Text>
425
+ {problem && (
426
+ <Text accessibilityRole="alert" style={styles.actionError}>
427
+ {problem}
428
+ </Text>
429
+ )}
430
+ </View>
431
+ );
432
+ }
433
+
434
+ function BrandFields({
435
+ values: stored,
436
+ change,
437
+ saveProblem,
438
+ styles,
439
+ }: Omit<TrackerFieldsProps, "incidents">) {
440
+ const brand = useOfficeBrand();
441
+ const saveName = useCallback((v: string) => change("Office name", { brandName: v }), [change]);
442
+ const saveLogo = useCallback((v: string) => change("Logo URL", { brandLogoUrl: v }), [change]);
443
+ const saveColor = useCallback((v: string) => change("Brand color", { brandColor: v }), [change]);
444
+ return (
445
+ <View style={settingsLayout.block}>
446
+ <Text style={styles.sheetLabel}>Branding</Text>
447
+ <View style={settingsLayout.strip}>
448
+ <OfficeMark brand={brand} fallbackColor={styles.brandIcon.color} />
449
+ <Text numberOfLines={1} style={styles.brandText}>
450
+ {brand.name ?? "Office 3D"}
451
+ </Text>
452
+ </View>
453
+ <View style={styles.headerFields}>
454
+ <SettingField
455
+ label="Office name"
456
+ value={stored ? (stored.brandName ?? "") : null}
457
+ hint="Display name. Leave blank to use the host default."
458
+ onSave={saveName}
459
+ problem={saveProblem("Office name")}
460
+ styles={styles}
461
+ />
462
+ <SettingField
463
+ label="Brand color"
464
+ value={stored ? (stored.brandColor ?? "") : null}
465
+ hint="Hex color for the office mark, such as #e8865f."
466
+ onSave={saveColor}
467
+ problem={saveProblem("Brand color")}
468
+ styles={styles}
469
+ />
470
+ <SettingField
471
+ label="Logo URL"
472
+ value={stored ? (stored.brandLogoUrl ?? "") : null}
473
+ hint="HTTPS image URL. Allow cross-origin images for the 3D sign."
474
+ onSave={saveLogo}
475
+ problem={saveProblem("Logo URL")}
476
+ styles={styles}
477
+ />
478
+ </View>
479
+ </View>
480
+ );
481
+ }
@@ -1,6 +1,7 @@
1
1
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
2
  import { Text, View } from "react-native";
3
- import { ExternalLink, Modal } from "@getpaseo/plugin/client/ui";
3
+ import { ExternalLink } from "@getpaseo/plugin/client/ui";
4
+ import { OfficeModal as Modal } from "./office-modal.js";
4
5
  import type { IncidentsState } from "../shared/contracts.js";
5
6
  import { ActionButton, failureText } from "./action-button.js";
6
7
  import { incidentProblems, incidentRows, type IncidentRow } from "./incidents-text.js";
@@ -1,6 +1,6 @@
1
1
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
2
  import { Text, View, type ViewStyle } from "react-native";
3
- import { Modal } from "@getpaseo/plugin/client/ui";
3
+ import { OfficeModal as Modal } from "./office-modal.js";
4
4
  import { ActionButton, failureText } from "./action-button.js";
5
5
  import { contextTone, inShownOrder, janitorRowLabel, type JanitorRow } from "./context-text.js";
6
6
  import type { OfficeStyles } from "./styles.js";
@@ -1,6 +1,7 @@
1
1
  import { Fragment, useCallback, useEffect, useRef, useState } from "react";
2
2
  import { Text, View } from "react-native";
3
- import { Modal, ScrollView, TextInput } from "@getpaseo/plugin/client/ui";
3
+ import { ScrollView, TextInput } from "@getpaseo/plugin/client/ui";
4
+ import { OfficeModal as Modal } from "./office-modal.js";
4
5
  import type { SkillInfo, SkillsResult } from "../shared/contracts.js";
5
6
  import { ActionButton, failureText } from "./action-button.js";
6
7
  import { textAfterSend } from "./agent-card.js";
@@ -136,22 +136,24 @@ function clockText(promptedAt: string | undefined, now: number): string | null {
136
136
  }
137
137
 
138
138
  /** How long ago a resting agent's last change was: "now", "5m ago", "2h ago", "3d ago". */
139
- function agoText(idleSince: string | undefined, now: number): string | null {
139
+ function agoText(idleSince: string | undefined, now: number, waiting = false): string | null {
140
140
  const since = idleSince === undefined ? Number.NaN : Date.parse(idleSince);
141
141
  if (!Number.isFinite(since)) return null;
142
142
  const ms = Math.max(0, now - since);
143
- if (ms < MINUTE) return "now";
144
- if (ms < HOUR) return `${Math.floor(ms / MINUTE)}m ago`;
145
- if (ms < DAY) return `${Math.floor(ms / HOUR)}h ago`;
146
- return `${Math.floor(ms / DAY)}d ago`;
143
+ if (ms < MINUTE) return waiting ? "Waiting <1m" : "now";
144
+ let duration = `${Math.floor(ms / DAY)}d`;
145
+ if (ms < HOUR) duration = `${Math.floor(ms / MINUTE)}m`;
146
+ else if (ms < DAY) duration = `${Math.floor(ms / HOUR)}h`;
147
+ return waiting ? `Waiting ${duration}` : `${duration} ago`;
147
148
  }
148
149
 
149
150
  /**
150
151
  * The row's time: the turn's clock while it runs, how long it has rested while it is idle. An
151
- * agent that needs you, is starting or has stopped on an error shows none.
152
+ * agent with a permission request uses its attention timestamp when the host provides one.
152
153
  */
153
154
  export function timeText(row: OfficeRow, now: number): string | null {
154
155
  const { agent } = row;
156
+ if (agent.permissions.length) return agoText(agent.permissionSince, now, true);
155
157
  if (attentionReason(agent) !== null) return null;
156
158
  if (agent.status === "running") return clockText(agent.promptedAt, now);
157
159
  if (agent.status === "idle") return agoText(agent.idleSince, now);
@@ -92,39 +92,48 @@ function TodoRow({ post, name, actions, styles }: TodoRowProps) {
92
92
  const keep = useCallback(() => setAsking(false), []);
93
93
  const remove = useCallback(() => actions.remove(post.id), [actions, post.id]);
94
94
  return (
95
- <View style={styles.boardPost}>
96
- <Pressable
97
- id={id}
98
- accessibilityRole="checkbox"
99
- accessibilityLabel={meta === null ? post.text : `${post.text}, ${meta}`}
100
- aria-checked={done}
101
- disabled={pending}
102
- onPress={toggle}
103
- style={pending ? styles.todoRowDisabled : styles.todoRow}
104
- >
105
- <Icon name={done ? "SquareCheck" : "Square"} size={20} color={styles.iconColor} />
106
- <View style={styles.rowBody}>
107
- <Text style={done ? styles.todoTextDone : styles.postText}>{post.text}</Text>
108
- {meta === null ? null : <Text style={styles.postMeta}>{meta}</Text>}
109
- </View>
110
- </Pressable>
95
+ <View style={styles.lobbyTask}>
96
+ <View style={styles.lobbyTaskLine}>
97
+ <Pressable
98
+ id={id}
99
+ accessibilityRole="checkbox"
100
+ accessibilityLabel={meta === null ? post.text : `${post.text}, ${meta}`}
101
+ aria-checked={done}
102
+ disabled={pending}
103
+ onPress={toggle}
104
+ style={pending ? styles.todoRowDisabled : styles.todoRow}
105
+ >
106
+ <Icon name={done ? "SquareCheck" : "Square"} size={20} color={styles.iconColor} />
107
+ <View style={styles.rowBody}>
108
+ <Text style={done ? styles.todoTextDone : styles.postText}>{post.text}</Text>
109
+ {meta === null ? null : <Text style={styles.postMeta}>{meta}</Text>}
110
+ </View>
111
+ </Pressable>
112
+ <Pressable
113
+ accessibilityRole="button"
114
+ accessibilityLabel={`Delete task: ${post.text}`}
115
+ aria-expanded={asking}
116
+ onPress={ask}
117
+ style={styles.lobbyDelete}
118
+ >
119
+ <Icon name="Trash2" size={16} color={styles.iconColor} />
120
+ </Pressable>
121
+ </View>
111
122
  {failure === null ? null : (
112
123
  <Text accessibilityRole="alert" style={styles.actionError}>
113
124
  {failure}
114
125
  </Text>
115
126
  )}
116
127
  {asking ? (
117
- <DeleteQuestion
118
- question="Delete this post?"
119
- onDelete={remove}
120
- onKeep={keep}
121
- styles={styles}
122
- />
123
- ) : (
124
- <View style={styles.actions}>
125
- <ActionButton label="Delete" pendingLabel="Deleting..." onPress={ask} styles={styles} />
128
+ <View style={styles.lobbyConfirm}>
129
+ <DeleteQuestion
130
+ question="Delete this post?"
131
+ onDelete={remove}
132
+ onKeep={keep}
133
+ styles={styles}
134
+ />
126
135
  </View>
127
- )}
136
+ ) : null}
128
137
  </View>
129
138
  );
130
139
  }
@@ -153,7 +162,9 @@ function TodoHeading({ board, done, actions, styles }: TodoHeadingProps) {
153
162
  if (asking && done === 0) setAsking(false);
154
163
  return (
155
164
  <View style={styles.boardTitleRow}>
156
- <Text style={styles.sheetLabel}>To-do</Text>
165
+ <Text accessibilityRole="header" style={styles.lobbyHeading}>
166
+ To-do
167
+ </Text>
157
168
  {asking ? (
158
169
  <View style={styles.sheetActions}>
159
170
  <DeleteQuestion
@@ -164,13 +175,15 @@ function TodoHeading({ board, done, actions, styles }: TodoHeadingProps) {
164
175
  />
165
176
  </View>
166
177
  ) : (
167
- <ActionButton
168
- label="Clear finished"
169
- pendingLabel="Clearing..."
178
+ <Pressable
179
+ accessibilityRole="button"
180
+ accessibilityLabel="Clear finished"
170
181
  onPress={ask}
171
182
  disabled={done === 0}
172
- styles={styles}
173
- />
183
+ style={styles.lobbyDelete}
184
+ >
185
+ <Text style={styles.lobbyDeleteText}>Clear finished</Text>
186
+ </Pressable>
174
187
  )}
175
188
  </View>
176
189
  );
@@ -204,13 +217,15 @@ interface TaskGroupProps {
204
217
  function TaskGroup({ group, name, styles }: TaskGroupProps) {
205
218
  const lines = useMemo(() => stepLines(group.steps), [group.steps]);
206
219
  return (
207
- <View style={styles.post}>
208
- <Text style={styles.postMeta}>{name(group.agentId)}</Text>
209
- {lines.map((line) => (
210
- <Text key={line.key} style={styles.postText} numberOfLines={1}>
211
- {line.text}
212
- </Text>
213
- ))}
220
+ <View style={styles.lobbyTask}>
221
+ <View style={styles.post}>
222
+ <Text style={styles.rowTitle}>{name(group.agentId)}</Text>
223
+ {lines.map((line) => (
224
+ <Text key={line.key} style={styles.postText}>
225
+ {line.text}
226
+ </Text>
227
+ ))}
228
+ </View>
214
229
  </View>
215
230
  );
216
231
  }
@@ -281,7 +296,7 @@ export function LobbyBody({
281
296
  }
282
297
  return (
283
298
  <View style={styles.sheet}>
284
- <View style={styles.sheetField}>
299
+ <View style={styles.lobbyForm}>
285
300
  <View style={styles.boardTitleRow}>
286
301
  <View style={styles.rowBody}>
287
302
  <TextInput
@@ -313,16 +328,17 @@ export function LobbyBody({
313
328
  {failure}
314
329
  </Text>
315
330
  )}
331
+ <WakeField
332
+ id={fieldId}
333
+ roomId={room.id}
334
+ to={to}
335
+ rooms={rooms}
336
+ wakesPaused={wakesPaused}
337
+ onOpen={open}
338
+ styles={styles}
339
+ />
316
340
  </View>
317
- <WakeField
318
- id={fieldId}
319
- to={to}
320
- rooms={rooms}
321
- wakesPaused={wakesPaused}
322
- onOpen={open}
323
- styles={styles}
324
- />
325
- <View style={styles.boardPosts}>
341
+ <View style={styles.lobbySection}>
326
342
  <TodoHeading board={room.id} done={done} actions={actions} styles={styles} />
327
343
  {room.todos.length === 0 ? <Text style={styles.muted}>No to-dos</Text> : null}
328
344
  {room.todos.map((post) => (
@@ -330,8 +346,10 @@ export function LobbyBody({
330
346
  ))}
331
347
  </View>
332
348
  {notes.length > 0 ? (
333
- <View style={styles.boardPosts}>
334
- <Text style={styles.sheetLabel}>Notes</Text>
349
+ <View style={styles.lobbySection}>
350
+ <Text accessibilityRole="header" style={styles.lobbyHeading}>
351
+ Notes
352
+ </Text>
335
353
  {notes.map((post) => (
336
354
  <PostWithActions
337
355
  key={post.id}
@@ -343,8 +361,10 @@ export function LobbyBody({
343
361
  ))}
344
362
  </View>
345
363
  ) : null}
346
- <View style={styles.boardPosts}>
347
- <Text style={styles.sheetLabel}>Agent tasks</Text>
364
+ <View style={styles.lobbySection}>
365
+ <Text accessibilityRole="header" style={styles.lobbyHeading}>
366
+ Agent tasks
367
+ </Text>
348
368
  {agentTasks.length === 0 ? <Text style={styles.muted}>No agent tasks</Text> : null}
349
369
  {agentTasks.map((group) => (
350
370
  <TaskGroup key={group.agentId} group={group} name={name} styles={styles} />