@linxin666/dsh-client-ui-task-board 0.4.8 → 0.4.9

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 (64) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +28 -22
  3. package/README.zh.md +28 -22
  4. package/lib/client.js +1435 -682
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +356 -366
  7. package/lib/types/client/PluginSettingsCard.d.ts +21 -0
  8. package/lib/types/client/TaskBoardSettingsCard.d.ts +7 -0
  9. package/lib/types/client/board/ExecutionLog.d.ts +16 -0
  10. package/lib/types/client/board/TaskForm.d.ts +4 -0
  11. package/lib/types/client/board/VerificationReport.d.ts +2 -15
  12. package/lib/types/client/body-mutations.d.ts +45 -0
  13. package/lib/types/client/locales.d.ts +42 -6
  14. package/lib/types/client/suppress-schedule-row.d.ts +86 -0
  15. package/lib/types/core/controller.d.ts +1 -1
  16. package/lib/types/core/subtask.d.ts +59 -49
  17. package/lib/types/core/tasks.d.ts +5 -8
  18. package/lib/types/core/use-cases/task-update.d.ts +1 -1
  19. package/lib/types/core/workspace-target.d.ts +23 -3
  20. package/lib/types/host/launch-admission.d.ts +8 -9
  21. package/lib/types/host-ledger.d.ts +72 -48
  22. package/lib/types/host-routes.d.ts +49 -0
  23. package/lib/types/host-runner.d.ts +20 -10
  24. package/lib/types/host-service.d.ts +7 -50
  25. package/lib/types/index.d.ts +61 -63
  26. package/lib/types/loopback.d.ts +21 -0
  27. package/lib/types/protocol.d.ts +0 -5
  28. package/lib/types/tool-surface.d.ts +1 -0
  29. package/package.json +25 -25
  30. package/src/client/CardDefaultPresetField.tsx +1 -1
  31. package/src/client/PluginSettingsCard.tsx +78 -18
  32. package/src/client/TaskBoardSettingsCard.tsx +68 -25
  33. package/src/client/board/ExecutionLog.tsx +140 -0
  34. package/src/client/board/LinkSubtaskModal.tsx +1 -9
  35. package/src/client/board/NewTaskModal.tsx +2 -11
  36. package/src/client/board/TaskCard.tsx +45 -23
  37. package/src/client/board/TaskDetail.tsx +407 -261
  38. package/src/client/board/TaskForm.tsx +19 -4
  39. package/src/client/board/VerificationReport.tsx +143 -104
  40. package/src/client/board/task-markdown.module.css +11 -8
  41. package/src/client/board-settings.module.css +35 -7
  42. package/src/client/board.module.css +855 -115
  43. package/src/client/body-mutations.ts +133 -0
  44. package/src/client/index.ts +10 -0
  45. package/src/client/locales.ts +97 -24
  46. package/src/client/settings-card.module.css +71 -10
  47. package/src/client/suppress-schedule-row.ts +198 -0
  48. package/src/core/controller.ts +1 -3
  49. package/src/core/subtask.ts +81 -76
  50. package/src/core/tasks.ts +5 -9
  51. package/src/core/use-cases/task-update.ts +1 -3
  52. package/src/core/workspace-target.ts +27 -3
  53. package/src/host/agent-tools.ts +14 -15
  54. package/src/host/launch-admission.ts +8 -9
  55. package/src/host-ledger.ts +158 -125
  56. package/src/host-routes.ts +65 -2
  57. package/src/host-runner.ts +53 -28
  58. package/src/host-service.ts +42 -127
  59. package/src/index.ts +84 -106
  60. package/src/loopback.ts +32 -0
  61. package/src/protocol.ts +2 -9
  62. package/src/tool-surface.ts +1 -0
  63. package/lib/types/client/board/team-run-promotion.d.ts +0 -26
  64. package/src/client/board/team-run-promotion.ts +0 -39
@@ -153,6 +153,11 @@ export interface TaskBoardSettings {
153
153
  announceToAgent?: boolean
154
154
  /** Prevent host idle sleep while sessions run or schedules are armed. */
155
155
  preventIdleSleep?: boolean
156
+ /**
157
+ * Whether the operator's own reverse proxy or tunnel may speak for the
158
+ * browser (default off). Volatile, so the board's fence reads it per request.
159
+ */
160
+ trustForwardedProxy?: boolean
156
161
  /** Subtask depth limit (1..3); 1 means a single level of subtasks. */
157
162
  maxSubtaskDepth?: number
158
163
  /** Roster-poll cadence in seconds while the board has work to reconcile. */
@@ -204,6 +209,8 @@ export interface TaskBoardSettingsCardState extends CardShell {
204
209
  announceToAgent: CardFieldState
205
210
  /** Idle-system-sleep protection flag. */
206
211
  preventIdleSleep: CardFieldState
212
+ /** Forwarded-request trust flag. */
213
+ trustForwardedProxy: CardFieldState
207
214
  /** Subtask depth limit field. */
208
215
  maxSubtaskDepth: CardFieldState
209
216
  /** Roster-poll cadence field. */
@@ -259,6 +266,7 @@ export class TaskBoardSettingsCardController {
259
266
  booleanField('enabled'),
260
267
  booleanField('announceToAgent'),
261
268
  booleanField('preventIdleSleep'),
269
+ booleanField('trustForwardedProxy'),
262
270
  subtaskDepthField(),
263
271
  sessionPollField(),
264
272
  runLaunchWidthField(),
@@ -284,6 +292,7 @@ export class TaskBoardSettingsCardController {
284
292
  enabled: this.form.field('enabled'),
285
293
  announceToAgent: this.form.field('announceToAgent'),
286
294
  preventIdleSleep: this.form.field('preventIdleSleep'),
295
+ trustForwardedProxy: this.form.field('trustForwardedProxy'),
287
296
  maxSubtaskDepth: this.form.field('maxSubtaskDepth'),
288
297
  sessionPollSeconds: this.form.field('sessionPollSeconds'),
289
298
  runLaunchWidth: this.form.field('runLaunchWidth'),
@@ -479,6 +488,7 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
479
488
  <ul className={settingsCss.nestedCards}>
480
489
  <PluginSettingsCard
481
490
  t={t}
491
+ density="nested"
482
492
  titleKey="settings.enabled"
483
493
  descriptionKey="settings.enabledCardHint"
484
494
  defaultOpen={false}
@@ -490,7 +500,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
490
500
  <BooleanField
491
501
  id="settings-task-board-enabled"
492
502
  label={t('settings.enabled')}
493
- hint={t('settings.enabledHint')}
503
+ hint={t('settings.enabledHintBrief')}
504
+ hintTitle={t('settings.enabledHint')}
494
505
  inheritLabel={t('settings.inherit')}
495
506
  onLabel={t('settings.on')}
496
507
  offLabel={t('settings.off')}
@@ -502,7 +513,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
502
513
  <BooleanField
503
514
  id="settings-task-board-announce"
504
515
  label={t('settings.announceToAgent')}
505
- hint={t('settings.announceToAgentHint')}
516
+ hint={t('settings.announceToAgentHintBrief')}
517
+ hintTitle={t('settings.announceToAgentHint')}
506
518
  inheritLabel={t('settings.inherit')}
507
519
  onLabel={t('settings.on')}
508
520
  offLabel={t('settings.off')}
@@ -514,7 +526,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
514
526
  <BooleanField
515
527
  id="settings-task-board-prevent-idle-sleep"
516
528
  label={t('settings.preventIdleSleep')}
517
- hint={t('settings.preventIdleSleepHint')}
529
+ hint={t('settings.preventIdleSleepHintBrief')}
530
+ hintTitle={t('settings.preventIdleSleepHint')}
518
531
  inheritLabel={t('settings.inherit')}
519
532
  onLabel={t('settings.on')}
520
533
  offLabel={t('settings.off')}
@@ -523,10 +536,24 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
523
536
  onEdit={(text) => { props.edit('preventIdleSleep', text) }}
524
537
  onReset={() => { props.resetField('preventIdleSleep') }}
525
538
  />
539
+ <BooleanField
540
+ id="settings-task-board-trust-forwarded-proxy"
541
+ label={t('settings.trustForwardedProxy')}
542
+ hint={t('settings.trustForwardedProxyHintBrief')}
543
+ hintTitle={t('settings.trustForwardedProxyHint')}
544
+ inheritLabel={t('settings.inherit')}
545
+ onLabel={t('settings.on')}
546
+ offLabel={t('settings.off')}
547
+ {...fieldProps}
548
+ {...state.trustForwardedProxy}
549
+ onEdit={(text) => { props.edit('trustForwardedProxy', text) }}
550
+ onReset={() => { props.resetField('trustForwardedProxy') }}
551
+ />
526
552
  <ValueField
527
553
  id="settings-task-board-session-poll"
528
554
  label={t('settings.sessionPollSeconds')}
529
- hint={t('settings.sessionPollSecondsHint')}
555
+ hint={t('settings.sessionPollSecondsHintBrief')}
556
+ hintTitle={t('settings.sessionPollSecondsHint')}
530
557
  numeric
531
558
  {...fieldProps}
532
559
  {...state.sessionPollSeconds}
@@ -536,7 +563,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
536
563
  <ChoiceField
537
564
  id="settings-task-board-subtask-depth"
538
565
  label={t('settings.maxSubtaskDepth')}
539
- hint={t('settings.maxSubtaskDepthHint')}
566
+ hint={t('settings.maxSubtaskDepthHintBrief')}
567
+ hintTitle={t('settings.maxSubtaskDepthHint')}
540
568
  inheritLabel={t('settings.inherit')}
541
569
  choices={SUBTASK_DEPTH_CHOICES.map(value => ({
542
570
  value,
@@ -550,7 +578,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
550
578
  <ValueField
551
579
  id="settings-task-board-run-launch-width"
552
580
  label={t('settings.runLaunchWidth')}
553
- hint={t('settings.runLaunchWidthHint')}
581
+ hint={t('settings.runLaunchWidthHintBrief')}
582
+ hintTitle={t('settings.runLaunchWidthHint')}
554
583
  numeric
555
584
  {...fieldProps}
556
585
  {...state.runLaunchWidth}
@@ -560,7 +589,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
560
589
  <ValueField
561
590
  id="settings-task-board-spend-budget"
562
591
  label={t('settings.spendBudgetTokens')}
563
- hint={t('settings.spendBudgetTokensHint')}
592
+ hint={t('settings.spendBudgetTokensHintBrief')}
593
+ hintTitle={t('settings.spendBudgetTokensHint')}
564
594
  numeric
565
595
  {...fieldProps}
566
596
  {...state.spendBudgetTokens}
@@ -571,6 +601,7 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
571
601
 
572
602
  <PluginSettingsCard
573
603
  t={t}
604
+ density="nested"
574
605
  titleKey="settings.runBehaviorTitle"
575
606
  descriptionKey="settings.runBehaviorCardHint"
576
607
  defaultOpen={false}
@@ -582,7 +613,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
582
613
  <BooleanField
583
614
  id="settings-task-board-goal-run"
584
615
  label={t('settings.goalRunGlobal')}
585
- hint={t('settings.goalRunGlobalHint')}
616
+ hint={t('settings.goalRunGlobalHintBrief')}
617
+ hintTitle={t('settings.goalRunGlobalHint')}
586
618
  inheritLabel={t('settings.inherit')}
587
619
  onLabel={t('settings.on')}
588
620
  offLabel={t('settings.off')}
@@ -595,6 +627,7 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
595
627
 
596
628
  <PluginSettingsCard
597
629
  t={t}
630
+ density="nested"
598
631
  titleKey="settings.goalVerificationTitle"
599
632
  descriptionKey="settings.goalVerificationCardHint"
600
633
  defaultOpen={false}
@@ -606,7 +639,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
606
639
  <BooleanField
607
640
  id="settings-task-board-goal-verification"
608
641
  label={t('settings.goalVerification')}
609
- hint={t('settings.goalVerificationHint')}
642
+ hint={t('settings.goalVerificationHintBrief')}
643
+ hintTitle={t('settings.goalVerificationHint')}
610
644
  inheritLabel={t('settings.inherit')}
611
645
  onLabel={t('settings.on')}
612
646
  offLabel={t('settings.off')}
@@ -618,7 +652,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
618
652
  <ChoiceField
619
653
  id="settings-task-board-goal-verification-model"
620
654
  label={t('settings.goalVerificationModel')}
621
- hint={t('settings.goalVerificationModelHint')}
655
+ hint={t('settings.goalVerificationModelHintBrief')}
656
+ hintTitle={t('settings.goalVerificationModelHint')}
622
657
  inheritLabel={t('settings.inherit')}
623
658
  choices={modelChoices}
624
659
  {...fieldProps}
@@ -629,7 +664,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
629
664
  <ChoiceField
630
665
  id="settings-task-board-goal-verification-effort"
631
666
  label={t('settings.goalVerificationEffort')}
632
- hint={t('settings.goalVerificationEffortHint')}
667
+ hint={t('settings.goalVerificationEffortHintBrief')}
668
+ hintTitle={t('settings.goalVerificationEffortHint')}
633
669
  inheritLabel={t('settings.inherit')}
634
670
  choices={effortChoices}
635
671
  {...fieldProps}
@@ -680,8 +716,10 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
680
716
  exactly as it did before this topic existed. */}
681
717
  <PluginSettingsCard
682
718
  t={t}
719
+ density="nested"
683
720
  titleKey="settings.cardDefaultsTitle"
684
- descriptionKey="settings.cardDefaultsCardHint"
721
+ descriptionKey="settings.cardDefaultsCardBrief"
722
+ descriptionTitleKey="settings.cardDefaultsCardHint"
685
723
  defaultOpen={false}
686
724
  hideFooter
687
725
  state={nestedShell}
@@ -691,7 +729,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
691
729
  <CardDefaultPresetField
692
730
  id="settings-task-board-card-default-mode"
693
731
  label={t('new.agentPreset')}
694
- hint={t('settings.cardDefaultModeHint')}
732
+ hint={t('settings.cardDefaultModeHintBrief')}
733
+ hintTitle={t('settings.cardDefaultModeHint')}
695
734
  presets={state.presets}
696
735
  {...fieldProps}
697
736
  {...state.cardDefaultMode}
@@ -701,7 +740,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
701
740
  <ChoiceField
702
741
  id="settings-task-board-card-default-permission"
703
742
  label={t('new.permission')}
704
- hint={t('settings.cardDefaultPermissionHint')}
743
+ hint={t('settings.cardDefaultPermissionHintBrief')}
744
+ hintTitle={t('settings.cardDefaultPermissionHint')}
705
745
  inheritLabel={t('exec.permission.default')}
706
746
  choices={TASK_PERMISSIONS.map(id => ({ value: id, label: t(`exec.permission.${id}` as TaskBoardKey) }))}
707
747
  {...fieldProps}
@@ -712,7 +752,8 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
712
752
  <ChoiceField
713
753
  id="settings-task-board-card-default-model"
714
754
  label={t('new.model')}
715
- hint={t('settings.cardDefaultModelHint')}
755
+ hint={t('settings.cardDefaultModelHintBrief')}
756
+ hintTitle={t('settings.cardDefaultModelHint')}
716
757
  inheritLabel={t('exec.model.default')}
717
758
  choices={modelChoiceRows(defaultModels)}
718
759
  {...fieldProps}
@@ -753,17 +794,19 @@ export function TaskBoardSettingsCard(props: TaskBoardSettingsCardProps) {
753
794
  seat draws nothing. */}
754
795
  {renderSlot('task-board.settings.section', { dispatch })}
755
796
  </ul>
756
- {/* Live power facts and the battery caveat: small print under the topic
757
- cards, separated from them, instead of two body-size paragraphs. */}
797
+ {/* Live power facts as label/value rows, then the battery caveat: quiet
798
+ small print that closes the card instead of a run-on sentence. */}
758
799
  <div className={settingsCss.power}>
759
- <p className={settingsCss.powerLine}>
760
- {t('settings.powerStatus', {
761
- platform: power?.platform ?? t('settings.powerUnknown'),
762
- phase: power?.phase ?? t('settings.powerUnknown'),
763
- running: String(power?.runningSessions ?? 0),
764
- schedules: String(power?.armedSchedules ?? 0),
765
- })}
766
- </p>
800
+ <dl className={settingsCss.powerFacts}>
801
+ <dt className={settingsCss.powerTerm}>{t('settings.powerPlatform')}</dt>
802
+ <dd className={settingsCss.powerValue}>{power?.platform ?? t('settings.powerUnknown')}</dd>
803
+ <dt className={settingsCss.powerTerm}>{t('settings.powerPhase')}</dt>
804
+ <dd className={settingsCss.powerValue}>{power?.phase ?? t('settings.powerUnknown')}</dd>
805
+ <dt className={settingsCss.powerTerm}>{t('settings.powerRunning')}</dt>
806
+ <dd className={settingsCss.powerValue}>{String(power?.runningSessions ?? 0)}</dd>
807
+ <dt className={settingsCss.powerTerm}>{t('settings.powerSchedules')}</dt>
808
+ <dd className={settingsCss.powerValue}>{String(power?.armedSchedules ?? 0)}</dd>
809
+ </dl>
767
810
  <p className={settingsCss.powerLine}>{t('settings.powerBoundary')}</p>
768
811
  {power?.lastError !== undefined && (
769
812
  <p className={settingsCss.powerError}>{t('settings.powerError', { error: power.lastError })}</p>
@@ -0,0 +1,140 @@
1
+ /**
2
+ * The execution history of one card.
3
+ *
4
+ * A card accumulates dozens of runs, and each run carried the full acceptance
5
+ * report inline: the same machine explanation repeated once per row buried the
6
+ * one row a reader needed. The history therefore renders newest first, keeps
7
+ * the five latest rows visible and puts the rest behind one disclosure that
8
+ * opens and closes as one motion pair (the presence hook keeps the extra rows
9
+ * mounted through the exit leg instead of pulling them out on the click's
10
+ * tick). Each row is two lines: identity on top (status, start/end in one
11
+ * format, the session jump) and the evidence the run produced underneath.
12
+ *
13
+ * Deliberately adds no new `data-dsh-part` value: the part enum belongs to the
14
+ * cross-repository semantic-attribute contract.
15
+ */
16
+ import { useId, useState } from 'react'
17
+ import type { ExecutionRecord } from '../../core/tasks.ts'
18
+ import { isMissingWorkspaceReason } from '../../core/workspace-target.ts'
19
+ import { t, type TaskBoardKey } from '../locales.ts'
20
+ import css from '../board.module.css'
21
+ import { IconSession } from './icons.tsx'
22
+ import { usePresence } from './overlay.tsx'
23
+ import { formatTime } from './TaskCard.tsx'
24
+ import { VerificationReport } from './VerificationReport.tsx'
25
+
26
+ /** Rows shown before the history asks to be expanded. */
27
+ export const VISIBLE_EXECUTIONS = 5
28
+
29
+ /** Execution outcome → locale key, shared with the history's folded summary. */
30
+ export const EXECUTION_RESULT_KEY: Record<NonNullable<ExecutionRecord['result']>, TaskBoardKey> = {
31
+ succeeded: 'detail.result.succeeded',
32
+ failed: 'detail.result.failed',
33
+ cancelled: 'detail.result.cancelled',
34
+ }
35
+
36
+ /** One execution-history row: identity on the head line, evidence below it. */
37
+ function ExecutionRow({ execution, timeZone, onOpen }: {
38
+ execution: ExecutionRecord
39
+ timeZone?: string
40
+ onOpen: (sessionId: string) => void
41
+ }) {
42
+ const result = execution.result
43
+ // An external record is one the Host never observed running: no session, no
44
+ // spinner, and a named outside agent instead of the initiating session. The
45
+ // data attribute keeps the distinction machine-readable too.
46
+ const external = execution.external === true
47
+ return (
48
+ <li
49
+ className={css.executionRow}
50
+ data-result={result}
51
+ data-execution-id={execution.id}
52
+ data-external={external ? 'true' : undefined}
53
+ >
54
+ <div className={css.executionRowHead}>
55
+ <span className={css.executionBadge} data-result={result}>
56
+ {result === undefined ? t('detail.result.running') : t(EXECUTION_RESULT_KEY[result])}
57
+ </span>
58
+ <span className={css.executionTimes}>
59
+ {t('detail.executionStarted')} {formatTime(execution.startedAt, timeZone)}
60
+ {execution.endedAt !== undefined && ` · ${t('detail.executionEnded')} ${formatTime(execution.endedAt, timeZone)}`}
61
+ </span>
62
+ {execution.sessionId !== undefined && (
63
+ <button
64
+ type="button"
65
+ className={css.executionSession}
66
+ onClick={() => { onOpen(execution.sessionId as string) }}
67
+ title={execution.sessionId}
68
+ >
69
+ {t('detail.viewSession')}
70
+ <IconSession size={13} />
71
+ </button>
72
+ )}
73
+ </div>
74
+ <div className={css.executionRowEvidence}>
75
+ {external && execution.initiatedBy !== undefined && (
76
+ <span className={css.executionTimes} title={execution.initiatedBy}>
77
+ {t('detail.execution.external', { agent: execution.initiatedBy })}
78
+ </span>
79
+ )}
80
+ {!external && execution.initiatedBy !== undefined && (
81
+ <span className={css.executionTimes} title={execution.initiatedBy}>
82
+ {t('detail.execution.initiator', { session: execution.initiatedBy })}
83
+ </span>
84
+ )}
85
+ {execution.verification !== undefined && <VerificationReport verification={execution.verification} />}
86
+ {execution.error !== undefined && execution.error !== '' && (
87
+ <span className={css.executionError}>
88
+ {isMissingWorkspaceReason(execution.error) ? t('exec.error.noWorkspace') : execution.error}
89
+ </span>
90
+ )}
91
+ </div>
92
+ </li>
93
+ )
94
+ }
95
+
96
+ /**
97
+ * Render one card's execution history.
98
+ * @param props - the card's executions, its time zone and the session jump.
99
+ * @returns the newest rows, the disclosure for the rest, and nothing else.
100
+ */
101
+ export function ExecutionLog({ executions, timeZone, onOpenSession }: {
102
+ executions: readonly ExecutionRecord[]
103
+ timeZone?: string
104
+ onOpenSession: (sessionId: string) => void
105
+ }) {
106
+ const [expanded, setExpanded] = useState(false)
107
+ const presence = usePresence(expanded)
108
+ const logId = useId()
109
+ // Newest first: the row a reader wants is the run that just settled.
110
+ const recent = [...executions].reverse()
111
+ const visible = recent.slice(0, VISIBLE_EXECUTIONS)
112
+ const older = recent.slice(VISIBLE_EXECUTIONS)
113
+ const row = (execution: ExecutionRecord) => (
114
+ <ExecutionRow key={execution.id} execution={execution} timeZone={timeZone} onOpen={onOpenSession} />
115
+ )
116
+ return (
117
+ <div className={css.executionLog} id={logId}>
118
+ <ul className={css.executionList}>{visible.map(row)}</ul>
119
+ {older.length > 0 && presence.mounted && (
120
+ <div className={css.executionExtra} data-execution-fold={presence.phase}>
121
+ <ul className={css.executionList}>{older.map(row)}</ul>
122
+ </div>
123
+ )}
124
+ {older.length > 0 && (
125
+ <button
126
+ type="button"
127
+ className={`${css.linkButton} ${css.executionDisclosure}`}
128
+ aria-expanded={expanded}
129
+ aria-controls={logId}
130
+ onClick={() => { setExpanded(!expanded) }}
131
+ >
132
+ {expanded
133
+ ? t('detail.collapse')
134
+ : t('detail.execution.showAll', { count: String(recent.length) })}
135
+ <span className={css.disclosureChevron} data-open={expanded} aria-hidden="true" />
136
+ </button>
137
+ )}
138
+ </div>
139
+ )
140
+ }
@@ -12,7 +12,6 @@ import { t } from '../locales.ts'
12
12
  import css from '../board.module.css'
13
13
  import { useDialog, type OverlayPhase } from './overlay.tsx'
14
14
  import { STATUS_KEY } from './status-key.ts'
15
- import { parentAwaitsTeamRunPromotion, promoteParentForTeamRun } from './team-run-promotion.ts'
16
15
 
17
16
  /** Link-subtask overlay props. */
18
17
  export interface LinkSubtaskModalProps {
@@ -57,10 +56,6 @@ export function LinkSubtaskModal({ controller, parent, onClose, phase = 'open' }
57
56
  setPending(true)
58
57
  setError(undefined)
59
58
  if (await controller.setParent(taskId, parent.id)) {
60
- // The link is confirmed, so a parent that just gained a subtask is opted
61
- // in where Agent Teams are served; a refused opt-in never undoes a link
62
- // the Host already committed.
63
- await promoteParentForTeamRun(controller, parent)
64
59
  onClose()
65
60
  return
66
61
  }
@@ -72,9 +67,6 @@ export function LinkSubtaskModal({ controller, parent, onClose, phase = 'open' }
72
67
  <div ref={dialog.attach} className={css.modal} role="dialog" aria-modal="true" aria-label={t('link.subtask.title')} tabIndex={-1}>
73
68
  <h2 className={css.modalTitle}>{t('link.subtask.title')}</h2>
74
69
  <p className={css.fieldHint}>{t('link.subtask.hint')}</p>
75
- {parentAwaitsTeamRunPromotion(controller, parent) && (
76
- <p className={css.fieldHint}>{t('exec.teamRunAutoHint')}</p>
77
- )}
78
70
  {candidates.length === 0
79
71
  ? <p className={css.detailText}>{t('link.subtask.empty')}</p>
80
72
  : (
@@ -85,7 +77,7 @@ export function LinkSubtaskModal({ controller, parent, onClose, phase = 'open' }
85
77
  <span className={css.statusBadge} data-status={task.status}>{t(STATUS_KEY[task.status])}</span>
86
78
  <button
87
79
  type="button"
88
- className={css.primaryButton}
80
+ className={css.ghostButton}
89
81
  disabled={pending}
90
82
  onClick={() => { void link(task.id) }}
91
83
  >
@@ -19,7 +19,6 @@ import { readParseModelPreference, writeParseModelPreference } from './parse-mod
19
19
  import { inheritPresetLabel, presetChoiceRows, presetLabel } from './preset-label.ts'
20
20
  import { ReasoningEffortField } from './ReasoningEffortField.tsx'
21
21
  import { reconcileReasoningEffort } from './model-options.ts'
22
- import { parentAwaitsTeamRunPromotion, promoteParentForTeamRun } from './team-run-promotion.ts'
23
22
  import css from '../board.module.css'
24
23
 
25
24
  export interface NewTaskModalProps {
@@ -273,11 +272,6 @@ export function NewTaskModal({ controller, onClose, initialTask, defaultWorkspac
273
272
  setError(controller.getSnapshot().transportError ?? t('new.required'))
274
273
  return
275
274
  }
276
- // The join is confirmed, so a parent that just gained a subtask is opted in
277
- // where Agent Teams are served. The write is a convenience, not part of the
278
- // creation: a refused one (the card was archived meanwhile) already
279
- // surfaced through the snapshot and never fails the created task.
280
- await promoteParentForTeamRun(controller, parentTask)
281
275
  if (isDuplicate && archiveOriginal && initialTask !== undefined) {
282
276
  if (onDuplicateSuccess !== undefined) {
283
277
  await onDuplicateSuccess(initialTask.id)
@@ -426,7 +420,7 @@ export function NewTaskModal({ controller, onClose, initialTask, defaultWorkspac
426
420
  : (
427
421
  <button
428
422
  type="button"
429
- className={css.primaryButton}
423
+ className={css.ghostButton}
430
424
  disabled={parseText.trim() === ''}
431
425
  onClick={() => { void runParse() }}
432
426
  >
@@ -444,9 +438,6 @@ export function NewTaskModal({ controller, onClose, initialTask, defaultWorkspac
444
438
  <p className={css.detailText} data-dsh-part="subtask-inherit">
445
439
  {t('detail.parent')}: {parentTask.title} · {t('new.subtaskInherit')}
446
440
  </p>
447
- {parentAwaitsTeamRunPromotion(controller, parentTask) && (
448
- <p className={css.detailText}>{t('exec.teamRunAutoHint')}</p>
449
- )}
450
441
  </>
451
442
  )}
452
443
 
@@ -460,7 +451,7 @@ export function NewTaskModal({ controller, onClose, initialTask, defaultWorkspac
460
451
  onPromptChange={setPrompt}
461
452
  />
462
453
  {isDuplicate && (
463
- <label className={css.checkboxLabel}>
454
+ <label className={css.scheduleToggle}>
464
455
  <input
465
456
  type="checkbox"
466
457
  checked={archiveOriginal}
@@ -168,6 +168,36 @@ function TaskCardInner({
168
168
  outcome.declared ? t('card.declaredHint') : '',
169
169
  ].filter(Boolean).join('\n')
170
170
 
171
+ // The status rail is one reserved row in every state: a label while a run is
172
+ // in flight, the settled result badge beside the run count, and the spinner
173
+ // box that is the same size whether or not it holds a spinner. Nothing here
174
+ // can add or remove a row, so a state change cannot resize the card.
175
+ const runningLabel = !archived && latest !== undefined && executionLabel(latest) === 'running'
176
+ ? (runningKey !== undefined
177
+ ? t(runningKey)
178
+ : latest.ownResult === undefined ? t('detail.result.running') : t('detail.subtasks.waiting'))
179
+ : ''
180
+ // Archived cards settle outside the board's judgement, so they keep the plain
181
+ // text result instead of a badge that would paint a tone they do not own.
182
+ const settledResult = archived ? undefined : latest?.result
183
+ const resultPrefix = settledResult === undefined && !busy && resultText !== '' ? `${resultText} · ` : ''
184
+ const runLine = latest === undefined ? undefined : (
185
+ <span
186
+ className={css.cardRun}
187
+ data-dsh-part="card-run"
188
+ data-result={settledResult}
189
+ data-declared={outcome.declared || undefined}
190
+ title={outcome.declared ? t('card.declaredHint') : undefined}
191
+ >
192
+ {settledResult !== undefined && (
193
+ <span className={css.cardResult} data-result={settledResult}>{resultText}</span>
194
+ )}
195
+ <span className={css.cardRuns}>
196
+ {resultPrefix}{runs} {t('board.runs')}
197
+ {outcome.declared ? ` · ${t('card.declared')}` : ''}
198
+ </span>
199
+ </span>
200
+ )
171
201
  const sessionMark = sessionId !== undefined && (onOpenSession !== undefined ? (
172
202
  <button
173
203
  type="button"
@@ -220,7 +250,9 @@ function TaskCardInner({
220
250
  <span className={css.cardMeta}>
221
251
  {decoration}
222
252
  {timeLabel}
223
- {!archived && (busy || pending) && <span className={css.cardSpinner} aria-hidden="true" />}
253
+ <span className={css.cardSpinnerSlot} aria-hidden="true">
254
+ {!archived && (busy || pending) && <span className={css.cardSpinner} />}
255
+ </span>
224
256
  </span>
225
257
  ) : (
226
258
  <>
@@ -281,30 +313,20 @@ function TaskCardInner({
281
313
  {t(task.schedule.mode === 'once' ? 'card.scheduledOnce' : 'card.scheduled')}
282
314
  </span>
283
315
  )}
284
- {latest !== undefined && (
285
- <span
286
- className={css.cardRun}
287
- data-dsh-part="card-run"
288
- data-result={archived || latest.result === undefined ? undefined : latest.result}
289
- data-declared={outcome.declared || undefined}
290
- title={outcome.declared ? t('card.declaredHint') : undefined}
291
- >
292
- {!busy && resultText !== '' ? `${resultText} · ` : ''}
293
- {runs} {t('board.runs')}
294
- {outcome.declared ? ` · ${t('card.declared')}` : ''}
295
- </span>
296
- )}
297
- {sessionMark}
298
- {!archived && (busy || pending) && <span className={css.cardSpinner} aria-hidden="true" />}
299
316
  </span>
300
- {!archived && pending && <span className={css.cardRunningLabel}>{t('board.pending')}…</span>}
301
- {!archived && latest !== undefined && executionLabel(latest) === 'running' && (
302
- <span className={css.cardRunningLabel}>
303
- {runningKey !== undefined
304
- ? t(runningKey)
305
- : latest.ownResult === undefined ? t('detail.result.running') : t('detail.subtasks.waiting')}…
317
+ <span className={css.cardStatus}>
318
+ <span className={css.cardStatusText}>
319
+ {!archived && pending && <span className={css.cardRunningLabel}>{t('board.pending')}…</span>}
320
+ {runningLabel !== '' && <span className={css.cardRunningLabel}>{runningLabel}…</span>}
321
+ {runLine}
306
322
  </span>
307
- )}
323
+ <span className={css.cardStatusTrail}>
324
+ <span className={css.cardSpinnerSlot} aria-hidden="true">
325
+ {!archived && (busy || pending) && <span className={css.cardSpinner} />}
326
+ </span>
327
+ {sessionMark}
328
+ </span>
329
+ </span>
308
330
  </>
309
331
  )}
310
332
  </article>