oneslash-design-system 2.28.0 → 2.29.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 (237) hide show
  1. package/README.md +1 -1
  2. package/dist/DESIGN.md +31 -1
  3. package/dist/cases/about-page.md +2 -0
  4. package/dist/cases/accept-invite.md +2 -0
  5. package/dist/cases/account-menu.md +2 -0
  6. package/dist/cases/activity-timeline.md +2 -0
  7. package/dist/cases/admin-inbox.md +2 -0
  8. package/dist/cases/agent-asks-before-risky-action.md +3 -1
  9. package/dist/cases/agent-cancels-when-unanswered.md +2 -0
  10. package/dist/cases/agent-changes-review/all-at-once.d.ts +1 -0
  11. package/dist/cases/agent-changes-review/all-at-once.jsx +238 -0
  12. package/dist/cases/agent-changes-review/per-change.d.ts +1 -0
  13. package/dist/cases/agent-changes-review/per-change.jsx +203 -0
  14. package/dist/cases/agent-changes-review.md +585 -0
  15. package/dist/cases/agent-handoff/to-agent.d.ts +1 -0
  16. package/dist/cases/agent-handoff/to-agent.jsx +53 -0
  17. package/dist/cases/agent-handoff/to-person.d.ts +1 -0
  18. package/dist/cases/agent-handoff/to-person.jsx +84 -0
  19. package/dist/cases/agent-handoff.md +231 -0
  20. package/dist/cases/agent-memory/list.d.ts +1 -0
  21. package/dist/cases/agent-memory/list.jsx +256 -0
  22. package/dist/cases/agent-memory.md +354 -0
  23. package/dist/cases/agent-options.md +2 -0
  24. package/dist/cases/agent-pending-reply/steps.jsx +70 -21
  25. package/dist/cases/agent-pending-reply.md +74 -27
  26. package/dist/cases/agent-permissions/levels.d.ts +3 -0
  27. package/dist/cases/agent-permissions/levels.jsx +49 -0
  28. package/dist/cases/agent-permissions/per-tool.d.ts +3 -0
  29. package/dist/cases/agent-permissions/per-tool.jsx +178 -0
  30. package/dist/cases/agent-permissions.md +314 -0
  31. package/dist/cases/agent-plan-proposal/changes.jsx +18 -11
  32. package/dist/cases/agent-plan-proposal/steps.jsx +11 -4
  33. package/dist/cases/agent-plan-proposal.md +36 -21
  34. package/dist/cases/agent-question.md +2 -0
  35. package/dist/cases/agent-refuses-clearly.md +2 -0
  36. package/dist/cases/agent-run-failure/limit-reached.d.ts +1 -0
  37. package/dist/cases/agent-run-failure/limit-reached.jsx +172 -0
  38. package/dist/cases/agent-run-failure/step-failed.d.ts +3 -0
  39. package/dist/cases/agent-run-failure/step-failed.jsx +187 -0
  40. package/dist/cases/agent-run-failure.md +500 -0
  41. package/dist/cases/agent-says-what-it-is.md +2 -0
  42. package/dist/cases/agent-says-where-it-stopped.md +27 -0
  43. package/dist/cases/agent-settings.md +2 -0
  44. package/dist/cases/agent-shows-progress.md +2 -0
  45. package/dist/cases/agent-shows-sources.md +2 -0
  46. package/dist/cases/api-keys/list.jsx +30 -3
  47. package/dist/cases/api-keys.md +37 -3
  48. package/dist/cases/app-shell.md +2 -0
  49. package/dist/cases/artifact-card.md +2 -0
  50. package/dist/cases/ask-page.md +2 -0
  51. package/dist/cases/auth-gate-loading.md +2 -0
  52. package/dist/cases/billing-page.md +2 -0
  53. package/dist/cases/blog-index.md +2 -0
  54. package/dist/cases/breadcrumb.md +2 -0
  55. package/dist/cases/breakdown-list.md +2 -0
  56. package/dist/cases/bulk-actions/list.d.ts +1 -0
  57. package/dist/cases/bulk-actions/list.jsx +209 -0
  58. package/dist/cases/bulk-actions/paged-table.d.ts +1 -0
  59. package/dist/cases/bulk-actions/paged-table.jsx +246 -0
  60. package/dist/cases/bulk-actions.md +559 -0
  61. package/dist/cases/changelog.md +2 -0
  62. package/dist/cases/chart.md +2 -0
  63. package/dist/cases/check-your-email.md +2 -0
  64. package/dist/cases/code-sample.md +2 -0
  65. package/dist/cases/collapsible-search.md +2 -0
  66. package/dist/cases/comment-thread.md +2 -0
  67. package/dist/cases/comparison-page/table.d.ts +1 -0
  68. package/dist/cases/comparison-page/table.jsx +97 -0
  69. package/dist/cases/comparison-page.md +156 -0
  70. package/dist/cases/composer-limit.md +2 -0
  71. package/dist/cases/confirm-destructive-action.md +2 -0
  72. package/dist/cases/confirm-dialogs.md +2 -0
  73. package/dist/cases/connection-status/card.d.ts +1 -0
  74. package/dist/cases/connection-status/card.jsx +97 -0
  75. package/dist/cases/connection-status/row.d.ts +1 -0
  76. package/dist/cases/connection-status/row.jsx +120 -0
  77. package/dist/cases/connection-status.md +330 -0
  78. package/dist/cases/contact-page.md +2 -0
  79. package/dist/cases/conversation-starters.md +2 -0
  80. package/dist/cases/cookie-choice.md +2 -0
  81. package/dist/cases/create-modal.md +2 -0
  82. package/dist/cases/danger-zone.md +2 -0
  83. package/dist/cases/dashboard.md +2 -0
  84. package/dist/cases/data-table-page.md +2 -0
  85. package/dist/cases/date-field.md +2 -0
  86. package/dist/cases/device-login.md +2 -0
  87. package/dist/cases/docs-component-page.md +2 -0
  88. package/dist/cases/email-confirmed.md +2 -0
  89. package/dist/cases/empty-list.md +2 -0
  90. package/dist/cases/empty-lists.md +2 -0
  91. package/dist/cases/empty-not-set-up.md +2 -0
  92. package/dist/cases/empty-search.md +2 -0
  93. package/dist/cases/error-page.md +2 -0
  94. package/dist/cases/faq.md +2 -0
  95. package/dist/cases/feature-grid.md +2 -0
  96. package/dist/cases/feedback-form.md +2 -0
  97. package/dist/cases/file-upload.md +2 -0
  98. package/dist/cases/filter-menu.md +2 -0
  99. package/dist/cases/forgot-password.md +2 -0
  100. package/dist/cases/form-errors.md +2 -0
  101. package/dist/cases/image-viewer.md +2 -0
  102. package/dist/cases/import-checklist.md +2 -0
  103. package/dist/cases/inline-form-feedback.md +2 -0
  104. package/dist/cases/integrations-list/nested.jsx +1 -1
  105. package/dist/cases/integrations-list/rows.jsx +1 -1
  106. package/dist/cases/integrations-list.md +6 -4
  107. package/dist/cases/invite-member.md +2 -0
  108. package/dist/cases/invoice-list.md +2 -0
  109. package/dist/cases/landing-hero.md +2 -0
  110. package/dist/cases/leaderboard.md +2 -0
  111. package/dist/cases/legal-page.md +2 -0
  112. package/dist/cases/load-failure.md +2 -0
  113. package/dist/cases/log-out-confirm.md +2 -0
  114. package/dist/cases/login-page.md +2 -0
  115. package/dist/cases/long-form-page.md +2 -0
  116. package/dist/cases/master-detail.md +2 -0
  117. package/dist/cases/members-list/rows.jsx +37 -6
  118. package/dist/cases/members-list/table.jsx +37 -6
  119. package/dist/cases/members-list.md +83 -12
  120. package/dist/cases/mention-list.md +2 -0
  121. package/dist/cases/message-actions.md +2 -0
  122. package/dist/cases/message-attachments.md +2 -0
  123. package/dist/cases/message-composer/with-tools.jsx +17 -7
  124. package/dist/cases/message-composer.md +28 -11
  125. package/dist/cases/message-edit.md +2 -0
  126. package/dist/cases/message-reactions.md +2 -0
  127. package/dist/cases/message-row.md +2 -0
  128. package/dist/cases/message-send-failure/needs-a-person.d.ts +1 -0
  129. package/dist/cases/message-send-failure/needs-a-person.jsx +116 -0
  130. package/dist/cases/message-send-failure/retrying.d.ts +1 -0
  131. package/dist/cases/message-send-failure/retrying.jsx +116 -0
  132. package/dist/cases/message-send-failure.md +308 -0
  133. package/dist/cases/mobile-menu.md +2 -0
  134. package/dist/cases/newsletter-signup.md +2 -0
  135. package/dist/cases/no-access/page.d.ts +1 -0
  136. package/dist/cases/no-access/page.jsx +37 -0
  137. package/dist/cases/no-access/read-only.d.ts +1 -0
  138. package/dist/cases/no-access/read-only.jsx +33 -0
  139. package/dist/cases/no-access.md +147 -0
  140. package/dist/cases/not-found-page.md +2 -0
  141. package/dist/cases/notification-menu.md +2 -0
  142. package/dist/cases/number-format.md +2 -0
  143. package/dist/cases/oauth-consent.md +2 -0
  144. package/dist/cases/on-off-settings.md +2 -0
  145. package/dist/cases/on-this-page.md +2 -0
  146. package/dist/cases/onboarding.md +2 -0
  147. package/dist/cases/one-main-action.md +2 -0
  148. package/dist/cases/overflow-menu.md +2 -0
  149. package/dist/cases/page-end.md +2 -0
  150. package/dist/cases/page-header.md +2 -0
  151. package/dist/cases/paged-card.md +2 -0
  152. package/dist/cases/password-gate.md +2 -0
  153. package/dist/cases/payment-method.md +2 -0
  154. package/dist/cases/people-row.md +2 -0
  155. package/dist/cases/phone-navigation.md +2 -0
  156. package/dist/cases/plan-change-confirm.md +2 -0
  157. package/dist/cases/plan-comparison.md +3 -1
  158. package/dist/cases/plan-picker.md +4 -1
  159. package/dist/cases/plan-sign-off.md +2 -0
  160. package/dist/cases/pricing-section.md +5 -1
  161. package/dist/cases/product-cards.md +2 -0
  162. package/dist/cases/product-demo/scripted.d.ts +3 -0
  163. package/dist/cases/product-demo/scripted.jsx +95 -0
  164. package/dist/cases/product-demo/still.d.ts +1 -0
  165. package/dist/cases/product-demo/still.jsx +20 -0
  166. package/dist/cases/product-demo.md +221 -0
  167. package/dist/cases/profile-form.md +2 -0
  168. package/dist/cases/quick-switcher.md +2 -0
  169. package/dist/cases/range-switch.md +2 -0
  170. package/dist/cases/rename.md +2 -0
  171. package/dist/cases/reply-feedback.md +2 -0
  172. package/dist/cases/reply-sources.md +2 -0
  173. package/dist/cases/route-loading.md +2 -0
  174. package/dist/cases/scope-picker.md +2 -0
  175. package/dist/cases/section-index.md +2 -0
  176. package/dist/cases/session-expired/in-place.d.ts +1 -0
  177. package/dist/cases/session-expired/in-place.jsx +63 -0
  178. package/dist/cases/session-expired/redirect.d.ts +1 -0
  179. package/dist/cases/session-expired/redirect.jsx +62 -0
  180. package/dist/cases/session-expired.md +204 -0
  181. package/dist/cases/set-new-password.md +2 -0
  182. package/dist/cases/settings-page.md +2 -0
  183. package/dist/cases/settings-save.md +2 -0
  184. package/dist/cases/side-pane.md +2 -0
  185. package/dist/cases/sidebar-nav.md +2 -0
  186. package/dist/cases/sign-up-page.md +3 -0
  187. package/dist/cases/signup-from-site/plain.d.ts +1 -0
  188. package/dist/cases/signup-from-site/plain.jsx +125 -0
  189. package/dist/cases/signup-from-site/with-plan.d.ts +4 -0
  190. package/dist/cases/signup-from-site/with-plan.jsx +151 -0
  191. package/dist/cases/signup-from-site.md +351 -0
  192. package/dist/cases/site-footer.md +2 -0
  193. package/dist/cases/site-header/links.d.ts +3 -1
  194. package/dist/cases/site-header/links.jsx +6 -2
  195. package/dist/cases/site-header.md +11 -3
  196. package/dist/cases/site-matches-app.md +32 -0
  197. package/dist/cases/site-search.md +2 -0
  198. package/dist/cases/slash-command-list.md +2 -0
  199. package/dist/cases/stat-row.md +2 -0
  200. package/dist/cases/status-label.md +3 -1
  201. package/dist/cases/success-feedback.md +2 -0
  202. package/dist/cases/tabbed-panels.md +2 -0
  203. package/dist/cases/tag-filter.md +2 -0
  204. package/dist/cases/task-header.md +2 -0
  205. package/dist/cases/theme-switcher.md +2 -0
  206. package/dist/cases/type-to-confirm.md +2 -0
  207. package/dist/cases/typing-and-status.md +2 -0
  208. package/dist/cases/unsaved-changes-guard.md +2 -0
  209. package/dist/cases/upgrade-prompt.md +2 -0
  210. package/dist/cases/usage-meters.md +2 -0
  211. package/dist/cases.json +1494 -42
  212. package/dist/components/checkBox.d.ts +5 -1
  213. package/dist/components/checkBox.jsx +23 -9
  214. package/dist/components/diff.d.ts +29 -0
  215. package/dist/components/diff.jsx +35 -0
  216. package/dist/index.d.ts +1 -0
  217. package/dist/index.js +1 -0
  218. package/dist/internal/diff.d.ts +17 -0
  219. package/dist/internal/diff.js +44 -0
  220. package/dist/native-mapping.json +9 -2
  221. package/dist/stories/AgentPermissions.probe.stories.d.ts +7 -0
  222. package/dist/stories/AgentPermissions.probe.stories.jsx +18 -0
  223. package/dist/stories/AgentRunFailure.probe.stories.d.ts +6 -0
  224. package/dist/stories/AgentRunFailure.probe.stories.jsx +12 -0
  225. package/dist/stories/Cases.generated.stories.d.ts +24 -0
  226. package/dist/stories/Cases.generated.stories.jsx +48 -0
  227. package/dist/stories/Checkbox.stories.d.ts +2 -0
  228. package/dist/stories/Checkbox.stories.jsx +18 -0
  229. package/dist/stories/Diff.stories.d.ts +9 -0
  230. package/dist/stories/Diff.stories.jsx +40 -0
  231. package/dist/stories/ProductDemo.probe.stories.d.ts +6 -0
  232. package/dist/stories/ProductDemo.probe.stories.jsx +12 -0
  233. package/dist/stories/SignupFromSite.probe.stories.d.ts +7 -0
  234. package/dist/stories/SignupFromSite.probe.stories.jsx +17 -0
  235. package/dist/stories/SiteHeader.probe.stories.d.ts +6 -0
  236. package/dist/stories/SiteHeader.probe.stories.jsx +13 -0
  237. package/package.json +1 -1
package/README.md CHANGED
@@ -70,7 +70,7 @@ import SectionIntro from 'oneslash-design-system/components/sectionIntro';
70
70
 
71
71
  ## Design cases
72
72
 
73
- A case is one design situation with oneSlash's answer to it. A rule case has one answer, such as "an agent asks before a risky action". A design case has one to four options, each with a line on when to use it and a working example built only from this package. 2.25.0 has 134: fourteen rules and 120 design cases for auth pages, confirms and modals, states, chat and agent interfaces, settings and menus, shells and navigation, dashboards and billing, marketing and content pages, forms with dates and files, onboarding, history and charts, cookies, newsletters and plan comparison.
73
+ A case is one design situation with oneSlash's answer to it. A rule case has one answer, such as "an agent asks before a risky action". A design case has one to four options, each with a line on when to use it and a working example built only from this package. 2.29.0 has 149: sixteen rules and 133 design cases for auth pages, confirms and modals, states, chat and agent interfaces, settings and menus, shells and navigation, dashboards and billing, marketing and content pages, forms with dates and files, onboarding, history and charts, cookies, newsletters and plan comparison.
74
74
 
75
75
  - `oneslash-design-system/cases.json` lists every case with its rule text, options, Do and Don't lines, and the source of each example.
76
76
  - `oneslash-design-system/cases/<id>.md` is one case as text, and `oneslash-design-system/cases/<id>/<option>.jsx` is the example itself.
package/dist/DESIGN.md CHANGED
@@ -300,11 +300,12 @@ For each web component, the table gives the native control to use. System contro
300
300
  | brandIcon | the provider's own button where one exists (`SignInWithAppleButton`), else an asset in the app | an asset in the app | |
301
301
  | breadcrumb | Not applicable: web page pattern | Not applicable: web page pattern | The system back button and the navigation title say where the person is. |
302
302
  | calendar | `DatePicker` with `.datePickerStyle(.graphical)` and `in:` for the range | `DatePicker` with a `DatePickerState` whose `selectableDates` holds the range | The system calendar draws the month, today and the chosen day, and moves with the keyboard. Inside a field, use `dateField`. |
303
- | checkBox | `Toggle` (switch on iOS, `.toggleStyle(.checkbox)` on macOS) | `Checkbox` | |
303
+ | checkBox | `Toggle` (switch on iOS, `.toggleStyle(.checkbox)` on macOS); `Toggle(sources:isOn:)` over the rows for a mixed header | `Checkbox`; `TriStateCheckbox` with `ToggleableState.Indeterminate` for a mixed header | The mixed state (`indeterminate`) is for a header over a partly selected list. A press selects every row. The iOS switch draws no mixed state, so say the count beside it, such as '2 of 3 selected'. |
304
304
  | codeBlock | `ScrollView(.horizontal)` with `Text(code).monospaced().textSelection(.enabled)` and a Copy `Button` | `SelectionContainer` around a `Text` in the code family with `horizontalScroll`, and a Copy `TextButton` | Show "Copied" for 2 seconds only after the write succeeds. No highlighting and no line numbers. One line to paste is a `copyField`. |
305
305
  | composer | `TextField(_:text:axis: .vertical)` with `.lineLimit(1...6)` over a toolbar `HStack` of the tool `Button`s and a send `Button` | `OutlinedTextField` with `maxLines = 6` over a `Row` of the tool `IconButton`s and a send `IconButton` | On iPhone and Android, Return adds a line and the send button sends. While an agent works, send becomes Stop. |
306
306
  | copyField | A `LabeledContent` row with the value in a `Text` (`.textSelection(.enabled)`) and a `Button` that sets `UIPasteboard` / `NSPasteboard` | An `OutlinedTextField` with `readOnly = true` and a `trailingIcon` `TextButton` that calls `LocalClipboard` | Show "Copied" for 2 seconds only after the write succeeds. Announce it for VoiceOver / TalkBack. A secret shown once gets the line under it. |
307
307
  | dateField | `DatePicker` with `.datePickerStyle(.compact)` and `in:` for the range | `DatePicker` in a `DatePickerDialog`, opened from a read-only `OutlinedTextField`, with `selectableDates` for the range | The system picker cannot hold a day outside the range, so there is no out-of-range message. Store the day as `YYYY-MM-DD`, not a time. |
308
+ | diff | A `ScrollView([.horizontal, .vertical])` of a `LazyVStack` of rows: a `Text("+")` or `Text("-")` mark, then the line `.monospaced()`, with `.accessibilityLabel("Added: …")` or `"Removed: …"` | A `LazyColumn` in a `horizontalScroll` of rows: a mark `Text`, then the line in the code family, with `semantics { contentDescription = "Added: …" }` or `"Removed: …"` | No system control shows a diff, so it is a monospaced text view with a mark on each row. Added lines use the `success` fill and removed lines the `error` fill, quiet, with primary text. The mark and the spoken word say it too, never color alone. No change shows the empty text. |
308
309
  | drawer | `.sheet` with `.presentationDetents` on iPhone; `.inspector` on iPad and Mac | `ModalNavigationDrawer` for `side="start"`; `ModalBottomSheet` for `side="end"` | The system sheet, inspector and drawer handle the scrim, swipe to close and focus. `ModalBottomSheet` needs `@OptIn(ExperimentalMaterial3Api::class)`. |
309
310
  | dropZone | `PhotosPicker` for pictures, or `.fileImporter` for files, behind a `Button`; add `.dropDestination(for:)` on macOS and iPad | `rememberLauncherForActivityResult` with `PickVisualMedia()` for pictures, or `OpenDocument()` for files, started from a `Button` | iPhone and Android have no drop target: the Button is the whole control. Check the type and size when the system hands the file back, and report the reason so the screen can write the error. |
310
311
  | emojiPicker | No system picker control: a reaction offers a few presets in a `contextMenu`, and text takes emoji from the system emoji keyboard | `EmojiPickerView` from `androidx.emoji2:emoji2-emojipicker`, in an `AndroidView` inside a `ModalBottomSheet` | The system keyboard and `EmojiPickerView` bring the full set, skin tones and search, so the built-in 96 are web only. |
@@ -447,6 +448,14 @@ Answer: Every agent message has marks no person's message has. It shows an icon
447
448
 
448
449
  File: cases/agent-says-what-it-is.md
449
450
 
451
+ ### An agent that stops short says what it finished and what is left
452
+
453
+ An agent is partway through a run of several steps when the run fails, is stopped, or hits a limit.
454
+
455
+ Answer: The agent says which steps are done, which one stopped and why, and which were not started. It offers the next move: try the step again, continue, or leave it. Work that was done stays done, and the agent says so. It also says whether anything was changed.
456
+
457
+ File: cases/agent-says-where-it-stopped.md
458
+
450
459
  ### An agent shows its progress
451
460
 
452
461
  The agent is working on a request and its reply is not ready yet.
@@ -519,6 +528,14 @@ Answer: A control that stands alone saves as soon as it changes: a `Switch`, a c
519
528
 
520
529
  File: cases/settings-save.md
521
530
 
531
+ ### A site promises only what the app does, in the app's words
532
+
533
+ A product has a public site and an app. The site names the plans, shows the app and sends visitors into it.
534
+
535
+ Answer: The site and the app use the same plan names, prices, limits and feature names. A button on the site lands on the page it names and carries the choice: 'Sign Up for Pro' opens the sign-up page with Pro chosen. A visitor who is logged in sees 'Open App' instead of 'Sign Up'. A demo of the app is marked as an example, and anything on the site that looks like the app shows only what the app has.
536
+
537
+ File: cases/site-matches-app.md
538
+
522
539
  ### Success shows where the person is looking
523
540
 
524
541
  Something the person did has worked.
@@ -534,10 +551,15 @@ File: cases/success-feedback.md
534
551
  | Account menu | A person opens a menu for their own account to change settings, get help or log out. | cases/account-menu.md |
535
552
  | History and activity | A person reads what happened on a task, or opens an older version of a document and brings it back. | cases/activity-timeline.md |
536
553
  | Admin inbox | The owner of a site reads the messages that visitors sent through its contact form. | cases/admin-inbox.md |
554
+ | Review of an agent's changes | The agent has changed files or other work and a person reviews the changes before they are applied. | cases/agent-changes-review.md |
555
+ | Hand-off | The agent cannot finish the work itself and hands it to a named person, or to another agent with a different job. | cases/agent-handoff.md |
556
+ | Agent memory | A person wants to see what the agent remembers about them or the workspace, and to correct it or have it forgotten. | cases/agent-memory.md |
537
557
  | Agent options | The agent sees two to four ways forward and needs the person to pick one. These are ways forward for the agent's own work. For a fact or a decision only the person has, see the case 'Agent question'. | cases/agent-options.md |
538
558
  | Agent at work | The agent is working on a request in the thread, and its reply is not ready yet. | cases/agent-pending-reply.md |
559
+ | What an agent may do | A person or an admin sets how much the agent does without asking, and which tools it may use. | cases/agent-permissions.md |
539
560
  | Plan proposal | The agent is about to change shared work and needs the person to approve it first. | cases/agent-plan-proposal.md |
540
561
  | Agent question | The agent needs an answer from the person before it can go on. It needs a fact or a decision only the person has. For ways forward in its own work, see the case 'Agent options'. | cases/agent-question.md |
562
+ | Run that stopped short | The agent's run stopped before the end: one step failed, or the run reached a limit of steps, time or budget with work left. | cases/agent-run-failure.md |
541
563
  | Agent settings | An admin sets which model the agent uses, how it picks one, what it should know about the team and how much it may spend. | cases/agent-settings.md |
542
564
  | API keys | A person makes keys that let a script or a service use the product as them, and revokes keys they no longer use. | cases/api-keys.md |
543
565
  | App shell | A person opens the product and moves between its places, such as Inbox, Tasks and Settings, from every page. | cases/app-shell.md |
@@ -548,14 +570,17 @@ File: cases/success-feedback.md
548
570
  | Blog index | A visitor opens the blog to see what was written lately and to pick a post to read. | cases/blog-index.md |
549
571
  | Breadcrumb | A page on a site sits under other pages, and the person needs to see where it is and go back up. | cases/breadcrumb.md |
550
572
  | Breakdown of a total | A page shows how a total splits into parts, such as responses by model or comments by project. | cases/breakdown-list.md |
573
+ | Bulk actions | A person picks several rows of a list or a table and does one thing to all of them at once. | cases/bulk-actions.md |
551
574
  | Changelog | A visitor or a customer wants to know what changed in the product lately, and may be sent to one change from a message. | cases/changelog.md |
552
575
  | Chart | A dashboard shows how a count moved over its range, day by day or week by week. | cases/chart.md |
553
576
  | Check your email | A person signed up, and the product sent a link to confirm their email. | cases/check-your-email.md |
554
577
  | Code sample | A page shows code that a person reads, or copies to run. | cases/code-sample.md |
555
578
  | Collapsible search | A person filters a list by a word, and the list should keep its room when they are not typing. | cases/collapsible-search.md |
556
579
  | Comment and thread | A person reads comments left on a piece of work, opens one, and reads and answers its thread. | cases/comment-thread.md |
580
+ | Comparison with another product | A visitor to the public site is choosing between this product and one other, and wants a fair side-by-side view. | cases/comparison-page.md |
557
581
  | Composer at a limit | The agent cannot be called from the composer because the workspace reached a limit, such as its AI agent responses for the month. | cases/composer-limit.md |
558
582
  | Delete confirm | A person asks to delete or remove something, and it cannot be undone. | cases/confirm-destructive-action.md |
583
+ | Status of a connected source | A person connected other tools to the product, and wants to know if each one still works, is busy, or needs them. | cases/connection-status.md |
559
584
  | Contact page | A visitor wants to reach the person behind a site. | cases/contact-page.md |
560
585
  | Conversation starters | A thread has no messages yet, and the person may not know what to write first. | cases/conversation-starters.md |
561
586
  | Cookie choice | A site sets cookies it does not need to run, and asks the visitor whether it may. | cases/cookie-choice.md |
@@ -599,8 +624,10 @@ File: cases/success-feedback.md
599
624
  | Message edit | A person changes the text of a message they sent. | cases/message-edit.md |
600
625
  | Reactions | People answer a message with an emoji instead of a reply. | cases/message-reactions.md |
601
626
  | Message row | A thread shows messages from people, and sometimes from an agent. | cases/message-row.md |
627
+ | Message that did not send | A person sent a message and it did not reach the people it was for, because the app is offline or because something needs fixing first. | cases/message-send-failure.md |
602
628
  | Menu on a phone | A site's links and actions do not fit in the bar on a phone, and the person still needs to reach every one. | cases/mobile-menu.md |
603
629
  | Newsletter sign-up | A reader of the public site wants to hear about the product by email, without making an account. | cases/newsletter-signup.md |
630
+ | No access | A person reaches a page or a setting that their role does not let them see or change, often by a link someone sent. | cases/no-access.md |
604
631
  | Page not found | A person opens a link to a page that does not exist. | cases/not-found-page.md |
605
632
  | Notification setting | A person chooses how much a channel or a thread notifies them. | cases/notification-menu.md |
606
633
  | OAuth consent | Another app, such as a CLI or an MCP client, asks to act for a person who is logged in, and the person must allow it. | cases/oauth-consent.md |
@@ -620,6 +647,7 @@ File: cases/success-feedback.md
620
647
  | Plan sign-off | The agent wrote a plan for a task, and people approve it before the agent starts the work. | cases/plan-sign-off.md |
621
648
  | Pricing section | A visitor to the public site compares the plans and signs up for one. | cases/pricing-section.md |
622
649
  | Product cards | A maker lists its products on one page, and each product has its own site. | cases/product-cards.md |
650
+ | Product demo on a site | A page on the public site shows the product at work, so a visitor sees what it does before they sign up. | cases/product-demo.md |
623
651
  | Profile | A person changes how they appear and how they sign in: their picture, their name and their password. | cases/profile-form.md |
624
652
  | Quick switcher | A person jumps to a channel, task or document by typing part of its name, from anywhere in the product. | cases/quick-switcher.md |
625
653
  | Range switch | A person changes the time range of the numbers or a list on the same page, such as Week, Month or Quarter. | cases/range-switch.md |
@@ -629,11 +657,13 @@ File: cases/success-feedback.md
629
657
  | Page loading | A page or a pane is loading, and there is nothing to show yet. | cases/route-loading.md |
630
658
  | Scope picker | A person chooses where a search or a question looks, such as one workspace or all of them. | cases/scope-picker.md |
631
659
  | Section index | A section of a site, such as the guides, has its own first page that shows the places inside it, so a person can pick one. | cases/section-index.md |
660
+ | Session that ended | A person is using the app when their login ends, such as after a long break or a password change somewhere else. | cases/session-expired.md |
632
661
  | Set new password | A person opened the link to reset their password and now chooses a new one. | cases/set-new-password.md |
633
662
  | Settings page | A person opens the settings of the product and looks for one area, such as Profile or Billing. | cases/settings-page.md |
634
663
  | Side pane | A person opens more about the page, such as its members, its history or a document, without leaving the page. | cases/side-pane.md |
635
664
  | Sidebar with sections and counts | A person looks down the sidebar for a place, and for what has something new in it. | cases/sidebar-nav.md |
636
665
  | Sign-up page | A person who has no account yet opens the product and wants one. | cases/sign-up-page.md |
666
+ | Sign-up from the site | A visitor pressed a Button on the public site and lands on the app's sign-up page, sometimes with a paid plan already picked. | cases/signup-from-site.md |
637
667
  | Site footer | A person reaches the end of a site's page and looks for the pages that are not in the header, and who runs the site. | cases/site-footer.md |
638
668
  | Site header | A site's pages name the site at the top and show the person where to go and what to do next. | cases/site-header.md |
639
669
  | Site search | A site has many pages, and a person wants to reach one by its name or by a word in it, from any page. | cases/site-search.md |
@@ -2,6 +2,8 @@
2
2
 
3
3
  A visitor wants to know who is behind the work and whether to get in touch.
4
4
 
5
+ For: a marketing site
6
+
5
7
  ## Do
6
8
 
7
9
  - Open with a `PageHeader` whose title is the person's name and whose lede says what they do in one sentence.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A person opens an invite link to join a workspace.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Name the workspace in a `Heading` with `level={1}`: "You're invited to Acme Design".
@@ -2,6 +2,8 @@
2
2
 
3
3
  A person opens a menu for their own account to change settings, get help or log out.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Use a small tertiary `Button` whose label is the person's name, with their `UserImage` as `decoIcon`: `decoIcon={<UserImage userHandle={name} size={20} decorative />}`.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A person reads what happened on a task, or opens an older version of a document and brings it back.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Show the history in a `SidePane` titled 'History' beside the page, as the case 'Side pane' says.
@@ -2,6 +2,8 @@
2
2
 
3
3
  The owner of a site reads the messages that visitors sent through its contact form.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Open with a `PageHeader` titled 'Messages' and a lede that counts what is unread: '3 of 12 unread'.
@@ -2,6 +2,8 @@
2
2
 
3
3
  The agent is about to do something that changes shared work or is hard to undo.
4
4
 
5
+ For: an agent
6
+
5
7
  ## Answer
6
8
 
7
9
  An action is risky when it changes shared work or is hard to undo. In a product that works with code, that includes opening or merging a pull request, deleting files, closing an issue and rolling back a release. Carrying out a plan of several changes is risky too. Before a risky action the agent stops and posts a card with the exact action: every step it will take, or the changes themselves, which the person can open. The agent does nothing until the person presses the approve button.
@@ -15,7 +17,7 @@ A person can only approve what they can see, and an agent's mistake in shared wo
15
17
  - List every step in the card, in the order the agent will do them.
16
18
  - Offer a way to see the full changes, such as a View Changes button, before the approve button is pressed.
17
19
  - Let the person edit the plan or cancel it, not only approve it.
18
- - Mark the card Approved or Cancelled once it is decided, and remove its buttons.
20
+ - Mark the card with the decision once it is made, such as Approved, Applied or Cancelled, and remove its buttons.
19
21
 
20
22
  ## Don't
21
23
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  The agent has asked a question or proposed an action, and nobody answers.
4
4
 
5
+ For: an agent
6
+
5
7
  ## Answer
6
8
 
7
9
  The agent never takes silence as a yes: while a question or proposal waits, it does nothing that depends on the answer. Each product sets the waiting time and shows it on the waiting card. When the time is up, the agent cancels the request, marks the card Cancelled, and posts one line saying what it did not do. The agent may write a plan that lists the unanswered questions as open questions. It may not carry out anything that depends on an answer.
@@ -0,0 +1 @@
1
+ export default function AgentChangesReviewAllAtOnce(): import("react").JSX.Element;
@@ -0,0 +1,238 @@
1
+ 'use client';
2
+ import { useEffect, useRef, useState } from 'react';
3
+ import { Bot } from 'lucide-react';
4
+ import Message from '../../components/message';
5
+ import UserImage from '../../components/userImage';
6
+ import Tag from '../../components/tag';
7
+ import TimeStamp from '../../components/timeStamp';
8
+ import Heading from '../../components/heading';
9
+ import Paragraph from '../../components/paragraph';
10
+ import Button from '../../components/button';
11
+ import Surface from '../../components/surface';
12
+ import Accordion from '../../components/accordion';
13
+ import Diff, { diffLines } from '../../components/diff';
14
+ import Textarea from '../../components/textarea';
15
+ import { Center, Cluster, Stack } from '../../components/layout';
16
+ var agentName = 'Acme Agent';
17
+ var request = { from: 'Dana Lee', at: new Date('2026-11-16T14:30:00Z'), text: 'Can you add the Business plan to the pricing page?' };
18
+ var proposedAt = new Date('2026-11-16T14:34:00Z');
19
+ // One change across three files: each file before and after. A real app gets the lines from the server.
20
+ var files = [
21
+ {
22
+ id: 'plans',
23
+ path: 'data/plans.json',
24
+ before: [
25
+ '[',
26
+ ' { "id": "free", "price": "$0.00" },',
27
+ ' { "id": "pro", "price": "$8.00" }',
28
+ ']',
29
+ ],
30
+ after: [
31
+ '[',
32
+ ' { "id": "free", "price": "$0.00" },',
33
+ ' { "id": "pro", "price": "$8.00" },',
34
+ ' { "id": "business", "price": "$16.00" }',
35
+ ']',
36
+ ],
37
+ },
38
+ {
39
+ id: 'plan-table',
40
+ path: 'ui/planTable.tsx',
41
+ before: [
42
+ 'const columns = [',
43
+ " { id: 'free', title: 'Free' },",
44
+ " { id: 'pro', title: 'Pro' },",
45
+ '];',
46
+ '',
47
+ 'const rows = [',
48
+ " { feature: 'Members', free: '3', pro: '20' },",
49
+ " { feature: 'Agent replies', free: '50', pro: '500' },",
50
+ " { feature: 'Support', free: 'Email', pro: 'Email' },",
51
+ '];',
52
+ ],
53
+ after: [
54
+ 'const columns = [',
55
+ " { id: 'free', title: 'Free' },",
56
+ " { id: 'pro', title: 'Pro' },",
57
+ " { id: 'business', title: 'Business' },",
58
+ '];',
59
+ '',
60
+ 'const rows = [',
61
+ ' {',
62
+ " feature: 'Members',",
63
+ " free: '3', pro: '20', business: 'Any',",
64
+ ' },',
65
+ ' {',
66
+ " feature: 'Agent replies',",
67
+ " free: '50', pro: '500', business: '2,000',",
68
+ ' },',
69
+ ' {',
70
+ " feature: 'Support',",
71
+ " free: 'Email', pro: 'Email', business: 'Chat',",
72
+ ' },',
73
+ '];',
74
+ ],
75
+ },
76
+ {
77
+ id: 'pricing',
78
+ path: 'pages/pricing.tsx',
79
+ before: [
80
+ "import PlanTable from '../ui/planTable';",
81
+ '',
82
+ 'export default function Pricing() {',
83
+ ' return (',
84
+ ' <Page title="Pricing">',
85
+ ' <PlanTable />',
86
+ ' </Page>',
87
+ ' );',
88
+ '}',
89
+ ],
90
+ after: [
91
+ "import PlanTable from '../ui/planTable';",
92
+ "import ContactSales from '../ui/contactSales';",
93
+ "import Faq from '../ui/faq';",
94
+ '',
95
+ 'export default function Pricing() {',
96
+ ' return (',
97
+ ' <Page title="Plans and pricing">',
98
+ ' <PlanTable highlight="business" />',
99
+ ' <ContactSales',
100
+ ' plan="business"',
101
+ ' title="Business for larger teams"',
102
+ ' />',
103
+ ' <Faq />',
104
+ ' </Page>',
105
+ ' );',
106
+ '}',
107
+ ],
108
+ },
109
+ ].map(function (f) {
110
+ var lines = diffLines(f.before.join('\n'), f.after.join('\n'));
111
+ return {
112
+ id: f.id,
113
+ path: f.path,
114
+ lines: lines,
115
+ added: lines.filter(function (l) { return l.kind === 'added'; }).length,
116
+ removed: lines.filter(function (l) { return l.kind === 'removed'; }).length,
117
+ };
118
+ });
119
+ // Counted from the lines, so the summary always matches the files.
120
+ var added = files.reduce(function (n, f) { return n + f.added; }, 0);
121
+ var removed = files.reduce(function (n, f) { return n + f.removed; }, 0);
122
+ var summary = "".concat(files.length, " files, ").concat(added, " lines added, ").concat(removed, " removed");
123
+ // The agent's marks, as the rule 'An agent says what it is' says.
124
+ function agentMeta(at) {
125
+ return (<>
126
+ <Tag variant="contained" size="small" label="Agent"/>
127
+ <TimeStamp createdAt={at} dateFormat="absolute" data="time"/>
128
+ <Paragraph size="caption" tone="secondary" measure="none">Model name</Paragraph>
129
+ </>);
130
+ }
131
+ export default function AgentChangesReviewAllAtOnce() {
132
+ var _a = useState('open'), status = _a[0], setStatus = _a[1];
133
+ var _b = useState(null), pending = _b[0], setPending = _b[1];
134
+ var _c = useState(''), draft = _c[0], setDraft = _c[1];
135
+ var timer = useRef();
136
+ var requestButton = useRef(null);
137
+ // Where focus goes after the next render, once the element it goes to is on screen.
138
+ var focusNext = useRef();
139
+ // Stops the request if the example goes away before it ends.
140
+ useEffect(function () { return function () { return clearTimeout(timer.current); }; }, []);
141
+ useEffect(function () {
142
+ var move = focusNext.current;
143
+ focusNext.current = undefined;
144
+ move === null || move === void 0 ? void 0 : move();
145
+ });
146
+ // Decided once: the Buttons go away, so a second press cannot apply or cancel it again.
147
+ // Nothing takes their place: a real app moves focus to the message box.
148
+ function decide(action) {
149
+ if (pending || status !== 'open')
150
+ return;
151
+ setPending(action);
152
+ // Stands in for the request to the server.
153
+ timer.current = setTimeout(function () {
154
+ setPending(null);
155
+ setStatus(action === 'apply' ? 'applied' : 'cancelled');
156
+ }, 1200);
157
+ }
158
+ function startRequest() {
159
+ if (pending)
160
+ return;
161
+ setDraft('');
162
+ setStatus('requesting');
163
+ }
164
+ // 'Discard' leaves the field and keeps the changes open for review.
165
+ function discard() {
166
+ setStatus('open');
167
+ focusNext.current = function () { var _a; return (_a = requestButton.current) === null || _a === void 0 ? void 0 : _a.focus(); };
168
+ }
169
+ var empty = draft.trim() === '';
170
+ // 'Send' tells the agent what should change. The Buttons go, and the agent redoes the changes.
171
+ // Nothing takes their place: a real app moves focus to the message box.
172
+ function send() {
173
+ if (pending || empty)
174
+ return;
175
+ setPending('send');
176
+ // Stands in for the request to the server.
177
+ timer.current = setTimeout(function () {
178
+ setPending(null);
179
+ setStatus('redoing');
180
+ }, 1200);
181
+ }
182
+ return (<Center width="page">
183
+ <Stack gap="large">
184
+ <Heading level={1} size="h5">Launch plan</Heading>
185
+ {/* A real app gives the list that holds the rows role="log". */}
186
+ <Stack gap="small">
187
+ <Message aria-label={request.from} avatar={<UserImage userHandle={request.from} decorative/>} name={request.from} meta={<TimeStamp createdAt={request.at} dateFormat="absolute" data="time"/>}>
188
+ <Paragraph measure="none">{request.text}</Paragraph>
189
+ </Message>
190
+ <Message aria-label={"".concat(agentName, ", agent")} avatar={<UserImage userHandle={agentName} icon={Bot} decorative/>} name={agentName} meta={agentMeta(proposedAt)}>
191
+ <Surface padding="small">
192
+ <Stack gap="medium">
193
+ {/* A real app announces the decided Tag in a polite live region. */}
194
+ <Cluster gap="small">
195
+ <Heading level={2} size="subtitle1">Changes ready</Heading>
196
+ {status === 'applied' && <Tag variant="contained" size="small" color="success" label="Applied"/>}
197
+ {status === 'cancelled' && <Tag variant="contained" size="small" label="Cancelled"/>}
198
+ </Cluster>
199
+ <Paragraph measure="none">These changes add the Business plan at $16.00 per member per month to the pricing page. They belong together, so they apply together.</Paragraph>
200
+ <Paragraph size="body2" tone="secondary" measure="none">{summary}</Paragraph>
201
+ {/* The changes themselves, one file per item, the first one open. */}
202
+ <Accordion id="agent-changes-review-all-at-once-files" headingLevel={3} defaultOpen={[files[0].id]} items={files.map(function (f) { return ({
203
+ id: f.id,
204
+ title: f.path,
205
+ secondTitle: "".concat(f.added, " added, ").concat(f.removed, " removed"),
206
+ content: <Diff id={"agent-changes-review-all-at-once-".concat(f.id)} label={"Changes to ".concat(f.path)} lines={f.lines} maxRows={16} wrap/>,
207
+ }); })}/>
208
+ {status === 'requesting' && (<Textarea id="agent-changes-review-all-at-once-request" label="What should change?" value={draft} onChange={function (e) { return setDraft(e.target.value); }} onSubmit={send} autoFocus disabled={pending === 'send'}/>)}
209
+ {status === 'redoing' && (<Paragraph measure="none">Acme Agent is redoing the changes. It posts a new card when they are ready.</Paragraph>)}
210
+ {/* The product sets the waiting time and counts it down. When it is up, nothing is applied. */}
211
+ {(status === 'open' || status === 'requesting') && (<Paragraph size="caption" tone="secondary" measure="none">Waits 10 more minutes, then cancels.</Paragraph>)}
212
+ {status === 'open' && (<Cluster gap="small">
213
+ <Button size="small" type="tertiary" state={pending === 'apply' ? 'disabled' : 'enabled'} label="Cancel" loading={pending === 'cancel'} onClickButton={function () { return decide('cancel'); }}/>
214
+ <Button ref={requestButton} size="small" type="secondary" state={pending ? 'disabled' : 'enabled'} label="Request Changes" onClickButton={startRequest}/>
215
+ {/* The product writes this label, never the agent. */}
216
+ <Button size="small" type="primary" state={pending === 'cancel' ? 'disabled' : 'enabled'} label="Apply Changes" loading={pending === 'apply'} onClickButton={function () { return decide('apply'); }}/>
217
+ </Cluster>)}
218
+ {status === 'requesting' && (<Cluster gap="small">
219
+ <Button size="small" type="tertiary" state={pending === 'send' ? 'disabled' : 'enabled'} label="Discard" onClickButton={discard}/>
220
+ <Button size="small" type="primary" state={empty ? 'disabled' : 'enabled'} label="Send" loading={pending === 'send'} onClickButton={send}/>
221
+ </Cluster>)}
222
+ </Stack>
223
+ </Surface>
224
+ </Message>
225
+ {status === 'applied' && (
226
+ // One line in the thread on what was applied, under the card.
227
+ <Message compact aria-label={"".concat(agentName, ", agent")}>
228
+ <Paragraph measure="none">Applied the changes to {files.length} files.</Paragraph>
229
+ </Message>)}
230
+ {status === 'cancelled' && (
231
+ // One line in the thread on what was not done, under the card.
232
+ <Message compact aria-label={"".concat(agentName, ", agent")}>
233
+ <Paragraph measure="none">Cancelled. Nothing was changed.</Paragraph>
234
+ </Message>)}
235
+ </Stack>
236
+ </Stack>
237
+ </Center>);
238
+ }
@@ -0,0 +1 @@
1
+ export default function AgentChangesReviewPerChange(): import("react").JSX.Element;