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.

Merge batch 11-06 k1415: #3365 (#3374)

0xken15219ed17629f7
diff --git a/desktop/lib/shared/theme/app_icons.dart b/desktop/lib/shared/theme/app_icons.dart
index e9001fccc..a4528b856 100644
--- a/desktop/lib/shared/theme/app_icons.dart
+++ b/desktop/lib/shared/theme/app_icons.dart
@@ -159,6 +159,8 @@ abstract final class AppIcons {
static const panelLeft = LucideIcons.panelLeft400;
static const panelLeftClose = LucideIcons.panelLeftClose400;
static const panelLeftOpen = LucideIcons.panelLeftOpen400;
+ static const panelRightClose = LucideIcons.panelRightClose400;
+ static const panelRightOpen = LucideIcons.panelRightOpen400;
static const panelsTopLeft = LucideIcons.panelsTopLeft400;
static const pause = LucideIcons.pause400;
static const pencil = LucideIcons.pencil400;
diff --git a/desktop/lib/super_tabs/buddies.dart b/desktop/lib/super_tabs/buddies.dart
index 35b3cda2f..15ea963e0 100644
--- a/desktop/lib/super_tabs/buddies.dart
+++ b/desktop/lib/super_tabs/buddies.dart
@@ -887,7 +887,11 @@ class _BuddyStartState extends State<_BuddyStart> {
if (machines.isEmpty)
BuddyNoMachine(machines: machines)
else
- Row(
+ // Wraps in a narrow pane: the Buddy chat beside the Board is about 300 px wide (task #3787).
+ Wrap(
+ spacing: grid.AppDesktop.controlGap,
+ runSpacing: grid.AppDesktop.controlGap,
+ crossAxisAlignment: WrapCrossAlignment.center,
children: [
BuddyMachineField(
key: const ValueKey('super-buddy-start-machine'),
@@ -903,7 +907,6 @@ class _BuddyStartState extends State<_BuddyStart> {
});
},
),
- const SizedBox(width: 8),
SizedBox(
width: 120,
child: AppSelectField<String>(
@@ -921,7 +924,6 @@ class _BuddyStartState extends State<_BuddyStart> {
},
),
),
- const SizedBox(width: 8),
FilledButton(
onPressed: busy || machine == null || keptBlock != null
? null
diff --git a/desktop/lib/super_tabs/message_row.dart b/desktop/lib/super_tabs/message_row.dart
index 4a7d57282..8784b57de 100644
--- a/desktop/lib/super_tabs/message_row.dart
+++ b/desktop/lib/super_tabs/message_row.dart
@@ -71,6 +71,7 @@ class SuperTabMessageRow extends StatefulWidget {
this.machineName,
this.reply,
this.replyAuthor,
+ this.quoteThreadReply = false,
this.replyGone = false,
this.grouped = false,
this.onReply,
@@ -161,6 +162,10 @@ class SuperTabMessageRow extends StatefulWidget {
final SuperTabMessage? reply;
final String? replyAuthor;
+ /// A thread reply in a flat chat (Desktop, task #3787) says what it answers, as an older reply does: it does not
+ /// sit under its root there.
+ final bool quoteThreadReply;
+
/// The original [reply] would show is no longer in the conversation.
final bool replyGone;
final bool grouped;
@@ -789,8 +794,10 @@ class _SuperTabMessageRowState extends State<SuperTabMessageRow> {
),
// A thread reply sits under its root, so it
// quotes nothing; an older reply keeps its quote.
- if (message.replyTo != null &&
- !message.threadReply)
+ if ((message.replyTo != null &&
+ !message.threadReply) ||
+ (widget.quoteThreadReply &&
+ widget.reply != null))
Padding(
padding: const EdgeInsets.only(bottom: 8),
child: SuperTabReplyPreview(
diff --git a/desktop/lib/super_tabs/project_sidebar.dart b/desktop/lib/super_tabs/project_sidebar.dart
index 3e9889157..9c0993107 100644
--- a/desktop/lib/super_tabs/project_sidebar.dart
+++ b/desktop/lib/super_tabs/project_sidebar.dart
@@ -61,11 +61,15 @@ class ProjectSidebar extends StatelessWidget {
this.places,
this.onOpenBuddyChat,
this.compact = false,
+ this.board = false,
});
final SuperTabController controller;
/// A phone's layout: its rows keep the app's sizes, not Slack desktop's ([SwarmType]).
final bool compact;
+
+ /// Desktop's Board layout (anh Dee, task #3787): no Threads row and no Buddy entry, the Buddy being the right pane.
+ final bool board;
final ValueChanged<String> onSelect;
final AppNotifier? app;
final VoidCallback? onNewProject;
@@ -746,14 +750,15 @@ class ProjectSidebar extends StatelessWidget {
icon: AppIcons.atSign,
waiting: mentions,
),
- _pageRow(
- onPage,
- target: SwarmPage.threads,
- key: 'super-threads',
- label: 'Threads',
- icon: AppIcons.messagesSquare,
- waiting: threads,
- ),
+ if (!board)
+ _pageRow(
+ onPage,
+ target: SwarmPage.threads,
+ key: 'super-threads',
+ label: 'Threads',
+ icon: AppIcons.messagesSquare,
+ waiting: threads,
+ ),
],
const SizedBox(height: 20),
SuperTabSectionHeading(
@@ -778,13 +783,13 @@ class ProjectSidebar extends StatelessWidget {
),
// The reader's one Buddy, the first item under Projects (anh
// Dee, 11-05).
- if (controller.oneBuddy) ?_swarmBuddyRow(),
+ if (controller.oneBuddy && !board) ?_swarmBuddyRow(),
for (final (_, channel) in _channels(snapshot, reading))
channel,
const SizedBox(height: 16),
// Buddies replaced Chat with PM in every Swarm (Ken, 10-29); where the
// server gives one Buddy for the whole Swarm, it is # buddy above.
- if (!controller.oneBuddy) ...[
+ if (!controller.oneBuddy && !board) ...[
SuperTabSectionHeading(
'Buddies',
titleStyle: _headingStyle,
diff --git a/desktop/lib/super_tabs/pulse_strip.dart b/desktop/lib/super_tabs/pulse_strip.dart
index 4237a5f55..41f94b945 100644
--- a/desktop/lib/super_tabs/pulse_strip.dart
+++ b/desktop/lib/super_tabs/pulse_strip.dart
@@ -13,10 +13,10 @@ import 'pulse.dart';
import 'visible_tick.dart';
/// The strip on top of a project's Tasks board (task #3384):
-/// `Waiting for River: 2 asks · oldest 14m (Huy) │ Working 6 of 10 │ Next up 7
-/// │ Lost 0 │ Held 3`. Each count opens its list. A count is red from its
-/// rule's `redAt` on, said by the error ink, a bold label and an alert icon
-/// together; the strip's rim turns red with it.
+/// `Waiting for River: 2 asks · oldest 14m (Huy)`, `Working 6 of 10`, `Next up
+/// 7`, `Lost 0`, `Held 3`, each a small chip (task #3787). Each count opens its
+/// list. A count is red from its rule's `redAt` on, said by the error ink, a
+/// bold label and an alert icon together; its chip's rim turns red with it.
class SuperTabPulseStrip extends StatefulWidget {
const SuperTabPulseStrip({
super.key,
@@ -162,7 +162,6 @@ class _SuperTabPulseStripState extends State<SuperTabPulseStrip>
grid.AppTheme.watch(context);
final now = widget.now();
final pulse = widget.pulse;
- final error = Theme.of(context).colorScheme.error;
bool red(SuperTabPulseRule rule) => pulse.isRed(rule, now);
final parts = [
_segment(
@@ -203,39 +202,19 @@ class _SuperTabPulseStripState extends State<SuperTabPulseStrip>
),
),
];
- return DecoratedBox(
+ // Small chips, one per count (anh Dee, task #3787): a red one rims
+ // itself, not the whole strip.
+ return KeyedSubtree(
key: const ValueKey('super-pulse'),
- decoration: BoxDecoration(
- color: grid.AppCard.base,
- borderRadius: BorderRadius.circular(grid.AppCard.radius),
- border: Border.all(
- color: pulse.anyRed(now) ? error : grid.AppCard.hair,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(grid.AppDesktop.listRowGap),
- child: Wrap(
- crossAxisAlignment: WrapCrossAlignment.center,
- children: [
- for (final (i, part) in parts.indexed) ...[
- if (i > 0) _divider(),
- part,
- ],
- ],
- ),
+ child: Wrap(
+ spacing: grid.AppDesktop.menuInset,
+ runSpacing: grid.AppDesktop.menuInset,
+ crossAxisAlignment: WrapCrossAlignment.center,
+ children: parts,
),
);
}
- Widget _divider() => SizedBox(
- height: AppIcons.inlineSize,
- child: VerticalDivider(
- width: grid.AppDesktop.listRowGap,
- thickness: 1,
- color: grid.AppCard.hair,
- ),
- );
-
/// One count: its words, red by [redBy] when that rule has passed, opening
/// [rows] beneath it.
Widget _segment(
@@ -258,33 +237,46 @@ class _SuperTabPulseStripState extends State<SuperTabPulseStrip>
children: rows,
builder: (context, menu, _) => Semantics(
button: true,
- child: InkWell(
- key: ValueKey('super-pulse-$name'),
- borderRadius: BorderRadius.circular(DesktopChrome.rowRadius),
- hoverColor: grid.AppSurface.hoverFill,
- onTap: () => menu.isOpen ? menu.close() : menu.open(),
- child: Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: grid.AppDesktop.controlGap,
- vertical: grid.AppDesktop.menuInset,
+ child: Material(
+ type: MaterialType.transparency,
+ child: Ink(
+ key: ValueKey('super-pulse-chip-$name'),
+ decoration: ShapeDecoration(
+ color: grid.AppSurface.wellFill,
+ shape: StadiumBorder(
+ side: red ? BorderSide(color: error) : BorderSide.none,
+ ),
),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- if (red) ...[
- Tooltip(
- message: _why(redBy),
- child: Icon(
- AppIcons.circleAlert,
- size: AppIcons.inlineSize,
- color: error,
- semanticLabel: _why(redBy),
- ),
- ),
- const SizedBox(width: grid.AppDesktop.menuInset),
- ],
- Text(text, style: style),
- ],
+ child: InkWell(
+ key: ValueKey('super-pulse-$name'),
+ customBorder: const StadiumBorder(),
+ hoverColor: grid.AppSurface.hoverFill,
+ onTap: () => menu.isOpen ? menu.close() : menu.open(),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(
+ horizontal:
+ grid.AppDesktop.controlGap + grid.AppDesktop.listRowGap,
+ vertical: grid.AppDesktop.paneCloseInset,
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ if (red) ...[
+ Tooltip(
+ message: _why(redBy),
+ child: Icon(
+ AppIcons.circleAlert,
+ size: AppIcons.inlineSize,
+ color: error,
+ semanticLabel: _why(redBy),
+ ),
+ ),
+ const SizedBox(width: grid.AppDesktop.menuInset),
+ ],
+ Text(text, style: style),
+ ],
+ ),
+ ),
),
),
),
diff --git a/desktop/lib/super_tabs/task_card.dart b/desktop/lib/super_tabs/task_card.dart
index 2aff0182d..284ceda93 100644
--- a/desktop/lib/super_tabs/task_card.dart
+++ b/desktop/lib/super_tabs/task_card.dart
@@ -11,14 +11,17 @@ import 'backlog.dart';
import 'chip.dart';
/// One card of a project's Tasks view, on the Board and as a List row alike:
-/// its title (up to [titleLines]), its caption led by its [priority] badge
-/// (task #3117), and its shared activity mark.
+/// its title (up to [titleLines]), its caption led by its [priority] (task
+/// #3117), and its shared activity mark.
///
-/// On the Board it is a [tile] (task #2948): an inset tile set into its
-/// column's panel, one step less rounded than the panel, with no shadow.
-/// The task the reader has open is [selected]: the sidebar's selected-row
-/// fill, not the blue keyboard selection, and said to a screen reader.
-class SuperTabTaskCard extends StatelessWidget {
+/// On the Board it is a [tile], drawn as Trello draws a card (anh Dee, task
+/// #3787): raised card material on its column's tinted lane, rounded one
+/// step less than the lane, with a soft shadow that lifts on hover; its
+/// [lane]'s colour label on top, then the title, then one quiet line of
+/// priority and caption. The task the reader has open is [selected]: the
+/// sidebar's selected-row fill, not the blue keyboard selection, and said to
+/// a screen reader.
+class SuperTabTaskCard extends StatefulWidget {
const SuperTabTaskCard({
super.key,
required this.title,
@@ -28,6 +31,7 @@ class SuperTabTaskCard extends StatelessWidget {
required this.activity,
required this.onOpen,
this.priority,
+ this.lane,
this.titleLines = 2,
this.captionLines = 1,
this.tile = false,
@@ -40,6 +44,10 @@ class SuperTabTaskCard extends StatelessWidget {
final HarnessActivity activity;
final VoidCallback onOpen;
final SuperTabTaskPriority? priority;
+
+ /// The crew lane the task is handed out in ("Desktop"), its label on a
+ /// Board tile; null when no lane owns it.
+ final String? lane;
final int titleLines;
/// How many lines the caption takes; null takes as many as it needs.
@@ -47,106 +55,80 @@ class SuperTabTaskCard extends StatelessWidget {
final bool tile, selected;
final Widget? trailing;
+ /// A tile's padding: the spacing scale's 12, between the control and the
+ /// group gap.
+ static const tilePadding =
+ (grid.AppDesktop.controlGap + grid.AppDesktop.groupGap) / 2;
+
+ @override
+ State<SuperTabTaskCard> createState() => _SuperTabTaskCardState();
+}
+
+/// A lane's label colour: one of the roster's hand-picked hues, which carry
+/// white at 5:1 or more and stay the same in both appearances, so a lane is
+/// found by its colour before it is read. Red and amber are left to P0 and P1.
+Color superTabLaneColor(String lane) {
+ const palette = grid.AppPalette.avatarPalette;
+ return switch (lane.toLowerCase()) {
+ 'desktop' => palette[0],
+ 'cli' => palette[1],
+ 'mobile' => palette[2],
+ 'backend' => palette[5],
+ 'docs' => palette[6],
+ _ => palette[7],
+ };
+}
+
+class _SuperTabTaskCardState extends State<SuperTabTaskCard> {
+ bool _hovered = false;
+
@override
Widget build(BuildContext context) {
grid.AppTheme.watch(context);
- final muted = DesktopChrome.metadata();
+ final w = widget;
return Semantics(
button: true,
- selected: selected ? true : null,
+ selected: w.selected ? true : null,
label: [
- title,
- if (priority case final priority?) 'Priority ${priority.badge}',
- caption,
- if (!needsYou)
- switch (activity) {
+ w.title,
+ ?w.lane,
+ if (w.priority case final priority?) 'Priority ${priority.badge}',
+ w.caption,
+ if (!w.needsYou)
+ switch (w.activity) {
HarnessActivity.starting => 'Queued',
HarnessActivity.needsInput => 'Waiting on a person',
HarnessActivity.offline => 'Blocked or agent lost',
HarnessActivity.done => 'Shipped',
- _ => activity.label,
+ _ => w.activity.label,
},
- if (unread) 'New replies',
+ if (w.unread) 'New replies',
].join(', '),
excludeSemantics: true,
child: _surface(
Padding(
- padding: EdgeInsets.symmetric(
- horizontal: grid.AppDesktop.controlGap,
- vertical: tile
- ? grid.AppDesktop.controlGap
- : grid.AppDesktop.menuInset,
- ),
- child: Row(
+ padding: w.tile
+ ? const EdgeInsets.all(SuperTabTaskCard.tilePadding)
+ : const EdgeInsets.symmetric(
+ horizontal: grid.AppDesktop.controlGap,
+ vertical: grid.AppDesktop.menuInset,
+ ),
+ child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- title,
- maxLines: titleLines,
- overflow: TextOverflow.ellipsis,
- style:
- DesktopChrome.control(color: DesktopChrome.foreground)
- .copyWith(
- fontWeight: unread
- ? FontWeight.w600
- : FontWeight.w400,
- ),
- ),
- if (priority != null || caption.isNotEmpty)
- Padding(
- padding: EdgeInsets.only(
- top: priority == null
- ? 0
- : grid.AppDesktop.listRowGap,
- ),
- child: Row(
- children: [
- if (priority case final priority?) ...[
- SuperTabPriorityBadge(priority),
- const SizedBox(width: grid.AppDesktop.menuInset),
- ],
- Flexible(
- child: Text(
- caption,
- maxLines: captionLines,
- // An ellipsis without a line limit still cuts
- // the text to one line.
- overflow: captionLines == null
- ? TextOverflow.clip
- : TextOverflow.ellipsis,
- style: muted,
- ),
- ),
- ],
- ),
- ),
- ],
- ),
+ if (w.tile && w.lane != null) ...[
+ _LaneLabel(w.lane!),
+ const SizedBox(height: grid.AppDesktop.controlGap),
+ ],
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(child: _text()),
+ const SizedBox(width: grid.AppDesktop.controlGap),
+ _mark(),
+ ?w.trailing,
+ ],
),
- const SizedBox(width: grid.AppDesktop.menuInset),
- ListenableBuilder(
- listenable: Listenable.merge([
- terminalThemeStore,
- appearancePrefsStore,
- ]),
- builder: (context, _) => ActivityMark(
- activity: activity,
- color: activityColor(
- activity,
- terminalThemeFor(
- grid.AppTheme.surfacePalette,
- terminalThemeStore.value,
- ),
- color: appearancePrefsStore.value.prompt.color,
- ),
- tooltip: false,
- ),
- ),
- ?trailing,
],
),
),
@@ -154,32 +136,124 @@ class SuperTabTaskCard extends StatelessWidget {
);
}
+ /// The title, the card's strongest text, over its one quiet line.
+ Widget _text() {
+ final w = widget;
+ final hasLine = w.priority != null || w.caption.isNotEmpty;
+ return Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ w.title,
+ maxLines: w.titleLines,
+ overflow: TextOverflow.ellipsis,
+ style: DesktopChrome.control(color: DesktopChrome.foreground)
+ .copyWith(
+ // Unread out-ranks the medium every tile title has.
+ fontWeight: w.unread
+ ? grid.AppFont.semibold
+ : w.tile
+ ? grid.AppFont.medium
+ : grid.AppFont.regular,
+ height: w.tile ? 1.35 : null,
+ ),
+ ),
+ if (hasLine)
+ Padding(
+ padding: EdgeInsets.only(
+ top: w.tile
+ ? grid.AppDesktop.menuInset
+ : w.priority == null
+ ? 0
+ : grid.AppDesktop.listRowGap,
+ ),
+ child: Row(
+ crossAxisAlignment: w.captionLines == null
+ ? CrossAxisAlignment.start
+ : CrossAxisAlignment.center,
+ children: [
+ if (w.priority case final priority?) ...[
+ if (w.tile)
+ _PriorityMark(priority)
+ else
+ SuperTabPriorityBadge(priority),
+ const SizedBox(width: grid.AppDesktop.menuInset),
+ ],
+ Flexible(
+ child: Text(
+ w.caption,
+ maxLines: w.captionLines,
+ // An ellipsis without a line limit still cuts the text
+ // to one line.
+ overflow: w.captionLines == null
+ ? TextOverflow.clip
+ : TextOverflow.ellipsis,
+ style: DesktopChrome.metadata(),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ );
+ }
+
+ Widget _mark() => ListenableBuilder(
+ listenable: Listenable.merge([terminalThemeStore, appearancePrefsStore]),
+ builder: (context, _) => ActivityMark(
+ activity: widget.activity,
+ color: activityColor(
+ widget.activity,
+ terminalThemeFor(
+ grid.AppTheme.surfacePalette,
+ terminalThemeStore.value,
+ ),
+ color: appearancePrefsStore.value.prompt.color,
+ ),
+ tooltip: false,
+ ),
+ );
+
/// A List row is a plain row that takes the list's hover, filled when it is
- /// selected; a Board tile is inset material of its own. Each fill is [Ink]
- /// on its own [Material], so the hover paints over it inside its panel.
+ /// selected; a Board tile is raised card material of its own, its shadow a
+ /// step deeper under the pointer. Each fill is [Ink] on its own [Material],
+ /// so the hover paints over it inside its lane.
Widget _surface(Widget body) {
+ final w = widget;
final radius = BorderRadius.circular(
- tile ? grid.AppCard.insetRadius : DesktopChrome.rowRadius,
+ w.tile ? grid.AppCard.insetRadius : DesktopChrome.rowRadius,
);
final ink = InkWell(
- onTap: onOpen,
+ onTap: w.onOpen,
+ onHover: w.tile
+ ? (hovered) {
+ if (hovered != _hovered) setState(() => _hovered = hovered);
+ }
+ : null,
hoverColor: grid.AppSurface.hoverFill,
focusColor: grid.AppSurface.hoverFill,
borderRadius: radius,
child: body,
);
- if (!tile && !selected) return ink;
+ if (!w.tile && !w.selected) return ink;
final fill = grid.AppSurface.selectedFill;
return Material(
type: MaterialType.transparency,
child: Ink(
- decoration: tile
+ decoration: w.tile
? BoxDecoration(
- color: selected
- ? Color.alphaBlend(fill, grid.AppCard.inset)
- : grid.AppCard.inset,
+ color: w.selected
+ ? Color.alphaBlend(fill, grid.AppCard.base)
+ : grid.AppCard.base,
borderRadius: radius,
- border: Border.all(color: grid.AppCard.insetHair),
+ border: Border.all(
+ color: w.selected
+ ? grid.AppGlass.lift
+ : grid.AppCard.insetHair,
+ ),
+ boxShadow: _hovered
+ ? grid.AppGlass.shadow
+ : grid.AppGlass.cardShadow,
)
: BoxDecoration(color: fill, borderRadius: radius),
child: ink,
@@ -187,3 +261,66 @@ class SuperTabTaskCard extends StatelessWidget {
);
}
}
+
+/// A lane's label, as Trello labels a card: a small capsule of the lane's
+/// colour with its name in white, so the colour is never the only cue.
+class _LaneLabel extends StatelessWidget {
+ const _LaneLabel(this.lane);
+ final String lane;
+
+ @override
+ Widget build(BuildContext context) => DecoratedBox(
+ key: ValueKey('super-task-lane-$lane'),
+ decoration: BoxDecoration(
+ color: superTabLaneColor(lane),
+ borderRadius: BorderRadius.circular(grid.AppDesktop.paneCloseInset),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(
+ horizontal: grid.AppDesktop.menuInset,
+ vertical: grid.AppDesktop.listRowGap / 2,
+ ),
+ child: Text(
+ lane,
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: DesktopChrome.metadata(color: grid.AppDesktop.onSelection)
+ .copyWith(fontWeight: grid.AppFont.medium, height: 1.25),
+ ),
+ ),
+ );
+}
+
+/// A tile's priority, kept small: P0 and P1 lead with a dot of their ink (red,
+/// amber) and say their name in it; P2 and P3 are a quiet word.
+class _PriorityMark extends StatelessWidget {
+ const _PriorityMark(this.priority);
+ final SuperTabTaskPriority priority;
+
+ @override
+ Widget build(BuildContext context) {
+ final color = superTabPriorityColor(priority);
+ final loud =
+ priority == SuperTabTaskPriority.p0 ||
+ priority == SuperTabTaskPriority.p1;
+ return Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ if (loud) ...[
+ SizedBox.square(
+ dimension: grid.AppDesktop.menuInset,
+ child: DecoratedBox(
+ decoration: BoxDecoration(color: color, shape: BoxShape.circle),
+ ),
+ ),
+ const SizedBox(width: grid.AppDesktop.paneCloseInset),
+ ],
+ Text(
+ priority.badge,
+ style: DesktopChrome.metadata(color: color)
+ .copyWith(fontWeight: loud ? grid.AppFont.semibold : null),
+ ),
+ ],
+ );
+ }
+}
diff --git a/desktop/lib/super_tabs/tasks_view.dart b/desktop/lib/super_tabs/tasks_view.dart
index 25295f82d..488ac982b 100644
--- a/desktop/lib/super_tabs/tasks_view.dart
+++ b/desktop/lib/super_tabs/tasks_view.dart
@@ -331,7 +331,11 @@ class _SuperTabTasksViewState extends State<SuperTabTasksView> {
static const _columnGap = grid.AppDesktop.groupGap;
Widget _heading(SuperTabTaskColumn column, int count, {bool? folded}) {
- final style = DesktopChrome.control(medium: true);
+ // A Board lane's name is its bold title, as Trello's (task #3787).
+ final style = folded == null
+ ? DesktopChrome.control(color: DesktopChrome.foreground)
+ .copyWith(fontWeight: grid.AppFont.semibold)
+ : DesktopChrome.control(medium: true);
final row = Row(
children: [
if (folded != null)
@@ -433,7 +437,8 @@ class _SuperTabTasksViewState extends State<SuperTabTasksView> {
return HarnessActivity.working;
}
- /// [entry]'s card; [lane] leads its caption (Members' Unassigned).
+ /// [entry]'s card; [lane] is its label (Members' Unassigned), else its
+ /// task's hand-out lane.
Widget _card(
SuperTabTaskEntry entry,
DateTime now, {
@@ -449,7 +454,11 @@ class _SuperTabTasksViewState extends State<SuperTabTasksView> {
title: task == null
? entry.proposal!.title
: superTabTitlePriority(task.title).title,
- caption: [?lane, if (caption.isNotEmpty) caption].join(' · '),
+ caption: list
+ ? [?lane, if (caption.isNotEmpty) caption].join(' · ')
+ : caption,
+ // A tile wears its lane as a label on top (task #3787).
+ lane: list ? null : lane ?? task?.handOutLane,
priority: superTabEntryPriority(entry),
needsYou: entry.needsYou,
unread: task != null && widget.controller.unreadShown(task),
@@ -494,26 +503,43 @@ class _SuperTabTasksViewState extends State<SuperTabTasksView> {
),
);
- /// One column of the Board or of Members: card material with its hairline
- /// rim at the card radius, and no shadow, which is for floating content
- /// only; [heading] over [body], which fills the rest.
+ /// A lane's tint, as Trello's lists (anh Dee, task #3787): a step off the
+ /// page, darker in light under white cards and darker in dark under lifted
+ /// ones, with no rim or shadow.
+ static Color get _laneFill =>
+ grid.AppTheme.pick(grid.AppSurface.wellFill, grid.AppPalette.panelBg);
+
+ /// Inside a lane, around its cards: inside the scroll view, so a card's
+ /// shadow is never cut at the lane's edge.
+ static const _laneInset = EdgeInsets.fromLTRB(
+ grid.AppDesktop.controlGap,
+ grid.AppDesktop.listRowGap,
+ grid.AppDesktop.controlGap,
+ 0,
+ );
+
+ /// One column of the Board or of Members: a tinted lane at the card radius
+ /// ([_laneFill]); [heading] over [body], which fills the rest.
Widget _framed(Key key, Widget heading, Widget body) => DecoratedBox(
key: key,
decoration: BoxDecoration(
- color: grid.AppCard.base,
+ color: _laneFill,
borderRadius: BorderRadius.circular(grid.AppCard.radius),
- border: Border.all(color: grid.AppCard.hair),
),
- child: Padding(
- padding: const EdgeInsets.all(grid.AppDesktop.controlGap),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- heading,
- const SizedBox(height: grid.AppDesktop.listRowGap),
- Expanded(child: body),
- ],
- ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ Padding(
+ padding: const EdgeInsets.fromLTRB(
+ SuperTabTaskCard.tilePadding,
+ grid.AppDesktop.controlGap,
+ SuperTabTaskCard.tilePadding,
+ grid.AppDesktop.listRowGap,
+ ),
+ child: heading,
+ ),
+ Expanded(child: body),
+ ],
),
);
@@ -541,6 +567,7 @@ class _SuperTabTasksViewState extends State<SuperTabTasksView> {
: column == SuperTabTaskColumn.nextUp
? _nextUp(entries, now)
: LaidOutListView.builder(
+ padding: _laneInset,
itemCount: entries.length,
itemBuilder: (context, i) => Padding(
padding: const EdgeInsets.only(
@@ -584,6 +611,7 @@ class _SuperTabTasksViewState extends State<SuperTabTasksView> {
key,
heading,
LaidOutListView.builder(
+ padding: _laneInset,
itemCount: rows.length,
itemBuilder: (context, i) => rows[i],
),
@@ -803,6 +831,7 @@ class _SuperTabTasksViewState extends State<SuperTabTasksView> {
(Offset.zero & box.size).contains(event.localPosition);
},
child: ReorderableListView.builder(
+ padding: _laneInset,
buildDefaultDragHandles: false,
itemCount: ordered.length,
onReorderItem: (from, to) {
diff --git a/desktop/lib/super_tabs/view.dart b/desktop/lib/super_tabs/view.dart
index 50726503e..6d5fd2785 100644
--- a/desktop/lib/super_tabs/view.dart
+++ b/desktop/lib/super_tabs/view.dart
@@ -20,6 +20,7 @@ import '../widgets/desktop_chrome.dart';
import '../widgets/finger_target.dart';
import '../widgets/new_harness_attachments.dart';
import '../widgets/new_harness_paste.dart';
+import '../core/local_key_value_store.dart';
import '../state/app_state.dart';
import '../state/harness_attachments.dart';
import '../state/workspace_chrome.dart';
@@ -135,8 +136,18 @@ class SuperTabView extends StatefulWidget {
this.onChooseAgentTerminal,
this.linkSwarms,
this.voiceRecorder,
+ this.paneStore,
+ this.board = false,
});
final SuperTabController controller;
+
+ /// Where the hidden left rail and Buddy pane are remembered (task #3787); the app's local store when null.
+ final LocalKeyValueStore? paneStore;
+
+ /// Desktop's layout of task #3787 (anh Dee): a project opens its Board with the person's Buddy beside it, the left
+ /// rail has no Buddy entry and no Threads, and a chat is one flat list (old thread replies inline in time order, a
+ /// reply quoting its message). The web keeps today's layout for now.
+ final bool board;
final VoidCallback onInvite;
final ValueChanged<SuperTabConversation> onAddAgent;
final ValueChanged<SuperTabAgent> onOpenTerminal;
@@ -200,6 +211,75 @@ class _SuperTabViewState extends State<SuperTabView>
/// requests does for a task.
bool _showTasks = false;
+ /// The project whose Board holds the middle pane, with the selected chat (the person's Buddy, or a card's task) on
+ /// the right (anh Dee, task #3787): opening a project shows its Board, not its chat.
+ String? _boardProjectId;
+
+ /// The left rail and the Buddy pane, hidden by their icons; remembered ([_paneStore]).
+ bool _leftHidden = false, _rightHidden = false;
+ static const _leftHiddenKey = 'swarm_left_pane_hidden';
+ static const _rightHiddenKey = 'swarm_right_pane_hidden';
+ LocalKeyValueStore? get _paneStore =>
+ widget.paneStore ?? widget.app?.localStore;
+
+ Future<void> _loadPanes() async {
+ final store = _paneStore;
+ if (store == null) return;
+ try {
+ final left = await store.read(_leftHiddenKey) == '1';
+ final right = await store.read(_rightHiddenKey) == '1';
+ if (!mounted) return;
+ setState(() {
+ _leftHidden = left;
+ _rightHidden = right;
+ });
+ } catch (_) {
+ // Unreadable: both panes show.
+ }
+ }
+
+ void _togglePane({required bool left}) {
+ setState(() {
+ if (left) {
+ _leftHidden = !_leftHidden;
+ } else {
+ _rightHidden = !_rightHidden;
+ }
+ });
+ final store = _paneStore;
+ if (store == null) return;
+ final hidden = left ? _leftHidden : _rightHidden;
+ unawaited(
+ store
+ .write(left ? _leftHiddenKey : _rightHiddenKey, hidden ? '1' : '0')
+ .catchError((Object _) {}),
+ );
+ }
+
+ /// Opens [project]'s Board in the middle, with the person's Buddy on the right.
+ void _openBoard(SuperTabProject project) {
+ c.leaveDevices();
+ widget.onCloseTerminal?.call();
+ setState(() {
+ _page = null;
+ _showManage = _showTasks = _showPullRequests = false;
+ _boardProjectId = project.id;
+ });
+ _showBuddy(project);
+ _closeSidebar();
+ }
+
+ /// The person's Buddy chat on the right: the Swarm's one Buddy, or this project's.
+ void _showBuddy(SuperTabProject project) {
+ final key = c.oneBuddy ? SuperTabController.kSwarmBuddyKey : project.id;
+ final chat = c.buddyChat(key);
+ if (chat != null) {
+ unawaited(c.select(chat.id));
+ } else {
+ unawaited(c.openBuddyChat(key));
+ }
+ }
+
/// The card the board shows selected (task #2948): the task or proposal
/// last opened from it, or the task whose chat the board was opened from.
String? _tasksSelectedId;
@@ -350,6 +430,7 @@ class _SuperTabViewState extends State<SuperTabView>
c.addListener(_changed);
c.addListener(_holdVoiceAway);
c.buddyChatOpener = _openBuddyChat;
+ unawaited(_loadPanes());
SuperTabChatNotices.of(c).chatShown = _chatShown;
SuperTabPlaces.of(c).addListener(_takePlace);
_registerDial();
@@ -1990,6 +2071,7 @@ class _SuperTabViewState extends State<SuperTabView>
}
Widget _sidebar() => ProjectSidebar(
+ board: widget.board,
controller: c,
compact: _phone,
app: widget.app,
@@ -2005,6 +2087,11 @@ class _SuperTabViewState extends State<SuperTabView>
// and the sidebar lists it as Slack does (task #2996).
onPage: _openPage,
onSelect: (id) {
+ // A project's row opens its Board (task #3787), never its chat.
+ final project = c.snapshot?.projects
+ .where((p) => p.leadConversationId == id)
+ .firstOrNull;
+ if (project != null && widget.board) return _openBoard(project);
setState(() {
_page = null;
_showManage = _showTasks = false;
@@ -2489,6 +2576,10 @@ class _SuperTabViewState extends State<SuperTabView>
/// The messages [id]'s list shows, in order.
/// A thread reply shows in its thread, and here only when also sent.
+ /// No Threads ([SuperTabView.threads]): a chat is one flat list, old thread replies inline in time order, and a
+ /// reply quotes its message rather than opening a thread.
+ bool get _flatChat => widget.board;
+
List<SuperTabMessage> _shownMessages(String id, {bool replies = false}) {
final messages = c.taskMessages(id);
final answered = answeredPromptAlerts(
@@ -2499,7 +2590,7 @@ class _SuperTabViewState extends State<SuperTabView>
.where(
(m) =>
_shown(m) &&
- (replies || m.inMainStream) &&
+ (replies || _flatChat || m.inMainStream) &&
!answered.contains(m.id),
)
.toList();
@@ -3421,9 +3512,131 @@ class _SuperTabViewState extends State<SuperTabView>
),
);
+ /// Above the Board: the left rail's icon, the project's name, and the Buddy pane's icon while it is hidden.
+ Widget _boardHeader(SuperTabProject project) => SizedBox(
+ height: 44,
+ child: Row(
+ children: [
+ const SizedBox(width: 8),
+ AppIconButton(
+ key: const ValueKey('super-pane-left-toggle'),
+ icon: _leftHidden ? AppIcons.panelLeftOpen : AppIcons.panelLeftClose,
+ tooltip: _leftHidden ? 'Show sidebar' : 'Hide sidebar',
+ onPressed: () => _togglePane(left: true),
+ ),
+ const SizedBox(width: 8),
+ Flexible(
+ child: Text(
+ project.name,
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: DesktopChrome.heading(),
+ ),
+ ),
+ const SizedBox(width: 12),
+ _projectTabs(project, board: true),
+ const Spacer(),
+ if (_rightHidden)
+ AppIconButton(
+ key: const ValueKey('super-pane-right-toggle'),
+ icon: AppIcons.panelRightOpen,
+ tooltip: 'Show your Buddy',
+ onPressed: () => _togglePane(left: false),
+ ),
+ const SizedBox(width: 8),
+ ],
+ ),
+ );
+
+ /// Board and Chat (Ken's review of the spec): the project's Board first, its chat a tab away while projects still
+ /// talk to their PM there.
+ Widget _projectTabs(SuperTabProject project, {required bool board}) => Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ for (final (key, label, selected, open) in [
+ ('super-board-tab-board', 'Board', board, () => _openBoard(project)),
+ (
+ 'super-board-tab-chat',
+ 'Chat',
+ !board,
+ () => _openProjectChat(project),
+ ),
+ ])
+ Padding(
+ padding: const EdgeInsetsDirectional.only(
+ end: grid.AppDesktop.listRowGap,
+ ),
+ child: TextButton(
+ key: ValueKey(key),
+ onPressed: selected ? null : open,
+ style: TextButton.styleFrom(
+ backgroundColor: selected ? grid.AppSurface.selectedFill : null,
+ foregroundColor: selected
+ ? DesktopChrome.foreground
+ : DesktopChrome.muted,
+ ),
+ child: Text(label),
+ ),
+ ),
+ ],
+ );
+
+ /// The project's chat in the middle, as before the Board: the Chat tab.
+ void _openProjectChat(SuperTabProject project) {
+ setState(() => _boardProjectId = null);
+ unawaited(c.select(project.leadConversationId));
+ }
+
+ /// The right pane beside the Board: the selected chat, flat, under a small header that goes back to the Buddy.
+ Widget _boardChat(Widget chat) {
+ final group = c.selected;
+ final project = c.snapshot?.projectById(_boardProjectId ?? '');
+ final onBuddy = group?.isBuddyChat == true;
+ return Column(
+ key: const ValueKey('super-board-chat'),
+ children: [
+ SizedBox(
+ height: 44,
+ child: Row(
+ children: [
+ const SizedBox(width: 12),
+ if (!onBuddy && project != null)
+ TextButton.icon(
+ key: const ValueKey('super-board-chat-buddy'),
+ onPressed: () => _showBuddy(project),
+ icon: const Icon(AppIcons.arrowLeft, size: 16),
+ label: const Text('Your Buddy'),
+ ),
+ Expanded(
+ child: Text(
+ onBuddy ? 'Your Buddy' : (group?.label ?? ''),
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: DesktopChrome.control().copyWith(
+ fontWeight: grid.AppFont.semibold,
+ ),
+ ),
+ ),
+ AppIconButton(
+ key: const ValueKey('super-pane-right-toggle'),
+ icon: AppIcons.panelRightClose,
+ tooltip: 'Hide your Buddy',
+ onPressed: () => _togglePane(left: false),
+ ),
+ const SizedBox(width: 8),
+ ],
+ ),
+ ),
+ Expanded(child: chat),
+ ],
+ );
+ }
+
/// The open project's Tasks view, while it holds the pane.
- Widget _tasksPage() {
- final project = _showTasks
+ Widget _tasksPage({String? boardProject}) {
+ final project = boardProject != null
+ ? c.snapshot?.projectById(boardProject)
+ : _showTasks
? c.snapshot?.projectById(c.selected?.projectId ?? '')
: null;
if (project == null) return const SizedBox.shrink();
@@ -3969,12 +4182,7 @@ class _SuperTabViewState extends State<SuperTabView>
item(
'Restart Buddy…',
() => unawaited(
- showRestartBuddy(
- context,
- c,
- group.projectId,
- app: widget.app,
- ),
+ showRestartBuddy(context, c, group.projectId, app: widget.app),
),
),
if (editable && c.buddy(group.projectId) != null)
@@ -4250,14 +4458,17 @@ class _SuperTabViewState extends State<SuperTabView>
final agent = message.fromAgent
? c.snapshot?.agent(message.authorId)
: null;
+ // In a flat chat a thread reply answers the message it names, else its thread's root (task #3787).
+ final flatReply =
+ _flatChat && message.threadReply && message.thread != message.id;
+ final answers = message.replyTo ?? (flatReply ? message.thread : null);
// An original outside the pages read is read by itself for its quote.
- final quoted = message.replyTo == null || byId.containsKey(message.replyTo)
+ final quoted = answers == null || byId.containsKey(answers)
? null
- : c.quoted(message.conversationId, message.replyTo!);
+ : c.quoted(message.conversationId, answers);
final fetched = quoted?.message;
final reply =
- byId[message.replyTo] ??
- (fetched != null && _shown(fetched) ? fetched : null);
+ byId[answers] ?? (fetched != null && _shown(fetched) ? fetched : null);
final writable =
c.canWrite &&
c.selected?.archived == false &&
@@ -4325,6 +4536,7 @@ class _SuperTabViewState extends State<SuperTabView>
reply: reply,
replyAuthor: reply == null ? null : _shownAuthor(c, reply),
replyGone: quoted != null && reply == null,
+ quoteThreadReply: flatReply,
onOpenReply: (row) => unawaited(_openOriginal(message, row)),
link: SwarmMessageLink(
tabId: c.tabId,
@@ -4349,14 +4561,14 @@ class _SuperTabViewState extends State<SuperTabView>
// keeps the inline reply.
onReply: !writable || inThread
? null
- : root != null
+ : root != null && !_flatChat
? () => c.openThread(root)
: () {
setState(() => _replies[c.selectedId] = message);
_focus.requestFocus();
},
- thread: thread,
- threadUnread: thread != null && c.threadUnread(thread),
+ thread: _flatChat ? null : thread,
+ threadUnread: !_flatChat && thread != null && c.threadUnread(thread),
threadTagged:
thread != null &&
SuperTabAttention.of(c).hasUnreadTagInThread(c.selectedId, thread.id),
@@ -4387,7 +4599,10 @@ class _SuperTabViewState extends State<SuperTabView>
metadata: true,
),
onOpenThread:
- !inThread && root != null && (thread != null || message.threadReply)
+ !_flatChat &&
+ !inThread &&
+ root != null &&
+ (thread != null || message.threadReply)
? () => c.openThread(root)
: null,
onReturnToComposer: _focus.requestFocus,
@@ -5684,6 +5899,22 @@ class _SuperTabViewState extends State<SuperTabView>
images: () => _images(_shownMessages(c.selectedId)),
child: _conversation(narrow),
);
+ // The project's Board in the middle, the selected chat on the right (task #3787), while nothing else holds the
+ // middle pane.
+ final boardProject =
+ wide &&
+ _boardProjectId != null &&
+ thread == null &&
+ !_rosterOpen &&
+ !_manageVisible &&
+ !_notificationsVisible &&
+ !_devicesVisible &&
+ !_terminalsVisible &&
+ !_showPullRequests &&
+ _pageShown == null &&
+ c.snapshot?.projectById(_boardProjectId!) != null
+ ? _boardProjectId
+ : null;
final chatCovered =
(narrow && _sidebarOpen) || (!wide && _rosterOpen) || threadDrawer;
if (_chatCovered && !chatCovered) {
@@ -5733,24 +5964,53 @@ class _SuperTabViewState extends State<SuperTabView>
child: SuperTabPaneLayout(
storage: widget.app?.localStore,
onLeave: _leaveResize,
- left: narrow ? null : _sidebar(),
+ left: narrow || (boardProject != null && _leftHidden)
+ ? null
+ : _sidebar(),
// An open thread takes the roster's side, as in Slack.
right: !wide
? null
+ : boardProject != null
+ ? (_rightHidden ? null : _boardChat(chat))
: thread ??
(_rosterOpen
? roster
: chatBeside
? chat
: null),
- rightDefault: thread == null && !chatBeside
+ rightDefault:
+ boardProject == null && thread == null && !chatBeside
? SuperTabPaneLayout.rightWidth
: SuperTabPaneLayout.threadWidth,
// Over the chat, beside an open thread, as in Slack.
over: wide ? viewer : null,
center: Column(
children: [
- _header(c.selected, narrow),
+ if (boardProject != null)
+ _boardHeader(c.snapshot!.projectById(boardProject)!)
+ else ...[
+ if (widget.board &&
+ !_manageVisible &&
+ !_notificationsVisible &&
+ _pageShown == null)
+ if (c.snapshot?.projects
+ .where(
+ (p) => p.leadConversationId == c.selectedId,
+ )
+ .firstOrNull
+ case final project?)
+ Padding(
+ padding: const EdgeInsetsDirectional.only(
+ start: grid.AppDesktop.controlGap,
+ top: grid.AppDesktop.listRowGap,
+ ),
+ child: Align(
+ alignment: Alignment.centerLeft,
+ child: _projectTabs(project, board: false),
+ ),
+ ),
+ _header(c.selected, narrow),
+ ],
if (_manageOpen)
Align(
alignment: Alignment.centerLeft,
@@ -5764,7 +6024,9 @@ class _SuperTabViewState extends State<SuperTabView>
),
Expanded(
child: SuperTabPages(
- index: _devicesVisible
+ index: boardProject != null
+ ? 5
+ : _devicesVisible
? 1
: _manageVisible
? 4
@@ -5780,7 +6042,9 @@ class _SuperTabViewState extends State<SuperTabView>
? 5
: 0,
children: [
- chatBeside ? const SizedBox.shrink() : chat,
+ chatBeside || boardProject != null
+ ? const SizedBox.shrink()
+ : chat,
terminal ?? const SizedBox.shrink(),
_showPullRequests
? SuperTabPullRequests(
@@ -5832,7 +6096,7 @@ class _SuperTabViewState extends State<SuperTabView>
facts: _facts,
)
: const SizedBox.shrink(),
- _tasksPage(),
+ _tasksPage(boardProject: boardProject),
],
),
),
diff --git a/desktop/lib/super_tabs/workspace.dart b/desktop/lib/super_tabs/workspace.dart
index 9526fcab8..10e81b21a 100644
--- a/desktop/lib/super_tabs/workspace.dart
+++ b/desktop/lib/super_tabs/workspace.dart
@@ -1,3 +1,4 @@
+import 'package:flutter/foundation.dart' show kIsWeb;
import 'dart:async';
import 'package:flutter/material.dart';
@@ -653,6 +654,9 @@ class _SuperTabWorkspaceState extends State<SuperTabWorkspace> {
children: [
if (!showTerminal) Offstage(child: terminal),
SuperTabView(
+ // The Board, the Buddy beside it and no Threads, on Desktop
+ // (anh Dee, task #3787); the browser is unchanged for now.
+ board: !kIsWeb,
key: ValueKey('${controller.accountId}:$id'),
controller: controller,
// macOS and the web record; Linux and Windows draw no mic.
diff --git a/desktop/test/super_tab_board_layout_test.dart b/desktop/test/super_tab_board_layout_test.dart
new file mode 100644
index 000000000..0767b461e
--- /dev/null
+++ b/desktop/test/super_tab_board_layout_test.dart
@@ -0,0 +1,207 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:harness/core/local_key_value_store.dart';
+import 'package:harness/shared/theme/app_theme.dart' as grid;
+import 'package:harness/super_tabs/controller.dart';
+import 'package:harness/super_tabs/message_row.dart' show SuperTabReplyPreview;
+import 'package:harness/super_tabs/view.dart';
+
+import 'super_tab_activity_lists_test.dart' show swarm;
+import 'support/super_tab_fixture.dart';
+
+/// Task #3787 (anh Dee, 11-06): the left rail, the project's Board in the middle and the person's Buddy on the right.
+/// Opening a project shows its Board; a card's chat opens on the right, flat, with a way back to the Buddy; the
+/// left rail has no Buddy entry and no Threads; both side panes hide and show, remembered.
+
+class _Memory implements LocalKeyValueStore {
+ final values = <String, String>{};
+ @override
+ Future<String?> read(String key) async => values[key];
+ @override
+ Future<void> write(String key, String value) async => values[key] = value;
+ @override
+ Future<void> delete(String key) async => values.remove(key);
+}
+
+Future<void> _settle(WidgetTester tester) async {
+ for (var i = 0; i < 3; i++) {
+ await tester.runAsync(
+ () => Future<void>.delayed(const Duration(milliseconds: 30)),
+ );
+ await tester.pump(const Duration(milliseconds: 50));
+ }
+}
+
+Finder _key(String k) => find.byKey(ValueKey(k));
+
+void main() {
+ Future<(SuperTabController, ConversationServer)> show(
+ WidgetTester tester, {
+ LocalKeyValueStore? store,
+ }) async {
+ await tester.binding.setSurfaceSize(const Size(1500, 900));
+ addTearDown(() => tester.binding.setSurfaceSize(null));
+ final server = swarm();
+ server.append('The project chat line nobody should see');
+ final conversations = (server.state['conversations'] as List)
+ .cast<Map<String, dynamic>>();
+ conversations.add({
+ ...conversationFixture('buddy-owner-lead', 'Buddy'),
+ 'kind': 'buddy',
+ 'projectId': 'lead',
+ 'buddyOwnerId': 'owner',
+ 'agentIds': <String>[],
+ });
+ conversations.firstWhere((g) => g['id'] == 'offline')
+ ..['number'] = 42
+ ..['assignment'] = {
+ 'id': 'a1',
+ 'agentId': 'kestrel',
+ 'status': 'working',
+ };
+ server.append('Working on the fix.', conversationId: 'offline');
+ final c = server.controller(
+ account: 'owner',
+ initial: {'tabId': 'tab', 'accountId': 'owner', 'selectedId': 'lead'},
+ );
+ await tester.runAsync(c.refresh);
+ await tester.pumpWidget(
+ MaterialApp(
+ theme: grid.buildAppTheme(brightness: Brightness.light),
+ home: Scaffold(
+ body: SuperTabView(
+ controller: c,
+ onInvite: () {},
+ onAddAgent: (_) {},
+ onOpenTerminal: (_) {},
+ machineName: (_) => 'Mac Studio',
+ paneStore: store,
+ board: true,
+ ),
+ ),
+ ),
+ );
+ await _settle(tester);
+ return (c, server);
+ }
+
+ Future<void> end(WidgetTester tester, SuperTabController c) async {
+ await tester.pumpWidget(const SizedBox());
+ c.dispose();
+ await tester.pump(const Duration(seconds: 5));
+ }
+
+ testWidgets('opening a project shows its Board, and the right pane is the '
+ "person's Buddy, not the project chat", (tester) async {
+ final (c, _) = await show(tester);
+ await tester.tap(_key('super-group-lead'));
+ await _settle(tester);
+ expect(_key('super-tasks-lead'), findsOneWidget);
+ expect(c.selectedId, 'buddy-owner-lead');
+ expect(find.text('The project chat line nobody should see'), findsNothing);
+ expect(_key('super-board-chat'), findsOneWidget);
+ await end(tester, c);
+ });
+
+ testWidgets("a card's chat opens on the right beside the Board, and its "
+ 'header goes back to the Buddy', (tester) async {
+ final (c, _) = await show(tester);
+ await tester.tap(_key('super-group-lead'));
+ await _settle(tester);
+ await tester.tap(_key('super-task-card-offline'));
+ await _settle(tester);
+ expect(c.selectedId, 'offline');
+ expect(_key('super-tasks-lead'), findsOneWidget, reason: 'the Board stays');
+ expect(find.text('Working on the fix.'), findsOneWidget);
+ await tester.tap(_key('super-board-chat-buddy'));
+ await _settle(tester);
+ expect(c.selectedId, 'buddy-owner-lead');
+ expect(_key('super-tasks-lead'), findsOneWidget);
+ await end(tester, c);
+ });
+
+ testWidgets("a card's chat is flat: its thread replies show inline, in time "
+ 'order, with no thread line', (tester) async {
+ final (c, server) = await show(tester);
+ final root = server.messages
+ .lastWhere((m) => m['conversationId'] == 'offline')['id'] as String;
+ server.append('A reply in its thread.', conversationId: 'offline');
+ server.messages.last['thread'] = root;
+ await tester.runAsync(c.refresh);
+ await tester.tap(_key('super-group-lead'));
+ await _settle(tester);
+ await tester.tap(_key('super-task-card-offline'));
+ await _settle(tester);
+ // The root, and its quote on the reply below.
+ expect(find.text('Working on the fix.'), findsWidgets);
+ expect(find.text('A reply in its thread.'), findsOneWidget);
+ expect(find.textContaining('1 reply'), findsNothing);
+ // Each reply says what it answers, as on the phone (Ken's review of the spec).
+ expect(
+ find.descendant(
+ of: find.byType(SuperTabReplyPreview),
+ matching: find.textContaining('Working on the fix.'),
+ ),
+ findsOneWidget,
+ );
+ await end(tester, c);
+ });
+
+ testWidgets('the project chat stays a tab away: Chat beside Board, Board '
+ 'first (Ken)', (tester) async {
+ final (c, _) = await show(tester);
+ await tester.tap(_key('super-group-lead'));
+ await _settle(tester);
+ expect(_key('super-tasks-lead'), findsOneWidget);
+ await tester.tap(_key('super-board-tab-chat'));
+ await _settle(tester);
+ expect(c.selectedId, 'lead');
+ expect(find.text('The project chat line nobody should see'), findsOneWidget);
+ expect(_key('super-tasks-lead'), findsNothing);
+ await tester.tap(_key('super-board-tab-board'));
+ await _settle(tester);
+ expect(_key('super-tasks-lead'), findsOneWidget);
+ expect(c.selectedId, 'buddy-owner-lead');
+ await end(tester, c);
+ });
+
+ testWidgets('the left rail has no Buddy entry and no Threads', (
+ tester,
+ ) async {
+ final (c, _) = await show(tester);
+ expect(_key('super-threads'), findsNothing);
+ expect(_key('super-swarm-buddy'), findsNothing);
+ expect(_key('super-group-buddy-owner-lead'), findsNothing);
+ expect(find.text('Buddies'), findsNothing);
+ await end(tester, c);
+ });
+
+ testWidgets('each side pane hides and shows, and a new view starts as it '
+ 'was left', (tester) async {
+ final store = _Memory();
+ final (c, _) = await show(tester, store: store);
+ await tester.tap(_key('super-group-lead'));
+ await _settle(tester);
+ expect(_key('super-group-lead'), findsOneWidget);
+ await tester.tap(_key('super-pane-left-toggle'));
+ await _settle(tester);
+ expect(_key('super-group-lead'), findsNothing, reason: 'left rail hidden');
+ await tester.tap(_key('super-pane-right-toggle'));
+ await _settle(tester);
+ expect(_key('super-board-chat'), findsNothing, reason: 'Buddy hidden');
+ expect(_key('super-tasks-lead'), findsOneWidget);
+ await end(tester, c);
+
+ // A new view: the project's Board opens as the panes were left.
+ final (again, _) = await show(tester, store: store);
+ await tester.tap(_key('super-group-lead'));
+ await _settle(tester);
+ expect(_key('super-tasks-lead'), findsOneWidget);
+ expect(_key('super-group-lead'), findsNothing, reason: 'still hidden');
+ expect(_key('super-board-chat'), findsNothing, reason: 'still hidden');
+ await tester.tap(_key('super-pane-left-toggle'));
+ await _settle(tester);
+ expect(_key('super-group-lead'), findsOneWidget);
+ await end(tester, again);
+ });
+}
diff --git a/desktop/test/super_tab_board_look_shots_test.dart b/desktop/test/super_tab_board_look_shots_test.dart
new file mode 100644
index 000000000..b481708b4
--- /dev/null
+++ b/desktop/test/super_tab_board_look_shots_test.dart
@@ -0,0 +1,135 @@
+// Task #3787 item 2 (anh Dee, 11-06): the Tasks Board as Trello draws one, for the PR's pictures, light and dark.
+// Writes nothing unless HARNESS_SUPER_TAB_CAPTURE names a folder.
+import 'dart:io';
+
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:harness/shared/theme/app_theme.dart' as grid;
+import 'package:harness/super_tabs/tasks_view.dart';
+
+import 'super_tab_pulse_test.dart' show pulseFixture, pulseServer, pulseNow;
+import 'super_tab_tasks_view_test.dart' show taskFixture;
+import 'support/capture.dart';
+import 'support/memory_key_value_store.dart';
+
+final shots = Platform.environment['HARNESS_SUPER_TAB_CAPTURE'];
+
+/// A board with work in every column: proposals, P0 and P1 next to quiet P2
+/// work, lanes, an agent on a card, pull requests, one that needs the reader,
+/// one unread and the one the reader has open.
+List<Map<String, dynamic>> _tasks() => [
+ {
+ ...taskFixture('hotfix', 'Sign-in loops forever after a token refresh', 30),
+ 'priority': 'P0',
+ 'handOutLane': 'backend',
+ },
+ {
+ ...taskFixture('composer', 'Composer keeps its draft across tabs', 31),
+ 'priority': 'P1',
+ 'handOutLane': 'Desktop',
+ 'requesterId': 'tony',
+ },
+ {
+ ...taskFixture('docs-lanes', 'Document the crew lanes', 32),
+ 'handOutLane': 'docs',
+ 'requesterId': 'scholes',
+ },
+ {
+ ...taskFixture(
+ 'board-look',
+ 'Board looks like Trello in light and dark',
+ 33,
+ requester: 'owner',
+ status: 'working',
+ pullRequest: 3790,
+ ),
+ 'priority': 'P1',
+ 'handOutLane': 'Desktop',
+ },
+ {
+ ...taskFixture(
+ 'cli-retry',
+ 'CLI retries a lost upload once',
+ 34,
+ requester: 'ken',
+ status: 'working',
+ ),
+ 'handOutLane': 'CLI',
+ 'lastMessageSequence': 10,
+ },
+ {
+ ...taskFixture(
+ 'phone-rename',
+ 'Rename a Swarm from the phone',
+ 35,
+ requester: 'tony',
+ status: 'review',
+ pullRequest: 3772,
+ liveness: {'state': 'waiting', 'why': 'review', 'since': 1},
+ ),
+ 'handOutLane': 'mobile',
+ },
+ {
+ ...taskFixture(
+ 'release-notes',
+ 'Release notes name every part that shipped',
+ 36,
+ requester: 'scholes',
+ status: 'done',
+ pullRequest: 3755,
+ merged: true,
+ shippedAt: pulseNow.subtract(const Duration(hours: 5)),
+ ),
+ 'handOutLane': 'backend',
+ },
+];
+
+void main() {
+ setUpAll(() => loadCaptureFonts(shots));
+
+ for (final brightness in Brightness.values) {
+ testWidgets('Board in ${brightness.name}', (tester) async {
+ if (shots == null) return;
+ final previous = grid.AppTheme.brightness.value;
+ grid.AppTheme.brightness.value = brightness;
+ addTearDown(() => grid.AppTheme.brightness.value = previous);
+ tester.view.devicePixelRatio = 2;
+ tester.view.physicalSize = const Size(3080, 1640);
+ addTearDown(tester.view.reset);
+ final server = pulseServer(pulseFixture());
+ server.proposals['lead']!.first['priority'] = 'P1';
+ (server.state['conversations'] as List).addAll(_tasks());
+ final c = server.controller();
+ await c.refresh();
+ await tester.pumpWidget(
+ MaterialApp(
+ debugShowCheckedModeBanner: false,
+ theme: grid.buildAppTheme(brightness: brightness),
+ builder: (context, child) => MediaQuery(
+ data: MediaQuery.of(context).copyWith(disableAnimations: true),
+ child: child!,
+ ),
+ home: Scaffold(
+ body: SuperTabTasksView(
+ controller: c,
+ project: c.snapshot!.projects.single,
+ storage: MemoryKeyValueStore(),
+ needsHuman: (_) => 0,
+ onOpenTask: (_) {},
+ onOpenProposal: (_) {},
+ onOpenMessage: (_, _) {},
+ selectedId: 'board-look',
+ now: () => pulseNow,
+ ),
+ ),
+ ),
+ );
+ await tester.pumpAndSettle();
+ expect(tester.takeException(), isNull);
+ await captureWindow(tester, shots, 'board-look-${brightness.name}');
+ await tester.pumpWidget(const SizedBox());
+ await c.flush();
+ c.dispose();
+ });
+ }
+}
diff --git a/desktop/test/super_tab_devices_test.dart b/desktop/test/super_tab_devices_test.dart
index 16f405a93..29de8d803 100644
--- a/desktop/test/super_tab_devices_test.dart
+++ b/desktop/test/super_tab_devices_test.dart
@@ -149,8 +149,10 @@ void main() {
expect(c.devicesSelected, isFalse);
expect(f.app.activeSwarm, same(tab));
expect(find.byType(DevicesScreen), findsNothing);
- // A project's row leaves Manage for its chat.
+ // A project's row leaves Manage for its Board (task #3787); its chat, with the draft kept, is the Chat tab.
expect(find.byType(SuperTabManageTabs), findsNothing);
+ await tester.tap(find.byKey(const ValueKey('super-board-tab-chat')));
+ await tester.pumpAndSettle();
expect(find.text('An unfinished project message'), findsOneWidget);
expect(
f.connection.calls.where(
diff --git a/desktop/test/super_tab_pulse_test.dart b/desktop/test/super_tab_pulse_test.dart
index 3cca2f16d..91aca1591 100644
--- a/desktop/test/super_tab_pulse_test.dart
+++ b/desktop/test/super_tab_pulse_test.dart
@@ -173,12 +173,24 @@ bool isRed(WidgetTester tester, String name) {
return red;
}
-Color stripRim(WidgetTester tester) {
- final box = tester.widget<DecoratedBox>(
- find.byKey(const ValueKey('super-pulse')),
- );
- return ((box.decoration as BoxDecoration).border! as Border).top.color;
-}
+/// The rims of the strip's chips (task #3787): a red count rims its own chip,
+/// never the whole strip; none for a calm one.
+List<Color> stripRim(WidgetTester tester) => [
+ for (final e
+ in find
+ .byWidgetPredicate(
+ (w) =>
+ w is Ink &&
+ w.key is ValueKey<String> &&
+ (w.key as ValueKey<String>).value.startsWith(
+ 'super-pulse-chip-',
+ ),
+ )
+ .evaluate())
+ if (((e.widget as Ink).decoration! as ShapeDecoration).shape
+ case StadiumBorder(:final side) when side != BorderSide.none)
+ side.color,
+];
const segments = ['asks', 'working', 'nextUp', 'lost', 'held'];
@@ -296,10 +308,7 @@ void main() {
for (final name in segments) {
expect(isRed(tester, name), isFalse, reason: name);
}
- expect(
- stripRim(tester),
- isNot(Theme.of(tester.element(segment('asks'))).colorScheme.error),
- );
+ expect(stripRim(tester), isEmpty);
await closePulse(tester, c);
});
@@ -354,10 +363,9 @@ void main() {
for (final other in segments) {
expect(isRed(tester, other), other == name, reason: other);
}
- expect(
- stripRim(tester),
+ expect(stripRim(tester), [
Theme.of(tester.element(segment(name))).colorScheme.error,
- );
+ ]);
await closePulse(tester, c);
});
}
diff --git a/desktop/test/super_tab_tasks_view_test.dart b/desktop/test/super_tab_tasks_view_test.dart
index db2a4301f..0b54f1ec9 100644
--- a/desktop/test/super_tab_tasks_view_test.dart
+++ b/desktop/test/super_tab_tasks_view_test.dart
@@ -252,8 +252,8 @@ void main() {
await _close(tester, c);
});
- testWidgets('each column is a 280-wide panel of card material, rounded 12, '
- 'with no shadow', (tester) async {
+ testWidgets('each column is a 280-wide tinted lane, rounded 12, with no rim '
+ 'or shadow (task #3787)', (tester) async {
final c = await _show(tester, tasksServer());
for (final name in [
'proposals',
@@ -265,13 +265,29 @@ void main() {
expect(tester.getSize(_column(name)).width, 280, reason: name);
final panel = tester.widget<DecoratedBox>(_column(name));
final decoration = panel.decoration as BoxDecoration;
- expect(decoration.color, grid.AppCard.base, reason: name);
+ // A step off the page, as Trello's lists: darker under white cards in
+ // light, darker under lifted ones in dark.
+ expect(
+ decoration.color,
+ grid.AppTheme.pick(grid.AppSurface.wellFill, grid.AppPalette.panelBg),
+ reason: name,
+ );
expect(
decoration.borderRadius,
BorderRadius.circular(grid.AppCard.radius),
);
- expect(decoration.border, Border.all(color: grid.AppCard.hair));
- expect(decoration.boxShadow, isNull, reason: 'shadows are for floating');
+ expect(decoration.border, isNull, reason: name);
+ expect(decoration.boxShadow, isNull, reason: name);
+ // Its name is the lane's bold title.
+ final label = find.descendant(
+ of: find.byKey(ValueKey('super-tasks-heading-$name')),
+ matching: find.byType(Text),
+ );
+ expect(
+ tester.widget<Text>(label.first).style?.fontWeight,
+ grid.AppFont.semibold,
+ reason: name,
+ );
}
await _close(tester, c);
});
@@ -305,31 +321,57 @@ void main() {
find.descendant(of: _card(id), matching: find.text(text));
expect(tester.widget<Text>(title('long', long)).maxLines, 3);
final board = tester.getSize(title('long', long)).height;
+ // Three of the tile title's lines.
+ final style = tester.widget<Text>(title('long', long)).style!;
+ expect(
+ board,
+ moreOrLessEquals(style.fontSize! * style.height! * 3, epsilon: 2),
+ );
await tester.tap(find.byKey(const ValueKey('super-tasks-layout-list')));
await tester.pumpAndSettle();
expect(tester.widget<Text>(title('long', long)).maxLines, 1);
- final line = tester.getSize(title('long', long)).height;
- expect(board, moreOrLessEquals(line * 3, epsilon: 1));
await _close(tester, c);
});
- testWidgets('a Board card is an inset tile, rounded 8, with no shadow', (
- tester,
- ) async {
+ testWidgets('a Board card is raised card material, rounded 8, with a soft '
+ 'shadow that lifts under the pointer (task #3787)', (tester) async {
final c = await _show(tester, tasksServer());
+ BoxDecoration decoration(String id) =>
+ tester
+ .widget<Ink>(
+ find.descendant(of: _card(id), matching: find.byType(Ink)),
+ )
+ .decoration!
+ as BoxDecoration;
for (final id in ['tag', 'preview', 'p-old', 'sender']) {
- final ink = tester.widget<Ink>(
- find.descendant(of: _card(id), matching: find.byType(Ink)),
- );
- final decoration = ink.decoration! as BoxDecoration;
- expect(decoration.color, grid.AppCard.inset, reason: id);
+ expect(decoration(id).color, grid.AppCard.base, reason: id);
expect(
- decoration.borderRadius,
+ decoration(id).borderRadius,
BorderRadius.circular(grid.AppCard.insetRadius),
);
- expect(decoration.border, Border.all(color: grid.AppCard.insetHair));
- expect(decoration.boxShadow, isNull, reason: 'shadows are for floating');
+ expect(decoration(id).border, Border.all(color: grid.AppCard.insetHair));
+ expect(decoration(id).boxShadow, grid.AppGlass.cardShadow, reason: id);
}
+ // Padding of 12 around its text.
+ final preview = tester.getRect(_card('preview'));
+ final previewTitle = tester.getRect(
+ find.descendant(
+ of: _card('preview'),
+ matching: find.text('Remove the old preview route'),
+ ),
+ );
+ expect(previewTitle.left - preview.left, moreOrLessEquals(12, epsilon: 1));
+ expect(previewTitle.top - preview.top, moreOrLessEquals(12, epsilon: 1));
+ final mouse = await tester.createGesture(kind: PointerDeviceKind.mouse);
+ addTearDown(mouse.removePointer);
+ await mouse.addPointer(location: Offset.zero);
+ await mouse.moveTo(tester.getCenter(_card('preview')));
+ await tester.pumpAndSettle();
+ expect(decoration('preview').boxShadow, grid.AppGlass.shadow);
+ expect(decoration('tag').boxShadow, grid.AppGlass.cardShadow);
+ await mouse.moveTo(Offset.zero);
+ await tester.pumpAndSettle();
+ expect(decoration('preview').boxShadow, grid.AppGlass.cardShadow);
// List keeps its plain rows.
await tester.tap(find.byKey(const ValueKey('super-tasks-layout-list')));
await tester.pumpAndSettle();
@@ -340,6 +382,49 @@ void main() {
await _close(tester, c);
});
+ testWidgets('a Board card wears its lane as a label on top; List does not '
+ '(task #3787)', (tester) async {
+ final server = tasksServer();
+ (server.state['conversations'] as List)
+ .cast<Map<String, dynamic>>()
+ .firstWhere((g) => g['id'] == 'tag')['handOutLane'] =
+ 'Desktop';
+ final c = await _show(tester, server);
+ final label = find.descendant(
+ of: _card('tag'),
+ matching: find.byKey(const ValueKey('super-task-lane-Desktop')),
+ );
+ expect(label, findsOneWidget);
+ expect(
+ find.descendant(of: label, matching: find.text('Desktop')),
+ findsOneWidget,
+ );
+ final title = find.descendant(
+ of: _card('tag'),
+ matching: find.text('One tag per ask'),
+ );
+ expect(tester.getTopLeft(label).dy, lessThan(tester.getTopLeft(title).dy));
+ // The caption keeps its words.
+ expect(
+ find.descendant(
+ of: _card('tag'),
+ matching: find.text('dee · Finch2 · PR #2867'),
+ ),
+ findsOneWidget,
+ );
+ expect(
+ find.descendant(
+ of: _card('preview'),
+ matching: find.byKey(const ValueKey('super-task-lane-Desktop')),
+ ),
+ findsNothing,
+ );
+ await tester.tap(find.byKey(const ValueKey('super-tasks-layout-list')));
+ await tester.pumpAndSettle();
+ expect(label, findsNothing);
+ await _close(tester, c);
+ });
+
testWidgets('an empty column keeps its heading with 0', (tester) async {
final server = tasksServer();
(server.state['conversations'] as List).removeWhere(
@@ -373,11 +458,11 @@ void main() {
.color;
expect(
fill('tag'),
- Color.alphaBlend(grid.AppSurface.selectedFill, grid.AppCard.inset),
+ Color.alphaBlend(grid.AppSurface.selectedFill, grid.AppCard.base),
);
expect(tester.getSemantics(_card('tag')), isSemantics(isSelected: true));
for (final id in ['preview', 'test-copy', 'p-old']) {
- expect(fill(id), grid.AppCard.inset, reason: id);
+ expect(fill(id), grid.AppCard.base, reason: id);
expect(
tester.getSemantics(_card(id)),
isNot(isSemantics(isSelected: true)),
@@ -439,10 +524,7 @@ void main() {
expect(inCard('tag', 'dee · Finch2 · PR #2867'), findsOneWidget);
expect(inCard('shipped-means', 'scholes'), findsOneWidget);
expect(inCard('sender', 'scholes · Finch2 · PR #2870'), findsOneWidget);
- expect(
- inCard('test-copy', 'ken15 · Finch2 · Needs you'),
- findsOneWidget,
- );
+ expect(inCard('test-copy', 'ken15 · Finch2 · Needs you'), findsOneWidget);
// No task numbers, machines or models.
expect(find.textContaining('#12'), findsNothing);
expect(find.textContaining('studio'), findsNothing);
diff --git a/docs/plans/2026-11-06-board-view-plan.md b/docs/plans/2026-11-06-board-view-plan.md
new file mode 100644
index 000000000..d4d041c26
--- /dev/null
+++ b/docs/plans/2026-11-06-board-view-plan.md
@@ -0,0 +1,67 @@
+# The project board replaces the project chat — plan (task #3787)
+
+**Goal:** Opening a project on Desktop shows its Board by default; the Board looks and feels like Trello; the left
+pane has no Buddy entry under Projects; the right pane is the person's Buddy chat instead of the Thread panel (a thread
+still opens from a card or a mention); the left and right panes hide and show, remembered. anh Dee's scope cut of
+11-06: no redesign, same columns and data. The final spec (`docs/plans/2026-11-06-buddy-board-final-spec.md`, Ken and anh Dee) holds the rest as Phase 2.
+
+**Architecture:** The Swarm view already has the Board (`SuperTabTasksView`: Proposals, Next up, Working, Waiting,
+Shipped) behind the header's Tasks button. Selecting a project now opens it instead of the project chat. The cards and
+columns get Trello's look in `task_card.dart` and `tasks_view.dart` (softer column backgrounds, roomier rounded cards,
+title first then one small lane/priority/person line, smooth scroll); data and placement are unchanged. The right pane,
+where the Thread panel sits, shows the Buddy's chat when no thread is open; opening a thread shows it there as today,
+and closing it returns to the Buddy. Two local booleans remember the hidden panes.
+
+**Tech Stack:** Flutter 3.47 (Desktop), `flutter_test` widget tests with `ConversationServer` (memory store, fake
+sign-in), screenshot captures with `HARNESS_SUPER_TAB_CAPTURE`.
+
+**Spec:** River's brief on task #3787 as cut by anh Dee (11-06, 13:3x): items 1 to 5; the card panel, the ruling and
+the banner are cancelled.
+
+This plan is written and carried out by its Engineer, test first; the Board's look runs as a parallel subagent in its
+own files; there is no execution handoff.
+
+## Design
+
+N/A beyond two local booleans (left and right pane hidden) in the existing local store: no new server reads, no data,
+no migration; older clients are unaffected (the project chat stays on the server).
+
+## Global Constraints
+
+- Same columns, data and placement as today's Board.
+- Harness design language (`scripts/check-ui-style.py`), light and dark.
+- Desktop tests use a memory store and a fake sign-in. No new process starts (Windows: no window flash).
+
+## Review Focus
+
+- Selecting a project shows its Board, never the project chat; the Buddy chat on the right keeps working.
+- A card or a mention still opens its thread; closing it returns to the Buddy.
+- Hide/show state survives a new view.
+
+## Tasks
+
+### 1. A project opens its Board (`view.dart`)
+
+- [x] Failing test: tapping a project row shows `super-tasks-board` and no project chat.
+- [x] Code.
+
+### 2. The Board looks like Trello (`task_card.dart`, `tasks_view.dart`; parallel)
+
+- [x] Screenshot test of the Board, light and dark; widget tests unchanged in behaviour.
+- [x] Code.
+
+### 3. No Buddy entry under Projects (`project_sidebar.dart`)
+
+- [x] Failing test: the left pane lists no Buddy row or Buddies section.
+- [x] Code.
+
+### 4. The Buddy chat on the right (`view.dart`)
+
+- [x] Failing test: with no thread open, the right pane shows the Buddy chat; a card or a mention opens its thread
+ there; closing it shows the Buddy again.
+- [x] Code.
+
+### 5. Hide and show the side panes (`view.dart`)
+
+- [x] Failing test: each pane's icon hides and shows it, and a new view starts as it was left.
+- [x] Code. Light and dark screenshots of the three panes.
diff --git a/docs/plans/2026-11-06-buddy-board-final-spec.md b/docs/plans/2026-11-06-buddy-board-final-spec.md
new file mode 100644
index 000000000..c07414904
--- /dev/null
+++ b/docs/plans/2026-11-06-buddy-board-final-spec.md
@@ -0,0 +1,299 @@
+# Final spec: people talk to their Buddies, the PM works from proposals, the Board is the project
+
+Merged 2026-11-06 by River from Ken's business spec (backend, roles, flow) and anh Dee's frontend (layout and look,
+thread in the harness project chat, 12:55-13:15). Where they differed, the call and who made it is marked **[merge]**.
+
+
+2026-11-06. What people see and what each role does. Phase 1 (below) is already being built for Desktop by anh Dee's
+decision; everything else is built after Dee and Ken approve this spec.
+
+> **This is a large change.** It changes who talks to whom in every project: people stop talking to the PM, and the PM
+> stops talking to people. Tasks running now that assume people chat with the PM, or that the PM relays to people, need
+> replanning before they continue or ship (see "Work in progress" at the end).
+
+## Why
+
+The PM is the bottleneck today. Every person writes to it in the project chat, and it has to read, answer, route and
+build in one thread:
+- While it runs a command it hears no one, so people wait on it.
+- Its context fills with conversation and with every answer it gives, and it forgets or misapplies the project's own
+ rules (it had the rule and did something else).
+- Its answers are spread over chat, threads and private lines, so nobody sees in one place what was asked and what
+ became of it.
+
+The fix is to split the two jobs:
+- **Talking with people** goes to each person's own Buddies. A Buddy holds that person's context, one Buddy per
+ purpose, so no context is shared or diluted.
+- **Deciding and running the work** stays with the PM. It works only from proposals, by the workflow the project's
+ instructions define, so each project still writes its own flow in words.
+
+## What changes, in one view
+
+| | Today | After |
+|---|---|---|
+| Selecting a project | Opens the project chat with the PM | Opens the project's Task Board; there is no chat with the PM |
+| Who a person talks to | The PM, in the project chat | Their own Buddies |
+| How work enters a project | A message to the PM, or a Buddy's proposal | A proposal (from a Buddy, or from the Board) |
+| How a person hears back | The PM's reply somewhere in chat | The proposal's card on the Board, and their Buddy at three moments |
+| Buddies per person | One | As many as they want, one per purpose |
+| The PM's inputs | People's messages, proposals, notices | Proposals, answers on proposals, and the Swarm's notices |
+
+## Roles
+
+### Person
+- Talks only to their own Buddies.
+- Sees every project they belong to as a Task Board.
+- Steers work from the Board: priority, pause, answering what is asked of them.
+- Writes in a task's card chat when they take part in that task (a tester's retest, a reporter's extra screenshot).
+
+### Buddy
+- A person's own assistant. A person may have several, each named for its purpose (for example Code, Research,
+ Planning), so each keeps its own context.
+- Talks with its person, helps shape an idea, and sends it to a project as a proposal with its person's agreement.
+- Before sending, checks that the same thing is not already proposed or in work. If it is, it adds to that one instead.
+- Answers the PM's questions about the proposals it sent: on its own when its context is enough, otherwise by asking
+ its person and bringing the answer back.
+- Tells its person, in one short line, at three moments of a proposal it sent: **decided** (accepted, reshaped,
+ later or declined, with the PM's reason), **needs you**, and **shipped**. A person who disagrees with a decision says
+ so through the same Buddy, on the card.
+
+### PM
+- Never chats with people, and is never in a person's conversation.
+- Is woken when a proposal arrives. A P0 or hotfix proposal is handled before anything else; other proposals are
+ handled in priority order.
+- For each proposal, decides by the project's instructions and writes the result on its card:
+ - **Accept**: it becomes a task in Next.
+ - **Reshape**: the version it will do instead.
+ - **Later**: and when it will look again.
+ - **No**: and why.
+- Asks what it needs to know on the card, to the Buddy that sent it, always with a default and a time. When the time
+ passes it applies the default, except where a rule says a person must agree.
+- Merges duplicates into one card, and everyone who proposed it is told.
+- Runs the work by the project's instructions: tasks, crew, review, test, merge, release.
+
+## The Task Board
+
+What a person sees when they select a project. Five columns **[merge]** (Ken's; today's Board has Proposals, Next up, Working, Waiting, Shipped: Waiting folds into
+Working with a mark, and Merged is new):
+
+| Column | Holds |
+|---|---|
+| Proposal | Proposals the PM has not decided yet, and those waiting on an answer from their sender |
+| Next | Accepted work not started yet, in priority order |
+| Working | Work being done, and work waiting (on review, test, CI, a person, a decision), marked on the card |
+| Merged | Merged, not yet released |
+| Shipped | Released |
+
+On each card a person can see:
+- the proposal's words, who proposed it, and through which Buddy;
+- the PM's decision and its one-line reason;
+- any open question and its default and time;
+- the task's state once there is one;
+- a mark when the card waits on them.
+
+Actions on the Board:
+- Propose directly from the Board, for a person with no Buddy yet.
+- Change priority and pause or resume a task, within the rights below.
+- Answer a question or decision asked of them.
+- Open a task's card chat.
+
+A "Needs you" bar at the top lists everything waiting on the reader in this project.
+
+Who may do what on the Board:
+
+| Who | May |
+|---|---|
+| Every member | Propose, answer what is asked of them, set P1–P3 on their own cards |
+| The project owner and the project's top decider (for openharness: Dee), named in the project's settings | Set P0 on any card, pause or resume any task |
+| The PM | Reorder priorities by the project's instructions, with a one-line reason on the card |
+
+Setting P0 and pausing stay with a few people because a P0 goes ahead of everything and a pause stops other people's
+work.
+
+### Screens (Desktop) *(anh Dee; the sketch is the end state: several Buddies and + New Buddy come in Phase 2)*
+
+```
++- left (hide/show) ---+ +- harness . Board -----------------------------------------+ +- right (hide/show) ------+
+| autonomous.ai v | | Needs you: 2 Search Mine Lane v | | (*) Code ( ) Planning |
+| Decisions | | | | [+ New Buddy] |
+| Mentions | | PROPOSAL NEXT WORKING MERGED SHIPPED | |--------------------------|
+| | | +-------+ +-------+ +-------+ +------+ +------+ | | the selected Buddy's |
+| Projects | | |[CLI] | |[Desk] | |[back] | |#3628 | |#3607 | | | chat (the person's main |
+| > harness | | |title | |#3765 | |#3747 | | | |1.3.84| | | chat), or a clicked |
+| lamp | | |Tuan . | |P1 | |Headfix| +------+ +------+ | | card's chat |
+| computer | | +-------+ +-------+ |review | | | |
+| | | +-------+ | | [Message...] [Send] |
++----------------------+ +-----------------------------------------------------------+ +--------------------------+
+```
+
+- **Left:** Swarm switching, Decisions, Mentions and the projects list, as today. No Buddy entry and no Threads entry
+ in it. A hide/show icon collapses it, remembered per person.
+- **Middle: the Board,** opened by default when a project is selected, and the most important screen. It looks and
+ feels like Trello: tinted columns with a bold title and count, raised rounded cards with a thin lane-colour strip, the
+ title first and one quiet line (priority, who proposed or who works on it, PR), gentle hover, smooth horizontal
+ scroll; calm, no heavy borders or red boxes; light and dark. The "Needs you" bar sits on top of it.
+- **Right:** the person's Buddies (a list with + New Buddy) and the selected Buddy's chat, which is the person's main
+ chat. Clicking a card shows that card's chat here instead (the task's thread, flat), with a header back to the
+ Buddy. A hide/show icon collapses it, remembered.
+- **No Threads feature.** There are no nested thread replies on Desktop: a task's conversation is its card's one flat
+ chat, and old thread replies show inline in time order. **[merge]** Ken keeps the task's conversation open to people
+ taking part in it; Dee removes the Threads feature. Both hold: the conversation stays, as the card's chat; only the
+ separate Threads view and reply-in-thread go.
+
+## A proposal's life
+
+1. A person talks with one of their Buddies. When an idea is ready, the Buddy shows the exact proposal and the person
+ agrees.
+2. The Buddy checks for an existing proposal or task about the same thing. If there is one, it adds to it and stops.
+3. The proposal goes in with its goal, why, "done when" and any evidence (screenshots, logs). A proposal missing one of
+ these is refused with what is missing.
+4. The PM wakes and decides: Accept, Reshape, Later or No, written on the card.
+5. If the PM needs more, it asks on the card. The sending Buddy answers, or asks its person and answers. Past the
+ time, the PM applies the default.
+6. Accepted work runs through the project's workflow. The card moves Next → Working → Merged → Shipped.
+7. The sending Buddy tells its person when the proposal is decided (whatever the decision), when something needs them,
+ and when it ships.
+ Every other step is visible on the Board only.
+
+If the Buddy that sent a proposal has been removed, its messages go to the person's default Buddy.
+
+## Steering and teaching the PM without chat
+
+| A person wants to | They |
+|---|---|
+| Change what goes first | Change the card's priority on the Board |
+| Stop something | Pause the task on the Board |
+| Give a lasting rule ("from now on…") | Send a rule proposal through their Buddy. The PM decides it like any proposal (Accept, Reshape, Later, No); an accepted rule is saved into the project's instructions word for word with who gave it. A person with the right to edit the instructions may also edit them directly |
+| Decide something a rule names them for (for example a production write, a product decision) | Answer the decision, which reaches them through their default Buddy and the Board's "Needs you" bar |
+
+## When an agent needs a person
+
+An agent working on a task that needs a person's answer asks that person directly, never through the PM:
+- The question goes to the person's default Buddy and shows in the Board's "Needs you" bar, always with a default and
+ a time.
+- It goes to one person: the task's requester by default, or the person a rule in the project's instructions names for
+ that kind of decision (for example a production write, a product decision).
+- The PM only sees the card marked as waiting on that person. Past the time, the default applies, except where a rule
+ says the person must agree; only then does the PM step in.
+
+## Talking about a task
+
+A task's conversation, the card's chat, stays open to people:
+- the people taking part in it can write there (the requester, a tester, a reviewer who is a person);
+- they talk with the agents working on that task.
+
+Only the chat with the PM goes away.
+
+The card's chat is for the task as accepted. New scope written there ("also do X") is not taken up by the agents: they say
+so in one line, and the person proposes it through their Buddy.
+
+## People without their own machine
+
+A person whose Buddy cannot run on their own machine (phone only, no machine yet) gets their Buddy on one of the
+Swarm's shared Team machines, so they can start with no setup:
+- It runs on the Team account's subscription, as Team agents do today.
+- A person has at most one Buddy on Team machines, counted within their Buddy cap.
+- Once the person signs in their own subscription, their Buddy uses theirs.
+
+Until they have any Buddy, they can propose straight from the Board.
+
+## Many Buddies
+
+- A person creates, names and removes their own Buddies. The PM never manages them.
+- Buddies belong to the person within one Swarm, as today. A person in two Swarms has separate Buddies in each, and
+ the cap counts per Swarm.
+- One Buddy is the person's default: it receives the messages of a removed Buddy and the decisions addressed to the
+ person.
+- An idle Buddy sleeps and wakes when its person writes to it or a proposal it sent needs it, so many Buddies do not
+ hold machine memory or quota while unused.
+- Each person has a maximum number of Buddies, set per Swarm.
+
+## Rollout
+
+- Per project: a project switches to this way of working when its owner turns it on. Projects not switched keep
+ today's behaviour, so a project with its own established flow (for example one built around a device queue) moves
+ when it is ready.
+- **[merge]** Desktop first, today (anh Dee: "focus on building desktop only, ship desktop asap"); phone and web follow
+ on the same spec, so in the end a person sees the same Board and the same Buddies on each.
+- The history of a switched project's chat with the PM stays readable, but nobody can write in it.
+- When a project switches on, every message to the PM still unanswered becomes a proposal on the Board, under its
+ author's name, so nothing is dropped. When it switches back, undecided proposals stay open and the PM answers them
+ in the chat as today.
+
+## Phases
+
+**Phase 1, Desktop, building now (#3787, Signincheck; release today):** the Board opens by default for a project, with
+the Trello look; left pane without Buddy and Threads; right pane = the person's Buddy, or a clicked card's chat;
+hide/show icons on both side panes. Built on what the backend has today (tasks, steps, PRs, task conversations, one
+Buddy, proposals as they are). **[merge, Ken's point 1]** No project is switched yet, so the PM still answers and asks in
+the project chat: Desktop keeps the project chat one click away (a Chat tab next to Board) until the project switches.
+**[merge, Ken's point 2]** Until the switch, agents and the PM keep replying in threads (the instructions' answer-in-thread
+rule stands); Desktop shows those replies inline in the chat, each with a 'replying to' line naming the message it
+answers, so the same conversation reads the same on every app. When a project switches, answers move to the card's
+chat and that rule is dropped.
+
+**Phase 2, after Dee and Ken approve this spec:**
+1. Backend (from Ken's spec; built by the backend crew): proposals as their own records with a decision (Accept, Reshape, Later, No + reason), questions on a
+ card with a default and a time, duplicate merge; many Buddies per person with a default and a cap; an agent's ask
+ goes to the person's default Buddy and the "Needs you" bar; the PM's inputs become proposals, answers and notices
+ only; the per-project switch; the Board read returns only what changed.
+ Rules on main (3bfd989a7) that Phase 2 must change first, found by Ken:
+ - a Buddy is refused on a Harness Team account (commands.ts:3153, the 10-28 ruling), but "People without their own
+ machine" runs one there: allow one Buddy per person on a Team machine, acting as its person;
+ - a Buddy may only post in its own chat (BUDDY_FORBIDDEN, buddies.ts:178): let it answer the PM on the cards it sent;
+ - a proposal never reaches P0 (taskPriority.ts:19): allow P0 and hotfix proposals, from the people allowed to set P0;
+ - any person may set any priority today (coordinatorOrPerson, commands.ts:728) and there is no pause command: the
+ server enforces priority and pause rights by role, and gains pause and resume;
+ - only crew members sleep (crewRules.ts): idle Buddies sleep and wake on their person or their proposal;
+ - the built-in "Swarm process v2" text (pmSchedule.ts:17-22) is one text for all projects: it follows each project's
+ switch, so a switched project's PM gets no inbox or answer-each-message lines.
+2. Desktop: Merged column and Waiting folded into Working; decision, question and "needs you" on the card; Needs you
+ bar; propose from the Board; priority and pause by role; + New Buddy and Buddy list.
+3. Phone and web: the same Board and Buddies.
+4. Instructions and the PM: drop the chat rules (answer in threads, inbox, owed asks) for a project once it switches.
+
+## Design
+
+- **Growth:** proposals live as long as their card. A shipped or declined card leaves the Board after a set time and
+ stays in the project's history. Buddies are deleted by their person; a sleeping Buddy's folder is dropped after a
+ long idle time.
+- **Concurrency:** one PM per project decides each proposal once. Two Buddies proposing the same thing end as one card.
+ A question to a person is answered once; a late second answer is shown but changes nothing.
+- **Read cost:** the PM reads only new proposals and new answers since it last looked, never the whole Board. A
+ person's Board updates only with what changed.
+- **Scale:** at 10× the people (many Buddies each), the first warning is proposals waiting on the PM longer than the
+ project's limit; the cap on Buddies per person bounds machine load.
+- **Compatibility:** apps that do not know the Board mode still show a switched project, read-only. A project not
+ switched works as today with every app.
+- **Migration and rollback:** switching a project on is reversible by its owner. Switching back reopens chat with the
+ PM; proposals and cards made meanwhile stay as tasks.
+- **Audience:** who sees a project's Board, who may propose, and who may change priority follow the project's members
+ and roles, enforced by the server, never by the app alone.
+- **Identity:** a proposal names the person who agreed to it and the Buddy that sent it. A Buddy on a shared Team
+ machine acts as its person, never as the machine's owner, and spends the Team account's subscription until its
+ person signs in their own.
+- **Failure:** a proposal the PM has not answered within the project's limit is shown as late on its card and in the
+ "Needs you" bar of the project owner. A Buddy that cannot be reached is marked on its person's list. Nothing waits
+ silently.
+- **Platforms:** Desktop (macOS, Windows, Linux), phone (iOS, Android) and web.
+
+## Out of scope
+
+- How any of this is built: the build plan comes after this spec is approved.
+- Changing the workflow inside a project (crew, review, test, merge, release). That stays defined by each project's
+ instructions.
+- People talking with each other. Only the person-to-PM chat is replaced.
+
+## Work in progress that needs replanning
+
+Before they continue, check work running now that assumes any of these:
+- **People write to the PM and the PM answers them:** the PM inbox, answering each message once, the "messages
+ waiting on the PM" strip, and the rules about how the PM talks in the project chat.
+- **Only the PM reaches people,** with agents' asks to people routed through the PM. Under this spec, an agent asks the
+ person directly, through their default Buddy and the Board.
+- **One Buddy per person:** Buddy creation, the Buddy chat, Buddy thread sessions, and the Buddy's news about work it
+ requested.
+- **Proposal consent and wording rules,** which assume one Buddy and a proposal posted into the project chat.
+- **The Board's columns and the phone's project tabs,** which today open on the chat and have no Merged column.
+- **The PM's built-in schedule,** which wakes it for what people wrote to it.
+- **Instructions lines** that tell people to talk only to the PM, or tell the PM to answer people in the chat.