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.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
Merge batch 11-02 b2230: #2625 (#2634)
0xken1527d596819d9f
diff --git a/desktop/lib/super_tabs/project_sidebar.dart b/desktop/lib/super_tabs/project_sidebar.dartindex 5a7062585..96a462062 100644--- a/desktop/lib/super_tabs/project_sidebar.dart+++ b/desktop/lib/super_tabs/project_sidebar.dart@@ -237,13 +237,10 @@ class ProjectSidebar extends StatelessWidget {reading == null || controller.expandedProjects.contains(project?.id)? controller.unreadShown(group): reading.unread.isNotEmpty;- // A collapsed project counts the tags in the conversations it hides, as- // Slack's collapsed section does; open, each row has its own.- final badge = attention == null- ? 0- : reading == null || controller.expandedProjects.contains(project?.id)- ? attention!.mentionsIn(group.id)- : reading.mentions;+ // Only what opening this row shows, so opening it clears the number (Dee,+ // Slack's way). Tags in the task conversations it hides make it bold, and+ // are on their own rows and in Activity.+ final badge = attention?.mentionsIn(group.id) ?? 0;return _drawRow(group,project: project,@@ -1222,8 +1219,8 @@ class _ProjectReading {Set<String> get waiting => _open.waiting;Set<String> get unread => _open.unread;- /// Tags of the reader in the project's chat and its open workgroups: a- /// collapsed project's number.+ /// Tags of the reader in the project's chat and its open workgroups: why the+ /// unread filter keeps a collapsed project. Never its number ([_row]).late final int mentions = switch (sidebar.attention) {null => 0,final attention =>diff --git a/desktop/test/super_tab_attention_test.dart b/desktop/test/super_tab_attention_test.dartindex cb988534c..2f17c26f8 100644--- a/desktop/test/super_tab_attention_test.dart+++ b/desktop/test/super_tab_attention_test.dart@@ -161,6 +161,125 @@ Text rowText(WidgetTester tester, String key, String text) =>void main() {group('the red number counts only what is for the reader', () {+ // Dee: the 7, 7 and 3 on project rows never cleared, and opening them showed none of what they counted.+ group('a project row counts only what opening it shows', () {+ Future<(SuperTabController, SuperTabAttention)> opened(+ ConversationServer server,+ ) async {+ final c = await openHere(server);+ final attention = SuperTabAttention.of(c);+ await attention.mentions.load();+ await attention.decisions.load();+ await attention.load();+ return (c, attention);+ }++ testWidgets('a tag in a task conversation shows no number on the '+ 'collapsed row, which is still bold and kept by the unread filter', (+ tester,+ ) async {+ final server = projectServer();+ fromLead(server, 'Please look', conversationId: 'offline');+ server.tag('message-1', conversationId: 'offline');+ final (c, attention) = await opened(server);+ await pumpSidebar(tester, c, attention);+ expect(attention.mentionsIn('offline'), 1);+ expect(+ inRow('super-group-lead', find.byType(SuperTabCountBadge)),+ findsNothing,+ );+ expect(+ rowText(tester, 'super-group-lead', 'web-project').style?.fontWeight,+ FontWeight.w600,+ );+ c.toggleUnreadOnly();+ await tester.pumpAndSettle();+ expect(find.byKey(const ValueKey('super-group-lead')), findsOneWidget);+ // Still listed where it can be opened, and on its own row once expanded.+ expect(attention.mentions.waiting, hasLength(1));+ c.toggleProject('lead');+ await tester.pumpAndSettle();+ expect(inRow('super-group-offline', find.text('1')), findsOneWidget);+ await close(tester, c);+ });++ testWidgets('a tag in the project chat counts collapsed or open, and '+ 'reading it clears it', (tester) async {+ final server = projectServer();+ server.tag('message-1', messageSequence: 1);+ fromLead(server, 'Please look');+ final (c, attention) = await opened(server);+ await pumpSidebar(tester, c, attention);+ expect(inRow('super-group-lead', find.text('1')), findsOneWidget);+ c.toggleProject('lead');+ await tester.pumpAndSettle();+ expect(inRow('super-group-lead', find.text('1')), findsOneWidget);+ c.toggleProject('lead');+ await tester.pumpAndSettle();+ c.select('lead');+ await tester.pumpAndSettle();+ c.markRead('lead');+ await tester.pumpAndSettle();+ expect(+ inRow('super-group-lead', find.byType(SuperTabCountBadge)),+ findsNothing,+ );+ await close(tester, c);+ });++ testWidgets('a tag in a reply that lives only in a thread counts on '+ 'Threads, not on the project row', (tester) async {+ final server = projectServer();+ server.followedThreads = {+ 'unread': [unreadThread('message-1', 2, conversationId: 'lead')],+ 'read': [],+ 'more': false,+ };+ server.tag('message-1', threadId: 'message-1');+ final (c, attention) = await opened(server);+ await pumpSidebar(tester, c, attention);+ expect(inRow('super-threads', find.text('1')), findsOneWidget);+ expect(+ inRow('super-group-lead', find.byType(SuperTabCountBadge)),+ findsNothing,+ );+ await close(tester, c);+ });++ testWidgets('every number shown clears by reading what it counts', (+ tester,+ ) async {+ final server = projectServer();+ fromLead(server, 'In the task', conversationId: 'offline');+ server.tag('message-1', conversationId: 'offline');+ server.tag('message-1', messageSequence: 1);+ fromLead(server, 'In the chat');+ final (c, attention) = await opened(server);+ await pumpSidebar(tester, c, attention);+ expect(inRow('super-group-lead', find.text('1')), findsOneWidget);+ c.select('lead');+ await tester.pumpAndSettle();+ c.markRead('lead');+ await tester.pumpAndSettle();+ expect(find.byType(SuperTabCountBadge), findsNothing);+ await close(tester, c);+ });++ testWidgets('a muted project chat shows no number', (tester) async {+ final server = projectServer();+ server.tag('message-1', messageSequence: 1);+ fromLead(server, 'Please look');+ final (c, attention) = await opened(server);+ await c.setNotify('lead', SuperTabNotify.muted);+ await pumpSidebar(tester, c, attention);+ expect(+ inRow('super-group-lead', find.byType(SuperTabCountBadge)),+ findsNothing,+ );+ await close(tester, c);+ });+ });+testWidgets('a tag in the chat counts on its row; a tag in a thread on ''Threads; a decision on its row; plain unread is bold with no ''number', (tester) async {@@ -203,8 +322,8 @@ void main() {await close(tester, c);});- testWidgets('a collapsed project counts the tags of the workgroups it '- 'hides', (tester) async {+ testWidgets('a collapsed project counts its own chat\'s tags, not those of '+ 'the workgroups it hides', (tester) async {final server = projectServer();server.followedThreads = {'unread': [], 'read': [], 'more': false};fromLead(server, 'News', conversationId: 'offline');@@ -214,7 +333,7 @@ void main() {final attention = SuperTabAttention.of(c);await attention.mentions.load();await pumpSidebar(tester, c, attention);- expect(inRow('super-group-lead', find.text('2')), findsOneWidget);+ expect(inRow('super-group-lead', find.text('1')), findsOneWidget);c.toggleProject('lead');await tester.pumpAndSettle();expect(inRow('super-group-lead', find.text('1')), findsOneWidget);diff --git a/docs/plans/2026-11-02-project-row-mentions-plan.md b/docs/plans/2026-11-02-project-row-mentions-plan.mdnew file mode 100644index 000000000..72b29a87e--- /dev/null+++ b/docs/plans/2026-11-02-project-row-mentions-plan.md@@ -0,0 +1,58 @@+# A project's red number counts only what opening it shows Implementation Plan++> Implemented task by task in this session, test first, each failing test committed before its code.++**Goal:** Every red number on a project row clears by opening what it counts.++**Architecture:** `_row` in `project_sidebar.dart` shows `mentionsIn(the project's chat)` whether the project is collapsed or open, and stops adding the tags of the task conversations it hides. Those stay on the task's own row when expanded and in Activity. Landing and clearing are unchanged: a chat opens at its New line, and reading to its end moves the read mark past its tags.++**Tech Stack:** Flutter, Dart, `flutter_test`.++**Spec:** task #2189 (Dee, Slack's way).++## Global Constraints++- Desktop tests use a memory store and a fake sign-in.+- A row is still bold for anything new it hides; only the number changes.+- The unread filter still keeps a project whose hidden task tags the reader, so those stay reachable.+- No new look: the same badge, a smaller count.++```+Before After+> # openharness (7) > # openharness bold: something is new+ opening shows none of them Activity › Mentions still lists the 7+> # harness-pro (3) > # harness-pro (3) 3 tags in its own chat+ opening clears nothing opening lands on the New line; reading clears them+```++## Review Focus++1. A collapsed project whose only tags are in its task conversations: no number, still bold, still kept by the unread filter. Pinned in Task 1.+2. A tag in the project's chat, read to its end: the number goes. Pinned in Task 1.+3. A tag in a reply that lives only in a thread: on the Threads row, not the project's, since opening the chat cannot clear it. Pinned in Task 1.+4. An expanded project: its task rows keep their own numbers. Pinned in Task 1.+5. A muted project chat: no number, as today. Pinned in Task 1.++## Design++N/A because this stores, syncs and exposes nothing new: the row reads a count it already has.++## Limits++- The brief says "the project chat and its threads". A thread-only tag is not counted on the row: opening the chat cannot clear it, and "every number clears by opening what it counts" decides. It stays on the Threads row and in Activity.+- In a long chat the number clears on reading to the end, not on opening, as the main chat's read mark does today.++---++### Task 1: The row counts its own chat++**Files:**+- Modify: `desktop/lib/super_tabs/project_sidebar.dart`+- Test: `desktop/test/super_tab_attention_test.dart`++**Interfaces:**+- Consumes: `SuperTabAttention.mentionsIn(String conversationId)`.++- [ ] **Step 1: Write the failing test and commit it.** A tag in a task conversation shows no number on the collapsed project row.+- [ ] **Step 2: Run it to verify it fails:** `flutter test test/super_tab_attention_test.dart`.+- [ ] **Step 3: Implement it and commit.**