@alis-build/design-system 0.39.0 → 0.42.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.
package/alisx.css CHANGED
@@ -141,6 +141,7 @@
141
141
  --space-32: 32px;
142
142
  --space-48: 48px;
143
143
  --card-padding-wide: 28px;
144
+ --attachment-preview-size: 96px;
144
145
  --chat-row: 32px;
145
146
  --touch-target: 32px;
146
147
  --touch-target-coarse: 48px;
@@ -745,6 +746,20 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
745
746
  .app-empty-field>div:last-child{position:relative;z-index:1;flex:1;display:flex;flex-direction:column}
746
747
  .app-shell__detail>.app-empty-field{margin:calc(var(--space-16) * -1) calc(var(--space-24) * -1)}
747
748
 
749
+ /* ── Sign-in · signing in, signing up, onboarding: one card on the plain ground. components/AppSignIn.md ── */
750
+ .app-signin{box-sizing:border-box;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-16);padding:var(--space-48) var(--space-16);background:var(--background);color:var(--on-surface)}
751
+ .app-signin__card{width:min(440px,100%);max-width:none;gap:var(--space-24)}
752
+ .app-signin__lead{display:flex;flex-direction:column;align-items:center;gap:var(--space-8);text-align:center}
753
+ .app-signin__lead>h1,.app-signin__lead>h2,.app-signin__lead>p{margin:0}
754
+ .app-signin__card--steps .app-signin__lead{align-items:flex-start;text-align:start}
755
+ .app-signin__logo{display:block;max-width:200px;max-height:40px;margin-bottom:var(--space-8)}
756
+ /* With nothing to fill in, the empty-state block sits at its own height so the foot stays under it */
757
+ .app-signin>.app-empty{flex:none;min-height:0;padding:0}
758
+ .app-signin__action{width:100%}
759
+ .app-signin__foot{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--space-4) var(--space-8);margin:0;color:var(--on-surface-variant)}
760
+ .app-signin__foot a{color:inherit;text-decoration:none}
761
+ .app-signin__foot a:hover,.app-signin__foot a:focus-visible{text-decoration:underline;text-underline-offset:2px}
762
+
748
763
  /* ── Transcript · a question and its answer, in pairs ── */
749
764
  .app-qa{display:flex;flex-direction:column;gap:var(--space-24);margin:0}
750
765
  .app-qa__pair{display:flex;flex-direction:column;gap:var(--space-8)}
@@ -918,6 +933,10 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
918
933
  /* ── Composer · where you write to Alis, an agent or a person: tray, editor, row; one line below ── */
919
934
  .app-composer{position:relative;display:flex;flex-direction:column;gap:var(--space-8);width:100%;max-width:var(--measure-prose);margin-inline:auto}
920
935
  .app-composer__box{position:relative;z-index:1;display:flex;flex-direction:column;padding:var(--space-8);border-radius:var(--radius-xl);background:var(--surface-container-high);box-shadow:var(--elevation-2);transition:background-color var(--dur-effects) var(--motion-effects),box-shadow var(--dur-effects) var(--motion-effects)}
936
+ /* Audience is a message property, kept above the draft even when its error line changes. */
937
+ .app-composer__audience{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--space-12);padding:var(--space-8) var(--space-12) var(--space-12);border-bottom:1px solid var(--outline-variant)}
938
+ .app-composer__audience .app-field{flex:1 1 24ch;min-width:0;max-width:100%}
939
+ .app-composer__audience>.text-meta{margin:0;padding-block:var(--space-8);color:var(--on-surface-variant);overflow-wrap:anywhere}
921
940
  .app-composer__tray{display:flex;flex-wrap:wrap;gap:var(--space-8);padding:var(--space-4) var(--space-4) 0}
922
941
  .app-composer__editor{min-height:24px;max-height:208px;overflow-y:auto;padding:var(--space-12) var(--space-12) var(--space-4);color:var(--on-surface);font-family:var(--font-sans);font-size:16px;line-height:24px;font-weight:400;overflow-wrap:anywhere}
923
942
  .app-composer__input{display:block;width:100%;margin:0;padding:0;border:0;outline:0;resize:none;background:transparent;color:inherit;font:inherit}
@@ -929,6 +948,9 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
929
948
  .app-composer__row>.app-chip>span:not(.app-icon){overflow:hidden;text-overflow:ellipsis}
930
949
  /* The trailing button: the one filled icon button, concentric with the 28px corner (20 + 8) */
931
950
  .app-composer__go{display:inline-flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;padding:0;border:0;border-radius:var(--radius-pill);background:var(--primary);color:var(--on-primary)}
951
+ /* A voice state carries its word: the only way into voice, and people meet it before they know the product. */
952
+ .app-composer__go:has(>.app-composer__go-label){width:auto;gap:var(--space-8);padding:0 var(--space-16) 0 var(--space-12)}
953
+ .app-composer__go-label{font-family:var(--font-sans);font-size:14px;line-height:20px;font-weight:600;white-space:nowrap}
932
954
  @media (prefers-reduced-motion:no-preference){.app-composer__go{transition:transform var(--dur-spatial) var(--motion-spatial)}.app-composer__go:not(:disabled):active{transform:scale(.94)}}
933
955
  /* Recording: the level wears ai-you, the voice light's "you're speaking" */
934
956
  .app-composer__meter{flex:1;min-width:0;height:32px;display:flex;align-items:center;justify-content:center;gap:3px;overflow:hidden;color:var(--ai-you)}
@@ -973,6 +995,11 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
973
995
  .app-composer__line .app-icon{font-size:16px}
974
996
  .app-composer__line.is-error{color:var(--error)}
975
997
  .app-composer__line-action{padding:0;border:0;background:none;color:var(--primary);font:inherit;font-weight:600;cursor:pointer}
998
+ /* On a phone the editor and the row share one row (56, a pill at radius-xl), unless the row holds chips or a bar.
999
+ One markup for both: the switch is CSS alone, so the textarea is never re-rendered and the keyboard stays up. */
1000
+ @media (max-width:599px){.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter))){flex-direction:row;flex-wrap:wrap;align-items:flex-end;column-gap:var(--space-4)}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>*{flex:0 0 100%}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>.app-composer__editor{order:2;flex:1 1 0;min-width:0;padding:var(--space-8) var(--space-4)}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>.app-composer__row{display:contents}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>.app-composer__row>*{order:3}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>.app-composer__row>:first-child:not(.app-composer__go){order:1}.app-composer__box:not(:has(>.app-composer__row>:is(.app-chip,.app-composer__rec,.app-composer__status,.app-composer__meter)))>.app-composer__row>.app-composer__spacer{display:none}.app-composer__input:placeholder-shown,.app-composer__input::placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
1001
+ /* While the keyboard is up: five lines at most, and a note or hint on the line steps aside; an error stays. */
1002
+ @media (max-width:599px) and (pointer:coarse){.app-composer:focus-within .app-composer__editor{max-height:136px}.app-composer:focus-within>.app-composer__line:not(.is-error){display:none}}
976
1003
  .app-composer__drop{display:flex;align-items:center;justify-content:center;width:100%;min-height:56px;border-radius:var(--radius-lg);color:var(--primary)}
977
1004
  /* Locked: drops to the ground, no shadow, no controls */
978
1005
  .app-composer.is-locked .app-composer__box{background:var(--surface-container-low);box-shadow:none}
@@ -989,18 +1016,20 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
989
1016
  @keyframes app-breathe{from{transform:scale(.96)}to{transform:scale(1.04)}}
990
1017
 
991
1018
  /* ── Attachment · a file, recording or queued message in the composer's tray, and in the sent message ── */
992
- .app-attachment{position:relative;display:flex;align-items:center;gap:var(--space-12);width:232px;max-width:100%;height:56px;padding:var(--space-8);border-radius:var(--radius-lg);background:var(--surface-container-low);overflow:hidden}
1019
+ .app-attachment{position:relative;display:flex;align-items:center;gap:var(--space-12);width:232px;max-width:100%;min-height:56px;height:auto;padding:var(--space-8);border-radius:var(--radius-lg);background:var(--surface-container-low)}
993
1020
  .app-attachment__glyph{display:flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;border-radius:var(--radius-sm);background:var(--surface);color:var(--on-surface-variant)}
994
1021
  .app-attachment__text{display:flex;flex-direction:column;flex:1;min-width:0}
995
1022
  .app-attachment__text>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
996
1023
  .app-attachment__text>.text-meta{color:var(--on-surface-variant)}
997
- .app-attachment .app-icon-btn{flex:none;width:24px;height:24px}
1024
+ /* Reserve actual hit boxes so adjacent Retry and Remove targets cannot overlap. */
1025
+ .app-attachment .app-icon-btn.app-state{flex:none;width:var(--touch-target);height:var(--touch-target)}
1026
+ .app-attachment:not(.app-attachment--message):has(.app-icon-btn~.app-icon-btn){width:320px}
998
1027
  .app-attachment .app-icon-btn .app-icon{font-size:16px}
999
- .app-attachment__bar{position:absolute;left:0;right:0;bottom:0;height:2px;background:color-mix(in srgb,var(--primary) 16%,transparent)}
1000
- .app-attachment__bar>span{display:block;height:100%;background:var(--primary)}
1028
+ .app-attachment__bar{position:absolute;left:var(--space-12);right:var(--space-12);bottom:var(--space-4);height:2px;background:var(--surface-container-highest);border-radius:var(--radius-pill);overflow:hidden}
1029
+ .app-attachment__bar>span{display:block;height:100%;background:var(--on-surface)}
1001
1030
  .app-attachment.is-error .app-attachment__glyph,.app-attachment.is-error .app-attachment__text>.text-meta{color:var(--error)}
1002
- .app-attachment--image{width:56px;padding:0}
1003
- .app-attachment--image>img,.app-attachment--image>svg{display:block;width:100%;height:100%;object-fit:cover}
1031
+ .app-attachment--image{width:var(--attachment-preview-size);height:var(--attachment-preview-size);padding:0}
1032
+ .app-attachment--image>img,.app-attachment--image>svg{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
1004
1033
  .app-attachment--image .app-icon-btn{position:absolute;top:var(--space-4);right:var(--space-4);background:var(--surface);color:var(--on-surface)}
1005
1034
  .app-attachment--message{width:100%;height:auto;min-height:56px}
1006
1035
  a.app-attachment{color:inherit;text-decoration:none}
@@ -1047,6 +1076,8 @@ button.app-attachment{border:0;color:inherit;font:inherit;text-align:left;cursor
1047
1076
  .app-turn .app-icon-btn{width:32px;height:32px}
1048
1077
  .app-turn__who{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-8);min-height:24px;color:var(--on-surface)}
1049
1078
  .app-turn__who .text-meta{color:var(--on-surface-variant)}
1079
+ .app-turn__audience{display:flex;align-items:center;gap:var(--space-4);margin:0;color:var(--on-surface-variant)}
1080
+ .app-turn__audience .app-icon{font-size:16px}
1050
1081
  .app-turn__avatar{display:inline-flex;align-items:center;justify-content:center;flex:none;width:24px;height:24px;border-radius:var(--radius-pill);background:var(--surface-container-highest);color:var(--on-surface);font-family:var(--font-sans);font-size:12px;line-height:16px;font-weight:600;overflow:hidden;object-fit:cover}
1051
1082
  .app-turn__avatar--alis{background:transparent}
1052
1083
  .app-turn__head{display:flex;align-items:center;gap:var(--space-12);min-height:32px}
package/classes.json CHANGED
@@ -111,6 +111,7 @@
111
111
  "app-combo__value",
112
112
  "app-compact-only",
113
113
  "app-composer",
114
+ "app-composer__audience",
114
115
  "app-composer__box",
115
116
  "app-composer__capture",
116
117
  "app-composer__capture-label",
@@ -118,6 +119,7 @@
118
119
  "app-composer__editor",
119
120
  "app-composer__go",
120
121
  "app-composer__go--plain",
122
+ "app-composer__go-label",
121
123
  "app-composer__input",
122
124
  "app-composer__interim",
123
125
  "app-composer__light",
@@ -274,6 +276,13 @@
274
276
  "app-shortcuts__heading",
275
277
  "app-shortcuts__note",
276
278
  "app-shortcuts__row",
279
+ "app-signin",
280
+ "app-signin__action",
281
+ "app-signin__card",
282
+ "app-signin__card--steps",
283
+ "app-signin__foot",
284
+ "app-signin__lead",
285
+ "app-signin__logo",
277
286
  "app-skel",
278
287
  "app-skel__bar",
279
288
  "app-skel__bar--block",
@@ -332,6 +341,7 @@
332
341
  "app-turn--them",
333
342
  "app-turn--you",
334
343
  "app-turn__about",
344
+ "app-turn__audience",
335
345
  "app-turn__avatar",
336
346
  "app-turn__avatar--alis",
337
347
  "app-turn__bubble",
@@ -441,6 +451,7 @@
441
451
  "--alis-red",
442
452
  "--amber-100",
443
453
  "--amber-700",
454
+ "--attachment-preview-size",
444
455
  "--background",
445
456
  "--band-bottom",
446
457
  "--band-fg",
@@ -4,11 +4,12 @@ A file, recording or queued message waiting in the composer's tray, and the same
4
4
 
5
5
  ## Use / don't use
6
6
 
7
- - **In [AppComposer](AppComposer.md)'s tray**, and in a sent message, where it opens the file. 232px wide, 56 high, `radius-lg` (16: concentric with the composer's corner, 28 − 12), on `surface-container-low`.
7
+ - **In [AppComposer](AppComposer.md)'s tray**, and in a sent message, where it opens the file. 232px wide, at least 56 high (growing for touch controls), `radius-lg` (16: concentric with the composer's corner, 28 − 12), on `surface-container-low`.
8
8
  - **A tile, not a chip.** A file needs a type, a size, progress, an error and a retry, and a chip can't hold them. Chips stay for the composer's context, so the two never read alike.
9
9
  - **No colour for types.** The glyph sits in ink on white: a PDF isn't red and an image isn't blue. Glyphs: `description` (a document), `slideshow`, `table` (a sheet), `graphic_eq` (audio), `movie`, `screen_record` (a screen capture), `draft` (anything else).
10
- - **An image shows itself**: 56 square, the picture, remove on top.
11
- - **States**: ready (type · size on the meta line); uploading (a 2px `primary` bar along the bottom edge); failed ("Didn't upload" in `error`, with retry); not accepted ("Can't be read here" in `error`, no retry, and the composer's line lists what works).
10
+ - **An image shows itself**: `attachment-preview-size` square, the picture, remove on top. Its image clips to the tile; the control and its focus ring stay inside it.
11
+ - **States** follow § Upload lifecycle. Transfer progress is a 2px `on-surface` bar, like [AppProgress](AppProgress.md); it is not an action, so never `primary`.
12
+ - **Controls have real space**: retry, cancel, edit and remove use `touch-target` for both dimensions (32px, 48 on touch). A tile with two controls grows wider; the tile grows taller for touch. Do not shrink controls, overlap their hit areas or let the tile clip a target or focus ring. An ellipsised name keeps its full text in the accessible name and `title`.
12
13
  - **A thing** opens what it names: the whole tile is the link, with no button in it. Its glyph names the kind, in ink, always a Material Symbol (a capability mark names a tool, not an object): `videocam` a meeting, `edit_note` its notes, `record_voice_over` an interview, `monitor_heart` diagnostics, `extension` a skill, `assignment` an issue, `terminal` an agent session. Its name is the label; the meta line is where it lives and its state: "Google Meet · recording", "Linear · BUI-29", "Diagnostics · 2 min ago". A provider's logo never replaces the glyph.
13
14
  - **Inside the product it opens in place; outside, in a new tab, and says so**: a 16px `open_in_new` at the tile's end (`.app-attachment__external`), and "opens in a new tab" in its accessible name.
14
15
  - **A file Alis made** stands in the reply where Alis put it, 320 wide (the full column on a phone), and opens [AppFilePane](AppFilePane.md) beside the conversation: the whole tile is a `<button>` with `aria-expanded`, nothing inside it, and no Download (that's in the pane). The label is Alis's description of the file, or else its name; the meta line its kind and size ("HTML page · 6 KB"). Glyphs: `web` an HTML page, `article` Markdown, `code` code, `text_snippet` plain text, `shapes` an SVG; a PDF, a CSV and anything else as above. An image Alis made shows itself, as any image does, and opens in the pane. No thumbnail of a page: it would mean running the page in every tile.
@@ -17,42 +18,93 @@ A file, recording or queued message waiting in the composer's tray, and the same
17
18
  - **Gone** (`is-gone`, deleted since): a `div`, not pressable and with no state layer; the meta line says "Deleted", in ink, and the glyph sits on an outline. Not red: nothing failed.
18
19
  - **A queued message** (`app-attachment--message`) takes the tray's full width: `schedule`, the text, "Sends when Alis finishes", edit and remove.
19
20
 
21
+ ## Upload lifecycle
22
+
23
+ The product supplies allowed file kinds, size/count limits and concurrency. State
24
+ belongs to a file in one conversation's draft, never to a global attachment tray.
25
+
26
+ | State | What it says | Available action |
27
+ | --- | --- | --- |
28
+ | Queued | **Waiting to upload**, with the file's name and size; no percentage | Remove |
29
+ | Uploading | **Uploading · 48%** when byte progress is known, plus a labelled determinate bar; otherwise **Uploading** without a made-up percentage | Cancel upload |
30
+ | Processing | **Processing** after all bytes transfer, until the service confirms the file is usable; no completed progress bar | Cancel upload |
31
+ | Ready | Type · size; a local thumbnail for an image | Remove |
32
+ | Failed | **Didn't upload**, or **Couldn't process** when transfer succeeded | Retry and Remove |
33
+ | Cancelled | **Upload cancelled**; no progress or error colour | Retry and Remove |
34
+ | Not accepted | The actionable reason, such as **Larger than 10 MiB** or **This file type isn't supported** | Remove; no retry until the input changes |
35
+
36
+ - **100% is not Ready.** Enable Send only after every retained file is Ready and there is text or at least one file. A failed or cancelled tile blocks Send until retried or removed. The composer stays writable.
37
+ - **Partial failure** stays on the affected tile; ready files and text are kept. Retry only that file, using a new attempt identity under its stable draft-file identity. Never upload the entire tray again.
38
+ - **Cancel stops the attempt and keeps its tile. Remove drops the tile.** Abort the request if possible; ignore late progress/completion from either an aborted attempt or a removed tile. Release local previews when removed, sent, discarded or signed out. Cleanup of remote temporary files belongs to the service.
39
+ - **Switching conversations** restores that conversation's draft, files and audience. Completion may update its own draft in the background, never whichever conversation is now open. Signing out clears local previews and work belonging to that session.
40
+ - **Picker, paste and drop** enter the same queue and validation path. Handle file paste without swallowing an ordinary text paste; prevent a file drop from navigating away. Reject unsupported or oversized files with the reason on their tile. Do not silently send, discard or truncate the other files.
41
+ - **Announce transitions, not every byte.** Use one persistent status region for the tray; announce queued, failed and ready counts. A determinate bar has an accessible name and `aria-valuenow`; Processing has words, not a fake percentage. Keep each control's accessible name specific to its file.
42
+
20
43
  ## Markup
21
44
 
22
45
  ```html
23
46
  <!-- Ready -->
24
47
  <div class="app-attachment">
25
48
  <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">description</span></span>
26
- <span class="app-attachment__text"><span class="text-label">Q3 pricing interviews.pdf</span><span class="text-meta">PDF · 2.4 MB</span></span>
27
- <button type="button" class="app-icon-btn app-state" aria-label="Remove Q3 pricing interviews.pdf" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
49
+ <span class="app-attachment__text"><span class="text-label" title="Q3 pricing interviews.pdf">Q3 pricing interviews.pdf</span><span class="text-meta">PDF · 2.4 MB</span></span>
50
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Q3 pricing interviews.pdf" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
28
51
  </div>
29
52
 
30
53
  <!-- Uploading -->
31
54
  <div class="app-attachment">
32
55
  <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">slideshow</span></span>
33
- <span class="app-attachment__text"><span class="text-label">Board deck v7.pptx</span><span class="text-meta">PowerPoint · 18 MB</span></span>
34
- <button type="button" class="app-icon-btn app-state" aria-label="Remove Board deck v7.pptx" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
56
+ <span class="app-attachment__text"><span class="text-label" title="Board deck v7.pptx">Board deck v7.pptx</span><span class="text-meta">Uploading · 62%</span></span>
57
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Cancel upload of Board deck v7.pptx" title="Cancel upload"><span class="app-icon" aria-hidden="true">close</span></button>
35
58
  <span class="app-attachment__bar" role="progressbar" aria-label="Uploading Board deck v7.pptx" aria-valuemin="0" aria-valuemax="100" aria-valuenow="62"><span style="width:62%"></span></span>
36
59
  </div>
37
60
 
38
61
  <!-- Failed -->
39
62
  <div class="app-attachment is-error">
40
63
  <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">error</span></span>
41
- <span class="app-attachment__text"><span class="text-label">Customer list.xlsx</span><span class="text-meta">Didn't upload</span></span>
42
- <button type="button" class="app-icon-btn app-state" aria-label="Retry Customer list.xlsx" title="Retry"><span class="app-icon" aria-hidden="true">refresh</span></button>
43
- <button type="button" class="app-icon-btn app-state" aria-label="Remove Customer list.xlsx" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
64
+ <span class="app-attachment__text"><span class="text-label" title="Customer list.xlsx">Customer list.xlsx</span><span class="text-meta">Didn't upload</span></span>
65
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Retry Customer list.xlsx" title="Retry"><span class="app-icon" aria-hidden="true">refresh</span></button>
66
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Customer list.xlsx" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
67
+ </div>
68
+
69
+ <!-- Queued upload -->
70
+ <div class="app-attachment" role="group" aria-label="Browser screenshot.png, waiting to upload">
71
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">image</span></span>
72
+ <span class="app-attachment__text"><span class="text-label" title="Browser screenshot.png">Browser screenshot.png</span><span class="text-meta">Waiting to upload</span></span>
73
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Browser screenshot.png" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
74
+ </div>
75
+
76
+ <!-- Processing upload -->
77
+ <div class="app-attachment" role="group" aria-label="Browser screenshot.png, processing">
78
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">image</span></span>
79
+ <span class="app-attachment__text"><span class="text-label" title="Browser screenshot.png">Browser screenshot.png</span><span class="text-meta">Processing</span></span>
80
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Cancel upload of Browser screenshot.png" title="Cancel upload"><span class="app-icon" aria-hidden="true">close</span></button>
81
+ </div>
82
+
83
+ <!-- Cancelled upload -->
84
+ <div class="app-attachment" role="group" aria-label="Browser screenshot.png, upload cancelled">
85
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">image</span></span>
86
+ <span class="app-attachment__text"><span class="text-label" title="Browser screenshot.png">Browser screenshot.png</span><span class="text-meta">Upload cancelled</span></span>
87
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Retry Browser screenshot.png" title="Retry"><span class="app-icon" aria-hidden="true">refresh</span></button>
88
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Browser screenshot.png" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
89
+ </div>
90
+
91
+ <!-- File not accepted -->
92
+ <div class="app-attachment is-error" role="group" aria-label="Browser screenshot.png, larger than 10 mib">
93
+ <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">image</span></span>
94
+ <span class="app-attachment__text"><span class="text-label" title="Browser screenshot.png">Browser screenshot.png</span><span class="text-meta">Larger than 10 MiB</span></span>
95
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Browser screenshot.png" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
44
96
  </div>
45
97
 
46
98
  <!-- An image -->
47
99
  <div class="app-attachment app-attachment--image" role="group" aria-label="Churn chart.png">
48
100
  <img src="…" alt="">
49
- <button type="button" class="app-icon-btn app-state" aria-label="Remove Churn chart.png" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
101
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove Churn chart.png" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
50
102
  </div>
51
103
 
52
104
  <!-- A thing: the whole tile opens it -->
53
105
  <a class="app-attachment app-state" href="…" target="_blank" rel="noopener noreferrer" aria-label="Call with Jan, Google Meet, opens in a new tab">
54
106
  <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">videocam</span></span>
55
- <span class="app-attachment__text"><span class="text-label">Call with Jan</span><span class="text-meta">Google Meet · recording</span></span>
107
+ <span class="app-attachment__text"><span class="text-label" title="Call with Jan">Call with Jan</span><span class="text-meta">Google Meet · recording</span></span>
56
108
  <span class="app-icon app-attachment__external" aria-hidden="true">open_in_new</span>
57
109
  </a>
58
110
  <!-- Inside the product: no target, no open_in_new -->
@@ -60,38 +112,38 @@ A file, recording or queued message waiting in the composer's tray, and the same
60
112
  <!-- A file Alis made, in Alis's prose; is-selected while it is open in the pane -->
61
113
  <button type="button" class="app-attachment app-state" aria-expanded="false" aria-controls="file-pane">
62
114
  <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">web</span></span>
63
- <span class="app-attachment__text"><span class="text-label">Pricing page</span><span class="text-meta">HTML page · 6 KB</span></span>
115
+ <span class="app-attachment__text"><span class="text-label" title="Pricing page">Pricing page</span><span class="text-meta">HTML page · 6 KB</span></span>
64
116
  </button>
65
117
 
66
118
  <!-- One that can't be shown: it downloads -->
67
119
  <a class="app-attachment app-state" href="…" download aria-label="Interview recordings, ZIP archive, 412 MB, downloads">
68
120
  <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">folder_zip</span></span>
69
- <span class="app-attachment__text"><span class="text-label">Interview recordings</span><span class="text-meta">ZIP archive · 412 MB</span></span>
121
+ <span class="app-attachment__text"><span class="text-label" title="Interview recordings">Interview recordings</span><span class="text-meta">ZIP archive · 412 MB</span></span>
70
122
  <span class="app-icon app-attachment__external" aria-hidden="true">download</span>
71
123
  </a>
72
124
 
73
125
  <!-- Gone since -->
74
126
  <div class="app-attachment is-gone" role="group" aria-label="Pricing page, deleted">
75
127
  <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">web</span></span>
76
- <span class="app-attachment__text"><span class="text-label">Pricing page</span><span class="text-meta">Deleted</span></span>
128
+ <span class="app-attachment__text"><span class="text-label" title="Pricing page">Pricing page</span><span class="text-meta">Deleted</span></span>
77
129
  </div>
78
130
 
79
131
  <!-- A queued message -->
80
132
  <div class="app-attachment app-attachment--message">
81
133
  <span class="app-attachment__glyph"><span class="app-icon" aria-hidden="true">schedule</span></span>
82
- <span class="app-attachment__text"><span class="text-label">Also check the EU accounts.</span><span class="text-meta">Sends when Alis finishes</span></span>
83
- <button type="button" class="app-icon-btn app-state" aria-label="Edit" title="Edit"><span class="app-icon" aria-hidden="true">edit</span></button>
84
- <button type="button" class="app-icon-btn app-state" aria-label="Remove" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
134
+ <span class="app-attachment__text"><span class="text-label" title="Also check the EU accounts.">Also check the EU accounts.</span><span class="text-meta">Sends when Alis finishes</span></span>
135
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Edit" title="Edit"><span class="app-icon" aria-hidden="true">edit</span></button>
136
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Remove" title="Remove"><span class="app-icon" aria-hidden="true">close</span></button>
85
137
  </div>
86
138
  ```
87
139
 
88
140
  ## Behaviour you must supply
89
141
 
90
- - Update the bar's width and `aria-valuenow` as the upload runs; remove the bar when it's done.
91
- - Retry restarts the upload; remove drops the tile and returns focus to the editor.
142
+ - Drive § Upload lifecycle, including transfer versus processing; change the label, bar and actions together. Keep the full file name available when it is truncated.
143
+ - Cancel invalidates the current attempt; retry starts only that file; remove drops it. Keep keyboard focus on the next available tile control, or return it to the editor when the tile leaves.
92
144
  - Edit on a queued message moves its text back into the editor and drops the tile.
93
145
  - In a sent message, the tile opens the file (wrap the glyph and text in the link or button); no remove. Sent tiles stack right above your bubble ([AppTurn](AppTurn.md)).
94
146
 
95
147
  ## Classes
96
148
 
97
- `.app-attachment`, `.app-attachment--image`, `.app-attachment--message`, `.is-error`, `.is-selected`, `.is-gone`, `.app-attachment__glyph`, `.app-attachment__text`, `.app-attachment__bar`, with `.app-icon-btn` and `.app-state` on its buttons.
149
+ `.app-attachment`, `.app-attachment--image`, `.app-attachment--message`, `.is-error`, `.is-selected`, `.is-gone`, `.app-attachment__glyph`, `.app-attachment__text`, `.app-attachment__bar`, with `.app-icon-btn`, `.app-state` and `.app-target` on its buttons.
@@ -1,6 +1,6 @@
1
1
  # AppComposer
2
2
 
3
- Where you write to Alis, an agent or a person. One floating surface with three bands (tray, editor, row) and one line below it; what runs beside the conversation or waits on you docks on top. Its trailing button changes with the state, and its glyph says what pressing it does now.
3
+ Where you write to Alis, an agent or a person. One floating surface with three bands (tray, editor, row) and one line below it, the editor and the row sharing one row on a phone; what runs beside the conversation or waits on you docks on top. Its trailing button changes with the state, and its glyph says what pressing it does now.
4
4
 
5
5
  ## Use / don't use
6
6
 
@@ -14,13 +14,14 @@ Where you write to Alis, an agent or a person. One floating surface with three b
14
14
  |---|---|---|
15
15
  | **Capture** (top, only while a capture runs beside the conversation) | The capture bar: a thumbnail of what's captured, the red dot and *Recording*, the time, Pause, ⋯ and Stop recording, divided by a hairline (§ A capture beside the conversation). Above an ask | The product decides what it captures and what ⋯ holds |
16
16
  | **Ask** (top, only while Alis or a person is waiting on you) | The decision they need: an [AppAsk](AppAsk.md), above the tray, divided by a hairline | The product writes it |
17
+ | **Audience** (only when a responder can write internally or to a customer) | A labelled choice and its recipient, always visible while composing (§ Message audience). Below an ask, above the tray | The product supplies the permitted audiences and recipient |
17
18
  | **Tray** (top, only when something's in it) | What goes with *this message*: [AppAttachment](AppAttachment.md)s (files, screen captures), a queued message, the drop target | The product decides which files and sizes |
18
- | **Editor** | Body type, 16/24. Grows to eight lines, then scrolls inside itself. The placeholder says what to write | The product writes the placeholder |
19
+ | **Editor** | Body type, 16/24. Grows to eight lines (five on a phone while the keyboard is up), then scrolls inside itself. The placeholder says what to write, short enough to fit beside the buttons on a phone (§ On a phone) | The product writes the placeholder |
19
20
  | **Suggestions** (only while you type `/` or `@`) | An [AppMenu](AppMenu.md) band right above the editor, divided by a hairline: commands, or people and things to mention. Below an open ask | The product supplies the commands and what can be mentioned |
20
21
  | **Row**: Add | `add` icon button: an [AppMenu](AppMenu.md) of what you can bring in, then the commands | The product fills the menu |
21
22
  | **Row**: Context | Label [AppChip](AppChip.md)s you can remove, for **what you opened beside the conversation, to point at it**: a file open in [AppFilePane](AppFilePane.md) (its glyph and file name), or anything opened in the detail pane from the chat. **Never where you are**: the page you're on goes with every message as references and is never shown. Never a mode or a setting. Removing the chip keeps the pane and leaves it out of the message; closing the pane removes the chip. What you write on a file goes in the tray | The product decides what opens beside the conversation |
22
- | **Row**: voice | A plain mic icon button beside live (see below) | The product decides whether there's voice, and which mic mode |
23
- | **Row**: trailing button | The one filled icon button in the system: `primary`, 40px, round | The system |
23
+ | **Row**: voice | A plain mic icon button beside live (see below). On a phone a Dictate mic leaves: the keyboard has its own (§ On a phone) | The product decides whether there's voice, and which mic mode |
24
+ | **Row**: trailing button | The one filled icon button in the system: `primary`, 40px, round. In a voice state it carries its word | The system |
24
25
  | **Line** (below the surface) | One line at most, meta type, 20 in: a hint, the trust note, why it's locked, or an error | The product writes it |
25
26
 
26
27
  ## The trailing button
@@ -29,11 +30,11 @@ Where you write to Alis, an agent or a person. One floating surface with three b
29
30
 
30
31
  | State | Trailing button (filled) | Beside it (plain) | Editor |
31
32
  |---|---|---|---|
32
- | Empty, live offered | `graphic_eq` "Talk to Alis" | `mic` "Dictate" or "Record a voice note" | Placeholder |
33
- | Empty, mic only | `mic` "Dictate" or "Record a voice note" | none | Placeholder |
33
+ | Empty, live offered | `graphic_eq` **Talk** | `mic` "Dictate" (not on a phone) or "Record a voice note" | Placeholder |
34
+ | Empty, mic only | `mic` **Dictate** or **Record** (on a phone, Dictate gives way to Send, disabled) | none | Placeholder |
34
35
  | Empty, no voice | `arrow_upward` "Send", disabled | none | Placeholder |
35
36
  | Something to send (text or a staged file) | `arrow_upward` "Send" | none: the voice controls leave | Live |
36
- | Uploading, or a tile failed | "Send", disabled; the line says why | none | Live |
37
+ | Queued, uploading, processing, or a tile failed | "Send", disabled; the line says why | none | Live |
37
38
  | Alis is working | `stop` (filled glyph) "Stop" | none | Stays writable; the draft is kept |
38
39
  | Working, queue on, with text | `arrow_upward` "Send when Alis finishes" | `stop_circle` "Stop" | Live |
39
40
  | Dictating | `check` "Done, keep the text" | the row is the recording bar | Words arrive as you speak |
@@ -45,8 +46,47 @@ Where you write to Alis, an agent or a person. One floating surface with three b
45
46
  | Waiting on a person's ask, with text | `arrow_upward` "Send", filled; the ask's action steps down to outlined | none | Live: what you send is a reply; the ask stays |
46
47
  | Locked | none | none | Dimmed; the line says why |
47
48
 
49
+ **A voice state carries its word**: Talk, Dictate or Record, after its glyph, at every width (`.app-composer__go-label`). It is the only way into voice, and the people who use it are often meeting the product for the first time (a participant in an interview), so its glyph alone is a guess, and a phone has no tooltip to name it. The word is its accessible name; it needs no tooltip. Every other state is a glyph alone: Send, Stop, ✓ and End are glyphs everyone reads. Typing turns the pill into the Send circle.
50
+
48
51
  **Two jobs, one slot:** the commit stays in the slot and the other steps aside as a plain icon button (Stop beside a queued Send, End beside a Send typed into a call). Send is `arrow_upward`, never the paper plane ([icons.md](../rules/icons.md)). Ending a call is cyan like every commit, never red.
49
52
 
53
+ ## On a phone
54
+
55
+ Below 600 wide, with the keyboard up, the conversation has about 390px, and every line the composer takes is a line of the question gone.
56
+
57
+ - **The editor and the row share one row**: `add`, the editor, any plain button, the trailing button. 8 + 40 + 8 is 56, so at `radius-xl` the surface is a pill, still concentric with the button set 8 in. As you write, the editor grows upwards and the buttons stay on its last line. It stays one row: it does not split into two bands at the second line.
58
+ - **Two bands come back when the row holds more than buttons**: context chips, or a bar that takes the row (the recording bar while dictating or recording a voice note). A call on a phone is full screen ([AppVoiceView](AppVoiceView.md)). The bands on top (capture, ask, audience, tray, suggestions) sit above the one row unchanged.
59
+ - **The placeholder fits one line** beside the buttons at 360 wide: under 18 characters beside Talk. "Type your answer" or "Ask Alis anything", not "Ask Alis about this project". The system cuts a longer one with an ellipsis as a backstop.
60
+ - **Dictation is the keyboard's.** Every phone keyboard has a dictation key, so a composer whose mic mode is dictation shows no mic of its own on a phone: the plain Dictate button is `.app-wide-only`, and an empty composer with no live gets Send, disabled. A voice note stays: the keyboard can't record one.
61
+ - **While the keyboard is up**, the editor grows to five lines at most, and the line steps aside if it holds a note or a hint (the trust note returns when the keyboard goes). An error stays.
62
+ - **The thread keeps its end in view** when the keyboard opens and as the composer grows, if its end was in view before ([AppTurn](AppTurn.md)): the question being answered is what the person should see.
63
+
64
+ ## Message audience
65
+
66
+ For responders in a conversation with both team-only and customer messages:
67
+
68
+ - **A new draft starts as Internal note.** Choosing **Note to customer** is deliberate and applies to this message only. Keep the choice and recipient visible in `.app-composer__audience`, above the tray and editor; it is never a context chip, a colour alone or a setting hidden in Add.
69
+ - Use a labelled [AppSelect](AppSelect.md): **Message visibility**, with Internal note and Note to customer. This is a choice attached to a message, not a filter on the thread. Beside it, say **Only your team** or **To Thandi Mokoena** (the actual recipient, or **To the customer** when unnamed). The editor's accessible name and placeholder, and Send's accessible name, repeat the chosen action: **Internal note** / **Note to customer**, **Send internal note** / **Send note to customer**.
70
+ - **Keep the audience while editing, uploading, validating or retrying.** Capture it with the message, its recipient and attachments when submitting. A new draft resets to Internal note; retrying an earlier message uses that message's captured audience, even if the current draft is different. Never carry the customer choice into another conversation or another person's session.
71
+ - With only one permitted audience, show its words and recipient without a selector. A customer portal only composes customer-visible messages: no internal option or internal metadata. Enforce audience and access on the server; hiding controls is not authorisation.
72
+ - Ordinary internal conversations with no customer audience need no extra band. A terminal uses the same words and defaults in its composing status; its visibility shortcut changes the draft, never existing messages.
73
+
74
+ ## Delivery and retry
75
+
76
+ The draft and a submitted message have different owners. Use this lifecycle in every conversation, including attachment-only messages:
77
+
78
+ | Stage | What stays on screen | Where recovery lives |
79
+ | --- | --- | --- |
80
+ | Draft validation or an upload fails, before submission | Text, files, audience and recipient stay in the composer; no bubble is created | A field/composer validation line, or the failed attachment's retry/remove controls |
81
+ | Submission starts | Capture an immutable message with a stable submission identity. Move it into the thread immediately; start a fresh draft | The submitted turn owns its delivery state from now on |
82
+ | Delivery fails, or the response is lost | The submitted turn and its files stay; the current draft is untouched | **Didn't send · Try again** beneath that turn ([AppTurn](AppTurn.md)) |
83
+ | Delivery is confirmed | Reconcile the existing turn with the server result, including a result arriving through live updates | Remove its failure line; never append a duplicate |
84
+
85
+ - **One message, one retry location.** Never restore a submitted message to the editor and leave a failed copy in the thread. Upload failures stay on their tiles; the composer's line may explain why Send is disabled, but does not repeat the error or its retry.
86
+ - Retry the same captured payload and submission identity; prevent concurrent retries. When a timeout leaves delivery uncertain, reconcile with the service before resubmitting, or use its deduplication contract. A UI alone cannot make retries idempotent.
87
+ - Keep the captured payload until acknowledged or explicitly discarded. If local persistence fails before submission, keep the draft and explain on the line; do not clear it. If the service cannot support safe retries, say how to check delivery instead of presenting an unsafe Try again.
88
+ - A failure notice is persistent and announced once through the thread's status region. A later successful retry removes it without stealing focus from a new draft.
89
+
50
90
  ## Voice
51
91
 
52
92
  - **Two mic modes; a composer has one**, chosen by the product. **Dictate**: words land in the editor as you speak, the ones still settling in `on-surface-variant`; ✓ ends it and leaves the text to edit, never sends. **Record a voice note**: the editor hides; Send sends the note, with its transcript, as the message.
@@ -83,18 +123,68 @@ Where you write to Alis, an agent or a person. One floating surface with three b
83
123
  <div class="app-composer">
84
124
  <div class="app-composer__box">
85
125
  <div class="app-composer__editor">
86
- <textarea class="app-composer__input" rows="1" aria-label="Message" placeholder="Ask Alis about this project"></textarea>
126
+ <textarea class="app-composer__input" rows="1" aria-label="Message" placeholder="Ask Alis anything"></textarea>
87
127
  </div>
88
128
  <div class="app-composer__row">
89
129
  <button type="button" class="app-icon-btn app-state app-target" aria-label="Add files and more" title="Add files and more"><span class="app-icon" aria-hidden="true">add</span></button>
90
130
  <span class="app-composer__spacer"></span>
91
- <button type="button" class="app-icon-btn app-state app-target" aria-label="Dictate" title="Dictate"><span class="app-icon" aria-hidden="true">mic</span></button>
92
- <button type="button" class="app-composer__go app-state" aria-label="Talk to Alis" title="Talk to Alis"><span class="app-icon" aria-hidden="true">graphic_eq</span></button>
131
+ <button type="button" class="app-icon-btn app-state app-target app-wide-only" aria-label="Dictate" title="Dictate"><span class="app-icon" aria-hidden="true">mic</span></button>
132
+ <button type="button" class="app-composer__go app-state"><span class="app-icon" aria-hidden="true">graphic_eq</span><span class="app-composer__go-label">Talk</span></button>
93
133
  </div>
94
134
  </div>
95
135
  <p class="app-composer__line text-meta">What you put here stays in your organisation.</p>
96
136
  </div>
97
137
 
138
+ <!-- Internal note: the recipient remains visible while writing -->
139
+ <div class="app-composer">
140
+ <div class="app-composer__box">
141
+ <div class="app-composer__audience">
142
+ <div class="app-field">
143
+ <label for="audience-internal" class="app-field__label text-label">Message visibility</label>
144
+ <div class="app-field__box app-field__box--select">
145
+ <select id="audience-internal" class="app-field__select" aria-describedby="recipient-internal">
146
+ <option value="internal" selected>Internal note</option>
147
+ <option value="customer">Note to customer</option>
148
+ </select>
149
+ <span class="app-icon" aria-hidden="true">expand_more</span>
150
+ </div>
151
+ </div>
152
+ <p id="recipient-internal" class="text-meta">Only your team</p>
153
+ </div>
154
+ <div class="app-composer__editor"><textarea class="app-composer__input" rows="2" aria-label="Internal note" aria-describedby="recipient-internal" placeholder="Internal note">Check the failed request before replying.</textarea></div>
155
+ <div class="app-composer__row">
156
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Add files and more" title="Add files and more"><span class="app-icon" aria-hidden="true">add</span></button>
157
+ <span class="app-composer__spacer"></span>
158
+ <button type="button" class="app-composer__go app-state app-target" aria-label="Send internal note" title="Send internal note"><span class="app-icon" aria-hidden="true">arrow_upward</span></button>
159
+ </div>
160
+ </div>
161
+ </div>
162
+
163
+ <!-- Note to customer: the recipient remains visible while writing -->
164
+ <div class="app-composer">
165
+ <div class="app-composer__box">
166
+ <div class="app-composer__audience">
167
+ <div class="app-field">
168
+ <label for="audience-customer" class="app-field__label text-label">Message visibility</label>
169
+ <div class="app-field__box app-field__box--select">
170
+ <select id="audience-customer" class="app-field__select" aria-describedby="recipient-customer">
171
+ <option value="internal">Internal note</option>
172
+ <option value="customer" selected>Note to customer</option>
173
+ </select>
174
+ <span class="app-icon" aria-hidden="true">expand_more</span>
175
+ </div>
176
+ </div>
177
+ <p id="recipient-customer" class="text-meta">To Thandi Mokoena</p>
178
+ </div>
179
+ <div class="app-composer__editor"><textarea class="app-composer__input" rows="2" aria-label="Note to customer" aria-describedby="recipient-customer" placeholder="Note to customer">The fix is ready for you to try.</textarea></div>
180
+ <div class="app-composer__row">
181
+ <button type="button" class="app-icon-btn app-state app-target" aria-label="Add files and more" title="Add files and more"><span class="app-icon" aria-hidden="true">add</span></button>
182
+ <span class="app-composer__spacer"></span>
183
+ <button type="button" class="app-composer__go app-state app-target" aria-label="Send note to customer" title="Send note to customer"><span class="app-icon" aria-hidden="true">arrow_upward</span></button>
184
+ </div>
185
+ </div>
186
+ </div>
187
+
98
188
  <!-- Something to send: a staged file and text; Send -->
99
189
  <div class="app-composer">
100
190
  <div class="app-composer__box">
@@ -196,8 +286,8 @@ Where you write to Alis, an agent or a person. One floating surface with three b
196
286
  <!-- Dragging a file over: the tray opens as the drop target -->
197
287
  <div class="app-composer__tray"><div class="app-composer__drop drop-target text-label">Drop to add to your message</div></div>
198
288
 
199
- <!-- The line: an error with its action -->
200
- <p class="app-composer__line text-meta is-error"><span class="app-icon" aria-hidden="true">error</span>Couldn't send. Your message is still here. <button type="button" class="app-composer__line-action">Try again</button></p>
289
+ <!-- Before submission: the draft stays in the editor -->
290
+ <p class="app-composer__line text-meta is-error"><span class="app-icon" aria-hidden="true">error</span>This message is too long. Shorten it before sending.</p>
201
291
 
202
292
  <!-- Locked -->
203
293
  <div class="app-composer is-locked"><!-- box with the editor only; the line says why --></div>
@@ -205,16 +295,18 @@ Where you write to Alis, an agent or a person. One floating surface with three b
205
295
 
206
296
  ## Behaviour you must supply
207
297
 
208
- - **The state machine** above: swap the trailing button's glyph, `aria-label` and `title`, and add or remove the plain voice buttons, on every change to the draft, the tray or the agent's state. `disabled` on Send until there is something to send and every tile is ready.
298
+ - **The state machine** above: swap the trailing button's glyph, `aria-label` and `title` (or its word, in a voice state), and add or remove the plain voice buttons, on every change to the draft, the tray or the agent's state. `disabled` on Send until there is something to send and every tile is ready.
209
299
  - **Keyboard**, on the editor only (never a window listener): Enter sends; Shift Enter adds a line (no hint line says so: Send's [AppTooltip](AppTooltip.md) carries Enter, and the [AppShortcutSheet](AppShortcutSheet.md) lists both); ignore Enter while `isComposing` (IME) or while a suggestion menu is open ([AppMenu](AppMenu.md)). In a call, Enter with text sends into the call. While Alis works with the queue off, Enter does nothing.
210
- - **Auto-grow**: set the textarea's height to its `scrollHeight` on input; the editor caps it at eight lines and scrolls.
300
+ - **Auto-grow**: set the textarea's height to its `scrollHeight` on input; the editor caps it at eight lines (five on a phone while the keyboard is up) and scrolls.
301
+ - **One markup at every width.** The phone's one row is CSS alone. Never re-render or move the textarea when the composer changes form or state: a phone drops its keyboard mid-word.
302
+ - **The page resizes with the keyboard**, so the composer sits on it and the thread takes what's left: `interactive-widget=resizes-content` in the viewport meta, and on iOS Safari the visual viewport's height. Above the keyboard the composer needs no bottom safe-area inset; with the keyboard down it has one.
211
303
  - **Recording**: start on the mic (holding Space outside a text field is a shortcut), run the timer, drive the meter bars' heights from the input level (`aria-hidden`; hold them still under `prefers-reduced-motion`). Under about a second is too short.
212
304
  - **Live**: toggle `is-alis` on `.app-composer` while Alis speaks and `is-muted` while muted (and `aria-pressed` on the mute toggle); update the status word, which is a live region.
213
305
  - **A capture beside the conversation**: show `.app-composer__capture` while it runs and remove it when it stops; tick the timer each second (`role="timer"` is not announced every tick); feed the thumbnail the live capture (a muted `<video>` on the stream), and under `prefers-reduced-motion` a still (`<img>` or `<canvas>`) refreshed every couple of seconds; the thumbnail toggles the larger view (`aria-expanded`), which closes on ✕, Esc or a click outside and returns focus to the thumbnail; Pause toggles `is-paused` on the bar, freezes the picture, and swaps the words and Pause's label and glyph; when frames stop arriving, set `is-empty` on the thumbnail with its glyph and put the error on the line, and clear both when they return; Stop ends the capture and stages what it captured as a tile in the thread. Its buttons take an [AppTooltip](AppTooltip.md) on a phone, where they show a glyph alone. Discard asks first ([AppDialog](AppDialog.md)). The bar never takes focus by itself, and after Stop or Discard focus returns to the editor.
214
306
  - **Drop**: show `.app-composer__drop` in the tray while a file is dragged over the composer; on drop, stage an [AppAttachment](AppAttachment.md).
215
- - **A send that fails** keeps the draft in the editor and says so on the line with Try again.
307
+ - **Delivery** follows § Delivery and retry: before submission the draft stays; after submission, the turn owns any failure and retry. A new draft never changes the audience or files of a retry.
216
308
  - Return focus to the editor after sending, after dictation and after a call.
217
309
 
218
310
  ## Classes
219
311
 
220
- `.app-composer`, `.is-locked`, `.app-composer__go--plain`, `.is-alis`, `.is-muted`, `.app-composer__light`, `.app-composer__box`, `.app-composer__tray`, `.app-composer__drop`, `.app-composer__editor`, `.app-composer__input`, `.app-composer__interim`, `.app-composer__row`, `.app-composer__spacer`, `.app-composer__go`, `.app-composer__rec`, `.app-composer__meter`, `.app-composer__timer`, `.app-composer__capture`, `.is-paused`, `.app-composer__capture-label`, `.app-capture-thumb`, `.is-empty`, `.app-capture-peek`, `.app-capture-peek__head`, `.app-capture-peek__title`, `.app-capture-peek__frame`, `.app-capture-peek__note`, `.app-composer__status`, `.app-composer__line`, `.is-error`, `.app-composer__line-action`, with `.drop-target` on the drop, `.app-state` on every button, `.app-target` on the icon buttons and the capture bar's buttons, `.app-btn--error` on Stop recording, and `.app-compact-only` on Pause's glyph.
312
+ `.app-composer`, `.app-composer__audience`, `.is-locked`, `.app-composer__go--plain`, `.is-alis`, `.is-muted`, `.app-composer__light`, `.app-composer__box`, `.app-composer__tray`, `.app-composer__drop`, `.app-composer__editor`, `.app-composer__input`, `.app-composer__interim`, `.app-composer__row`, `.app-composer__spacer`, `.app-composer__go`, `.app-composer__go-label`, `.app-composer__rec`, `.app-composer__meter`, `.app-composer__timer`, `.app-composer__capture`, `.is-paused`, `.app-composer__capture-label`, `.app-capture-thumb`, `.is-empty`, `.app-capture-peek`, `.app-capture-peek__head`, `.app-capture-peek__title`, `.app-capture-peek__frame`, `.app-capture-peek__note`, `.app-composer__status`, `.app-composer__line`, `.is-error`, `.app-composer__line-action`, with `.drop-target` on the drop, `.app-state` on every button, `.app-target` on the icon buttons and the capture bar's buttons, `.app-btn--error` on Stop recording, and `.app-compact-only` on Pause's glyph.
@@ -6,14 +6,14 @@ A row in a list, the navigation pane, the agent chat list, or a read-back of sav
6
6
 
7
7
  48px minimum (36 in the navigation pane, 32 in the agent chat list, all 48 on touch); the whole row is the target. A list paints no surface.
8
8
 
9
- - **Content** (default): a row in a content list. Title in object-title, an optional supporting line, an optional trailing slot (a small status [AppChip](AppChip.md), an [AppIconButton](AppIconButton.md)) and a meta value at the end. Selected takes the full `secondary-container` fill.
9
+ - **Content** (default): a row in a content list. Title in object-title, an optional supporting line, an optional trailing slot (a small status [AppChip](AppChip.md), an [AppIconButton](AppIconButton.md), or a text button that is the row's one act) and a meta value at the end. Selected takes the full `secondary-container` fill.
10
10
  - **Nav** (`app-row--nav`): a destination in the navigation pane ([AppShell](AppShell.md)). 36px, 24px icon, label type, pill shape. The pane is permanent chrome, so its selected row takes the quieter `selection-chrome`. A heading over a group of rows is `.app-nav-heading`, which sets its own type. A destination that can create takes a small `add` [AppIconButton](AppIconButton.md) in its trailing slot ("New project"). A destination where Alis is waiting on you takes `.app-count` there instead: the number of asks, in `error` like every notification badge ([AppAsk](AppAsk.md)).
11
11
  - **Agent chat** (`app-row--agent-chat`): the agent chat list, 32px rows, and nothing else. It is not a density option: no other list may use it, however alike it looks ([spacing.md](../rules/spacing.md)). Its menu button is 24px and projects no target.
12
12
  - **Field** (`app-row--field`, in an `app-list--fields`): one saved setting read back, on a screen that shows what was chosen and lets you change it (an interview's setup, its review before publishing, a settings page). The name is the row's title in object-title; the value is supporting **in ink**, under it, wrapping to as many lines as it has, a second fact on a line of its own. A value not set takes `text-on-surface-variant` and says what happens instead ("Not set. Alis will open the conversation."). The trailing slot holds the `edit` [AppIcon](AppIcon.md), not a button: the row is the target and opens the edit in place, so there is one stop per row and no tooltip. A field that can't change has no glyph, no hit and no `app-state`, and says why on a further line in `text-on-surface-variant`; when it is their role that stops them, the line says who can ("Only Owners can change this."), and for a Viewer every field reads back this way with no line on each: the bar's role chip already says it ([access.md](../rules/access.md)). A line runs between fields, never above the first or below the last. The list reaches 16 into the gutter so the names meet the heading's edge; never margin or pad it at a site. The name is a name, not a question ("Length", not "How long should it take?"); the edit form's label may ask.
13
13
  - `app-row--divided` draws a hairline between consecutive rows. A field list draws its own.
14
14
  - Selection is always two properties: the fill, and the icon at FILL 1 with the text at 700 (the CSS does both from `is-selected`).
15
15
  - **Three or four facts about each item?** Title, then the rest joined with " · " in the supporting line (`europe-west1 · v1.42.3 · main`), the state as a trailing chip, the time as meta. Once people compare values across items, or sort by them, use [AppTable](AppTable.md).
16
- - A trailing control is 32px at most and projects no target, so the row never grows (the CSS enforces it). Below 600px a content row drops its meta so the title keeps room.
16
+ - A trailing control is 32px at most and projects no target, so the row never grows (the CSS enforces it). **A text button there** ("Request to join" on an account the person could join) only when it is the row's one act: the row opens nothing, so it has no hit, and its title is plain `text-object-title`. A row with a hit keeps a chip or an icon button. Below 600px a content row drops its meta so the title keeps room.
17
17
 
18
18
  ## Markup
19
19
 
@@ -35,6 +35,15 @@ The row is a container; its title is the one button or link (`.app-row__hit`) an
35
35
  <!-- An unselected row: no is-selected, aria-pressed="false". A row that navigates: <a class="app-row__hit text-object-title" href="…"> -->
36
36
  </div>
37
37
 
38
+ <!-- The row's one act is its trailing text button: no hit -->
39
+ <div class="app-row app-row--divided" role="listitem">
40
+ <span class="app-row__text">
41
+ <span class="text-object-title">Acme</span>
42
+ <span class="text-supporting">12 members · acme.com</span>
43
+ </span>
44
+ <span class="app-row__trailing"><button type="button" class="app-btn app-state app-target">Request to join</button></span>
45
+ </div>
46
+
38
47
  <!-- Leading icon (content rows: 20px) -->
39
48
  <span class="app-icon app-row__icon" aria-hidden="true">description</span>
40
49