Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Desktop Tasks pane: quiet cards, grey project capsule, plain mode choice (#4468) (#3537)

0xken151e3dededb1f0
diff --git a/desktop/design/desktop-design-system.md b/desktop/design/desktop-design-system.md
index 21de0f3da..9bc2b8d5f 100644
--- a/desktop/design/desktop-design-system.md
+++ b/desktop/design/desktop-design-system.md
@@ -460,15 +460,28 @@ on it (anh Dee, 2026-11-07, task #4465). Every element below follows them.
diameter, gap 7%, drawn outside the avatar's box so no row moves. Its
accessible label says Lead. The crown is only number one's on the
leaderboard.
-- **Task status marks.** Proposal is Lucide `lightbulb`, Rejected
+- **Task status marks.** Proposal is Lucide `lightbulb`, Declined
`thumbs-down`, Failed (Stuck) `triangle-alert` in the semantic error ink.
The check, question mark and spinner stay, from the shared activity
vocabulary. No status in Flutter draws an X: an X means close. Terminal text
and native tab marks may keep `✗`.
-- **Task card and row.** The Tasks pane card (`SuperTabPersonalTaskCard`) and
- the left pane's row (`SuperTabQuietRow`, [Swarm left pane](#swarm-left-pane))
- carry the elements above at their
- shipped sizes; their size and layout do not change when an element does.
+- **Left pane row.** The left pane's row (`SuperTabQuietRow`,
+ [Swarm left pane](#swarm-left-pane)) carries the elements above at its
+ shipped size; its size and layout do not change when an element does.
+- **Tasks pane header** (`SuperTabTasksPaneHeader`). "Tasks" in 13 semibold
+ on the left. The Accept all or Ask me choice on the right is plain 12
+ secondary text; its chevron and a faint fill show only on hover, focus or
+ while its menu is open, and the chevron's room is held at rest so the text
+ never moves. The menu is the app's one dropdown, with a check on the stored
+ choice.
+- **Tasks pane card** (`SuperTabPersonalTaskCard`). A card surface with one
+ hairline (`DesktopChrome.rim`), radius 10 and no shadow; a selected card
+ differs by its fill alone. On top, the project's name in a neutral grey
+ capsule (`AppSurface.wellFill`, secondary text), never a project colour, and
+ the status mark at the right. Then the title in 13 medium, up to three
+ lines, and two 18 faces: who asked, then who is doing it. Only while the
+ task waits for the reader: Decline as plain text and Accept as the blue
+ capsule, on the right.
- **Adding or changing one.** A new or changed element updates this section
and the gallery, with its images, in the same pull request.
diff --git a/desktop/lib/super_tabs/tasks/personal_task_card.dart b/desktop/lib/super_tabs/tasks/personal_task_card.dart
index a4421b60e..b1326c0de 100644
--- a/desktop/lib/super_tabs/tasks/personal_task_card.dart
+++ b/desktop/lib/super_tabs/tasks/personal_task_card.dart
@@ -8,21 +8,10 @@ import '../../widgets/harness_activity_mark.dart';
import '../task_card.dart';
import 'personal_tasks.dart';
-/// A project's tag colour: one of the roster's hues, which carry white at 5:1 or more in both appearances, picked by
-/// its id so a project keeps its colour everywhere and needs no stored field.
-Color superTabProjectColor(String projectId) {
- const palette = grid.AppPalette.avatarPalette;
- var hash = 0;
- for (final unit in projectId.codeUnits) {
- hash = (hash * 31 + unit) & 0x7fffffff;
- }
- return palette[hash % palette.length];
-}
-
-/// One task in the Tasks pane, as a Board tile, cleaner (anh Dee, 11-07): the project's tag and the status mark on
-/// top, the title in up to three lines, then who asked and the agent as two avatars, with Approve and Reject on the
-/// right while the task waits for the reader.
-class SuperTabPersonalTaskCard extends StatefulWidget {
+/// One task in the Tasks pane, quiet (anh Dee, 11-07): a hairline card with the project's grey capsule and the
+/// status mark on top, the title in up to three lines, then who asked and the agent as two faces, with Decline and
+/// Accept on the right only while the task waits for the reader.
+class SuperTabPersonalTaskCard extends StatelessWidget {
const SuperTabPersonalTaskCard({
super.key,
required this.task,
@@ -46,62 +35,40 @@ class SuperTabPersonalTaskCard extends StatefulWidget {
final VoidCallback onOpen;
final Widget? requester, agent;
- /// The task waits for the reader: Approve and Reject show, disabled while [onApprove] and [onReject] are null.
+ /// The task waits for the reader: Accept and Decline show, disabled while [onApprove] and [onReject] are null.
final bool waiting;
final VoidCallback? onApprove, onReject;
/// The decision sent for this task and not yet confirmed, `approve` or `reject`: its button spins.
final String? pending;
- /// Why Approve and Reject are disabled, as their tooltip; null when they are not, or nothing to say.
+ /// Why Accept and Decline are disabled, as their tooltip; null when they are not, or nothing to say.
final String? disabledReason;
- @override
- State<SuperTabPersonalTaskCard> createState() => _CardState();
-}
-
-/// Approve and Reject fit beside two avatars in the pane's fixed 340.
-const _buttonPadding = EdgeInsets.symmetric(
- horizontal: grid.AppDesktop.controlGap,
- vertical: grid.AppDesktop.menuInset,
-);
-
-class _CardState extends State<SuperTabPersonalTaskCard> {
- bool _hovered = false;
-
@override
Widget build(BuildContext context) {
grid.AppTheme.watch(context);
- final w = widget;
- final radius = BorderRadius.circular(grid.AppCard.insetRadius);
- final waiting = w.waiting;
- final avatars = [?w.requester, ?w.agent];
+ final radius = BorderRadius.circular(grid.AppDesktop.rowRadius);
+ final avatars = [?requester, ?agent];
+ // One hairline and no shadow, selected or not: a selected card differs by its fill alone (#4468).
return Semantics(
- selected: w.selected ? true : null,
+ selected: selected ? true : null,
container: true,
child: Material(
type: MaterialType.transparency,
child: Ink(
decoration: BoxDecoration(
- color: w.selected
+ color: selected
? Color.alphaBlend(
grid.AppSurface.selectedFill,
grid.AppCard.base,
)
: grid.AppCard.base,
borderRadius: radius,
- border: Border.all(
- color: w.selected ? grid.AppGlass.lift : grid.AppCard.insetHair,
- ),
- boxShadow: _hovered
- ? grid.AppGlass.shadow
- : grid.AppGlass.cardShadow,
+ border: Border.all(color: DesktopChrome.rim),
),
child: InkWell(
- onTap: w.onOpen,
- onHover: (hovered) {
- if (hovered != _hovered) setState(() => _hovered = hovered);
- },
+ onTap: onOpen,
hoverColor: grid.AppSurface.hoverFill,
focusColor: grid.AppSurface.hoverFill,
borderRadius: radius,
@@ -117,19 +84,16 @@ class _CardState extends State<SuperTabPersonalTaskCard> {
Expanded(
child: Align(
alignment: AlignmentDirectional.centerStart,
- child: _Tag(w.project, w.task.projectId),
+ child: _Tag(project),
),
),
const SizedBox(width: grid.AppDesktop.controlGap),
- SuperTabTaskStatusMark(
- w.task.status,
- reason: w.task.reason,
- ),
+ SuperTabTaskStatusMark(task.status, reason: task.reason),
],
),
const SizedBox(height: grid.AppDesktop.controlGap),
Text(
- w.task.title,
+ task.title,
maxLines: 3,
overflow: TextOverflow.ellipsis,
style: DesktopChrome.control(
@@ -149,23 +113,26 @@ class _CardState extends State<SuperTabPersonalTaskCard> {
],
const Spacer(),
if (waiting) ...[
+ // Plain text: only Accept, the main action, is a capsule.
TextButton(
- onPressed: w.onReject,
+ onPressed: onReject,
style: TextButton.styleFrom(
+ backgroundColor: Colors.transparent,
+ side: BorderSide.none,
visualDensity: VisualDensity.compact,
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
padding: _buttonPadding,
minimumSize: Size.zero,
),
child: _label(
- 'Reject',
- w.pending == 'reject',
- w.onReject,
+ 'Decline',
+ pending == 'reject',
+ onReject,
),
),
const SizedBox(width: grid.AppDesktop.listRowGap * 2),
FilledButton(
- onPressed: w.onApprove,
+ onPressed: onApprove,
style: FilledButton.styleFrom(
visualDensity: VisualDensity.compact,
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
@@ -173,9 +140,9 @@ class _CardState extends State<SuperTabPersonalTaskCard> {
minimumSize: Size.zero,
),
child: _label(
- 'Approve',
- w.pending == 'approve',
- w.onApprove,
+ 'Accept',
+ pending == 'approve',
+ onApprove,
),
),
],
@@ -206,24 +173,30 @@ class _CardState extends State<SuperTabPersonalTaskCard> {
],
)
: Text(text);
- final why = widget.disabledReason;
+ final why = disabledReason;
return onPressed == null && why != null
? Tooltip(message: why, child: label)
: label;
}
}
-/// The project's name in a capsule of its colour, white on it, as a Board tile labels its lane.
+/// Accept and Decline fit beside two faces in the pane's fixed 340.
+const _buttonPadding = EdgeInsets.symmetric(
+ horizontal: grid.AppDesktop.controlGap,
+ vertical: grid.AppDesktop.menuInset,
+);
+
+/// The project's name in a neutral grey capsule: grey everywhere, colour only on agent faces (anh Dee, 11-07).
class _Tag extends StatelessWidget {
- const _Tag(this.name, this.projectId);
- final String name, projectId;
+ const _Tag(this.name);
+ final String name;
@override
Widget build(BuildContext context) => DecoratedBox(
key: const ValueKey('personal-task-tag'),
- decoration: BoxDecoration(
- color: superTabProjectColor(projectId),
- borderRadius: BorderRadius.circular(grid.AppDesktop.paneCloseInset),
+ decoration: ShapeDecoration(
+ color: grid.AppSurface.wellFill,
+ shape: const StadiumBorder(),
),
child: Padding(
padding: const EdgeInsets.symmetric(
@@ -234,8 +207,7 @@ class _Tag extends StatelessWidget {
name,
maxLines: 1,
overflow: TextOverflow.ellipsis,
- style: DesktopChrome.metadata(color: grid.AppDesktop.onSelection)
- .copyWith(fontWeight: grid.AppFont.medium, height: 1.25),
+ style: DesktopChrome.metadata().copyWith(height: 1.25),
),
),
);
@@ -303,7 +275,7 @@ HarnessActivity superTabTaskActivity(String status) => switch (status) {
/// as the Board says them.
String superTabTaskStatusLabel(String status) => switch (status) {
'proposal' => 'Proposal',
- 'rejected' => 'Rejected',
+ 'rejected' => 'Declined',
'planned' => 'Planned',
'working' => 'Working',
'needs_human' => 'Needs a human',
diff --git a/desktop/lib/super_tabs/tasks/personal_tasks_pane.dart b/desktop/lib/super_tabs/tasks/personal_tasks_pane.dart
index e01b5331d..f197b1c87 100644
--- a/desktop/lib/super_tabs/tasks/personal_tasks_pane.dart
+++ b/desktop/lib/super_tabs/tasks/personal_tasks_pane.dart
@@ -3,7 +3,6 @@ import 'dart:async';
import 'package:flutter/material.dart';
import '../../shared/theme/app_theme.dart';
-import '../../shared/widgets/app_select_field.dart';
import '../../shared/widgets/skeleton.dart';
import '../../widgets/desktop_chrome.dart';
import '../../widgets/laid_out_list.dart';
@@ -13,6 +12,7 @@ import '../model.dart';
import '../task_card.dart';
import 'personal_task_card.dart';
import 'personal_tasks.dart';
+import 'tasks_pane_header.dart';
/// The person's active work, from the same authenticated cursor as the chat.
class SuperTabPersonalTasksPane extends StatefulWidget {
@@ -31,10 +31,10 @@ class SuperTabPersonalTasksPane extends StatefulWidget {
State<SuperTabPersonalTasksPane> createState() => _TasksPaneState();
}
-/// Who asked, a step smaller than the agent beside it, as on a Board tile.
-const _requesterSize = 18.0;
+/// Who asked and who is doing it, both at 18 (anh Dee, 11-07).
+const _faceSize = 18.0;
-/// Why Approve, Reject and the approval mode are disabled while a change is unconfirmed.
+/// Why Accept, Decline and the approval mode are disabled while a change is unconfirmed.
const _waitingWhy = 'Waiting for the last change to be confirmed';
class _TasksPaneState extends State<SuperTabPersonalTasksPane> {
@@ -103,14 +103,14 @@ class _TasksPaneState extends State<SuperTabPersonalTasksPane> {
: null;
setState(() {
if (lost) {
- _error = 'The change is not confirmed. Retry to check it.';
+ _error = 'Not confirmed. Retry to check.';
} else {
_action = null;
_operationId = null;
if (answer == null) {
_error = updateRequired
? 'Update Harness to change Tasks.'
- : refusal ?? 'The change was refused.';
+ : refusal ?? 'Change refused.';
}
}
});
@@ -118,9 +118,7 @@ class _TasksPaneState extends State<SuperTabPersonalTasksPane> {
if (answer == null && !lost) unawaited(owner.refresh());
} catch (_) {
if (mounted && identical(owner, c)) {
- setState(
- () => _error = 'The change is not confirmed. Retry to check it.',
- );
+ setState(() => _error = 'Not confirmed. Retry to check.');
}
} finally {
if (mounted && identical(owner, c)) setState(() => _sending = false);
@@ -136,7 +134,7 @@ class _TasksPaneState extends State<SuperTabPersonalTasksPane> {
builder: (context, update) => AlertDialog(
// Names the task, so the person knows which one they turn down.
title: Text(
- 'Reject “${task.title}”?',
+ 'Decline “${task.title}”?',
maxLines: 3,
overflow: TextOverflow.ellipsis,
),
@@ -159,7 +157,7 @@ class _TasksPaneState extends State<SuperTabPersonalTasksPane> {
onPressed: reason.text.trim().isEmpty
? null
: () => Navigator.pop(context, reason.text.trim()),
- child: const Text('Reject task'),
+ child: const Text('Decline'),
),
],
),
@@ -220,66 +218,13 @@ class _TasksPaneState extends State<SuperTabPersonalTasksPane> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
- Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: AppDesktop.groupGap,
- vertical: AppDesktop.controlGap,
- ),
- child: Row(
- children: [
- const Expanded(
- child: Text(
- 'Tasks',
- style: TextStyle(fontWeight: FontWeight.w600),
- ),
- ),
- if (supported)
- // Disabled as the decisions are; the shared select has no disabled state of its own.
- ExcludeFocus(
- excluding: !enabled,
- child: IgnorePointer(
- ignoring: !enabled,
- child: AppSelectField<String>(
- key: const ValueKey('tasks-approval-mode'),
- value: tasks!.mode,
- semanticLabel: 'Approval',
- textStyle: DesktopChrome.metadata(
- color: DesktopChrome.foreground,
- ),
- width: AppSelectField.fitWidth(
- context,
- labels: const ['Auto approve', 'Review'],
- textStyle: DesktopChrome.metadata(),
- ),
- menuWidth: 300,
- menuAlignedToEnd: true,
- options: const [
- SelectOption(
- value: 'autoApprove',
- label: 'Auto approve',
- detail: 'Tasks you ask for start right away.',
- ),
- SelectOption(
- value: 'review',
- label: 'Review',
- detail: 'Tasks you ask for wait until you approve them.',
- ),
- ],
- onChanged: (value) {
- if (value != tasks.mode) {
- unawaited(
- _send({
- 'type': 'member.approvalMode',
- 'mode': value,
- }),
- );
- }
- },
- ),
- ),
- ),
- ],
- ),
+ SuperTabTasksPaneHeader(
+ mode: supported ? tasks!.mode : null,
+ onChanged: enabled
+ ? (mode) => unawaited(
+ _send({'type': 'member.approvalMode', 'mode': mode}),
+ )
+ : null,
),
// Offline, the rows are what was last read: said once, quietly, until the Swarm answers again.
if (supported && c.backendUnreachable && snapshot != null)
@@ -331,7 +276,7 @@ class _TasksPaneState extends State<SuperTabPersonalTasksPane> {
: 'Update Harness to use Tasks.',
),
)
- else
+ else if (supported)
Expanded(
// Empty means empty (anh Dee's rule 7, task #4465).
child: tasks!.rows.isEmpty
@@ -367,7 +312,7 @@ class _TasksPaneState extends State<SuperTabPersonalTasksPane> {
: person != null
? SuperTabAvatar.person(
person,
- size: _requesterSize,
+ size: _faceSize,
)
: SuperTabAvatar(
identity:
@@ -376,7 +321,7 @@ class _TasksPaneState extends State<SuperTabPersonalTasksPane> {
task.requester['name']
as String? ??
'Person',
- size: _requesterSize,
+ size: _faceSize,
picture:
SuperTabAvatarPicture.fromJson(
task.requester['avatar'],
@@ -391,7 +336,7 @@ class _TasksPaneState extends State<SuperTabPersonalTasksPane> {
agent?.name ??
task.agent['name'] as String? ??
'Agent',
- size: SuperTabAvatar.rowSize,
+ size: _faceSize,
picture:
agent?.avatar ??
SuperTabAvatarPicture.fromJson(
@@ -474,8 +419,8 @@ class _SkeletonCards extends StatelessWidget {
child: DecoratedBox(
decoration: BoxDecoration(
color: AppCard.base,
- borderRadius: BorderRadius.circular(AppCard.insetRadius),
- border: Border.all(color: AppCard.insetHair),
+ borderRadius: BorderRadius.circular(AppDesktop.rowRadius),
+ border: Border.all(color: DesktopChrome.rim),
),
child: Padding(
padding: const EdgeInsets.all(SuperTabTaskCard.tilePadding),
@@ -485,7 +430,8 @@ class _SkeletonCards extends StatelessWidget {
Skeleton(
width: 64 + 16.0 * (i % 3),
height: 16,
- radius: AppDesktop.paneCloseInset,
+ // The project's capsule.
+ radius: 8,
),
const SizedBox(height: AppDesktop.controlGap),
SkeletonText(style: title, widthFactor: .9 - .1 * (i % 2)),
@@ -493,9 +439,9 @@ class _SkeletonCards extends StatelessWidget {
const SizedBox(height: AppDesktop.controlGap),
const Row(
children: [
- Skeleton.circle(size: _requesterSize),
+ Skeleton.circle(size: _faceSize),
SizedBox(width: AppDesktop.listRowGap * 2),
- Skeleton.circle(size: SuperTabAvatar.rowSize),
+ Skeleton.circle(size: _faceSize),
],
),
],
diff --git a/desktop/lib/super_tabs/tasks/tasks_pane_header.dart b/desktop/lib/super_tabs/tasks/tasks_pane_header.dart
new file mode 100644
index 000000000..7b45c502f
--- /dev/null
+++ b/desktop/lib/super_tabs/tasks/tasks_pane_header.dart
@@ -0,0 +1,144 @@
+import 'package:flutter/material.dart';
+
+import '../../shared/theme/app_icons.dart';
+import '../../shared/theme/app_theme.dart' as grid;
+import '../../shared/widgets/app_menu.dart';
+import '../../widgets/desktop_chrome.dart';
+
+/// The top of the Tasks pane (anh Dee, 11-07): "Tasks" in semibold on the left, and the reader's Accept all or
+/// Ask me choice on the right, shown only when [mode] is known.
+class SuperTabTasksPaneHeader extends StatelessWidget {
+ const SuperTabTasksPaneHeader({super.key, this.mode, this.onChanged});
+
+ /// `autoApprove` or `review`, as the server stores it; null when the backend has no Tasks.
+ final String? mode;
+
+ /// Null while a change is sent or the reader can't write: the choice then stays plain text.
+ final ValueChanged<String>? onChanged;
+
+ @override
+ Widget build(BuildContext context) {
+ grid.AppTheme.watch(context);
+ return Padding(
+ padding: const EdgeInsets.symmetric(
+ horizontal: grid.AppDesktop.groupGap,
+ vertical: grid.AppDesktop.controlGap,
+ ),
+ child: Row(
+ children: [
+ Expanded(
+ child: Text(
+ 'Tasks',
+ style: DesktopChrome.control(color: DesktopChrome.foreground)
+ .copyWith(fontWeight: grid.AppFont.semibold),
+ ),
+ ),
+ if (mode case final mode?)
+ _ApprovalModeChoice(
+ key: const ValueKey('tasks-approval-mode'),
+ mode: mode,
+ onChanged: onChanged,
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+/// The Accept all or Ask me choice: plain secondary text at rest, its chevron and a faint fill only on hover,
+/// focus or while open (anh Dee, 11-07: dropdowns stay plain text until you hover).
+class _ApprovalModeChoice extends StatefulWidget {
+ const _ApprovalModeChoice({
+ super.key,
+ required this.mode,
+ required this.onChanged,
+ });
+
+ /// `autoApprove` or `review`, as the server stores it.
+ final String mode;
+
+ /// Null while a change is sent or the reader can't write: the choice then stays plain text.
+ final ValueChanged<String>? onChanged;
+
+ @override
+ State<_ApprovalModeChoice> createState() => _ChoiceState();
+}
+
+/// As a meeting invite (anh Dee, 11-07): Accept all, or Ask me before a task starts. The stored values stay.
+const _modes = {'autoApprove': 'Accept all', 'review': 'Ask me'};
+
+/// What each choice does, under it in the menu (#3532), in a few words.
+const _details = {
+ 'autoApprove': 'Your tasks start right away.',
+ 'review': 'Your tasks wait for you to accept them.',
+};
+
+class _ChoiceState extends State<_ApprovalModeChoice> {
+ bool _hovered = false, _focused = false;
+
+ @override
+ Widget build(BuildContext context) {
+ grid.AppTheme.watch(context);
+ final onChanged = widget.onChanged;
+ return AppDropdown(
+ // Wide enough that each choice's line reads whole in the pane's 340 (#3532).
+ width: 300,
+ alignment: AlignmentDirectional.bottomEnd,
+ onClose: () {
+ if (mounted) setState(() {});
+ },
+ children: [
+ for (final MapEntry(key: mode, value: label) in _modes.entries)
+ AppMenuItem(
+ label: label,
+ detail: _details[mode],
+ selected: mode == widget.mode,
+ // The stored choice closes the menu and sends nothing.
+ onPressed: () {
+ if (mode != widget.mode) onChanged?.call(mode);
+ },
+ ),
+ ],
+ builder: (context, menu, _) {
+ // The chevron's room is held at rest, so the text never moves when it shows.
+ final lit = onChanged != null && (_hovered || _focused || menu.isOpen);
+ return InkWell(
+ borderRadius: BorderRadius.circular(DesktopChrome.rowRadius),
+ hoverColor: grid.AppSurface.hoverFill,
+ focusColor: grid.AppSurface.hoverFill,
+ onHover: (hovered) => setState(() => _hovered = hovered),
+ onFocusChange: (focused) => setState(() => _focused = focused),
+ onTap: onChanged == null
+ ? null
+ : () {
+ menu.isOpen ? menu.close() : menu.open();
+ setState(() {});
+ },
+ child: Padding(
+ padding: const EdgeInsets.symmetric(
+ horizontal: grid.AppDesktop.badgeInset,
+ vertical: grid.AppDesktop.listRowGap,
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(
+ _modes[widget.mode] ?? _modes.values.first,
+ style: DesktopChrome.metadata(),
+ ),
+ Opacity(
+ opacity: lit ? 1 : 0,
+ child: Icon(
+ AppIcons.chevronDown,
+ size: AppIcons.metadataSize,
+ color: DesktopChrome.muted,
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ },
+ );
+ }
+}
diff --git a/desktop/test/goldens/swarm-elements-dark.png b/desktop/test/goldens/swarm-elements-dark.png
index cc1c41603..0ab1fd8c6 100644
Binary files a/desktop/test/goldens/swarm-elements-dark.png and b/desktop/test/goldens/swarm-elements-dark.png differ
diff --git a/desktop/test/goldens/swarm-elements-light.png b/desktop/test/goldens/swarm-elements-light.png
index 7d7d0422a..8edd5ad61 100644
Binary files a/desktop/test/goldens/swarm-elements-light.png and b/desktop/test/goldens/swarm-elements-light.png differ
diff --git a/desktop/test/super_tab_pane_minimums_shots_test.dart b/desktop/test/super_tab_pane_minimums_shots_test.dart
index ee1f48275..eeaab0a53 100644
--- a/desktop/test/super_tab_pane_minimums_shots_test.dart
+++ b/desktop/test/super_tab_pane_minimums_shots_test.dart
@@ -120,7 +120,7 @@ void main() {
await t.tap(find.text('Add the project export'));
await t.pumpAndSettle();
await captureWindow(t, shots, 'tasks-open-row-${brightness.name}');
- await t.tap(find.text('Reject'));
+ await t.tap(find.text('Decline'));
await t.pumpAndSettle();
expect(t.takeException(), isNull);
await captureWindow(t, shots, 'reject-dialog-${brightness.name}');
diff --git a/desktop/test/super_tab_personal_tasks_middle_test.dart b/desktop/test/super_tab_personal_tasks_middle_test.dart
index 3e1d1b30e..3b4ee342e 100644
--- a/desktop/test/super_tab_personal_tasks_middle_test.dart
+++ b/desktop/test/super_tab_personal_tasks_middle_test.dart
@@ -151,9 +151,9 @@ void main() {
'status': 'rejected',
'reason': 'Too much scope',
});
- expect(find.text('Rejected'), findsOneWidget);
+ expect(find.text('Declined'), findsOneWidget);
expect(find.text('Reason: Too much scope'), findsOneWidget);
- expect(find.byTooltip('Rejected: Too much scope'), findsOneWidget);
+ expect(find.byTooltip('Declined: Too much scope'), findsOneWidget);
});
testWidgets('a long reason wraps instead of overflowing', (t) async {
await header(t, {
diff --git a/desktop/test/super_tab_personal_tasks_pane_test.dart b/desktop/test/super_tab_personal_tasks_pane_test.dart
index cd680c4ce..7e921ae79 100644
--- a/desktop/test/super_tab_personal_tasks_pane_test.dart
+++ b/desktop/test/super_tab_personal_tasks_pane_test.dart
@@ -2,11 +2,14 @@ import 'package:harness/super_tabs/zone_time.dart';
import 'dart:async';
+import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:harness/super_tabs/controller.dart';
import 'package:harness/super_tabs/view.dart';
import 'package:harness/shared/theme/app_icons.dart';
+import 'package:harness/shared/theme/app_theme.dart' as grid;
+import 'package:harness/widgets/desktop_chrome.dart';
import 'package:harness/widgets/harness_activity_mark.dart';
import 'package:harness/state/harness_activity.dart';
@@ -119,6 +122,15 @@ class TasksFixture {
Finder inCard(String id, Finder f) =>
find.descendant(of: find.byKey(ValueKey('personal-task-$id')), matching: f);
+/// The card of task [id] is quiet: one hairline at radius 10 and no shadow (#4468).
+bool quietCard(WidgetTester t, String id) {
+ final ink = t.widget<Ink>(inCard(id, find.byType(Ink)).first);
+ final d = ink.decoration! as BoxDecoration;
+ return d.borderRadius == BorderRadius.circular(10) &&
+ d.border == Border.all(color: DesktopChrome.rim) &&
+ (d.boxShadow ?? const []).isEmpty;
+}
+
void main() {
setUpAll(superTabLoadZones);
late TasksFixture f;
@@ -168,7 +180,7 @@ void main() {
),
findsOneWidget,
);
- expect(find.text('Auto approve'), findsOneWidget);
+ expect(find.text('Accept all'), findsOneWidget);
});
testWidgets(
'ordinary proposals open their conversation without approval controls',
@@ -191,8 +203,8 @@ void main() {
await t.tap(find.text('Task new'));
await t.pump();
expect(opened, ['new']);
- expect(inCard('new', find.text('Approve')), findsNothing);
- expect(inCard('new', find.text('Reject')), findsNothing);
+ expect(inCard('new', find.text('Accept')), findsNothing);
+ expect(inCard('new', find.text('Decline')), findsNothing);
expect(find.byType(DropdownButtonFormField<String>), findsNothing);
expect(f.commands, isEmpty);
f.rows.last['canApprove'] = false;
@@ -205,13 +217,87 @@ void main() {
expect(f.commands, isEmpty);
},
);
+ testWidgets(
+ 'the header is quiet: Tasks in semibold, the choice plain text until hover',
+ (t) async {
+ await mount(t);
+ final title = t.widget<Text>(find.text('Tasks')).style!;
+ expect(title.fontSize, 13);
+ expect(title.fontWeight, FontWeight.w600);
+ expect(find.byType(DropdownButton<String>), findsNothing);
+ final choice = find.byKey(const ValueKey('tasks-approval-mode'));
+ final label = t
+ .widget<Text>(
+ find.descendant(of: choice, matching: find.text('Accept all')),
+ )
+ .style!;
+ expect(label.fontSize, 12);
+ expect(label.color, DesktopChrome.muted);
+ double chevron() => t
+ .widget<Opacity>(
+ find
+ .ancestor(
+ of: find.descendant(
+ of: choice,
+ matching: find.byIcon(AppIcons.chevronDown),
+ ),
+ matching: find.byType(Opacity),
+ )
+ .first,
+ )
+ .opacity;
+ final rest = t.getSize(choice);
+ expect(chevron(), 0);
+ final mouse = await t.createGesture(kind: PointerDeviceKind.mouse);
+ addTearDown(mouse.removePointer);
+ await mouse.addPointer(location: Offset.zero);
+ await mouse.moveTo(t.getCenter(choice));
+ await t.pump();
+ expect(chevron(), 1);
+ expect(t.getSize(choice), rest);
+ await mouse.moveTo(Offset.zero);
+ await t.pump();
+ expect(chevron(), 0);
+ },
+ );
+ testWidgets(
+ 'empty means empty: no tasks, or still loading, shows only the header',
+ (t) async {
+ List<String> words() => [
+ for (final text in t.widgetList<Text>(
+ find.descendant(
+ of: find.byType(SuperTabPersonalTasksPane),
+ matching: find.byType(Text),
+ ),
+ ))
+ text.data ?? '',
+ ];
+ Widget pane(SuperTabController c) => MaterialApp(
+ home: Scaffold(
+ body: SizedBox(
+ width: 340,
+ child: SuperTabPersonalTasksPane(controller: c, onOpenTask: (_) {}),
+ ),
+ ),
+ );
+ final loading = TasksFixture();
+ addTearDown(() => loading.controller.dispose());
+ await t.pumpWidget(pane(loading.controller));
+ expect(words(), ['Tasks']);
+ final empty = TasksFixture()..rows = [];
+ addTearDown(() => empty.controller.dispose());
+ await empty.controller.refresh();
+ await t.pumpWidget(pane(empty.controller));
+ expect(words(), ['Tasks', 'Accept all']);
+ },
+ );
testWidgets('mode is saved by authenticated command and server read', (
t,
) async {
await mount(t);
await t.tap(find.byKey(const ValueKey('tasks-approval-mode')));
await t.pumpAndSettle();
- await t.tap(find.text('Review').last);
+ await t.tap(find.text('Ask me').last);
await t.pumpAndSettle();
expect(f.commands.single, {
'type': 'member.approvalMode',
@@ -229,15 +315,23 @@ void main() {
await t.pump();
expect(find.byType(DropdownButtonFormField<String>), findsNothing);
expect(
- inCard('new', find.widgetWithText(TextButton, 'Reject')),
+ inCard('new', find.widgetWithText(TextButton, 'Decline')),
findsOneWidget,
);
expect(
- inCard('new', find.widgetWithText(FilledButton, 'Approve')),
+ inCard('new', find.widgetWithText(FilledButton, 'Accept')),
findsOneWidget,
);
+ // Decline is plain text: no fill and no rim over the theme's text button (#4468).
+ final reject = t
+ .widget<TextButton>(
+ inCard('new', find.widgetWithText(TextButton, 'Decline')),
+ )
+ .style!;
+ expect(reject.side?.resolve({}), BorderSide.none);
+ expect(reject.backgroundColor?.resolve({}), Colors.transparent);
expect(find.text('Suggested'), findsNothing);
- await t.tap(inCard('new', find.text('Approve')));
+ await t.tap(inCard('new', find.text('Accept')));
await t.pumpAndSettle();
expect(f.commands.single, {
'type': 'task.approve',
@@ -249,9 +343,9 @@ void main() {
testWidgets('approve sends once while waiting and keeps the task', (t) async {
await mount(t);
f.hold = Completer<void>();
- await t.tap(inCard('new', find.text('Approve')));
+ await t.tap(inCard('new', find.text('Accept')));
await t.pump();
- await t.tap(inCard('new', find.text('Approve')));
+ await t.tap(inCard('new', find.text('Accept')));
await t.pump();
expect(f.commands.length, 1);
f.hold!.complete();
@@ -271,7 +365,7 @@ void main() {
..['version'] = 2;
await f.controller.refresh();
await t.pump();
- await t.tap(inCard('new', find.text('Approve')));
+ await t.tap(inCard('new', find.text('Accept')));
await t.pumpAndSettle();
expect(f.commands.single, {
'type': 'task.approve',
@@ -281,7 +375,7 @@ void main() {
});
testWidgets('rejection needs a reason and remains in the list', (t) async {
await mount(t);
- await t.tap(inCard('new', find.text('Reject')));
+ await t.tap(inCard('new', find.text('Decline')));
await t.pumpAndSettle();
expect(f.commands, isEmpty);
await t.enterText(
@@ -289,7 +383,7 @@ void main() {
'Too much scope',
);
await t.pump();
- await t.tap(find.text('Reject task').last);
+ await t.tap(find.text('Decline').last);
await t.pumpAndSettle();
expect(f.commands.single, {
'type': 'task.reject',
@@ -298,7 +392,7 @@ void main() {
});
// The mark says why on hover (finding 17).
expect(
- inCard('new', find.byTooltip('Rejected: Too much scope')),
+ inCard('new', find.byTooltip('Declined: Too much scope')),
findsOneWidget,
);
});
@@ -307,9 +401,11 @@ void main() {
) async {
await mount(t);
f.fail = true;
- await t.tap(inCard('new', find.text('Approve')));
+ await t.tap(inCard('new', find.text('Accept')));
await t.pumpAndSettle();
expect(find.textContaining('fixture private'), findsNothing);
+ // What happened and what to do, in two short sentences (anh Dee, 11-07).
+ expect(find.text('Not confirmed. Retry to check.'), findsOneWidget);
expect(find.text('Retry'), findsOneWidget);
f.fail = false;
await t.tap(find.text('Retry'));
@@ -332,7 +428,7 @@ void main() {
('reconciling', 'Checking its agent', HarnessActivity.unknown),
('lost', 'Agent lost', HarnessActivity.offline),
('proposal', 'Proposal', null),
- ('rejected', 'Rejected', null),
+ ('rejected', 'Declined', null),
('a-later-status', 'Status unavailable', HarnessActivity.unknown),
];
await mount(t);
@@ -379,7 +475,7 @@ void main() {
FilledButton approve(String id) =>
find
.ancestor(
- of: inCard(id, find.text('Approve')),
+ of: inCard(id, find.text('Accept')),
matching: find.byType(FilledButton),
)
.evaluate()
@@ -396,7 +492,7 @@ void main() {
await mount(t);
f.refuse = SuperTabFailure(code, sentence, statusCode: status);
final before = f.reads;
- await t.tap(inCard('new', find.text('Approve')));
+ await t.tap(inCard('new', find.text('Accept')));
await t.pumpAndSettle();
expect(find.text(sentence), findsOneWidget);
expect(find.text('Retry'), findsNothing);
@@ -404,7 +500,7 @@ void main() {
expect(approve('new').onPressed, isNotNull);
expect(f.reads, greaterThan(before), reason: 'reads the task again');
f.refuse = null;
- await t.tap(inCard('old', find.text('Approve')));
+ await t.tap(inCard('old', find.text('Accept')));
await t.pumpAndSettle();
expect(f.commands.length, 2);
expect(f.operations.toSet().length, 2, reason: 'a new change');
@@ -414,7 +510,7 @@ void main() {
testWidgets('a refused Retry of a lost answer unlocks too', (t) async {
await mount(t);
f.fail = true;
- await t.tap(inCard('new', find.text('Approve')));
+ await t.tap(inCard('new', find.text('Accept')));
await t.pumpAndSettle();
expect(find.text('Retry'), findsOneWidget);
expect(approve('old').onPressed, isNull);
@@ -438,7 +534,7 @@ void main() {
'fixture private payload',
statusCode: 426,
);
- await t.tap(inCard('new', find.text('Approve')));
+ await t.tap(inCard('new', find.text('Accept')));
await t.pumpAndSettle();
expect(find.text('Update Harness to change Tasks.'), findsOneWidget);
expect(find.textContaining('fixture private'), findsNothing);
@@ -453,7 +549,7 @@ void main() {
);
await t.tap(find.byKey(const ValueKey('tasks-approval-mode')));
await t.pumpAndSettle();
- await t.tap(find.text('Review').last);
+ await t.tap(find.text('Ask me').last);
await t.pumpAndSettle();
expect(
find.text('Only members choose how their tasks are approved.'),
@@ -475,7 +571,7 @@ void main() {
);
await t.tap(find.byKey(const ValueKey('tasks-approval-mode')));
await t.pumpAndSettle();
- await t.tap(find.text('Review').last);
+ await t.tap(find.text('Ask me').last);
await t.pumpAndSettle();
expect(
find.text('Only the project\'s owner changes this.'),
@@ -485,7 +581,7 @@ void main() {
f.refuse = null;
await t.tap(find.byKey(const ValueKey('tasks-approval-mode')));
await t.pumpAndSettle();
- await t.tap(find.text('Review').last);
+ await t.tap(find.text('Ask me').last);
await t.pumpAndSettle();
expect(f.commands.length, 2);
expect(f.operations.toSet().length, 2);
@@ -514,7 +610,7 @@ void main() {
'an open rejection cannot be submitted under a replacement account',
(t) async {
await mount(t);
- await t.tap(inCard('new', find.text('Reject')));
+ await t.tap(inCard('new', find.text('Decline')));
await t.pumpAndSettle();
await t.enterText(
find.byKey(const ValueKey('task-reject-reason')),
@@ -537,7 +633,7 @@ void main() {
),
),
);
- await t.tap(find.text('Reject task').last);
+ await t.tap(find.text('Decline').last);
await t.pumpAndSettle();
expect(f.commands, isEmpty);
expect(replacement.commands, isEmpty);
@@ -682,14 +778,23 @@ void main() {
find.byWidgetPredicate((w) => w is ActivityMark),
);
expect(t.widget<Text>(title).maxLines, 3);
+ // A neutral grey capsule with secondary text, never the project's colour (#4468).
expect(
t.widget<DecoratedBox>(tag).decoration,
- isA<BoxDecoration>().having(
- (d) => d.color,
- 'color',
- superTabProjectColor('lead5701'),
- ),
+ isA<ShapeDecoration>()
+ .having((d) => d.color, 'color', grid.AppSurface.wellFill)
+ .having((d) => d.shape, 'shape', isA<StadiumBorder>()),
+ );
+ expect(
+ t
+ .widget<Text>(
+ find.descendant(of: tag, matching: find.byType(Text)),
+ )
+ .style
+ ?.color,
+ DesktopChrome.muted,
);
+ expect(quietCard(t, 'new'), isTrue);
// The mark sits top right: above the title, at the card's right side.
expect(t.getRect(mark).bottom, lessThanOrEqualTo(t.getRect(title).top));
expect(
@@ -710,6 +815,8 @@ void main() {
final asked = t.getRect(avatars.at(0)),
agent = t.getRect(avatars.at(1));
expect(t.widget<SuperTabAvatar>(avatars.at(0)).identity, 'person:6a86');
+ expect(asked.height, 18);
+ expect(agent.height, 18);
expect(asked.left, lessThan(agent.left));
expect(agent.right, lessThan(t.getRect(card).center.dx));
expect(asked.top, greaterThan(t.getRect(title).bottom));
@@ -742,19 +849,43 @@ void main() {
expect(f.commands, isEmpty);
});
- test('a project keeps its colour', () {
- expect(
- superTabProjectColor('lead5701'),
- superTabProjectColor('lead5701'),
- );
- expect(
- {
- for (final id in ['a', 'b', 'c', 'd', 'e', 'f', 'g'])
- superTabProjectColor(id),
- }.length,
- greaterThan(1),
- );
- });
+ testWidgets(
+ 'a long project name stays in its capsule and a selected card is only filled',
+ (t) async {
+ f = TasksFixture()
+ ..rows = [
+ // A project the snapshot doesn't hold shows the row's own name.
+ task('new', 1, 20)
+ ..['projectId'] = 'elsewhere'
+ ..['projectName'] = 'A very long project name ' * 8,
+ ];
+ addTearDown(() => f.controller.dispose());
+ await f.controller.refresh();
+ await t.pumpWidget(
+ MaterialApp(
+ home: Scaffold(
+ body: SizedBox(
+ width: 340,
+ child: SuperTabPersonalTasksPane(
+ controller: f.controller,
+ onOpenTask: (_) {},
+ selectedId: 'new',
+ ),
+ ),
+ ),
+ ),
+ );
+ expect(t.takeException(), isNull);
+ final card = t.getRect(
+ inCard('new', find.byType(SuperTabPersonalTaskCard)),
+ );
+ final mark = t.getRect(
+ inCard('new', find.byType(SuperTabTaskStatusMark)),
+ );
+ expect(mark.right, lessThanOrEqualTo(card.right));
+ expect(quietCard(t, 'new'), isTrue);
+ },
+ );
});
testWidgets('while a change is sent, Approve and Reject are disabled', (
@@ -762,7 +893,7 @@ void main() {
) async {
await mount(t);
f.hold = Completer<void>();
- await t.tap(inCard('new', find.text('Approve')));
+ await t.tap(inCard('new', find.text('Accept')));
await t.pump();
for (final id in ['new', 'old']) {
expect(
diff --git a/desktop/test/super_tab_personal_tasks_shots_test.dart b/desktop/test/super_tab_personal_tasks_shots_test.dart
index 52957e5a2..d8de34bce 100644
--- a/desktop/test/super_tab_personal_tasks_shots_test.dart
+++ b/desktop/test/super_tab_personal_tasks_shots_test.dart
@@ -95,7 +95,7 @@ void main() {
await t.pumpAndSettle();
expect(t.takeException(), isNull);
await captureWindow(t, shots, 'tasks-review-${brightness.name}');
- await t.tap(find.text('Reject'));
+ await t.tap(find.text('Decline'));
await t.pumpAndSettle();
await t.enterText(
find.byKey(const ValueKey('task-reject-reason')),
@@ -169,7 +169,7 @@ void main() {
'The suggested agent changed. Read the task again.',
statusCode: 409,
);
- await t.tap(find.text('Approve'));
+ await t.tap(find.text('Accept'));
await t.pumpAndSettle();
expect(t.takeException(), isNull);
await captureWindow(t, shots, 'tasks-refused-${brightness.name}');
diff --git a/desktop/test/super_tab_reject_dialog_test.dart b/desktop/test/super_tab_reject_dialog_test.dart
index eb657a21b..fc36762da 100644
--- a/desktop/test/super_tab_reject_dialog_test.dart
+++ b/desktop/test/super_tab_reject_dialog_test.dart
@@ -34,7 +34,7 @@ void main() {
// Each waiting card has its own Reject: the one on this task's card.
final reject = find.descendant(
of: find.byKey(const ValueKey('personal-task-new')),
- matching: find.text('Reject'),
+ matching: find.text('Decline'),
);
testWidgets('the Reject dialog names the task', (t) async {
@@ -44,11 +44,19 @@ void main() {
expect(
find.descendant(
of: find.byType(AlertDialog),
- matching: find.text('Reject “Add the project export”?'),
+ matching: find.text('Decline “Add the project export”?'),
),
findsOneWidget,
);
- expect(find.text('Reject task'), findsOneWidget, reason: 'the button');
+ // A button is one or two words, verb first; the title already names the task.
+ expect(
+ find.descendant(
+ of: find.byType(AlertDialog),
+ matching: find.widgetWithText(TextButton, 'Decline'),
+ ),
+ findsOneWidget,
+ reason: 'the button',
+ );
});
testWidgets('a long title wraps in the dialog without overflowing', (
@@ -60,7 +68,7 @@ void main() {
await t.pumpAndSettle();
final heading = find.descendant(
of: find.byType(AlertDialog),
- matching: find.textContaining('Reject “Add the project export'),
+ matching: find.textContaining('Decline “Add the project export'),
);
expect(heading, findsOneWidget);
expect(t.takeException(), isNull);
diff --git a/desktop/test/super_tab_task_cards_shots_test.dart b/desktop/test/super_tab_task_cards_shots_test.dart
index 18b67781f..3e6f3e7d5 100644
--- a/desktop/test/super_tab_task_cards_shots_test.dart
+++ b/desktop/test/super_tab_task_cards_shots_test.dart
@@ -133,24 +133,29 @@ void main() {
await captureWindow(t, shots, 'cards-$b');
});
- testWidgets('a task opened in the middle, $b', (t) async {
- size(t, const Size(1440, 800), brightness);
- final f = TasksFixture()..rows = rows();
- addTearDown(f.controller.dispose);
- await f.controller.refresh();
- await t.pumpWidget(themed(brightness, view(f.controller)));
- await t.pump();
- await t.tap(
- find.descendant(
- of: find.byKey(const ValueKey('personal-task-aeef')),
- matching: find.byType(SuperTabPersonalTaskCard),
- ),
- );
- await t.pumpAndSettle();
- expect(t.takeException(), isNull);
- expect(find.byKey(const ValueKey('super-task-header')), findsOneWidget);
- await captureWindow(t, shots, 'task-middle-$b');
- });
+ // At the narrowest window the Swarm screen keeps all three panes, and wide.
+ for (final width in [880.0, 1440.0]) {
+ testWidgets('a task opened in the middle at ${width.toInt()}, $b', (
+ t,
+ ) async {
+ size(t, Size(width, 800), brightness);
+ final f = TasksFixture()..rows = rows();
+ addTearDown(f.controller.dispose);
+ await f.controller.refresh();
+ await t.pumpWidget(themed(brightness, view(f.controller)));
+ await t.pump();
+ await t.tap(
+ find.descendant(
+ of: find.byKey(const ValueKey('personal-task-aeef')),
+ matching: find.byType(SuperTabPersonalTaskCard),
+ ),
+ );
+ await t.pumpAndSettle();
+ expect(t.takeException(), isNull);
+ expect(find.byKey(const ValueKey('super-task-header')), findsOneWidget);
+ await captureWindow(t, shots, 'task-middle-${width.toInt()}-$b');
+ });
+ }
testWidgets('the Buddy chat header, $b', (t) async {
size(t, const Size(1440, 500), brightness);
diff --git a/desktop/test/super_tab_tasks_pane_polish_test.dart b/desktop/test/super_tab_tasks_pane_polish_test.dart
index 83f2ba098..83bef03a4 100644
--- a/desktop/test/super_tab_tasks_pane_polish_test.dart
+++ b/desktop/test/super_tab_tasks_pane_polish_test.dart
@@ -91,44 +91,37 @@ void main() {
matching: find.byType(CircularProgressIndicator),
);
- testWidgets(
- 'the pressed Approve spins; the other buttons say why they wait',
- (t) async {
- await mount(t);
- f.hold = Completer<void>();
- await t.tap(inCard('new', find.text('Approve')));
- await t.pump();
- expect(
- spinnerIn(inCard('new', find.byType(FilledButton))),
- findsOneWidget,
- );
- expect(spinnerIn(inCard('new', find.byType(TextButton))), findsNothing);
- expect(
- inCard('old', find.byType(CircularProgressIndicator)),
- findsNothing,
- );
- // Every disabled decision names what it waits on.
- expect(inCard('old', find.byTooltip(_waiting)), findsNWidgets(2));
- f.hold!.complete();
- await t.pumpAndSettle();
- expect(find.byType(CircularProgressIndicator), findsNothing);
- expect(find.byTooltip(_waiting), findsNothing);
- },
- );
+ testWidgets('the pressed Accept spins; the other buttons say why they wait', (
+ t,
+ ) async {
+ await mount(t);
+ f.hold = Completer<void>();
+ await t.tap(inCard('new', find.text('Accept')));
+ await t.pump();
+ expect(spinnerIn(inCard('new', find.byType(FilledButton))), findsOneWidget);
+ expect(spinnerIn(inCard('new', find.byType(TextButton))), findsNothing);
+ expect(inCard('old', find.byType(CircularProgressIndicator)), findsNothing);
+ // Every disabled decision names what it waits on.
+ expect(inCard('old', find.byTooltip(_waiting)), findsNWidgets(2));
+ f.hold!.complete();
+ await t.pumpAndSettle();
+ expect(find.byType(CircularProgressIndicator), findsNothing);
+ expect(find.byTooltip(_waiting), findsNothing);
+ });
- testWidgets('the pressed Reject spins while its rejection is confirmed', (
+ testWidgets('the pressed Decline spins while its decline is confirmed', (
t,
) async {
await mount(t);
f.hold = Completer<void>();
- await t.tap(inCard('new', find.text('Reject')));
+ await t.tap(inCard('new', find.text('Decline')));
await t.pumpAndSettle();
await t.enterText(
find.byKey(const ValueKey('task-reject-reason')),
'Too much scope',
);
await t.pump();
- await t.tap(find.text('Reject task').last);
+ await t.tap(find.text('Decline').last);
await t.pump();
await t.pump(const Duration(milliseconds: 300));
expect(spinnerIn(inCard('new', find.byType(TextButton))), findsOneWidget);
@@ -139,18 +132,19 @@ void main() {
});
testWidgets(
- 'Auto approve and Review are the app select, saying what each does',
+ 'Accept all and Ask me are the app dropdown, plain until hover, saying what each does',
(t) async {
await mount(t);
final mode = find.byKey(const ValueKey('tasks-approval-mode'));
- expect(t.widget(mode), isA<AppSelectField<String>>());
+ // Plain text at rest (#4468); the menu is the app's one dropdown (#3532).
+ expect(find.byType(AppSelectField<String>), findsNothing);
expect(find.byType(DropdownButton<String>), findsNothing);
await t.tap(mode);
await t.pumpAndSettle();
// Each says what it does, whole, in the pane's 340.
for (final detail in [
- 'Tasks you ask for start right away.',
- 'Tasks you ask for wait until you approve them.',
+ 'Your tasks start right away.',
+ 'Your tasks wait for you to accept them.',
]) {
expect(
t.renderObject<RenderParagraph>(find.text(detail)).didExceedMaxLines,
@@ -158,7 +152,7 @@ void main() {
reason: detail,
);
}
- await t.tap(find.text('Review').last);
+ await t.tap(find.text('Ask me').last);
await t.pumpAndSettle();
expect(f.commands.single, {
'type': 'member.approvalMode',
@@ -175,13 +169,14 @@ void main() {
expect(find.text('Loading Tasks…'), findsNothing);
});
- // anh Dee's rule 7 (task #4465): empty means empty, no words where there is nothing.
- testWidgets('the empty pane says nothing', (t) async {
+ // Empty means empty (anh Dee, 11-07; #4468): no words under the header.
+ testWidgets('the empty pane shows nothing under its header', (t) async {
f = TasksFixture()..rows = [];
addTearDown(() => f.controller.dispose());
await f.controller.refresh();
await pumpPane(t);
expect(find.textContaining('No tasks yet'), findsNothing);
+ expect(find.byType(SkeletonBlock), findsNothing);
});
for (final merged in [false, true]) {
diff --git a/desktop/test/swarm_elements_gallery_test.dart b/desktop/test/swarm_elements_gallery_test.dart
index 98c4dcc65..b3bfb158c 100644
--- a/desktop/test/swarm_elements_gallery_test.dart
+++ b/desktop/test/swarm_elements_gallery_test.dart
@@ -20,6 +20,7 @@ import 'package:harness/super_tabs/identity.dart';
import 'package:harness/super_tabs/model.dart';
import 'package:harness/super_tabs/tasks/personal_task_card.dart';
import 'package:harness/super_tabs/tasks/personal_tasks.dart';
+import 'package:harness/super_tabs/tasks/tasks_pane_header.dart';
import 'package:harness/super_tabs/tasks/personal_tasks_pane.dart';
import 'package:harness/terminal/terminal_typography.dart';
@@ -136,7 +137,7 @@ Future<List<SuperTabController>> _show(
await buddy.select('swarm-buddy-peer');
await member.select('aeef');
tester.view.devicePixelRatio = 1;
- tester.view.physicalSize = const Size(760, 1080);
+ tester.view.physicalSize = const Size(760, 1280);
addTearDown(tester.view.reset);
await tester.pumpWidget(
MaterialApp(
@@ -356,6 +357,32 @@ final _person = SuperTabPerson.fromJson({
'role': 'owner',
});
+/// A Tasks pane card as the pane draws it: the project's capsule, the mark, the title and two 18 faces.
+Widget _card(
+ String title,
+ String status, {
+ bool waiting = false,
+ bool selected = false,
+}) => SuperTabPersonalTaskCard(
+ task: SuperTabPersonalTask({
+ 'id': title,
+ 'version': 1,
+ 'at': 0,
+ 'projectId': 'harness',
+ 'projectName': 'harness',
+ 'title': title,
+ 'status': status,
+ }),
+ project: 'harness',
+ selected: selected,
+ onOpen: () {},
+ requester: SuperTabAvatar.person(_person, size: 18),
+ agent: SuperTabAvatar.agent(_agent('Quinn'), size: 18, engineBadge: false),
+ waiting: waiting,
+ onApprove: waiting ? () {} : null,
+ onReject: waiting ? () {} : null,
+);
+
class _Gallery extends StatelessWidget {
const _Gallery(
this.brightness, {
@@ -452,7 +479,7 @@ class _Gallery extends StatelessWidget {
),
],
),
- title('Left pane rows and task card'),
+ title('Left pane rows'),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -517,29 +544,45 @@ class _Gallery extends StatelessWidget {
],
),
),
+ ],
+ ),
+ title(
+ 'Tasks pane: header, a waiting, a working and a selected card',
+ ),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(
+ width: 340,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ SuperTabTasksPaneHeader(
+ mode: 'autoApprove',
+ onChanged: (_) {},
+ ),
+ _card(
+ 'Friendly agent faces and a gold Lead ring',
+ 'proposal',
+ waiting: true,
+ ),
+ ],
+ ),
+ ),
gap(),
SizedBox(
width: 340,
- child: SuperTabPersonalTaskCard(
- task: SuperTabPersonalTask({
- 'id': 't1',
- 'version': 1,
- 'at': 0,
- 'projectId': 'harness',
- 'projectName': 'harness',
- 'title': 'Friendly agent faces and a gold Lead ring',
- 'status': 'proposal',
- }),
- project: 'harness',
- selected: false,
- onOpen: () {},
- requester: SuperTabAvatar.person(_person, size: 20),
- agent: SuperTabAvatar.agent(
- _agent('Quinn'),
- size: 20,
- engineBadge: false,
- ),
- waiting: true,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ _card('Quiet cards in the Tasks pane', 'working'),
+ const SizedBox(height: 8),
+ _card(
+ 'Round faces in the chat',
+ 'done',
+ selected: true,
+ ),
+ ],
),
),
],
diff --git a/docs/naming-system.md b/docs/naming-system.md
index f0ed2551a..be3225770 100644
--- a/docs/naming-system.md
+++ b/docs/naming-system.md
@@ -188,6 +188,12 @@ task form.
| Author a reusable Store package | **Create Harness** |
| Start the bundled agent from the installed OS home | **Start OpenCode** |
| Set up wireless networking | **Connect to Wi-Fi** |
+| Answer a task that waits for you, as a meeting invite | **Accept**, **Decline**; a declined task reads **Declined**. Never Approve or Reject for a task. |
+| Choose whether the tasks you ask for wait for you | **Accept all**, **Ask me** |
+
+**Auto-approve** under the Cmd-N box keeps its name: it is what an agent may do
+on the computer, not an answer to a task. Command and field names in code
+(`task.approve`, `task.reject`, `autoApprove`, `review`) stay as they are.
Use the object's own name where possible: **Blender**, **Web Viewer**, or the
person's project name. Keep task instructions in the conversation and technical
diff --git a/docs/plans/2026-11-07-tasks-pane-quiet-plan.md b/docs/plans/2026-11-07-tasks-pane-quiet-plan.md
new file mode 100644
index 000000000..2364f8dba
--- /dev/null
+++ b/docs/plans/2026-11-07-tasks-pane-quiet-plan.md
@@ -0,0 +1,73 @@
+# Tasks pane: quiet cards (task #4468)
+
+**Goal:** Redraw the Swarm Tasks pane to anh Dee's quiet rules: a plain header, hairline cards, a grey project
+capsule, 18-point faces, and Approve and Reject only while a task waits.
+
+**Architecture:** Two files change. `personal_task_card.dart` draws the card: a hairline at radius 10 with no shadow,
+the project tag as a neutral capsule, the status mark top right, the title, then two 18 faces and, while the task
+waits, Reject as text and Approve as the theme's blue capsule. `personal_tasks_pane.dart` draws the header: "Tasks"
+13 semibold, and the approval choice as plain 12 secondary text on the app's one dropdown (`AppDropdown`), whose
+chevron and fill show only on hover or while open. Status marks and faces come from #4461 (PR #3533); main is merged
+after it lands, then the Tasks pane joins its gallery and design-doc section.
+
+**Tech Stack:** Flutter (Desktop), flutter_test widget tests, the #4461 gallery goldens.
+
+**Spec:** task #4468 brief (River, from anh Dee's agreed redraw, 11-07 15:35).
+
+Way of working: the project's Engineer flow: plan first, each task's failing test committed before its code, one
+pull request, one independent review.
+
+## Global Constraints
+
+- Desktop only; only `desktop/lib/super_tabs/tasks/` plus the doc and gallery entries for what changes.
+- Named roles only (`scripts/check-ui-style.py` stays clean): card `AppCard.base`, hairline `DesktopChrome.rim`,
+ radius `AppDesktop.rowRadius` (10), tag fill `AppSurface.wellFill`, tag and mode text `DesktopChrome.muted`.
+- Sizes: "Tasks" 13 semibold; title 13 medium, up to three lines; details 12; faces 18.
+- Grey everywhere; blue only on Approve; colour only on agent faces.
+- Light and dark, the pane at 340 inside windows of 880 and wide.
+
+## Review Focus
+
+- The mode choice keeps its width on hover: the chevron's room is held at rest, so the text never jumps.
+- A selected card differs from the others by fill alone, without a blue rim or a shadow.
+- A long project name ellipsizes inside its capsule and never pushes the status mark off the card.
+- A task that stops waiting loses Approve and Reject at once; a disabled pair still shows while a change is sent.
+- Keyboard: the mode choice opens with Enter or Space and shows its chevron while focused.
+
+## Task 1: the quiet card
+
+**Files:** `desktop/lib/super_tabs/tasks/personal_task_card.dart`, `personal_tasks_pane.dart` (face size),
+`desktop/test/super_tab_personal_tasks_pane_test.dart`.
+
+**Interfaces:** removes `superTabProjectColor`; `SuperTabPersonalTaskCard` becomes stateless, same parameters.
+
+- [ ] Test: the tag is filled `AppSurface.wellFill` with `DesktopChrome.muted` text; the card is a `DesktopChrome.rim`
+ hairline at radius 10 with no shadow, selected or not; both faces are 18; a long project name keeps the mark
+ inside the card.
+- [ ] Watch it fail.
+- [ ] Draw the card; drop the project colour and its test.
+- [ ] Pass.
+
+## Task 2: the quiet header
+
+**Files:** `desktop/lib/super_tabs/tasks/personal_tasks_pane.dart`, `desktop/test/super_tab_personal_tasks_pane_test.dart`.
+
+**Interfaces:** the trigger keeps key `tasks-approval-mode`; rows are `AppMenuItem`s with the stored one selected.
+
+- [ ] Test: "Tasks" is 13 semibold; the choice shows "Auto approve" in 12 secondary text with its chevron invisible
+ at rest and visible on hover and focus, the same width both ways; no `DropdownButton`; picking Review sends
+ the command once.
+- [ ] Watch it fail.
+- [ ] Draw the header.
+- [ ] Pass.
+
+## Task 3: gallery and doc (after #4461 merges)
+
+**Files:** `desktop/test/swarm_elements_gallery_test.dart`, its goldens, `desktop/design/desktop-design-system.md`.
+
+- [ ] Merge main; resolve the status mark in the card toward #4461's marks.
+- [ ] Gallery: the Tasks header and a waiting, a working and a selected card in light and dark; fails before the
+ images are regenerated.
+- [ ] Regenerate with `--update-goldens`, inspect, commit.
+- [ ] Doc: the Tasks pane card and header lines in the Swarm elements section.
+- [ ] Screenshots: the pane in light and dark at 880 and wide.