dsh-better-ask-user 0.2.0 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-better-ask-user",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Independent ask_user_question plugin: configurable wait, input-extended countdown, markdown/mobile card, native or default timeout behavior, and PTC deadline exemption.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -15,8 +15,8 @@
15
15
  "./package.json": "./package.json"
16
16
  },
17
17
  "engines": {
18
- "node": "^22.19.0 || >=24.0.0",
19
- "dsh": ">=0.2.1-rc.2 <0.3.0"
18
+ "node": ">=24.9.0",
19
+ "dsh": "0.2.2-rc.1"
20
20
  },
21
21
  "scripts": {
22
22
  "pretest": "node scripts/build-client.mjs",
@@ -24,17 +24,17 @@
24
24
  "build": "node scripts/build-client.mjs"
25
25
  },
26
26
  "dependencies": {
27
- "@deepseek-ai/schemastery": "~3.18.5",
28
- "dsh-better-ptc": "0.1.1"
27
+ "@deepseek-ai/schemastery": "~3.19.0",
28
+ "dsh-better-ptc": "0.2.0"
29
29
  },
30
30
  "peerDependencies": {
31
- "@deepseek-ai/cordis": "~4.0.5",
32
- "@deepseek-ai/dsh-agent": ">=0.2.1-rc.2 <0.3.0",
33
- "@deepseek-ai/dsh-llm": ">=0.2.1-rc.2 <0.3.0",
34
- "@deepseek-ai/dsh-session": ">=0.2.1-rc.2 <0.3.0",
35
- "@deepseek-ai/dsh-system-prompt": ">=0.2.1-rc.2 <0.3.0",
36
- "@deepseek-ai/dsh-tools": ">=0.2.1-rc.2 <0.3.0",
37
- "@deepseek-ai/dsh-user-questions": ">=0.2.1-rc.2 <0.3.0",
31
+ "@deepseek-ai/cordis": "~4.1.0",
32
+ "@deepseek-ai/dsh-agent": "0.2.2-rc.1",
33
+ "@deepseek-ai/dsh-llm": "0.2.2-rc.1",
34
+ "@deepseek-ai/dsh-session": "0.2.2-rc.1",
35
+ "@deepseek-ai/dsh-system-prompt": "0.2.2-rc.1",
36
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.1",
37
+ "@deepseek-ai/dsh-user-questions": "0.2.2-rc.1",
38
38
  "react": "^18.2.0"
39
39
  },
40
40
  "devDependencies": {
package/src/ask-tool.js CHANGED
@@ -1,5 +1,6 @@
1
1
  /** ask_user_question scope shadow: official contract plus the plugin-managed wait. */
2
2
  import { ToolArgsError, validateJsonSchemaValue } from '@deepseek-ai/dsh-tools'
3
+ import { TIMED_WAIT_PARAMETER } from '@deepseek-ai/dsh-user-questions'
3
4
  import { buildDefaultAnswer } from './default-answer.js'
4
5
 
5
6
  /** Model-visible notice for the native pending result. */
@@ -44,10 +45,15 @@ function answerResult(result) {
44
45
  }
45
46
  }
46
47
 
47
- /** Add the optional detail field to the model-visible question schema. */
48
+ /** Add detail and the next host marker used to replay pending questions. */
48
49
  function parametersWithDetail(parameters) {
49
50
  if (parameters === undefined) return parameters
50
51
  const next = structuredClone(parameters)
52
+ // DSH classifies logged ask calls by this schema key, not by askTimed usage.
53
+ next.properties[TIMED_WAIT_PARAMETER] = {
54
+ type: 'integer',
55
+ description: 'Host continuation marker; omit. The plugin setting, not this argument, controls foreground wait duration.',
56
+ }
51
57
  const properties = next?.properties?.questions?.items?.properties
52
58
  if (properties !== undefined && properties.detail === undefined) {
53
59
  properties.detail = {
@@ -1,13 +1,23 @@
1
- .row { --ask-accent: #3388BB; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; min-width: 0; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; text-align: left; }
2
- button.row { cursor: pointer; transition: background-color 100ms ease; }
3
- button.row:hover { background: var(--dsw-alias-interactive-bg-hover); }
4
- button.row:active { background: color-mix(in srgb, var(--ask-accent) 9%, transparent); }
5
- button.row:focus-visible { outline: 2px solid var(--ask-accent); outline-offset: -2px; }
1
+ .frame {
2
+ --cfg-line: var(--dsw-alias-border-l2);
3
+ --cfg-ink: var(--dsw-alias-label-primary);
4
+ --cfg-muted: var(--dsw-alias-label-secondary);
5
+ --cfg-accent: #3388bb;
6
+ --cfg-accent-text: #14587f;
7
+ --cfg-hover: var(--dsw-alias-interactive-bg-hover);
8
+ min-width: 0;
9
+ }
10
+ .row { appearance: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; min-width: 0; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--cfg-muted); font: inherit; line-height: 20px; text-align: left; }
11
+ button.row { cursor: pointer; transition: background-color 140ms ease, color 140ms ease; }
12
+ button.row:hover { background: var(--cfg-hover); color: var(--cfg-ink); }
13
+ button.row:active { background: color-mix(in srgb, var(--cfg-accent) 9%, transparent); }
14
+ button.row:focus-visible { outline: 2px solid var(--cfg-accent); outline-offset: -2px; }
6
15
  .icon { display: inline-flex; flex: none; color: var(--dsw-alias-label-tertiary); }
7
16
  .icon svg { width: 14px; height: 14px; }
8
- .title { flex: none; color: var(--dsw-alias-label-primary); font-weight: 500; }
9
- .summary { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsw-alias-label-secondary); }
10
- .open { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--dsw-alias-label-tertiary); font-size: 12px; }
11
- .row:hover .open { color: var(--dsw-alias-label-primary); }
12
- @media (max-width: 640px), (pointer: coarse) { .row { min-height: 44px; } }
17
+ .summary { min-width: 0; flex: 1; overflow: hidden; color: var(--cfg-ink); font-size: 13px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
18
+ .open { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--cfg-muted); font-size: 11px; line-height: 18px; white-space: nowrap; }
19
+ .error { display: block; padding: 4px 8px 4px 30px; color: var(--dsw-alias-state-error-primary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
20
+ @media (pointer: coarse) { .row { min-height: 44px; } }
13
21
  @media (prefers-reduced-motion: reduce) { button.row { transition: none; } }
22
+
23
+ [data-ds-dark-theme] .frame { --cfg-accent: #4eb0e8; --cfg-accent-text: #6fc0ee; }
@@ -1,4 +1,5 @@
1
1
  /** History row for ask_user_question: compact summary plus a replay button. */
2
+ import { useState } from 'react'
2
3
  import { IconChevronRightOutlineRegular, IconQuestionOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives'
3
4
  import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'
4
5
  import type { ToolCallViewProps, UserQuestionRecord } from '@deepseek-ai/dsh-client-ui-tool/client'
@@ -99,6 +100,7 @@ export function AskHistoryRow({
99
100
  reviewPanel,
100
101
  t,
101
102
  }: AskHistoryRowProps): React.JSX.Element {
103
+ const [failedAction, setFailedAction] = useState<string | null>(null)
102
104
  const argsRaw = 'kind' in block ? block.call?.argsRaw ?? '' : block.argsRaw
103
105
  const output = 'kind' in block ? resultText(block.content) : undefined
104
106
  const questions = questionList(argsRaw)
@@ -109,20 +111,30 @@ export function AskHistoryRow({
109
111
  const summary = questions?.[0]?.question.split('\n').find(line => line.trim() !== '')?.trim() ?? t('history.title')
110
112
  const review = record !== undefined
111
113
  const action = review
112
- ? () => { reviewPanel(callId, record) }
114
+ ? () => reviewPanel(callId, record)
113
115
  : isPending(output) || phase === 'start'
114
- ? () => { revealPanel(callId) }
116
+ ? () => revealPanel(callId)
115
117
  : undefined
116
118
 
119
+ const actionKey = `${callId}-${review ? 'review' : 'open'}`
120
+
117
121
  const content = (
118
122
  <>
119
123
  <span className={css.icon} aria-hidden="true"><IconQuestionOutlineRegular /></span>
120
- <span className={css.title}>{t('history.title')}</span>
121
124
  <span className={css.summary} title={summary}>{summary}</span>
122
125
  {action !== undefined && <span className={css.open}>{review ? t('history.review') : t('history.reopen')}<IconChevronRightOutlineRegular size={14} /></span>}
123
126
  </>
124
127
  )
125
- return action === undefined
126
- ? <div className={css.row} data-question-history={callId}>{content}</div>
127
- : <button type="button" className={css.row} data-question-history={callId} data-history-action={review ? 'review' : 'open'} onClick={action} aria-label={review ? t('history.review') : t('history.reopen')}>{content}</button>
128
+ return (
129
+ <div className={css.frame} role="group" aria-label={t('history.title')}>
130
+ {action === undefined
131
+ ? <div className={css.row} data-question-history={callId}>{content}</div>
132
+ : <button
133
+ type="button" className={css.row} data-question-history={callId} data-history-action={review ? 'review' : 'open'}
134
+ onClick={() => { setFailedAction(action() ? null : actionKey) }}
135
+ aria-label={`${review ? t('history.review') : t('history.reopen')} · ${summary}`}
136
+ >{content}</button>}
137
+ {failedAction === actionKey && <span className={css.error} role="alert">{t('history.unavailable')}</span>}
138
+ </div>
139
+ )
128
140
  }
@@ -1,9 +1,22 @@
1
1
  .frame {
2
- --ask-accent: #3388BB;
2
+ --cfg-line: var(--dsw-alias-border-l2);
3
+ --cfg-line-strong: var(--dsw-alias-border-l3);
4
+ --cfg-surface: var(--dsw-alias-bg-layer-2);
5
+ --cfg-sunken: color-mix(in srgb, var(--dsw-alias-label-primary) 4%, var(--dsw-alias-bg-layer-1));
6
+ --cfg-ink: var(--dsw-alias-label-primary);
7
+ --cfg-muted: var(--dsw-alias-label-secondary);
8
+ --cfg-accent: #3388bb;
9
+ --cfg-accent-text: #14587f;
10
+ --cfg-hover: var(--dsw-alias-interactive-bg-hover);
11
+ --cfg-danger: var(--dsw-alias-state-error-primary);
12
+ --cfg-solid: #20709e;
13
+ --cfg-solid-hover: #1c638d;
14
+ --cfg-on-solid: #fff;
3
15
  display: flex;
4
16
  justify-content: center;
5
- padding: 8px calc(var(--dsh-composer-side-clearance) + 16px) calc(12px + env(safe-area-inset-bottom));
17
+ padding: 6px calc(var(--dsh-composer-side-clearance) + 16px) calc(10px + env(safe-area-inset-bottom));
6
18
  }
19
+
7
20
  .card {
8
21
  display: flex;
9
22
  flex-direction: column;
@@ -13,46 +26,249 @@
13
26
  max-height: min(75vh, 640px);
14
27
  max-height: min(75dvh, 640px);
15
28
  overflow: hidden;
16
- border: 0.5px solid var(--dsw-alias-border-l3);
29
+ border: 1px solid var(--cfg-line);
30
+ border-top-color: var(--cfg-accent);
17
31
  border-radius: 12px;
18
- background: var(--dsw-alias-bg-layer-3);
19
- color: var(--dsw-alias-label-primary);
20
- font-size: 13px;
21
- line-height: 20px;
32
+ background: var(--cfg-surface);
33
+ color: var(--cfg-ink);
22
34
  --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);
23
35
  --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);
24
36
  }
25
- .card, .card * { box-sizing: border-box; }
26
- .strip { display: flex; align-items: center; flex-shrink: 0; flex-wrap: wrap; gap: 12px; min-width: 0; padding: 12px 16px; }
27
- .panelLabel { color: var(--dsw-alias-label-secondary); font-size: 12px; font-weight: 500; line-height: 20px; }
28
- .previewActions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; margin-left: auto; }
29
- .summary { position: relative; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 4px 16px 24px; }
37
+
38
+ .card,
39
+ .card * {
40
+ box-sizing: border-box;
41
+ }
42
+
43
+ .strip {
44
+ display: flex;
45
+ align-items: center;
46
+ flex-shrink: 0;
47
+ flex-wrap: wrap;
48
+ gap: 8px;
49
+ min-width: 0;
50
+ padding: 8px 12px 8px 16px;
51
+ border-bottom: 1px solid var(--cfg-line);
52
+ }
53
+
54
+ .panelLabel {
55
+ display: inline-flex;
56
+ align-items: center;
57
+ height: 20px;
58
+ padding: 0 7px;
59
+ border: 1px solid var(--cfg-line);
60
+ border-radius: 999px;
61
+ background: var(--cfg-sunken);
62
+ color: var(--cfg-muted);
63
+ font-size: 11px;
64
+ line-height: 18px;
65
+ font-weight: 500;
66
+ white-space: nowrap;
67
+ }
68
+
69
+ .previewActions {
70
+ display: flex;
71
+ align-items: center;
72
+ flex-wrap: wrap;
73
+ gap: 4px;
74
+ min-width: 0;
75
+ margin-left: auto;
76
+ }
77
+
78
+ .summary {
79
+ min-width: 0;
80
+ min-height: 0;
81
+ overflow-y: auto;
82
+ overscroll-behavior: contain;
83
+ scrollbar-gutter: stable;
84
+ padding: 12px 16px;
85
+ }
86
+
30
87
  .documentHeading { display: flex; align-items: flex-start; gap: 8px; }
31
88
  .documentIcon { flex: none; width: 18px; height: 20px; color: var(--dsw-alias-label-tertiary); }
32
- .title, .description { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
33
- .title { margin: 0; font-size: 14px; font-weight: 500; line-height: 20px; }
34
- .description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 8px 0 0; color: var(--dsw-alias-label-secondary); font-size: 13px; line-height: 20px; }
35
- .footer { display: flex; align-items: center; justify-content: flex-end; flex-shrink: 0; flex-wrap: wrap; gap: 12px; padding: 8px 16px; border-top: 0.5px solid var(--dsw-alias-border-l2); }
36
- .feedback { flex: 1; min-width: 0; color: var(--dsw-alias-state-error-primary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
37
- .feedback:empty { display: none; }
38
- .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
39
- .actions > button, .previewActions button { height: 32px; min-height: 32px; padding: 0 12px; border-radius: 6px; font-size: 13px; line-height: 20px; }
40
- .decline { padding: 0 12px; border: 0; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
41
- .decline:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); }
42
- .decline:active:not(:disabled) { background: color-mix(in srgb, var(--ask-accent) 10%, transparent); }
43
- .discuss { gap: 8px; }
44
- .primaryButton { --dsw-alias-button-primary-fill: color-mix(in srgb, var(--ask-accent) 85%, black); --dsw-alias-button-primary-fill-hover: color-mix(in srgb, var(--ask-accent) 72%, black); --dsw-alias-label-primary-foreground: #fff; border-color: color-mix(in srgb, var(--ask-accent) 25%, var(--dsw-alias-border-l2)); background: var(--dsw-alias-button-primary-fill); color: var(--dsw-alias-label-primary-foreground); }
45
- .primaryButton:hover:not(:disabled) { background: var(--dsw-alias-button-primary-fill-hover); }
46
- .primaryButton:active:not(:disabled) { background: var(--dsw-alias-button-primary-fill-hover); }
47
- .card button:focus-visible { outline: 2px solid var(--ask-accent); outline-offset: -2px; }
48
- .card button:disabled { opacity: .4; cursor: default; }
49
- .srOnly { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; border: 0; clip-path: inset(50%); white-space: nowrap; }
89
+
90
+ .title,
91
+ .description {
92
+ min-width: 0;
93
+ overflow-wrap: anywhere;
94
+ word-break: break-word;
95
+ }
96
+
97
+ .title {
98
+ margin: 0;
99
+ font-size: 14px;
100
+ font-weight: 500;
101
+ line-height: 20px;
102
+ }
103
+
104
+ .description {
105
+ display: -webkit-box;
106
+ -webkit-box-orient: vertical;
107
+ -webkit-line-clamp: 2;
108
+ overflow: hidden;
109
+ margin: 4px 0 0;
110
+ color: var(--cfg-muted);
111
+ font-size: 12px;
112
+ line-height: 18px;
113
+ }
114
+
115
+ .footer {
116
+ display: flex;
117
+ align-items: center;
118
+ justify-content: flex-end;
119
+ flex-shrink: 0;
120
+ flex-wrap: wrap;
121
+ gap: 8px 12px;
122
+ padding: 8px 12px;
123
+ border-top: 1px solid var(--cfg-line);
124
+ }
125
+
126
+ .feedback {
127
+ flex: 1;
128
+ min-width: 0;
129
+ display: flex;
130
+ align-items: center;
131
+ gap: 6px;
132
+ color: var(--cfg-muted);
133
+ font-size: 12px;
134
+ line-height: 18px;
135
+ overflow-wrap: anywhere;
136
+ }
137
+
138
+ .feedback[data-error] { color: var(--cfg-danger); }
139
+
140
+ .discuss, .primary, .decline {
141
+ appearance: none;
142
+ display: inline-flex;
143
+ align-items: center;
144
+ justify-content: center;
145
+ height: 32px;
146
+ padding: 0 12px;
147
+ border: 1px solid var(--cfg-line);
148
+ border-radius: 8px;
149
+ background: var(--cfg-surface);
150
+ color: var(--cfg-ink);
151
+ box-shadow: none;
152
+ font: inherit;
153
+ font-size: 13px;
154
+ font-weight: 500;
155
+ cursor: pointer;
156
+ transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
157
+ }
158
+ .discuss:hover:not(:disabled) { background: var(--cfg-hover); }
159
+ .primary { border-color: transparent; background: var(--cfg-solid); color: var(--cfg-on-solid); }
160
+ .primary:hover:not(:disabled) { background: var(--cfg-solid-hover); }
161
+ .spinner { flex: none; width: 12px; height: 12px; border: 1px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 800ms linear infinite; }
162
+ @keyframes spin { to { transform: rotate(360deg); } }
163
+
164
+ .feedback:empty {
165
+ display: none;
166
+ }
167
+
168
+ .actions {
169
+ display: flex;
170
+ align-items: center;
171
+ flex-wrap: wrap;
172
+ gap: 8px;
173
+ }
174
+
175
+ .decline {
176
+ min-height: 32px;
177
+ padding: 0 12px;
178
+ border: 0;
179
+ border-radius: 8px;
180
+ background: transparent;
181
+ color: var(--cfg-muted);
182
+ font: inherit;
183
+ font-size: 13px;
184
+ line-height: 20px;
185
+ cursor: pointer;
186
+ }
187
+
188
+ .decline:hover:not(:disabled),
189
+ .decline:active:not(:disabled) {
190
+ background: var(--cfg-hover);
191
+ color: var(--cfg-ink);
192
+ }
193
+
194
+ .discuss {
195
+ gap: 6px;
196
+ }
197
+
198
+ .card button:focus-visible {
199
+ outline: 2px solid var(--cfg-accent);
200
+ outline-offset: -2px;
201
+ }
202
+
203
+ .card button:disabled {
204
+ opacity: 0.4;
205
+ cursor: default;
206
+ }
207
+
208
+ .srOnly {
209
+ position: absolute;
210
+ width: 1px;
211
+ height: 1px;
212
+ overflow: hidden;
213
+ padding: 0;
214
+ border: 0;
215
+ clip-path: inset(50%);
216
+ white-space: nowrap;
217
+ }
218
+
50
219
  @media (max-width: 720px) {
51
- .card { max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); }
52
- .strip { padding: 12px 16px; }
53
- .summary { padding: 8px 16px 24px; }
54
- .card button { min-height: 44px; }
55
- .footer { padding: 12px 16px; }
56
- .feedback { flex: 1 1 100%; }
57
- }
58
- @media (max-width: 420px) { .actions { width: 100%; } .actions > button { flex: 1; } }
220
+ .card {
221
+ max-height: calc(100vh - 160px);
222
+ max-height: calc(100dvh - 160px);
223
+ }
224
+
225
+ .strip {
226
+ padding: 8px 12px;
227
+ }
228
+
229
+ .summary {
230
+ padding: 12px;
231
+ }
232
+
233
+ .footer {
234
+ padding: 8px;
235
+ }
236
+
237
+ .feedback {
238
+ flex: 1 1 100%;
239
+ }
240
+ }
241
+
242
+ @media (max-width: 420px) {
243
+ .actions {
244
+ display: grid;
245
+ grid-template-columns: 1fr 1fr;
246
+ width: 100%;
247
+ gap: 8px;
248
+ }
249
+
250
+ .decline {
251
+ grid-column: 1 / -1;
252
+ justify-content: flex-start;
253
+ }
254
+
255
+ .actions > button {
256
+ flex: none;
257
+ width: 100%;
258
+ }
259
+
260
+ .discuss, .primary, .decline {
261
+ white-space: nowrap;
262
+ }
263
+ }
264
+
265
+ @media (pointer: coarse) { .card button { min-height: 44px; } }
266
+ @media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
267
+
268
+ [data-ds-dark-theme] .frame {
269
+ --cfg-accent: #4eb0e8;
270
+ --cfg-accent-text: #6fc0ee;
271
+ --cfg-solid: #4eb0e8;
272
+ --cfg-solid-hover: #6fc0ee;
273
+ --cfg-on-solid: #0e1014;
274
+ }
@@ -99,11 +99,17 @@ export function PlanReviewPanel({ pending, review, t, renderSlot, useQuestionCar
99
99
  </div>
100
100
  <QuestionWaitBar card={card} t={t} busy={busy} onTakeTime={() => { pending.takeTime() }} />
101
101
  <div className={css.summary} data-plan-document>
102
- <div className={css.documentHeading}><svg className={css.documentIcon} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" aria-hidden="true"><path d="M14 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8zM14 3v5h5M9 12h6M9 16h6" /></svg><h3 className={css.title}>{summary.title}</h3></div>
102
+ <div className={css.documentHeading}>
103
+ <svg className={css.documentIcon} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" aria-hidden="true"><path d="M14 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8zM14 3v5h5M9 12h6M9 16h6" /></svg>
104
+ <h3 className={css.title}>{summary.title}</h3>
105
+ </div>
103
106
  {summary.description !== '' && <p className={css.description}>{summary.description}</p>}
104
107
  </div>
105
108
  <div className={css.footer} data-plan-decision>
106
- <div className={css.feedback} role="status" aria-atomic="true">{error}</div>
109
+ <div className={css.feedback} role={error === null ? 'status' : 'alert'} aria-atomic="true" data-error={error !== null || undefined}>
110
+ {busy && <span className={css.spinner} aria-hidden="true" />}
111
+ {error ?? (busy ? t('submitting') : null)}
112
+ </div>
107
113
  <div className={css.actions}>
108
114
  {decline !== undefined && (
109
115
  <button
@@ -121,7 +127,7 @@ export function PlanReviewPanel({ pending, review, t, renderSlot, useQuestionCar
121
127
  {t('plan.discuss')}
122
128
  </Button>
123
129
  <Button
124
- variant="primary" className={css.primaryButton} {...tooltip(review.approve.description)}
130
+ variant="primary" className={css.primary} {...tooltip(review.approve.description)}
125
131
  aria-describedby={review.approve.description === undefined ? undefined : `plan-approve-${pending.key}`}
126
132
  disabled={busy || !canDecide} onClick={() => { decide(review.approve.label) }}
127
133
  >