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-03 cc: #2764 (#2775)

0xken1548d2ba966fa4
diff --git a/docs/design/2026-11-03-swarm-slack-redesign.md b/docs/design/2026-11-03-swarm-slack-redesign.md
new file mode 100644
index 000000000..e336d9888
--- /dev/null
+++ b/docs/design/2026-11-03-swarm-slack-redesign.md
@@ -0,0 +1,221 @@
+# Swarm on the phone: a Slack-style UI/UX tune
+
+- Date: 2026-11-03
+- Scope: the phone app only (`mobile/`). Desktop and the backend do not change.
+- Base: `feat/mobile-ios-android` @ `90d2ce56d`
+- Reference: [Re-designing Slack on Mobile](https://slack.design/articles/re-designing-slack-on-mobile/) (Siddhant Mehta, Slack)
+- Prototype: [2026-11-03-swarm-slack-redesign/prototype.html](2026-11-03-swarm-slack-redesign/prototype.html). Open it in a browser. Each phone is clickable. Tabs: Current · A · B · C · Compare.
+- Status: **direction A is implemented**. Tony approved it on 2026-11-03, answers in section 7. Where the build differs from the prototype, the decision says so under **Built**.
+
+## 1. Goal
+
+Make the Swarm part of the phone app as simple to read as Slack. Within 3 seconds of opening the app, a person should see **what needs me** and **where there is something new**, then deal with it in the same session.
+
+Slack reports that people open its mobile apps 15–20 times a day, for 20–30 seconds each time. It does not try to increase screen time. It tries to increase what gets done in each session. Harness has the same pattern: the phone is for catching up, approving and replying, and heavy work happens on the desktop.
+
+## 2. What the article says, mapped to Harness
+
+| Slack idea | Harness before | What shipped (A) |
+|---|---|---|
+| Five tabs cut to three, still labelled (label-less tabs hurt accessibility and comprehension) | Four labelled tabs: Home · Buddy · Activity · You | Three labelled tabs: Home · Buddy · Activity. You moves to an avatar |
+| A bar of tiles for unreads and secondary surfaces | Two large cards: While you were away, Threads | One tile bar: While you were away · Threads · Agents |
+| Filters in each tab, as a bottom sheet on Android, not an overflow menu | Home has a Sort and filter sheet | The same sheet, now also holding Mark all read and Refresh |
+| Pull down to open search, swipe sideways to change kind | No search in Swarm. Find lives only in the terminal | A Search button on Home's top bar plus a pull down at its top. Chips or a sideways swipe change the kind |
+| One feed for threads, mentions, alerts, invitations | What needs you is in 6 places. Invitations sit on Home | Activity opens on All. Invitations head All and Needs you and count on the tab's badge |
+| The header shrinks as you scroll | Fixed header | Built, then dropped with the Search field (D10) |
+| Less-used surfaces move to familiar places | Harness is reachable only through 4 "Open terminal" menu items | An Agents tile, and Agents in Search |
+| Huddles, Canvases, Lists, Later, Drafts & Sent | Not Harness features | Not applied |
+
+## 3. The five problems this fixes
+
+Paths are relative to `mobile/lib/`.
+
+1. **Two cards took about a third of the screen before the first project** (`SwarmAwayCard`, `SwarmThreadsRow`). An iPhone 16 showed 6 projects.
+2. **Each project row had two lines, and the second was the same everywhere.** All 7 of 7 rows said "7 humans".
+3. **Almost every row had the unread dot**, so the dot said nothing. Agents post all the time.
+4. **What needs you was spread over 6 places:** the Home card, Activity, the Work, Team and Status sheets, and the Buddy chat. Invitations sat on Home.
+5. **Several things were hard to reach.** There was no search in Swarm. Harness was behind 4 "Open terminal" menu items. You took a whole tab. Invite was buried in ⋮ › Leaderboard. Switching Swarm from Buddy was buried in ⋮ › Swarm.
+
+**Biggest issue:** everything on Home had the same visual weight, so nothing told the eye where to look first.
+
+## 4. Directions
+
+| | A · Slack trio (**chosen**) | B · Inbox | C · Light tune |
+|---|---|---|---|
+| Idea | Arrange Swarm as Slack does: tiles, one-line rows, Search, one Activity feed | Merge Home and Activity into one urgency-sorted inbox | Keep the structure, fix density only |
+| Tabs | Home · Buddy · Activity, You on the avatar | Inbox · Projects · Buddy | Home · Buddy · Activity · You |
+| Strongest point | Fixes all five problems with little to learn | Approve is one tap from opening the app | Lowest risk |
+| Cost | You is one tap further. Two earlier decisions are reversed. Home loses pull-to-refresh | Far from Slack. The list reorders under your finger. The most work | Four tabs stay, Harness stays hidden |
+
+**Why not B.** Slack keeps places (Home) apart from work (Activity). Merging them gives a list that grows with every task and keeps reordering itself.
+
+**Why not C.** C fixes how things look, not how they are arranged.
+
+## 5. Decisions
+
+Each decision lists what was chosen, the alternatives, the reasoning, the cost, and what was built.
+
+### D1. Three labelled tabs: Home · Buddy · Activity
+
+- **Alternatives:** keep four tabs with You; Inbox · Projects · Buddy (B); five tabs with Search and Harness; icon-only tabs.
+- **Why:** Slack found three jobs on mobile: catch up, respond, delegate. Home is for catching up on places, Buddy for delegating (the person's 1:1 chat with their own agent, the role Slack's DMs tab plays), Activity for responding. You is used rarely and does not need a quarter of the bar. Three tabs are about 131pt wide instead of 98pt.
+- **Cost:** reaching You takes one more tap. This reverses the You tab from prototype C1 (2026-10-30).
+- **Built:** `SwarmTab` is `home · buddy · activity` (`swarm/swarm_tabs.dart`). `showSwarmTab(context, tab, activity:)` switches tabs and can ask Activity for a filter.
+
+### D2. You moves to an avatar at the top right of Home and Activity
+
+- **Alternatives:** keep the You tab; a drawer; fold You into Settings; the avatar on the left.
+- **Why:** an avatar at the top right is widely understood, and it carries the status dot. Drawers are hard to discover, and the app already removed one. The left holds the Swarm name, Slack's workspace position, so "who am I" stays apart from "where am I".
+- **Cost:** the Buddy chat header has no room for it, so from Buddy you go back to Home first.
+- **Built:** `SwarmYouButton` is a 30pt avatar in a 44pt target, heard as "You" or "You, <status>". It pushes `SwarmYouPage` with a back button and the title You. The page's content does not change. A You opened this way goes with the tabs: when Swarm is turned off from its own Settings, back from Settings is the terminal, as it was from the You tab, not a You with no Swarm under it.
+
+### D3. A tile bar replaces the two cards at the top of Home
+
+- **Tiles:** While you were away (34 done · 4 need you) · Threads · Agents (1 working).
+- **Alternatives:** keep both cards; a one-line summary; move everything into Activity.
+- **Why:** Slack landed on "a simple bar of tiles that optimized for unread conversations while giving quick access to these surfaces". While you were away stays because Tony decided on 2026-11-02 (`c09849c64`) that it always shows. The bar scrolls sideways, so tiles can be added later.
+- **Cost:** on a narrow phone the last tile is only partly visible, so the most important tile comes first.
+- **Built** (`swarm/swarm_home_tiles.dart`):
+ - While you were away is 214pt wide, the others 104pt. All are as tall as each other and at least 44pt.
+ - While you were away opens Activity on Needs you.
+ - Threads opens the Threads page for the Swarm shown. The prototype had it open Activity › Threads, but the Threads page already scopes to one Swarm and keeps its read marks, so the build kept it.
+ - Agents opens the agents list (D7). It shows only when the app's computers can list agents.
+ - A figure not known yet is a skeleton, heard as "not known how many". Each tile is one button for a screen reader.
+
+### D4. Project rows become one line
+
+- **Layout:** a 44pt row: `#name [Swarm] … [tags]`. A bold name means there is something new.
+- **Alternatives:** keep two lines with time and an unread dot; a last-message preview; drop the state dot.
+- **Why:** the second line repeated on every row, and times like "now / now / 1m" did not help anyone decide. Slack signals two levels, bold for new and a badge for mentions. The prototype kept a state dot (working, waiting, down); the build dropped it (below).
+- **Cost:** the people count and the time leave the row. The list is still sorted by latest activity.
+- **Built:** `SwarmHomeProjectRow` (`swarm/swarm_home_rows.dart`). With several Swarms, the Swarm's name follows the #name in faint ink. Rows stay inside the grouped card the app already uses.
+- **No state dot** (Tony, 2026-11-03): an idle team's grey dot sat on nearly every row and said nothing, so the dot went first for idle teams and then altogether. A tag or decision waiting on the person still makes the name bold and adds `@N`; who works, waits or is down is on the project's page, in Activity and on the Agents tile. Home no longer counts a team per row, and its loading rows draw the name's bar alone.
+- **Phase 2:** the unread rule. Agents post constantly, so almost every row ends up bold. The proposal is that only people's messages, tags of the person and items that need them make a row bold. That has to change together with desktop `_hasUnread`.
+
+### D5. Search from the top bar, plus a pull down to open it
+
+- **Alternatives:** a Search tab (old Slack); a magnifier only; the pull only (new Slack); the terminal's Find.
+- **Why:** Slack removed the overlap between "Jump to" and a Search tab. Swarm had no search at all. A visible field is easy to find, and the pull is a shortcut for those who know it. The field folds on scroll, so it costs nothing while browsing.
+- **Cost:** Home loses pull-to-refresh. Swarm already polls, so Refresh moves into the filter sheet (D9).
+- **Changed after review** (Tony, 2026-11-03): the field under the top bar is gone. Search is a magnifier on the top bar, before the avatar, where Sort and filter was; it opens the same Search page. The pull stays.
+- **Built** (`swarm/swarm_home_search.dart`, `swarm/swarm_search_page.dart`):
+ - Chips: **Recent · Projects · Chats · Agents**. People are left out: a person has no page of their own in Swarm yet. Agents shows only when the app's computers can list them.
+ - Recent lists what moved last, at most 12. While something is typed, the Recent chip reads All and lists every kind.
+ - Matching ignores case and accents, as New message's To: does (`swarmSearchFold`). Ranking: the title starts with the text (a leading # is optional), then a word in it does, then the title holds it, then its Swarm or computer does. The prototype said to reuse Find's ranking, but Find ranks machines and agents for the terminal, and the To: field is the matching people already know in Swarm.
+ - Projects are those the person reads; a private project someone else owns stays out unless they are on it. Chats are the person's own Buddy chats, never another person's or an archived one.
+ - A row opens its project, chat or agent over Search, and back returns to Search as it was left.
+ - While the Swarms are read it shows a skeleton, never "nothing". A Swarm that could not be read is said above what the others have.
+ - The pull counts only a drag that began with the list at its top and went past 72pt, on Android (clamping) and iOS (bouncing) alike. A hint says "Pull to search", then "Release to search", with a haptic at the threshold.
+ - The chips scroll sideways on a narrow phone, as Activity's pills do. A chip opened by a swipe of the pages scrolls into sight.
+ - A drag on the results puts the keyboard away, a short list included.
+- **Phase 2:** searching message content needs a backend API.
+
+### D6. One Activity feed
+
+- **Chips:** All · Needs you · Mentions · Threads · Reactions.
+- **Alternatives:** keep Invitations on Home; put Needs you on Home (B); one list with no chips; an Invitations chip.
+- **Why:** Slack calls Activity a "one-stop shop" that "minimizes pogo-sticking". A word is clearer than "@", and a screen reader can say it.
+- **Built** (`swarm/swarm_activity.dart`, `swarm/swarm_activity_page.dart`):
+ - The Activity tab opens on All. A pushed Activity page (from a project) still opens on Needs you.
+ - All (`swarmActivityAll`) lists what still needs the person first, as Needs you does. Then tags, replies and reactions, newest first, those with no time last. Then the needs already handled. Each row appears once.
+ - Invitations to other Swarms head All and Needs you, the tab's only; a pushed Activity page and Home list none. They wait on the person's answer, so they count in both chips and on the Activity tab's badge (`swarmActivityTabBadge`): with Home's top gone, the badge is how the person learns one came. Needs you does not say "Nothing needs you." while one shows. With nothing anywhere, All says "You're all caught up."
+ - No Invitations chip (Tony, 2026-11-03): it would show 0 almost always, push Mentions further off a narrow phone, and an invitation is something that needs the person, which is what Needs you is for.
+ - Home's "While you were away · N need you" does not count invitations: it covers the Swarms Home shows.
+ - "@" is renamed "Mentions" **on the phone only**. Desktop keeps "@" (Tony, 2026-11-03).
+
+### D7. A way into Harness from Swarm
+
+- **Flow:** Agents tile, or Search › Agents → the agents list → terminal. The terminal does not change.
+- **Alternatives:** only "Open terminal" in four menus; a fourth Harness tab; a drawer.
+- **Why:** running agents is the core job of Harness, and Swarm had no way to its list. A fourth tab would bring the four-tab bar back.
+- **Built:** `SwarmAgents` (`swarm/swarm_agents.dart`) is what Swarm reads; the app's `AppSwarmAgents` (`swarm/swarm_computers.dart`) serves it from the agent index. It tells its listeners only when how many agents work or wait, or the agent list itself, changes, never at every terminal frame. It is a notifier of its own, so a change of agents never reads the Swarms again the way a computer coming up does. The list opens `AgentsListPage` pushed over Swarm, and an agent opens as it does anywhere else.
+
+### D8. A tap on the project's #name opens its details
+
+- **Sheet:** #name over who is on it. Quick actions: Notifications · Invite · Open terminal. Rows: Status · Work · Team (with who is on it) · Leaderboard.
+- **Alternatives:** only today's ⋮ dropdown with six items; project tabs Chat / Tasks / Team (tried and dropped).
+- **Why:** in Slack a channel's name opens its details. The sheet separates actions from information, and makes Invite visible.
+- **Built** (`swarm/swarm_project_details.dart`, `swarm/swarm_project_page.dart`):
+ - The #name in the header is one button, at least 44pt tall, heard as "#name, project details".
+ - Invite is for the Swarm's owner alone. Open terminal follows the ⋮ menu's rule: never for a viewer, and greyed with why (Stopped, Offline, Not linked) when it cannot open.
+ - A tap closes the sheet, then opens what the ⋮ row opens. Open terminal opens at once.
+ - The sheet closes when access is lost, on sign-out, or when the project leaves the Swarm, as the menu's sheets do.
+ - The ⋮ menu stays as it was, so nothing people know moves.
+
+### D9. Filters stay one button and one bottom sheet
+
+- **Change:** Mark all read and Refresh move into Sort and filter.
+- **Alternatives:** filter chips across Home; an overflow menu; Mark all read in the header.
+- **Why:** the app already has the sheet (`swarm/swarm_home_view_sheet.dart`), and the header drops to two controls, which suits Dee's preference for a minimal UI.
+- **Where:** at the right of the projects' first caption (Projects, or Pinned when a project is pinned), not on the top bar (Tony, 2026-11-03): it sorts and filters the projects, so it sits over them, and the top bar keeps Search and the avatar. A Home pushed over another page has none, as before.
+- **Cost:** Mark all read is one tap further. Its Undo toast stays.
+- **Built:** both close the sheet, then act. Mark all read is greyed when nothing is unread. Refresh does what the pull did (recheck the computers when there are none, then read every Swarm) and says "Refreshing…".
+
+### D10. The header folds on scroll
+
+- **Dropped** (Tony, 2026-11-03): it folded the Search field, which is gone (D5). The top bar stays fixed.
+
+### D11. Buddy stays a tab, and a tap on its title switches Swarm
+
+- **Why:** Home switches Swarm by its title, so Buddy works the same way. Swarm has no person-to-person DMs yet, so a DMs tab would be misnamed.
+- **Built:** with several Swarms, the Buddy tab's title is a button heard as "<title>. Switch Swarm" that opens the same switcher as ⋮ › Swarm. With one Swarm it is plain text.
+
+### D12. What stays as it is
+
+The New message button (2026-10-30), the composer (approved 2026-11-01), labelled tabs, the Graphite palette and tokens, haptics, and the terminal, untouched.
+
+## 6. Not applied
+
+- **Huddles, Canvases, Lists, Later, Drafts & Sent:** Harness has no such features.
+- **A theme per Swarm:** the app has palettes, and nobody asked.
+- **Sales Elevate, external-connection and Enterprise Grid filters:** the All Swarms switcher covers the need.
+
+## 7. Decisions taken (Tony, 2026-11-03)
+
+1. Direction A.
+2. Drop the You tab and the Threads row on Home: yes.
+3. Pull down to search in place of pull to refresh, with Refresh in the filter sheet: yes.
+4. "@" becomes "Mentions" on the phone only. Desktop does not change.
+5. Built in a worktree from `feat/mobile-ios-android`, with this spec and the prototype in the same commit.
+
+## 8. Where it is in the code
+
+All under `mobile/lib/swarm/`.
+
+- **New:** `swarm_agents.dart`, `swarm_home_tiles.dart`, `swarm_home_search.dart`, `swarm_search_page.dart`, `swarm_project_details.dart`.
+- **Changed:** `swarm_tabs.dart`, `swarm_you_page.dart`, `swarm_page.dart`, `swarm_home_rows.dart`, `swarm_home_top.dart`, `swarm_home_view_sheet.dart`, `swarm_activity.dart`, `swarm_activity_page.dart`, `swarm_computers.dart`, `swarm_project_page.dart`, `swarm_conversation_page.dart`, `swarm_style.dart`, `swarm_threads_page.dart`.
+- **Removed:** `SwarmAwayCard` and `SwarmThreadsRow`, replaced by tiles, and the You tab.
+
+## 9. Tests
+
+Widget and unit tests under `mobile/test/swarm/`. Run with `cd mobile && flutter test`, as CI does. `integration_test` is not part of it.
+
+- **Tabs** (`swarm_tabs_test.dart`, `phone/phone_shell_swarm_home_test.dart`): three labelled tabs, the avatar opening You with back, You going with the tabs when Swarm is turned off, While you were away opening Activity on Needs you, a repeated ask applied again.
+- **Tiles** (`swarm_home_tiles_test.dart`): figures, skeletons and what a screen reader hears; the row's order, sizes and sideways scroll.
+- **Project rows** (`swarm_home_project_row_test.dart`, `swarm_home_test.dart`): one line, bold when new, the Swarm's name with several, no people line.
+- **Search** (`swarm_search_page_test.dart`, `swarm_home_search_test.dart`): the ways in; each kind and what it leaves out; ranking, case and accents; chips, swipes and the chip following; opening a row and coming back; agents; reading and failure; the keyboard inset (the page ends at the keyboard, once) and a drag putting the keyboard away. The pull is tested on clamping and bouncing lists, and a drag begun mid-list opens nothing. Home has no field; the top bar's Search opens the page. The page's field takes none of the app's field outline or fill, focused or not, in light and dark.
+- **Activity** (`swarm_activity_test.dart`, `swarm_activity_page_test.dart`, `swarm_activity_feed_page_test.dart`, `swarm_invitations_in_swarm_test.dart`): All's order, Mentions, Invitations in All and Needs you with their counts, the tab badge counting them and dropping one put off.
+- **Filter sheet** (`swarm_home_view_test.dart`, `swarm_mark_all_test.dart`, `swarm_home_instant_test.dart`): Mark all read and Refresh in the sheet.
+- **Project details** (`swarm_project_details_test.dart`): the header button, every item and its order, Invite for the owner alone, Open terminal and its greyed states, each row's sheet, and the sheet closing with access, sign-out or the project.
+- **Agents** (`swarm_computers_test.dart`): what is listed, and when it tells.
+- **Buddy title** (`swarm_buddy_tab_test.dart`): the switcher with several Swarms, none with one.
+
+## 10. Design (AGENTS.md)
+
+This change stores no new data and adds no server call. Search reads only what the session already holds.
+
+- **Growth:** N/A, nothing is stored. Recent is worked out from what moved last.
+- **Concurrency:** N/A, no writes.
+- **Read cost:** Search builds its catalog from the reads Swarm already holds, when they change. The agents notifier counts the agent index the app already keeps, which is memoized.
+- **Scale:** at 10× projects or chats the results stay lazy lists, and Recent is capped at 12. The first metric to warn is Search's build time on a change.
+- **Compatibility:** no server change, so old and new clients work side by side. Desktop is unchanged.
+- **Migration and rollback:** none needed. Existing preference keys stay. Roll back by reverting the commit.
+- **Audience:** Search lists only what the person already reads; private projects follow New message's rule.
+- **Identity:** N/A.
+- **Failure:** a Swarm that cannot be read is said, never shown as "nothing matches".
+- **Platforms:** iOS and Android share the sheets; the pull is tested on both scroll physics.
+
+## 11. Next
+
+- The unread rule (D4), with desktop.
+- Searching message content (D5), with the backend.
diff --git a/docs/design/2026-11-03-swarm-slack-redesign/prototype.html b/docs/design/2026-11-03-swarm-slack-redesign/prototype.html
new file mode 100644
index 000000000..69ffcb628
--- /dev/null
+++ b/docs/design/2026-11-03-swarm-slack-redesign/prototype.html
@@ -0,0 +1,841 @@
+<!doctype html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
+<title>Swarm Mobile Redesign</title>
+<meta name="claude:viewport-fit-sides" content="cover">
+<style>
+/* Layout: a quiet review shell (tabs, thesis, notes) around one interactive phone per direction.
+ Shell follows the viewer's theme; the phones keep the app's own Graphite dark palette on purpose. */
+:root{
+ --bg:#f5f5f2; --fg:#1b1b19; --muted:#5d5c56; --line:#dad9d3; --chip:#ebebe6; --mark:#2f5bea; --frame:#0d0d0d;
+ --ui:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
+ --mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,"Roboto Mono",Consolas,monospace;
+}
+@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--bg:#111110;--fg:#ecebe7;--muted:#a3a29b;--line:#2d2d2a;--chip:#1f1f1d;--mark:#7d98ff;--frame:#000;color-scheme:dark}}
+:root[data-theme="dark"]{--bg:#111110;--fg:#ecebe7;--muted:#a3a29b;--line:#2d2d2a;--chip:#1f1f1d;--mark:#7d98ff;--frame:#000;color-scheme:dark}
+body{margin:0;background:var(--bg);color:var(--fg);font:14px/1.5 var(--ui);
+ padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:20px 56px}
+.wrap{max-width:1160px;margin:0 auto}
+.top h1{font:650 17px/1.3 var(--ui);margin:0;text-wrap:balance}
+.top p{margin:4px 0 0;color:var(--muted);font-size:13px;max-width:80ch}
+.top code,.thesis code{font:12px var(--mono)}
+.wrap a{color:var(--mark)}
+#dirtabs{display:flex;gap:2px;overflow-x:auto;border-bottom:1px solid var(--line);margin-top:16px;scrollbar-width:none}
+#dirtabs [role=tab]{appearance:none;background:none;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;padding:10px 12px;font:600 13px var(--ui);color:var(--muted);white-space:nowrap;cursor:pointer}
+#dirtabs [role=tab]:hover{color:var(--fg)}
+#dirtabs [role=tab][aria-selected=true]{color:var(--fg);border-bottom-color:var(--fg)}
+#dirtabs [role=tab]:focus-visible,.jump button:focus-visible{outline:2px solid var(--mark);outline-offset:2px;border-radius:4px}
+.thesis{margin:14px 0 22px;max-width:80ch;font-size:14px}
+.thesis b{font-weight:650}
+.stage{display:grid;grid-template-columns:auto minmax(0,1fr);gap:36px;align-items:start}
+.notes{min-width:0;display:grid;gap:22px;max-width:62ch}
+.notes h3{font:650 12px/1.3 var(--ui);letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 8px}
+.notes ul{margin:0;padding-left:18px;display:grid;gap:6px}
+.notes .try{margin:10px 0 0;font-size:13px;color:var(--muted)}
+.jump{display:flex;flex-wrap:wrap;gap:6px}
+.jump button{border:1px solid var(--line);background:var(--chip);color:var(--fg);border-radius:999px;padding:6px 11px;font:500 12.5px var(--ui);cursor:pointer}
+.jump button:hover{border-color:var(--muted)}
+.jump button[aria-current=true]{background:var(--fg);color:var(--bg);border-color:var(--fg)}
+.why{display:grid;gap:10px;margin:0}
+.why div{border-top:1px solid var(--line);padding-top:10px}
+.why dt{font-weight:650}
+.why dd{margin:2px 0 0;color:var(--muted);font-size:13.5px}
+.why dd b{color:var(--fg);font-weight:600}
+.now{display:grid;grid-template-columns:auto minmax(0,1fr);gap:36px;align-items:start}
+.shot{width:300px;max-width:100%;border:8px solid var(--frame);border-radius:40px;overflow:hidden;background:#181818}
+.shot img{display:block;width:100%}
+.diag{display:grid;gap:22px;max-width:66ch;min-width:0}
+.diag ol,.diag ul{margin:0;padding-left:20px;display:grid;gap:6px}
+.diag .big{border-left:3px solid var(--mark);padding:2px 0 2px 12px;margin:0}
+.diag h3{font:650 12px/1.3 var(--ui);letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 8px}
+.cmp{overflow-x:auto}
+.cmp table{border-collapse:collapse;width:100%;min-width:720px;font-size:13.5px}
+.cmp th,.cmp td{border-bottom:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top}
+.cmp thead th{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
+.cmp tbody th{font-weight:600;white-space:nowrap}
+.cmp .pick{color:var(--mark);font-weight:650}
+.rec{max-width:80ch;margin-top:24px;display:grid;gap:10px}
+.rec p{margin:0}
+@media (max-width:860px){.stage,.now{grid-template-columns:minmax(0,1fr)}.phone,.shot{margin-inline:auto}}
+
+/* ───────────── Phone: the app's Graphite palette and its real sizes ───────────── */
+.phone{
+ --g:#181818; --card:#202020; --srf:#2c2c2c; --sheet:#1f1f1f; --hair:rgba(255,255,255,.12);
+ --t1:#f5f5f5; --t2:#a8a8a2; --t3:#6e6e68; --blue:#2f5bea; --green:#3fb950; --yellow:#ffb020; --inky:#1a1200; --red:#f2544b;
+ --agent:#5cc8db; --human:#6ad08a;
+ width:375px;max-width:100%;height:780px;border:10px solid var(--frame);border-radius:50px;background:var(--g);color:var(--t1);
+ position:relative;overflow:hidden;display:flex;flex-direction:column;font:15px/1.35 var(--ui);user-select:none;-webkit-user-select:none;
+ box-shadow:0 1px 0 var(--line),0 24px 48px -24px rgba(0,0,0,.45);box-sizing:border-box}
+.phone *{box-sizing:border-box}
+:where(.phone) button{appearance:none;background:none;border:0;color:inherit;font:inherit;padding:0;cursor:pointer;text-align:left}
+.phone button:focus-visible{outline:2px solid #8aa4ff;outline-offset:-2px;border-radius:8px}
+.phone .ic{width:20px;height:20px;flex:none;stroke-width:1.6}
+:where(.phone) i.ic::before{content:"•"}
+.phone .s14{width:14px;height:14px}.phone .s16{width:16px;height:16px}.phone .s18{width:18px;height:18px}.phone .s22{width:22px;height:22px}.phone .s24{width:24px;height:24px}.phone .s26{width:26px;height:26px}
+.phone .t2{color:var(--t2)}.phone .t3{color:var(--t3)}
+.phone .grow{flex:1}
+.sb{height:46px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:6px 26px 0;font:600 15px var(--ui);position:relative}
+.sb .island{position:absolute;left:50%;top:9px;width:108px;height:30px;margin-left:-54px;background:#000;border-radius:20px}
+.sb .sbr{display:flex;gap:5px;align-items:center}
+.scr{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}
+.scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;touch-action:pan-y}
+.scroll::-webkit-scrollbar{display:none}
+.pullin{transition:transform .18s ease}
+.hdr{display:flex;align-items:center;gap:6px;padding:4px 12px 4px 16px;min-height:52px;flex:none}
+.ws{display:flex;align-items:center;gap:8px;min-height:44px;min-width:0}
+.wtile{width:28px;height:28px;border-radius:7px;background:var(--srf);display:grid;place-items:center;font:600 14px var(--ui);color:var(--t1);flex:none}
+.wname{font:600 20px var(--mono);letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
+.htitle{font:600 20px var(--mono)}
+.ib{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;color:var(--t1);position:relative}
+.ib:hover,.ib:active{background:rgba(255,255,255,.06)}
+.ib:disabled{color:var(--t3)}
+.av{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font:600 13px var(--ui);color:#fff;flex:none;position:relative}
+.avbtn{width:44px;height:44px;display:grid;place-items:center}
+.avbtn .av{background:#1d5bd6}
+.av .sd{position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border-radius:50%;background:var(--green);box-shadow:0 0 0 2px var(--g)}
+.searchwrap{flex:none;padding:0 16px 10px;max-height:56px;overflow:hidden;transition:max-height .2s ease,opacity .16s ease,padding .2s ease}
+.phone.collapsed .searchwrap{max-height:0;opacity:0;padding-bottom:0}
+.spill{width:100%;height:38px;border-radius:10px;background:var(--srf);display:flex;align-items:center;gap:8px;padding:0 12px;color:var(--t2);font-size:15px}
+.pullhint{height:0;overflow:visible;text-align:center;font-size:12.5px;color:var(--t2);position:relative;top:-28px;transition:color .12s}
+.pullhint.ready{color:var(--t1)}
+.tiles{display:flex;gap:8px;overflow-x:auto;padding:4px 16px 14px;scroll-snap-type:x mandatory;scrollbar-width:none;touch-action:pan-x pan-y}
+.tiles::-webkit-scrollbar{display:none}
+.tile{flex:none;scroll-snap-align:start;width:96px;min-height:66px;border-radius:12px;background:var(--card);padding:10px;display:flex;flex-direction:column;justify-content:space-between;gap:6px}
+.tile:hover,.tile:active{background:#262626}
+.tile.wide{width:214px}
+.tile .tt span{overflow:hidden;text-overflow:ellipsis}
+.tile .tt{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--t2);white-space:nowrap}
+.tile .tv{display:flex;align-items:center;gap:6px;font:600 15px var(--ui);white-space:nowrap;font-variant-numeric:tabular-nums}
+.g{color:var(--green)}.y{color:var(--yellow)}.r{color:var(--red)}
+.badge{min-width:22px;height:22px;border-radius:11px;padding:0 7px;display:inline-grid;place-items:center;font:600 12.5px var(--ui);font-variant-numeric:tabular-nums;flex:none}
+.badge.b{background:var(--blue);color:#fff}.badge.yb{background:var(--yellow);color:var(--inky)}
+.dot{width:8px;height:8px;border-radius:50%;background:var(--t3);flex:none;display:inline-block}
+.dot.green{background:var(--green)}.dot.yellow{background:var(--yellow)}.dot.red{background:var(--red)}.dot.idle{background:#4a4a46}
+.sech{display:flex;align-items:center;gap:6px;padding:8px 16px 4px;font:600 13px var(--ui);color:var(--t2);min-height:36px;width:100%}
+.sech .ic{transition:transform .15s}
+.sech.shut .ic{transform:rotate(-90deg)}
+.prow{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:0 16px}
+.prow:hover,.prow:active{background:rgba(255,255,255,.04)}
+.prow .pn{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px;color:var(--t2)}
+.prow.unread .pn{color:var(--t1);font-weight:650}
+.prow .tm{font-size:12.5px;color:var(--t3);font-variant-numeric:tabular-nums}
+.prow.quiet .pn{color:var(--t3)}
+.prow .hash{color:var(--t3);font-weight:400;margin-right:1px}
+.fab{position:absolute;right:16px;bottom:96px;width:56px;height:56px;border-radius:50%;background:var(--blue);display:grid;place-items:center;color:#fff;box-shadow:0 8px 20px rgba(0,0,0,.45);z-index:3}
+.fab:hover{filter:brightness(1.08)}
+.tabbar{flex:none;display:flex;border-top:1px solid var(--hair);padding:7px 0 26px;background:var(--g);position:relative}
+.tabbar::after{content:"";position:absolute;left:50%;bottom:8px;width:134px;height:5px;margin-left:-67px;border-radius:3px;background:rgba(255,255,255,.55)}
+.tb{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--t2);font:500 12.5px var(--ui);min-height:52px;text-align:center}
+.tb[aria-selected=true]{color:var(--t1);font-weight:650}
+.tb .gl{position:relative;height:26px}
+.tb .gl .badge{position:absolute;left:15px;top:-7px;height:20px;min-width:20px;font-size:11.5px;padding:0 6px}
+.tb .gl .bd{position:absolute;right:-2px;bottom:0;width:9px;height:9px;border-radius:50%;background:var(--green);box-shadow:0 0 0 1.5px var(--g)}
+/* chips (the app's 44pt stadium pills, drawn smaller here) */
+.chips{display:flex;gap:8px;overflow-x:auto;padding:2px 16px 12px;flex:none;scrollbar-width:none}
+.chips::-webkit-scrollbar{display:none}
+.chip{flex:none;height:34px;border-radius:17px;background:var(--srf);padding:0 13px;display:flex;align-items:center;gap:6px;font:500 14px var(--ui);color:var(--t1);white-space:nowrap}
+.chip[aria-pressed=true]{background:var(--t1);color:#181818}
+.chip .n{font-variant-numeric:tabular-nums;opacity:.75}
+/* activity rows */
+.arow{display:flex;gap:12px;padding:12px 16px;align-items:flex-start;width:100%}
+.arow:hover{background:rgba(255,255,255,.03)}
+.arow .bd1{flex:1;min-width:0;display:grid;gap:3px}
+.arow .cap{font-size:13px;color:var(--t2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
+.arow .tl{font-size:15.5px;line-height:1.3;color:var(--t1)}
+.arow.unread .tl{font-weight:620}
+.arow .sub{font-size:13px;color:var(--t2)}
+.arow.done{opacity:.55}
+.arow .doneword{display:flex;align-items:center;gap:4px;font-size:13px;color:var(--t2)}
+.btn{height:34px;border-radius:10px;padding:0 13px;font:600 14px var(--ui);display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:none}
+.btn.fill{background:var(--blue);color:#fff}.btn.fill.confirm{background:var(--yellow);color:var(--inky)}
+.btn.soft{background:var(--srf);color:var(--t1)}
+.btn.ghost{color:var(--t2);padding:0 8px}
+.av.sq{border-radius:9px}
+.empty{padding:28px 16px;color:var(--t2);text-align:center;font-size:14px}
+/* sheets */
+.veil{position:absolute;inset:0;background:rgba(0,0,0,0);z-index:8;transition:background .2s}
+.veil.open{background:rgba(0,0,0,.5)}
+.sheet{position:absolute;left:0;right:0;bottom:0;max-height:90%;overflow-y:auto;background:var(--sheet);border-radius:18px 18px 0 0;padding:8px 0 30px;z-index:9;transform:translateY(100%);transition:transform .24s cubic-bezier(.2,.8,.2,1);scrollbar-width:none}
+.sheet.open{transform:none}
+.sheet.static,.veil.static{transition:none}
+.grab{width:36px;height:5px;border-radius:3px;background:#4a4a46;margin:2px auto 10px}
+.shead{display:flex;align-items:center;gap:8px;padding:0 12px 8px 16px}
+.shead .st{flex:1;min-width:0;font:600 17px var(--mono)}
+.ssub{padding:0 16px 12px;color:var(--t2);font-size:13.5px;margin-top:-6px}
+.cap2{padding:14px 16px 6px;font:600 13px var(--ui);color:var(--t2)}
+.grp{margin:0 12px;border-radius:12px;background:var(--card);overflow:hidden}
+.srow{display:flex;align-items:center;gap:12px;min-height:52px;padding:0 14px;width:100%}
+.srow+.srow{border-top:1px solid var(--hair)}
+.srow:hover{background:rgba(255,255,255,.04)}
+.srow .lb{flex:1;min-width:0}
+.srow .vl{color:var(--t2);font-size:14px;white-space:nowrap}
+.srow.danger{color:var(--red)}
+.quick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:4px 12px 6px}
+.qb{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 4px;border-radius:12px;background:var(--card);font-size:13px;color:var(--t1);text-align:center}
+.qb:hover{background:#262626}
+.tick{color:var(--t1)}
+.you-top{display:flex;flex-direction:column;align-items:center;gap:6px;padding:6px 16px 8px}
+.you-top .av{width:64px;height:64px;font-size:24px}
+.you-top .nm{font:600 22px var(--ui)}
+.you-top .sw{color:var(--t2);font-size:14px}
+/* chat */
+.chdr{display:flex;align-items:center;gap:4px;padding:2px 6px 6px 4px;min-height:52px;border-bottom:1px solid var(--hair);flex:none}
+.ctitle{flex:1;min-width:0;display:grid;gap:1px;padding:4px 6px;border-radius:10px}
+.ctitle:hover{background:rgba(255,255,255,.04)}
+.ctitle .a{display:flex;align-items:center;gap:6px;font:600 17px var(--mono);white-space:nowrap;overflow:hidden}
+.ctitle .b{display:flex;align-items:center;gap:3px;font-size:13px;color:var(--t2);white-space:nowrap}
+.day{display:flex;align-items:center;gap:10px;color:var(--t2);font-size:12.5px;padding:10px 16px}
+.day::before,.day::after{content:"";flex:1;height:1px;background:var(--hair)}
+.msg{display:flex;gap:10px;padding:6px 16px 8px;position:relative}
+.msg.me{background:rgba(47,91,234,.12)}
+.msg.me::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#5b7cff}
+.msg .who{display:flex;align-items:baseline;gap:6px;font-size:13.5px}
+.msg .who b{font-weight:600}
+.msg .who .agent{color:var(--agent)}.msg .who .human{color:var(--human)}
+.role{font-size:11px;border:1px solid var(--hair);border-radius:8px;padding:0 6px;color:var(--t2)}
+.msg .hh{font:12px var(--mono);color:var(--t3)}
+.msg .tx{font-size:15.5px;line-height:1.38;margin-top:2px}
+.msg .mn{color:#8fa8ff;font-weight:600}
+.live{margin-top:8px;border-radius:12px;background:var(--card);padding:10px 12px 10px 14px;border-left:4px solid var(--blue);display:grid;gap:6px}
+.live .lt{font:600 15px var(--ui)}
+.live .ls{font-size:13px;color:var(--t2);display:flex;align-items:center;gap:6px}
+.live .pr{display:flex;align-items:center;gap:8px;font-size:13.5px}
+.decide{margin-top:8px;border-radius:12px;background:var(--card);padding:12px;display:grid;gap:10px}
+.decide .q{font-weight:600}
+.decide .row{display:flex;gap:8px;flex-wrap:wrap}
+.composer{flex:none;padding:6px 10px 8px}
+.ccard{border-radius:24px;background:var(--card);border:1px solid var(--hair);padding:10px 8px 6px 14px}
+.cfield{color:var(--t3);font-size:16px;padding:2px 0 10px}
+.ctool{display:flex;align-items:center;gap:4px}
+.cb{width:36px;height:36px;display:grid;place-items:center;border-radius:18px;color:var(--t2)}
+.tagchip{height:30px;border-radius:15px;background:var(--srf);padding:0 10px;display:flex;align-items:center;gap:4px;font-size:13.5px;color:var(--t1)}
+.send{width:36px;height:36px;border-radius:18px;background:var(--srf);display:grid;place-items:center;color:var(--t3)}
+/* search */
+.shdr{display:flex;align-items:center;gap:10px;padding:4px 16px 10px;flex:none}
+.field{flex:1;height:38px;border-radius:10px;background:var(--srf);display:flex;align-items:center;gap:8px;padding:0 12px;color:var(--t2)}
+.field input{flex:1;min-width:0;background:none;border:0;outline:0;color:var(--t1);font:16px var(--ui);user-select:text;-webkit-user-select:text}
+.field input::placeholder{color:var(--t2)}
+.cancel{color:var(--t1);font-size:16px;min-height:44px}
+.rrow{display:flex;align-items:center;gap:12px;min-height:56px;padding:6px 16px;width:100%}
+.rrow:hover{background:rgba(255,255,255,.04)}
+.rrow .rk{width:32px;height:32px;border-radius:9px;background:var(--srf);display:grid;place-items:center;color:var(--t2);flex:none}
+.rrow .rt{font-size:15.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
+.rrow .rs{font-size:13px;color:var(--t2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
+.rrow .rb{flex:1;min-width:0}
+.swipehint{text-align:center;font-size:12px;color:var(--t3);padding:10px 0 18px}
+/* agents and terminal */
+.mrow{display:flex;align-items:center;gap:8px;padding:14px 16px 6px;font-size:13px;color:var(--t2)}
+.term{flex:1;min-height:0;background:#0c0c0c;font:12.5px/1.55 var(--mono);color:#d6d6d0;padding:12px 14px;overflow:auto;white-space:pre-wrap}
+.term .p{color:#6ad08a}.term .q{color:#ffb020}.term .c{color:#7a7a74}
+.keybar{flex:none;display:flex;gap:6px;padding:8px 10px 10px;background:#141414;border-top:1px solid var(--hair);overflow-x:auto;scrollbar-width:none}
+.key{flex:none;height:34px;min-width:44px;padding:0 10px;border-radius:8px;background:var(--srf);display:grid;place-items:center;font:12.5px var(--mono)}
+/* B inbox */
+.sum{padding:2px 16px 10px;font-size:13.5px;color:var(--t2)}
+.card{margin:0 12px 8px;border-radius:12px;background:var(--card);padding:12px;display:grid;gap:8px}
+.card .cap{font-size:13px;color:var(--t2)}
+.card .tl{font-size:15.5px;font-weight:600;line-height:1.3}
+.card .row{display:flex;gap:8px}
+.card.done{opacity:.55}
+.caught{display:flex;flex-direction:column;align-items:center;gap:6px;padding:28px 16px 40px;color:var(--t2);font-size:14px}
+/* C */
+.cgrp{margin:0 16px;border-radius:12px;background:var(--card);overflow:hidden}
+.crow{display:flex;align-items:center;gap:10px;min-height:48px;padding:0 14px;width:100%}
+.crow+.crow{border-top:1px solid var(--hair)}
+.ccap{padding:16px 18px 6px;font:500 13px var(--ui);color:var(--t2)}
+@media (prefers-reduced-motion: reduce){.phone *,.phone{transition:none!important;scroll-behavior:auto}}
+</style>
+</head>
+<body>
+
+<div class="wrap">
+ <header class="top">
+ <h1>Swarm Mobile, modeled on Slack · prototype</h1>
+ <p>Built from <code>feat/mobile-ios-android</code> @ <code>90d2ce56d</code>, following the article <a href="https://slack.design/articles/re-designing-slack-on-mobile/" target="_blank" rel="noopener">Re-designing Slack on Mobile</a>. Every phone is tappable: bottom tabs, tiles, rows, avatar, Approve. The data is sample data (project names come from the real screen). The terminal is unchanged.</p>
+ </header>
+
+ <nav role="tablist" aria-label="Design direction" id="dirtabs">
+ <button role="tab" id="tab-now" aria-controls="panel-now" aria-selected="false" tabindex="-1">Current</button>
+ <button role="tab" id="tab-a" aria-controls="panel-a" aria-selected="true">A · Slack trio</button>
+ <button role="tab" id="tab-b" aria-controls="panel-b" aria-selected="false" tabindex="-1">B · Inbox</button>
+ <button role="tab" id="tab-c" aria-controls="panel-c" aria-selected="false" tabindex="-1">C · Light tune</button>
+ <button role="tab" id="tab-cmp" aria-controls="panel-cmp" aria-selected="false" tabindex="-1">Compare</button>
+ </nav>
+ <p class="thesis" id="thesis"></p>
+
+ <section role="tabpanel" id="panel-now" aria-labelledby="tab-now" hidden>
+ <div class="now">
+ <div class="shot"><img alt="Current Swarm Home: autonomous.ai header, While you were away card 34 done 4 need you, Threads card @2, project list with 2-line rows, blue + button, 4 tabs Home Buddy Activity You" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QBMRXhpZgAATU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABXqADAAQAAAABAAAC+AAAAAD/wAARCAL4AV4DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgc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pTDNIH8yPCkk7QeOT07V53RRYDqvEeuwaxDbiHdvOZbksMZmbAYj1GAK5WnvHJGQJFKkjIDDGQe/PamUAZd7/rR/u1Tq5e/wCtH+7VOgD/1PxfrUsv9Uf96sutSy/1R/3qALlFFFABSqu9gmQMnGT0H1pKKAOy8YX9h/ovhzRZFkstOi2iRPuyzyYaWT3ycKPZR616TeeMtOutPXRLi5gks00CJVjKKcXcbFhg43eYOO/TivBKKAPpOK78HWGsXGsSX2myQ3mqWNzDGhDskC8yb12/IFPDKevpiqdp48sry30+31a6tSsx1CG+BijGYcD7OrEJnaCTs9K+eKKVgPpODVPCNv4MSwudQtrnZHZSW6u8QKyiVDMBAkKshVSwZnkJcc8jpTbxjpWpagLu9l06aS112Q2i3CiOJbRlkwMoh2puClSQQDg46188UU7Ad/8AEeewutcjuLG7+2M1uvnHdHJscE/IZokjWXAwd+3vg9K4CiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigArv/AIU694Z8LfEvQvEnjO0+36TY6hDPe220N5kSNlhtPDY67T1xiuAooA/Vb/goT+0n+zz8bfCvh7SPhRtv9Ss5mlkvVtXt/s9uyYEBLqhYk84GVXHXmvypoooAy73/AFo/3ap1cvf9aP8AdqnQB//V/F+tzTbcywFg8a/N0ZgD0HrWHWpZf6o/71AGx9ib/npD/wB9ij7E3/PSH/vsVTooAufYm/56Q/8AfYo+xN/z0h/77FU6KALn2Jv+ekP/AH2KPsTf89If++xVOigC59ib/npD/wB9ij7E3/PSH/vsVTooAufYm/56Q/8AfYo+xN/z0h/77FU6KALn2Jv+ekP/AH2KPsTf89If++xVOigC59ib/npD/wB9ij7E3/PSH/vsVTooAufYm/56Q/8AfYo+xN/z0h/77FU6KALn2Jv+ekP/AH2KPsTf89If++xVOigC59ib/npD/wB9ij7E3/PSH/vsVTooAufYm/56Q/8AfYo+xN/z0h/77FU6KALn2Jv+ekP/AH2KPsTf89If++xVOigC59ib/npD/wB9ij7E3/PSH/vsV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c3lrfLPbwPaXDXai3toYlkncbWklVFAkZl4JYHIrB8TeNdd8WxW1vq32dYrMOLeK2gjgjjEjbmAWNVHJOa5OigAooooAKKKKAP//V/F+iiigAooooAKKKKACiiigAooooAKKKKACiiigAor1TR/hhNqmmxag14qecu4Kqb8D65HNan/CoJP8An/H/AH6/+yoA8Xor2j/hUEn/AD/j/v1/9lR/wqCT/n/H/fr/AOyoA8Xor2j/AIVBJ/z/AI/79f8A2VH/AAqCT/n/AB/36/8AsqAPF6K9o/4VBJ/z/j/v1/8AZUf8Kgk/5/x/36/+yoA8Xor2j/hUEn/P+P8Av1/9lR/wqCT/AJ/x/wB+v/sqAPF6K9o/4VBJ/wA/4/79f/ZUf8Kgk/5/x/36/wDsqAPF6K9o/wCFQSf8/wCP+/X/ANlR/wAKgk/5/wAf9+v/ALKgDxeivaP+FQSf8/4/79f/AGVcr4r8CS+GLNL03KzKz7Nu3Y34cnNAHA0UUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9b8X6KKKACiiigAooooAKKKKACiiigAooooAKKKKALEV5eQLshlkRfRWIH6Gpf7S1H/AJ+Jv++2/wAapUUAXf7S1H/n4m/77b/Gj+0tR/5+Jv8Avtv8apUUAXf7S1H/AJ+Jv++2/wAaP7S1H/n4m/77b/GqVFAF3+0tR/5+Jv8Avtv8aP7S1H/n4m/77b/GqVFAF3+0tR/5+Jv++2/xo/tLUf8An4m/77b/ABqlRQBd/tLUf+fib/vtv8aP7S1H/n4m/wC+2/xqlRQBd/tLUf8An4m/77b/ABo/tLUf+fib/vtv8apUUAXf7S1H/n4m/wC+2/xqCW4uLggzyO+Om9if51DRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k="></div>
+ <div class="diag">
+ <div>
+ <h3>Problems</h3>
+ <ol>
+ <li>Two cards (While you were away, Threads) take up ~⅓ of the screen before the first project.</li>
+ <li>Project rows have 2 lines; line 2, "7 humans", is identical on every row.</li>
+ <li>Almost every row has an unread dot, so the dot no longer tells you anything.</li>
+ <li>Things that need you live in 6 places: the Home card, Activity, Work, Team, Status, the Buddy chat.</li>
+ <li>Swarm has no Search; Harness is reachable only through 4 "Open terminal" menu items; You takes up a whole tab.</li>
+ </ol>
+ </div>
+ <p class="big"><b>Biggest problem:</b> open the app and, within 3 seconds, you cannot see "what needs me", because everything has the same visual weight.</p>
+ <div>
+ <h3>What the Slack article says (short version)</h3>
+ <ul>
+ <li>People open the app 15–20 times a day, for 20–30 seconds each time. Goal: get more done per visit, not make visits longer.</li>
+ <li>The tab bar went from 5 tabs to 3. Tabs must have labels: the unlabeled version was dropped because it was confusing and poor for accessibility.</li>
+ <li>A row of tiles on Home for unreads and secondary surfaces (Threads, Later, Huddles…).</li>
+ <li>The overlapping "Jump to" and Search tab were merged into one Search, opened by pulling down; swipe sideways to change the result kind.</li>
+ <li>Activity is one feed for every priority item (threads, mentions, alerts, invitations), so there is less jumping between tabs.</li>
+ <li>Each tab has a filter, opened as a bottom sheet (on Android too). The header collapses on scroll.</li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </section>
+
+ <section role="tabpanel" id="panel-a" aria-labelledby="tab-a">
+ <div class="stage"><div class="phone" id="phone-a"></div><aside class="notes" id="notes-a" aria-live="polite"></aside></div>
+ </section>
+ <section role="tabpanel" id="panel-b" aria-labelledby="tab-b" hidden>
+ <div class="stage"><div class="phone" id="phone-b"></div><aside class="notes" id="notes-b" aria-live="polite"></aside></div>
+ </section>
+ <section role="tabpanel" id="panel-c" aria-labelledby="tab-c" hidden>
+ <div class="stage"><div class="phone" id="phone-c"></div><aside class="notes" id="notes-c" aria-live="polite"></aside></div>
+ </section>
+
+ <section role="tabpanel" id="panel-cmp" aria-labelledby="tab-cmp" hidden>
+ <div class="cmp">
+ <table>
+ <thead><tr><th></th><th>A · Slack trio <span class="pick">(recommended)</span></th><th>B · Inbox</th><th>C · Light tune</th></tr></thead>
+ <tbody>
+ <tr><th>Best for</th><td>People who open the app many times a day to skim, then act fast</td><td>People who open the app only to approve/reply</td><td>Keeping the shipping pace without changing user habits</td></tr>
+ <tr><th>Tabs</th><td>3: Home · Buddy · Activity; You moves to the avatar</td><td>3: Inbox · Projects · Buddy; You moves to the avatar</td><td>4, as before</td></tr>
+ <tr><th>Projects visible on the first screen</th><td>~10 (1-line rows, 66pt tiles)</td><td>0 in Inbox; ~12 in the Projects tab</td><td>~9</td></tr>
+ <tr><th>Biggest strength</th><td>Fixes all 5 problems; close to Slack, so little to learn; adds a way into Harness, and Search</td><td>Only 1 tap from opening the app to Approve</td><td>Low risk, few broken tests</td></tr>
+ <tr><th>What it costs</th><td>You is 1 more tap away; reverses 2 earlier decisions (You tab, Threads row on Home); pull down to search replaces pull to refresh</td><td>Far from Slack; 2 lists to learn; the list reorders itself under your finger; the most code</td><td>Still 4 tabs; Harness still hidden; Threads still in 2 places; does not fix things that need you being scattered</td></tr>
+ <tr><th>With 10× projects</th><td>Good: 1-line rows, collapsible sections, filter</td><td>Inbox grows long, needs grouping</td><td>Okay for now, still 1 line</td></tr>
+ <tr><th>Build effort</th><td>Medium (~4–6 small PRs, mostly Home, tab bar, new Search)</td><td>High (new Inbox screen, merge logic, split out Projects)</td><td>Low (1–2 PRs)</td></tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="rec">
+ <p><b>Recommendation: A.</b> A fixes exactly the 5 problems in the Current tab: the tile bar gives back ⅓ of the screen, 1-line rows use bold text instead of dots, Activity gathers what needs you in one place, Search and the Agents tile open a way into Harness, and the You tab goes away. Almost every change rearranges screens that already exist; only Search is a new screen.</p>
+ <p><b>The cost:</b> You is one more tap away, and Home no longer has pull to refresh (data updates on its own; there is still a button in the filter sheet). Two earlier decisions are reversed: the You tab and the Threads row on Home.</p>
+ </div>
+ </section>
+</div>
+
+<script src="https://unpkg.com/[email protected]/dist/umd/lucide.min.js"></script>
+<script>
+(() => {
+// ───────────── Sample data (project names from the real Home; the rest is sample) ─────────────
+const SW = 'autonomous.ai';
+const PROJECTS = [
+ {id:'lampos', st:'yellow', unread:true, m:0, t:'now', humans:7, agents:0},
+ {id:'computer', st:'idle', unread:false, m:0, t:'now', humans:7, agents:0},
+ {id:'openharness', st:'red', unread:true, m:1, t:'now', humans:7, agents:1},
+ {id:'focus-pod', st:'idle', unread:true, m:1, t:'1m', humans:7, agents:0},
+ {id:'spaceship', st:'yellow', unread:true, m:0, t:'3m', humans:7, agents:0},
+ {id:'garage-pod', st:'idle', unread:false, m:0, t:'5m', humans:7, agents:0},
+ {id:'docs-site', st:'idle', unread:false, m:0, t:'12m', humans:4, agents:0},
+ {id:'mobile-app', st:'idle', unread:true, m:0, t:'40m', humans:5, agents:0},
+ {id:'billing', st:'idle', unread:false, m:0, t:'2h', humans:3, agents:0},
+ {id:'design-kit', st:'idle', unread:false, m:0, t:'6h', humans:4, agents:0},
+];
+const QUIET = ['infra','hiring','offsite','old-site','research','press','grants','labs','archive'];
+const ACT = [
+ {id:'n1', f:'needs', p:'openharness', who:'River', k:'agent', t:'3m', title:'Merge PR #2466 into main?', act:'Approve'},
+ {id:'n2', f:'needs', p:'lampos', who:'Juniper', k:'agent', t:'12m', title:'Which login page ships: A (email first) or B (Google first)?', act:'Reply'},
+ {id:'n3', f:'needs', p:'openharness', who:'River', k:'agent', t:'20m', title:'Can I restart build-box to free disk space?', act:'Approve'},
+ {id:'n4', f:'needs', p:'spaceship', who:'River', k:'agent', t:'2h', title:'Review the release notes before I post them', act:'Reply'},
+ {id:'m1', f:'mentions', p:'openharness', who:'dee', k:'human', t:'5m', title:'@tony can we ship this before Friday?'},
+ {id:'m2', f:'mentions', p:'focus-pod', who:'khoa', k:'human', t:'40m', title:'@tony screenshots are in the thread'},
+ {id:'h1', f:'threads', p:'lampos', who:'Juniper', k:'agent', t:'8m', title:'Login redirect loops on Android', sub:'2 new replies'},
+ {id:'h2', f:'threads', p:'garage-pod', who:'mai', k:'human', t:'1h', title:'Which camera do we order?', sub:'1 new reply'},
+ {id:'r1', f:'reactions', p:'openharness', who:'dee', k:'human', t:'30m', title:'PR #2466 is ready for review', sub:'👍 3 🎉 1', read:true},
+ {id:'i1', f:'invites', p:null, who:'linh', k:'human', t:'1d', title:'linh invited you to the Swarm bvm-labs'},
+];
+const AGENTS = [
+ {m:'mac-studio', on:true, list:[{n:'openharness-pm', e:'Claude', st:'green', w:'Working'}, {n:'fix-login', e:'Codex', st:'yellow', w:'Waiting for you'}]},
+ {m:'build-box', on:true, list:[{n:'lampos-dev', e:'Claude', st:'idle', w:'Idle'}]},
+ {m:'tony-mbp', on:false, list:[]},
+];
+const PEOPLE = [['dee','Active'],['khoa','🎯 Focusing'],['linh','Away'],['mai','Active']];
+const CHATS = [
+ {t:'#openharness', s:'Project chat · 7 humans · 1 agent running', go:'chat:openharness', k:'hash'},
+ {t:'Wren', s:'Your Buddy · autonomous.ai', go:'tab:buddy', k:'message-circle'},
+ {t:'Fix login redirect', s:'Work chat · #lampos', go:'chat:lampos', k:'messages-square'},
+ {t:'Release notes', s:'Work chat · #spaceship', go:'chat:spaceship', k:'messages-square'},
+];
+const RECENT = [
+ {t:'#openharness', s:'7 humans · 1 agent running', go:'chat:openharness', k:'hash'},
+ {t:'Wren', s:'Your Buddy · autonomous.ai', go:'tab:buddy', k:'message-circle'},
+ {t:'Login redirect loops on Android', s:'Thread · #lampos · 2 new replies', go:'chat:lampos', k:'messages-square'},
+ {t:'fix-login', s:'Codex · mac-studio · waiting for you', go:'term:fix-login', k:'square-terminal'},
+ {t:'dee', s:'Active · autonomous.ai', go:'', k:'@d'},
+ {t:'#lampos', s:'7 humans', go:'chat:lampos', k:'hash'},
+];
+const AVC = {River:'#0f766e', Juniper:'#6d28d9', Wren:'#15803d', dee:'#be123c', khoa:'#a65a08', mai:'#4e5d78', linh:'#a21caf', tony:'#1d5bd6'};
+
+// ───────────── Small builders ─────────────
+const ic = (n, c='') => `<i data-lucide="${n}" class="ic ${c}" aria-hidden="true"></i>`;
+const av = (who, sq=false) => `<span class="av ${sq?'sq':''}" style="background:${AVC[who]||'#4b5f9b'}" aria-hidden="true">${who[0].toUpperCase()}</span>`;
+const esc = s => String(s).replace(/[&<>"]/g, ch => ({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;'}[ch]));
+const proj = id => PROJECTS.find(p => p.id === id) || {id, humans:7, agents:0};
+const projLine = p => `${p.humans} humans${p.agents ? ` · ${p.agents} agent running` : ''}`;
+
+const statusBar = () => `<div class="sb"><span>12:19</span><span class="island"></span><span class="sbr">${ic('signal','s16')}${ic('wifi','s16')}${ic('battery-full','s22')}</span></div>`;
+const avatarBtn = () => `<button class="avbtn" data-act="sheet:you" aria-label="You: tony, Active">${'<span class="av">T<span class="sd"></span></span>'}</button>`;
+const wsBtn = (chev=true) => `<button class="ws" data-act="sheet:switcher" aria-label="Swarm: ${SW}. Switch Swarm"><span class="wtile">a</span><span class="wname">${SW}</span>${chev?ic('chevron-down','s16 t2'):''}</button>`;
+
+function tabBar(s, tabs){
+ const needs = needsLeft(s);
+ return `<div class="tabbar" role="tablist" aria-label="App tabs">${tabs.map(t => {
+ const on = s.tab === t.k;
+ const badge = t.badge === 'needs' && needs ? `<span class="badge yb">${needs}</span>` : '';
+ const dot = t.dot ? '<span class="bd" aria-hidden="true"></span>' : '';
+ return `<button class="tb" role="tab" aria-selected="${on}" data-act="tab:${t.k}"><span class="gl">${ic(t.icon,'s26')}${badge}${dot}</span>${t.label}</button>`;
+ }).join('')}</div>`;
+}
+const needsLeft = s => ACT.filter(a => a.f === 'needs' && !s.done.has(a.id)).length;
+
+// project rows
+function prow(p, {time=false, quiet=false}={}){
+ const right = p.m ? `<span class="badge b" aria-label="${p.m} mention">@${p.m}</span>` : '';
+ const label = `#${p.id}${p.unread?', new messages':''}`;
+ return `<button class="prow ${p.unread?'unread':''} ${quiet?'quiet':''}" data-act="chat:${p.id}" aria-label="${label}"><span class="dot ${p.st||'idle'}"></span><span class="pn"><span class="hash">#</span>${p.id}</span>${time?`<span class="tm">${p.t}</span>`:''}${right}</button>`;
+}
+
+// activity rows (shared by A and C)
+function arow(s, a){
+ const done = s.done.has(a.id);
+ const cap = a.p ? `#${a.p} · ${a.who} · ${a.t}` : `${a.who} · ${a.t}`;
+ let tail = '';
+ if (a.f === 'needs') {
+ if (done) tail = `<span class="doneword">${ic('check','s16')}${a.act==='Approve'?'Approved':'Answered'}</span>`;
+ else if (a.act === 'Approve') tail = `<button class="btn fill ${s.confirm===a.id?'confirm':''}" data-act="approve:${a.id}">${s.confirm===a.id?'Approve?':'Approve'}</button>`;
+ else tail = `<button class="btn soft" data-act="chat:${a.p}">Reply</button>`;
+ } else if (a.f === 'invites') {
+ tail = done ? `<span class="doneword">${ic('check','s16')}Joined</span>` : `<button class="btn fill" data-act="join:${a.id}">Join</button>`;
+ }
+ const go = a.p ? `chat:${a.p}` : 'noop';
+ const lead = a.f === 'invites' ? `<span class="av sq" style="background:#2c2c2c;color:#a8a8a2">${ic('hexagon','s18')}</span>` : av(a.who);
+ return `<div class="arow ${a.read||done?'':'unread'} ${done?'done':''}">${lead}<button class="bd1" data-act="${go}"><span class="cap">${cap}</span><span class="tl">${esc(a.title)}</span>${a.sub?`<span class="sub">${a.sub}</span>`:''}</button>${tail}</div>`;
+}
+
+// ───────────── Screens ─────────────
+const S = {};
+
+// A · Home: avatar, search pill, tile bar, one-line rows, sections
+S.homeA = s => {
+ const shown = s.sec ? PROJECTS : [];
+ return `<div class="hdr">${wsBtn()}<span class="grow"></span><button class="ib" data-act="sheet:filter" aria-label="Sort and filter">${ic('list-filter','s22')}</button>${avatarBtn()}</div>
+ <div class="searchwrap"><button class="spill" data-act="go:search">${ic('search','s16')}<span>Search chats, projects, agents</span></button></div>
+ <div class="scroll" data-pull="1"><div class="pullin"><div class="pullhint">${ic('arrow-down','s14')} Pull down to search</div>
+ <div class="tiles" role="list">
+ <button class="tile wide" role="listitem" data-act="tabf:activity:needs"><span class="tt">${ic('clock','s16')}<span>While you were away · 21h</span></span><span class="tv"><span class="g">34</span><span class="t2" style="font-weight:400">done</span>&nbsp;<span class="y">${needsLeft(s)}</span><span class="t2" style="font-weight:400">need you</span></span></button>
+ <button class="tile" role="listitem" data-act="tabf:activity:threads"><span class="tt">${ic('messages-square','s16')}Threads</span><span class="tv"><span class="badge b">@2</span></span></button>
+ <button class="tile" role="listitem" data-act="go:agents"><span class="tt">${ic('square-terminal','s16')}Agents</span><span class="tv"><span class="dot green"></span>1 working</span></button>
+ </div>
+ <button class="sech ${s.sec?'':'shut'}" data-act="toggle:sec" aria-expanded="${!!s.sec}">${ic('chevron-down','s16')}Projects</button>
+ ${shown.map(p => prow(p)).join('')}
+ <button class="sech ${s.other?'':'shut'}" data-act="toggle:other" aria-expanded="${!!s.other}">${ic('chevron-down','s16')}Other projects · ${QUIET.length}</button>
+ ${s.other ? QUIET.map(q => prow({id:q, st:'idle'}, {quiet:true})).join('') : ''}
+ <div style="height:84px"></div>
+ </div></div>
+ <button class="fab" data-act="noop" aria-label="New message">${ic('plus','s26')}</button>`;
+};
+
+// Search (A, and C's search pill): recents first, swipe or chips for kinds
+const CATS = [['recent','Recent'],['projects','Projects'],['chats','Chats'],['people','People'],['agents','Agents']];
+function searchItems(cat){
+ if (cat === 'recent') return RECENT;
+ if (cat === 'projects') return [...PROJECTS.map(p => ({t:'#'+p.id, s:projLine(p), go:'chat:'+p.id, k:'hash'})), ...QUIET.map(q => ({t:'#'+q, s:'Quiet for a day', go:'chat:'+q, k:'hash'}))];
+ if (cat === 'chats') return CHATS;
+ if (cat === 'people') return [...PEOPLE.map(([n,st]) => ({t:n, s:st, go:'', k:'@'+n})), {t:'River', s:'Agent · PM · #openharness', go:'', k:'@River'}, {t:'Juniper', s:'Agent · Dev · #lampos', go:'', k:'@Juniper'}];
+ return AGENTS.flatMap(m => m.list.map(a => ({t:a.n, s:`${a.e} · ${m.m} · ${a.w.toLowerCase()}`, go:'term:'+a.n, k:'square-terminal'})));
+}
+function searchResults(s){
+ const q = (s.q||'').trim().toLowerCase();
+ let items = q ? CATS.flatMap(([c]) => c==='recent'?[]:searchItems(c)).filter(i => (i.t+' '+i.s).toLowerCase().includes(q)) : searchItems(s.cat);
+ if (!items.length) return `<div class="empty">Nothing matches "${esc(s.q)}".<br>Messages inside chats come in phase 2.</div>`;
+ const lead = i => i.k.startsWith('@') ? av(i.k.slice(1)) : `<span class="rk">${ic(i.k,'s18')}</span>`;
+ return (q?'':`<div class="cap2">${CATS.find(c=>c[0]===s.cat)[1]}</div>`) + items.map(i => `<button class="rrow" data-act="${i.go?i.go:'noop'}">${lead(i)}<span class="rb"><span class="rt" style="display:block">${esc(i.t)}</span><span class="rs" style="display:block">${esc(i.s)}</span></span></button>`).join('') + (q?'':`<div class="swipehint">Swipe sideways to change kind · ${CATS.map(c=>c[1]).join(' · ')}</div>`);
+}
+S.search = s => `<div class="shdr"><label class="field">${ic('search','s16')}<input id="${s.dir}-q" type="search" placeholder="Search" value="${esc(s.q||'')}" autocomplete="off" aria-label="Search chats, projects, people and agents"></label><button class="cancel" data-act="back">Cancel</button></div>
+ <div class="chips" role="group" aria-label="Kind">${CATS.map(([k,l]) => `<button class="chip" aria-pressed="${s.cat===k && !s.q}" data-act="cat:${k}">${l}</button>`).join('')}</div>
+ <div class="scroll" data-swipe="1" id="${s.dir}-results">${searchResults(s)}</div>`;
+
+// Activity: A adds All + Invitations; C only renames "@" to Mentions
+function activityScreen(s, withAll){
+ const F = withAll ? [['all','All'],['needs','Needs you'],['mentions','Mentions'],['threads','Threads'],['reactions','Reactions']] : [['needs','Needs you'],['mentions','Mentions'],['threads','Threads'],['reactions','Reactions']];
+ const f = s.f || (withAll ? 'all' : 'needs');
+ const count = k => k==='needs' ? needsLeft(s) : k==='all' ? 0 : ACT.filter(a => a.f===k && !a.read).length;
+ const rows = ACT.filter(a => f==='all' ? (withAll || a.f!=='invites') : a.f===f);
+ const head = withAll ? `<div class="hdr"><span class="htitle">Activity</span><span class="grow"></span>${avatarBtn()}</div>` : `<div class="hdr"><span class="htitle">Activity</span></div>`;
+ return `${head}<div class="chips" role="group" aria-label="Filter">${F.map(([k,l]) => `<button class="chip" aria-pressed="${f===k}" data-act="flt:${k}">${l}${count(k)?` <span class="n">${count(k)}</span>`:''}</button>`).join('')}</div>
+ <div class="scroll">${rows.length ? rows.map(a => arow(s,a)).join('') : '<div class="empty">Nothing needs you.</div>'}<div style="height:16px"></div></div>`;
+}
+S.activityA = s => activityScreen(s, true);
+S.activityC = s => activityScreen(s, false);
+
+// Buddy chat (all directions; A/B make the title the Swarm switcher)
+S.buddy = s => {
+ const sw = s.dir !== 'c';
+ return `<div class="chdr"><button class="ctitle" ${sw?'data-act="sheet:switcher" aria-label="Wren, your Buddy in autonomous.ai. Switch Swarm"':'data-act="noop"'}><span class="a"><span class="dot green"></span>Wren${sw?ic('chevron-down','s16 t2'):''}</span><span class="b">Buddy · ${SW}</span></button><button class="ib" data-act="noop" aria-label="Buddy menu">${ic('ellipsis-vertical','s22')}</button></div>
+ <div class="scroll"><div class="day">Today</div>
+ ${msg('Wren','agent','','08:02',`Morning. 3 PRs merged overnight in <b>#openharness</b>. One needs you:`, decideCard(s))}
+ ${msg('tony','human','','08:05','What is blocking #lampos?')}
+ ${msg('Wren','agent','','08:05','Juniper is waiting on your pick for the login page, A or B. Everything else is moving.')}
+ </div>
+ ${composer('Message Wren', true)}`;
+};
+function decideCard(s){
+ if (s.done.has('n1')) return `<div class="decide"><span class="q">Merge PR #2466 into main?</span><span class="doneword">${ic('check','s16')}You chose: Approve</span></div>`;
+ return `<div class="decide"><span class="q">Merge PR #2466 into main?</span><div class="row"><button class="btn fill ${s.confirm==='n1'?'confirm':''}" data-act="approve:n1">${s.confirm==='n1'?'Approve?':'Approve'}</button><button class="btn soft" data-act="noop">Let River decide</button><button class="btn ghost" data-act="noop">Not now</button></div></div>`;
+}
+function msg(who, kind, role, hh, html, extra='', me=false){
+ return `<div class="msg ${me?'me':''}">${av(who)}<div style="flex:1;min-width:0"><div class="who"><b class="${kind}">${who}</b>${role?`<span class="role">${role}</span>`:''}<span class="hh">${hh}</span></div><div class="tx">${html}</div>${extra}</div></div>`;
+}
+const composer = (ph, buddy=false) => `<div class="composer"><div class="ccard"><div class="cfield">${ph}</div><div class="ctool"><button class="cb" data-act="noop" aria-label="Attach">${ic('plus','s22')}</button>${buddy?`<button class="tagchip" data-act="noop">${ic('message-square-plus','s14')}New session</button>`:`<button class="tagchip" data-act="noop">${ic('at-sign','s14')}Tag</button>`}<span class="grow"></span><button class="cb" data-act="noop" aria-label="Voice">${ic('mic','s22')}</button><button class="send" disabled aria-label="Send">${ic('arrow-up','s18')}</button></div></div></div>`;
+
+// Project chat: A/B open details from the title; C keeps the ⋮ menu
+S.chat = s => {
+ const p = proj(s.pid || 'openharness');
+ const tapTitle = s.dir !== 'c';
+ const title = `<span class="a">#${p.id}</span><span class="b">${projLine(p)}${tapTitle?ic('chevron-right','s14'):''}</span>`;
+ const head = `<div class="chdr"><button class="ib" data-act="back" aria-label="Back">${ic('chevron-left','s26')}</button>${tapTitle?`<button class="ctitle" data-act="sheet:details" aria-label="#${p.id} details">${title}</button>`:`<div class="ctitle">${title}</div>`}${tapTitle?'':`<button class="ib" data-act="sheet:menu" aria-label="Project menu">${ic('ellipsis-vertical','s22')}</button>`}</div>`;
+ const body = p.id === 'openharness'
+ ? msg('River','agent','PM','16:40','Fix login redirect is ready. PR #2466 passes CI.', `<div class="live"><span class="lt">Fix login redirect</span><span class="ls"><span class="dot yellow"></span>In review · waiting on a person</span><span class="pr">${ic('git-pull-request','s16 g')}#2466 Fix login redirect loop<span class="grow"></span>${ic('external-link','s14 t2')}</span></div>`)
+ + msg('dee','human','','16:44','<span class="mn">@tony</span> can we ship this before Friday?', '', true)
+ + msg('Juniper','agent','Dev','16:47','Android build is green too.')
+ : msg('Juniper','agent','Dev','16:31',`Two login pages are ready in <b>#${p.id}</b>. A puts email first, B puts Google first.`)
+ + msg('mai','human','','16:38','B tested better with the pilot group.')
+ + msg('Juniper','agent','Dev','16:40','<span class="mn">@tony</span> which one ships?', '', true);
+ return `${head}<div class="scroll"><div class="day">Today</div>${body}</div>${composer('Message #'+p.id)}`;
+};
+
+// Agents (Harness) list, reached from the Agents tile and Search
+S.agents = s => `<div class="chdr"><button class="ib" data-act="back" aria-label="Back">${ic('chevron-left','s26')}</button><div class="ctitle"><span class="a">Agents</span><span class="b">Harness · on your computers</span></div></div>
+ <div class="scroll">${AGENTS.map(m => `<div class="mrow"><span class="dot ${m.on?'green':'idle'}"></span>${m.m} · ${m.on?'online':'offline'}</div>${m.list.length ? `<div class="grp">${m.list.map(a => `<button class="srow" data-act="term:${a.n}"><span class="dot ${a.st}"></span><span class="lb"><span style="display:block;font:600 15px var(--mono)">${a.n}</span><span style="display:block;font-size:13px;color:var(--t2)">${a.e} · ${a.w}</span></span>${ic('chevron-right','s18 t3')}</button>`).join('')}</div>` : `<div style="padding:0 16px;color:var(--t3);font-size:13.5px">No agents</div>`}`).join('')}<div style="height:20px"></div></div>`;
+
+S.term = s => `<div class="chdr"><button class="ib" data-act="back" aria-label="Back">${ic('chevron-left','s26')}</button><div class="ctitle"><span class="a">${s.term||'fix-login'}</span><span class="b">mac-studio · Codex</span></div></div>
+ <div class="term"><span class="c"># Terminal stays 100% as it is today</span>
+<span class="p">›</span> Fix the login redirect loop on Android
+• Read src/auth/redirect.ts
+• Patched the redirect guard (+12 −4)
+• Ran unit tests: 48 passed
+<span class="q">? Run the Android e2e suite now? (y/n)</span>
+</div><div class="keybar">${['esc','tab','ctrl','↑','↓','y','n','⏎'].map(k=>`<span class="key">${k}</span>`).join('')}</div>`;
+
+// B · Inbox: one list ordered by urgency, actions in place
+S.inbox = s => {
+ const needs = ACT.filter(a => a.f==='needs');
+ const replies = ACT.filter(a => a.f==='mentions' || a.f==='threads');
+ const news = [['lampos','Juniper','Android build is green','8m'],['mobile-app','mai','Build 1.0.12 (79) is on TestFlight','40m']];
+ const card = a => {
+ const done = s.done.has(a.id);
+ const tail = done ? `<span class="doneword">${ic('check','s16')}${a.act==='Approve'?'Approved':'Answered'}</span>`
+ : a.act==='Approve' ? `<div class="row"><button class="btn fill ${s.confirm===a.id?'confirm':''}" data-act="approve:${a.id}">${s.confirm===a.id?'Approve?':'Approve'}</button><button class="btn ghost" data-act="noop">Not now</button></div>`
+ : `<div class="row"><button class="btn soft" data-act="chat:${a.p}">Reply</button><button class="btn ghost" data-act="noop">Not now</button></div>`;
+ return `<div class="card ${done?'done':''}"><span class="cap">#${a.p} · ${a.who} · ${a.t}</span><span class="tl">${esc(a.title)}</span>${tail}</div>`;
+ };
+ return `<div class="hdr"><span class="htitle">Inbox</span><span class="grow"></span><button class="ib" data-act="sheet:switcher" aria-label="Swarm: ${SW}. Switch Swarm"><span class="wtile">a</span></button>${avatarBtn()}</div>
+ <div class="scroll"><div class="sum">While you were away · 21h · <span class="g">34 done</span></div>
+ <div class="cap2">Needs you · ${needsLeft(s)}</div>${needs.map(card).join('')}
+ <div class="cap2">Mentions and replies · ${replies.length}</div>${replies.map(a => arow(s,a)).join('')}
+ <div class="cap2">New in projects</div>${news.map(([p,w,t,tm]) => `<button class="arow unread" data-act="chat:${p}"><span class="av sq" style="background:#2c2c2c;color:#a8a8a2">#</span><span class="bd1"><span class="cap">#${p} · ${tm}</span><span class="tl">${w}: ${t}</span></span></button>`).join('')}
+ <div class="caught">${ic('circle-check','s24 g')}You're caught up</div></div>`;
+};
+S.projectsB = s => `<div class="hdr"><span class="htitle">Projects</span><span class="grow"></span><button class="ib" data-act="sheet:filter" aria-label="Sort and filter">${ic('list-filter','s22')}</button>${avatarBtn()}</div>
+ <div class="searchwrap"><button class="spill" data-act="noop">${ic('search','s16')}<span>Search</span></button></div>
+ <div class="scroll"><button class="sech" data-act="noop">${ic('chevron-down','s16')}Projects</button>${PROJECTS.map(p => prow(p)).join('')}<button class="sech shut" data-act="noop">${ic('chevron-down','s16')}Other projects · ${QUIET.length}</button><div style="height:84px"></div></div>
+ <button class="fab" data-act="noop" aria-label="New message">${ic('plus','s26')}</button>`;
+
+// C · Home: today's structure, tighter
+S.homeC = s => `<div class="hdr">${wsBtn()}<span class="grow"></span><button class="ib" data-act="sheet:filter" aria-label="Sort and filter">${ic('list-filter','s22')}</button><button class="ib" data-act="noop" aria-label="Mark all read">${ic('check-check','s22')}</button></div>
+ <div class="searchwrap"><button class="spill" data-act="go:search">${ic('search','s16')}<span>Search</span></button></div>
+ <div class="scroll"><div class="cgrp">
+ <button class="crow" data-act="tabf:activity:needs">${ic('clock','s18 t2')}<span class="grow">While you were away · 21h</span><span class="g" style="font-weight:600">34</span><span class="t2" style="font-size:13px">done</span><span class="y" style="font-weight:600;margin-left:6px">${needsLeft(s)}</span><span class="t2" style="font-size:13px">need you</span></button>
+ <button class="crow" data-act="tabf:activity:threads">${ic('messages-square','s18 t2')}<span class="grow">Threads</span><span class="badge b">@2</span></button>
+ </div>
+ <div class="ccap">Projects</div><div class="cgrp">${PROJECTS.map(p => prow(p,{time:true}).replace('class="prow','class="prow crow')).join('')}</div>
+ <div style="height:90px"></div></div>
+ <button class="fab" data-act="noop" aria-label="New message">${ic('plus','s26')}</button>`;
+
+// You: the same rows as today's You tab
+const youBody = () => `<div class="you-top"><span class="av" style="background:#1d5bd6">T</span><span class="nm">tony</span><span class="sw">${SW}</span></div>
+ <div class="cap2">Status</div><div class="grp"><button class="srow" data-act="noop"><span class="dot green" style="width:10px;height:10px"></span><span class="lb">🎯 Focusing</span><span class="vl">Change ›</span></button></div>
+ <div class="cap2">Username</div><div class="grp"><button class="srow" data-act="noop">${ic('at-sign','s18 t2')}<span class="lb">tony</span><span class="vl">Change ›</span></button></div>
+ <div style="height:12px"></div><div class="grp"><button class="srow" data-act="noop">${ic('cpu','s18 t2')}<span class="lb">Your models</span><span class="vl">3 ready now ›</span></button><button class="srow" data-act="noop">${ic('laptop','s18 t2')}<span class="lb">Your devices</span><span class="vl">2 online · 1 offline ›</span></button></div>
+ <div style="height:12px"></div><div class="grp"><button class="srow" data-act="noop">${ic('settings','s18 t2')}<span class="lb">Settings</span><span class="vl">›</span></button></div>`;
+S.youC = s => `<div class="hdr"><span class="htitle">You</span></div><div class="scroll">${youBody()}<div style="height:20px"></div></div>`;
+
+// Sheets
+const SHEETS = {
+ you: s => `<div class="grab"></div><div class="shead"><span class="st">You</span><button class="ib" data-act="close" aria-label="Close">${ic('x','s22')}</button></div>${youBody()}`,
+ switcher: s => `<div class="grab"></div><div class="grp">
+ <button class="srow" data-act="close">${ic('layers','s18 t2')}<span class="lb">All Swarms</span></button>
+ <button class="srow" data-act="close"><span class="wtile">a</span><span class="lb">${SW}</span>${ic('check','s18 tick')}</button>
+ <button class="srow" data-act="close"><span class="wtile">b</span><span class="lb">bvm-labs</span><span class="badge yb">2</span></button>
+ </div><div style="height:10px"></div><div class="grp"><button class="srow" data-act="close">${ic('plus','s18 t2')}<span class="lb">Join or create a Swarm</span></button></div>`,
+ filter: s => {
+ const opt = (l, on) => `<button class="srow" data-act="noop"><span class="lb">${l}</span>${on?ic('check','s18 tick'):''}</button>`;
+ return `<div class="grab"></div><div class="shead"><span class="st">Sort and filter</span><button class="ib" data-act="close" aria-label="Close">${ic('x','s22')}</button></div>
+ <div class="cap2">Sort by</div><div class="grp">${opt('Sections',true)}${opt('Newest to oldest',false)}</div>
+ <div class="cap2">Unreads and mentions</div><div class="grp">${opt('Show in order',true)}${opt('Move to the top',false)}</div>
+ <div class="cap2">Filter</div><div class="grp">${opt('All projects',true)}${opt('Unread',false)}${opt('Mentions',false)}</div>
+ ${s.dir!=='c'?`<div style="height:12px"></div><div class="grp"><button class="srow" data-act="close">${ic('check-check','s18 t2')}<span class="lb">Mark all read</span></button><button class="srow" data-act="close">${ic('refresh-cw','s18 t2')}<span class="lb">Refresh</span></button></div>`:''}`;
+ },
+ details: s => {
+ const p = proj(s.pid || 'openharness');
+ const row = (i,l,v,go='noop') => `<button class="srow" data-act="${go}">${ic(i,'s18 t2')}<span class="lb">${l}</span><span class="vl">${v} ›</span></button>`;
+ return `<div class="grab"></div><div class="shead"><span class="st">#${p.id}</span><button class="ib" data-act="close" aria-label="Close">${ic('x','s22')}</button></div><div class="ssub">${SW} · ${p.humans} humans · 3 agents</div>
+ <div class="quick"><button class="qb" data-act="noop">${ic('bell','s22')}All messages</button><button class="qb" data-act="noop">${ic('user-plus','s22')}Invite</button><button class="qb" data-act="term:openharness-pm">${ic('square-terminal','s22')}Open terminal</button></div>
+ <div style="height:8px"></div><div class="grp">${row('activity','Status','updated 16:52')}${row('list-checks','Work','2 waiting on you')}${row('users','Team',`${p.humans} humans · 3 agents`)}${row('trophy','Leaderboard','')}</div>`;
+ },
+ menu: s => `<div class="grab"></div><div class="grp">${['Open terminal','Status','Leaderboard','Work','Team','Notifications'].map(l => `<button class="srow" data-act="close"><span class="lb">${l}</span></button>`).join('')}</div><div class="ssub" style="padding-top:12px">Menu ⋮ as today (6 items).</div>`,
+};
+
+// ───────────── Directions: tabs, screens, notes, jumps ─────────────
+const DIRS = {
+ a: {
+ tabs:[{k:'home',label:'Home',icon:'house'},{k:'buddy',label:'Buddy',icon:'message-circle',dot:true},{k:'activity',label:'Activity',icon:'bell',badge:'needs'}],
+ root:{home:'homeA', buddy:'buddy', activity:'activityA'},
+ jumps:[['Home',{tab:'home'}],['Search (pull down)',{tab:'home',push:'search'}],['Activity',{tab:'activity'}],['Buddy',{tab:'buddy'}],['Project chat',{tab:'home',push:'chat',pid:'openharness'}],['Project details',{tab:'home',push:'chat',pid:'openharness',sheet:'details'}],['You (avatar)',{tab:'home',sheet:'you'}],['Agents → terminal',{tab:'home',push:'agents'}]],
+ notes:{
+ homeA:{t:'Home', b:['Header: the Swarm name ▾ to switch Swarm, a filter button, and your avatar on the right (replaces the You tab).','The Search box is always visible. Scrolling the list collapses it to make room (like Slack).','A row of tiles replaces the two cards: While you were away, Threads, Agents. 66pt tall instead of ~170pt.','Rows are 1 line, 44pt. Bold means new messages; a blue badge means someone mentioned you. The "7 humans" line and the time are gone.','The Agents tile is a way into Harness right from Swarm.'], try:'Try: pull the list down while at the top (opens Search), scroll to see the header collapse, tap each tile, tap the avatar.'},
+ search:{t:'Search', b:['One place to search both Swarm and Harness. Today the app has no Search in Swarm, and Find exists only in the terminal.','Open it by tapping the Search box or pulling Home down. Shows recent items by default.','Swipe sideways or tap a chip to change kind: Projects · Chats · People · Agents.','Typing searches every kind at once. Searching message content needs backend work, so it waits for phase 2.'], try:'Try: type "login" or "mac"; swipe sideways on the list.'},
+ activityA:{t:'Activity', b:['One feed for everything that needs you: Needs you, Mentions, Threads, Reactions, and Invitations (moved over from Home).','Adds an All chip. The "@" chip becomes "Mentions" so it is clearer and VoiceOver can read it.','The separate Threads page is gone; the Threads tile opens the Threads chip here directly.','Approve still asks you to confirm once, as today; the tab badge drops right after you approve.'], try:'Try: tap Approve twice and watch the row fade and the tab count drop.'},
+ buddy:{t:'Buddy', b:['The second tab is still the Buddy chat. It is the 1:1 chat you use most, the same role as the DMs tab in Slack.','Tap the Buddy name ▾ to switch Swarm (today you have to go through ⋮ › Swarm).','Decisions in the Buddy chat share state with Activity: approve in one place and the other updates too.']},
+ chat:{t:'Project chat', b:['Tap the project name or the "7 humans · 1 agent running ›" line to open Details, like tapping a channel name in Slack. Replaces the 6-item ⋮ menu.','The composer stays exactly as approved on Nov 1 (floating card, + · Tag · mic · Send).','Messages that mention you have a colored bar on the left, as today.']},
+ details:{t:'Project details', b:['Status, Work, Team, Leaderboard, Notifications and Open terminal are gathered into one sheet.','Invite becomes a quick button. Today it is buried in ⋮ › Leaderboard and only the owner sees it; permissions stay the same.','Open terminal for the PM lives here, so no separate item is needed.']},
+ you:{t:'You', b:['The content stays exactly as in the current You tab: Status, Username, Your models, Your devices, Settings.','Only the way in changes: the avatar in the Home and Activity headers. The green dot on the avatar is your status.']},
+ agents:{t:'Agents (Harness)', b:['Harnesses listed by machine; status uses the same dot colors as Home.','Tapping one opens the terminal as it does now; the terminal stays 100% the same.','Ways in: the Agents tile, Search › Agents, and the existing Open terminal buttons.']},
+ term:{t:'Terminal', b:['The terminal does not change at all. Back returns to Swarm.']},
+ filter:{t:'Sort and filter', b:['Keeps the existing sheet. Adds Mark all read (moved here from the header) and Refresh (replaces pull to refresh).']},
+ switcher:{t:'Switch Swarm', b:['Keeps the existing sheet. Home and Buddy open the same sheet.']},
+ },
+ why:[
+ ['3 labeled tabs: Home · Buddy · Activity','Not 4 tabs, because You is opened only a few times a week yet takes ¼ of the tab bar. Not icon-only tabs, because Slack tried them and dropped them as confusing and hard for VoiceOver.'],
+ ['You is the avatar at the right of the header','Not a drawer, because drawers are hard to find and the app already dropped one. Not tucked into Settings, because status and username belong to the person, while Settings belong to the device.'],
+ ['A row of tiles replaces the two cards','Not keeping the cards, because the two cards cost ~170pt. Not dropping them entirely, because While you were away was settled as always visible on Nov 2; the tile keeps it, just more compact.'],
+ ['1-line rows: bold means new, a badge means a mention','Not 2 lines, because line 2 is the same on every row. No last-message preview, because agents post constantly, so the preview keeps changing and is hard to read.'],
+ ['Search in the header, plus pull down','No Search tab, because it spends a whole tab on something done a few times a day. Not gesture-only, because nobody discovers pull down on their own.'],
+ ['Activity is a single feed','Not keeping the Threads page and Invitations on Home, because when the same thing lives in two places you have to jump back and forth.'],
+ ],
+ },
+ b: {
+ tabs:[{k:'inbox',label:'Inbox',icon:'inbox',badge:'needs'},{k:'projects',label:'Projects',icon:'hash'},{k:'buddy',label:'Buddy',icon:'message-circle',dot:true}],
+ root:{inbox:'inbox', projects:'projectsB', buddy:'buddy'},
+ jumps:[['Inbox',{tab:'inbox'}],['Projects',{tab:'projects'}],['Buddy',{tab:'buddy'}],['Project chat',{tab:'projects',push:'chat',pid:'lampos'}],['You (avatar)',{tab:'inbox',sheet:'you'}]],
+ notes:{
+ inbox:{t:'Inbox', b:['Home and Activity merge into one list ordered by urgency: Needs you (Approve right on the card), then Mentions and replies, then new messages in projects, and finally "You\'re caught up".','No tile bar and no Activity tab. While you were away shrinks to one line.','Works best when you open the app only to deal with tasks: open it and you can Approve right away.'], try:'Try: Approve twice; the card fades and the Inbox badge drops.'},
+ projectsB:{t:'Projects', b:['The project list moves to its own tab, with 1-line rows like A.','Two lists to learn: Inbox (tasks) and Projects (places).']},
+ buddy:{t:'Buddy', b:['Same as A.']},
+ chat:{t:'Project chat', b:['Same as A: tap the title to open Details.']},
+ details:{t:'Project details', b:['Same as A.']},
+ you:{t:'You', b:['Same as A: avatar in the header.']},
+ switcher:{t:'Switch Swarm', b:['The "a" square in the Inbox header.']},
+ filter:{t:'Sort and filter', b:['Same as A.']},
+ term:{t:'Terminal', b:['Unchanged.']},
+ },
+ why:[
+ ['Gains','The fewest taps for approving and replying. No need to understand how Activity differs from Home.'],
+ ['Costs','Far from Slack, so it can lean less on existing habits. The list reorders itself when new tasks arrive, right under your finger. Inbox grows long with 10× the tasks. Needs a new screen and merge logic, so it is the most work.'],
+ ['Why not this one','The Slack article keeps Home (places) separate from Activity (tasks) on purpose. B merges the two, so it is less predictable.'],
+ ],
+ },
+ c: {
+ tabs:[{k:'home',label:'Home',icon:'house'},{k:'buddy',label:'Buddy',icon:'message-circle',dot:true},{k:'activity',label:'Activity',icon:'bell',badge:'needs'},{k:'you',label:'You',icon:'circle-user'}],
+ root:{home:'homeC', buddy:'buddy', activity:'activityC', you:'youC'},
+ jumps:[['Home',{tab:'home'}],['Search',{tab:'home',push:'search'}],['Activity',{tab:'activity'}],['Buddy',{tab:'buddy'}],['You',{tab:'you'}],['Project chat',{tab:'home',push:'chat',pid:'openharness'}]],
+ notes:{
+ homeC:{t:'Home', b:['Keeps the 4 tabs, the header and the buttons as today.','The two cards merge into two lines in one card. Adds a Search box.','1-line rows that keep the time on the right; bold means new, a badge means a mention.'], try:'How it differs from A: the You tab stays, Threads stays on Home, and there is no way into Harness.'},
+ activityC:{t:'Activity', b:['Only renames "@" to "Mentions". Invitations stay on Home, and there is no All chip.']},
+ youC:{t:'You', b:['The You tab, as before.']},
+ buddy:{t:'Buddy', b:['As before: switching Swarm still goes through ⋮ › Swarm.']},
+ search:{t:'Search', b:['The same Search screen as A.']},
+ chat:{t:'Project chat', b:['Keeps the 6-item ⋮ menu, as before.']},
+ menu:{t:'Menu ⋮', b:['As before.']},
+ filter:{t:'Sort and filter', b:['As before.']},
+ switcher:{t:'Switch Swarm', b:['As before.']},
+ term:{t:'Terminal', b:['Unchanged.']},
+ },
+ why:[
+ ['Gains','Low risk, few broken tests, ships in 1–2 PRs. Users do not have to relearn anything.'],
+ ['Costs','Still 4 tabs. Harness is still reachable only through the menu. Threads are still in two places. Things that need you are still scattered. It fixes density but not the organization.'],
+ ],
+ },
+};
+
+// ───────────── Phone engine ─────────────
+const STATE = {};
+for (const dir of Object.keys(DIRS)) {
+ const first = DIRS[dir].tabs[0].k;
+ STATE[dir] = {dir, tab:first, stack:[DIRS[dir].root[first]], sheet:null, shownSheet:null, done:new Set(), confirm:null, f:null, cat:'recent', q:'', sec:true, other:false, pid:null, term:null};
+}
+
+function render(dir){
+ const s = STATE[dir], d = DIRS[dir], el = document.getElementById('phone-'+dir);
+ const top = s.stack[s.stack.length-1];
+ const isRoot = s.stack.length === 1;
+ const sheetOpen = s.sheet ? `<div class="veil ${s.shownSheet===s.sheet?'open static':''}" data-act="close"></div><div class="sheet ${s.shownSheet===s.sheet?'open static':''}" role="dialog" aria-label="${s.sheet}">${SHEETS[s.sheet](s)}</div>` : '';
+ const keep = el.dataset.top === top + '|' + s.stack.length ? (el.querySelector('.scr .scroll')?.scrollTop || 0) : 0;
+ el.classList.remove('collapsed');
+ el.innerHTML = statusBar() + `<div class="scr">${S[top](s)}</div>` + (isRoot ? tabBar(s, d.tabs) : '') + sheetOpen;
+ if (s.sheet && s.shownSheet !== s.sheet) {
+ requestAnimationFrame(() => requestAnimationFrame(() => { el.querySelector('.veil')?.classList.add('open'); el.querySelector('.sheet')?.classList.add('open'); }));
+ s.shownSheet = s.sheet;
+ }
+ if (!s.sheet) s.shownSheet = null;
+ el.dataset.top = top + '|' + s.stack.length;
+ const sc = el.querySelector('.scr .scroll');
+ if (sc && keep) { sc.scrollTop = keep; if (top === 'homeA') el.classList.toggle('collapsed', keep > 12); }
+ icons(el);
+ bindScreen(dir, el, top);
+ renderNotes(dir);
+}
+
+function icons(root){
+ if (window.lucide && lucide.createIcons) { try { lucide.createIcons({attrs:{'stroke-width':1.6}, root}); } catch(e) { try { lucide.createIcons({attrs:{'stroke-width':1.6}}); } catch(_){} } }
+}
+
+function bindScreen(dir, el, top){
+ const s = STATE[dir];
+ const sc = el.querySelector('.scroll');
+ if (top === 'homeA' && sc) {
+ sc.addEventListener('scroll', () => el.classList.toggle('collapsed', sc.scrollTop > 12), {passive:true});
+ bindPull(sc, () => { s.stack.push('search'); s.q=''; s.cat='recent'; render(dir); setTimeout(() => document.getElementById(dir+'-q')?.focus({preventScroll:true}), 60); });
+ }
+ if (top === 'search') {
+ const input = document.getElementById(dir+'-q');
+ input?.addEventListener('input', e => { s.q = e.target.value; const r = document.getElementById(dir+'-results'); r.innerHTML = searchResults(s); icons(r); el.querySelectorAll('.chip').forEach(c => c.setAttribute('aria-pressed', String(!s.q && c.dataset.act === 'cat:'+s.cat))); });
+ bindSwipe(document.getElementById(dir+'-results'), step => { const i = CATS.findIndex(c => c[0]===s.cat); const n = Math.max(0, Math.min(CATS.length-1, i+step)); if (n!==i){ s.cat = CATS[n][0]; s.q=''; render(dir);} });
+ }
+}
+
+// Pull down at the top of Home opens Search (mouse drag and touch)
+function bindPull(sc, open){
+ const inner = sc.querySelector('.pullin'), hint = sc.querySelector('.pullhint');
+ let y0 = null, dy = 0;
+ const start = y => { dy = 0; y0 = sc.scrollTop <= 0 ? y : null; };
+ const move = (y, ev) => { if (y0 == null) return; dy = y - y0; if (dy > 0 && sc.scrollTop <= 0) { ev?.cancelable && ev.preventDefault(); inner.style.transition='none'; inner.style.transform = `translateY(${Math.min(dy*.5, 70)}px)`; hint.classList.toggle('ready', dy > 90); } };
+ const end = () => { if (y0 == null) return; const go = dy > 90; y0 = null; inner.style.transition=''; inner.style.transform = ''; hint.classList.remove('ready'); if (go) { sc.dataset.pulled = '1'; open(); } };
+ sc.addEventListener('pointerdown', e => { if (e.pointerType === 'mouse') start(e.clientY); });
+ sc.addEventListener('pointermove', e => { if (e.pointerType === 'mouse') move(e.clientY, e); });
+ sc.addEventListener('pointerup', e => { if (e.pointerType === 'mouse') end(); });
+ sc.addEventListener('pointerleave', e => { if (e.pointerType === 'mouse') end(); });
+ sc.addEventListener('touchstart', e => start(e.touches[0].clientY), {passive:true});
+ sc.addEventListener('touchmove', e => move(e.touches[0].clientY, e), {passive:false});
+ sc.addEventListener('touchend', end);
+ sc.addEventListener('click', e => { if (Math.abs(dy) > 8) { e.stopPropagation(); e.preventDefault(); dy = 0; } }, true);
+}
+
+// Horizontal swipe on Search results changes the kind
+function bindSwipe(node, step){
+ if (!node) return;
+ let x0 = null, y0 = 0;
+ node.addEventListener('pointerdown', e => { x0 = e.clientX; y0 = e.clientY; });
+ node.addEventListener('pointerup', e => { if (x0 == null) return; const dx = e.clientX - x0, dy = e.clientY - y0; x0 = null; if (Math.abs(dx) > 60 && Math.abs(dx) > Math.abs(dy)*1.5) { node.dataset.swiped = '1'; step(dx < 0 ? 1 : -1); } });
+ node.addEventListener('click', e => { if (node.dataset.swiped) { delete node.dataset.swiped; e.stopPropagation(); e.preventDefault(); } }, true);
+}
+
+function act(dir, a){
+ const s = STATE[dir], d = DIRS[dir];
+ const [k, v, w] = a.split(':');
+ const hadConfirm = s.confirm != null;
+ if (k !== 'approve') s.confirm = null;
+ switch (k) {
+ case 'noop': if (hadConfirm) render(dir); return;
+ case 'tab': s.tab = v; s.stack = [d.root[v]]; s.sheet = null; if (v==='activity') s.f = null; break;
+ case 'tabf': s.tab = v; s.stack = [d.root[v]]; s.sheet = null; s.f = (dir==='c' && w==='all') ? 'needs' : w; break;
+ case 'go': s.stack.push(v); s.sheet = null; if (v==='search'){ s.q=''; s.cat='recent'; } break;
+ case 'back': if (s.stack.length > 1) s.stack.pop(); break;
+ case 'sheet': s.sheet = v; break;
+ case 'close': s.sheet = null; break;
+ case 'flt': s.f = v; break;
+ case 'cat': s.cat = v; s.q = ''; break;
+ case 'toggle': s[v] = !s[v]; break;
+ case 'chat': s.pid = v; s.sheet = null; s.stack.push('chat'); break;
+ case 'term': s.term = v; s.sheet = null; s.stack.push('term'); break;
+ case 'join': s.done.add(v); break;
+ case 'approve': if (s.confirm === v) { s.done.add(v); s.confirm = null; } else s.confirm = v; break;
+ }
+ if (s.stack.length > 6) s.stack.splice(1, s.stack.length - 6);
+ render(dir);
+ if (k === 'go' && v === 'search') setTimeout(() => document.getElementById(dir+'-q')?.focus({preventScroll:true}), 60);
+}
+
+for (const dir of Object.keys(DIRS)) {
+ document.getElementById('phone-'+dir).addEventListener('click', e => {
+ const t = e.target.closest('[data-act]');
+ if (!t || t.disabled) return;
+ act(dir, t.dataset.act);
+ });
+}
+
+// Notes beside each phone follow the screen on it
+function renderNotes(dir){
+ const s = STATE[dir], d = DIRS[dir];
+ const top = s.stack[s.stack.length-1];
+ const key = s.sheet || top;
+ const n = d.notes[key] || d.notes[top] || {t:'', b:[]};
+ const cur = JSON.stringify(currentJump(s));
+ document.getElementById('notes-'+dir).innerHTML = `
+ <div><h3>Jump to screen</h3><div class="jump">${d.jumps.map(([l, j], i) => `<button data-jump="${i}" aria-current="${JSON.stringify(j)===cur}">${l}</button>`).join('')}</div></div>
+ <div><h3>On this screen · ${n.t}</h3><ul>${n.b.map(x => `<li>${x}</li>`).join('')}</ul>${n.try?`<p class="try">${n.try}</p>`:''}</div>
+ <div><h3>${dir==='a'?'Why this and not the alternatives':'Gains and costs'}</h3><dl class="why">${d.why.map(([t, x]) => `<div><dt>${t}</dt><dd>${x}</dd></div>`).join('')}</dl></div>`;
+}
+function currentJump(s){
+ const top = s.stack[s.stack.length-1];
+ const j = {tab:s.tab};
+ if (s.stack.length > 1) { j.push = top; if (top === 'chat') j.pid = s.pid; }
+ if (s.sheet) j.sheet = s.sheet;
+ return j;
+}
+for (const dir of Object.keys(DIRS)) {
+ document.getElementById('notes-'+dir).addEventListener('click', e => {
+ const b = e.target.closest('[data-jump]'); if (!b) return;
+ const [, j] = DIRS[dir].jumps[+b.dataset.jump];
+ const s = STATE[dir];
+ s.tab = j.tab; s.stack = [DIRS[dir].root[j.tab]]; s.sheet = j.sheet || null; s.shownSheet = null; s.confirm = null; s.f = null;
+ if (j.push) { s.stack.push(j.push); if (j.pid) s.pid = j.pid; if (j.push === 'search') { s.q=''; s.cat='recent'; } }
+ render(dir);
+ });
+}
+
+// ───────────── Shell tabs ─────────────
+const THESIS = {
+ 'tab-now':'<b>Current.</b> The Swarm Home screen running on the simulator, captured from <code>feat/mobile-ios-android</code>, with the 5 main problems and a summary of the Slack article.',
+ 'tab-a':'<b>A · Slack trio.</b> 3 tabs, Home · Buddy · Activity; You moves to the avatar. The bet: the way Slack organizes things (a row of tiles, 1-line rows, pull-down Search, one Activity feed) maps almost 1-to-1 onto Swarm.',
+ 'tab-b':'<b>B · Inbox.</b> Merges Home and Activity into one inbox ordered by urgency; projects move to their own tab. The bet: on a phone, people open the app only to handle what needs them.',
+ 'tab-c':'<b>C · Light tune.</b> Keeps the 4 tabs and every screen, and only fixes density and hierarchy. The bet: the current organization is right, it is just not presented tightly enough.',
+ 'tab-cmp':'<b>Compare.</b> The three directions side by side, with a recommendation.',
+};
+const tabs = [...document.querySelectorAll('#dirtabs [role=tab]')];
+function selectTab(t, focus){
+ tabs.forEach(x => { const on = x === t; x.setAttribute('aria-selected', on); x.tabIndex = on ? 0 : -1; document.getElementById(x.getAttribute('aria-controls')).hidden = !on; });
+ document.getElementById('thesis').innerHTML = THESIS[t.id];
+ if (focus) t.focus();
+}
+tabs.forEach((t, i) => {
+ t.addEventListener('click', () => selectTab(t));
+ t.addEventListener('keydown', e => {
+ if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') { e.preventDefault(); selectTab(tabs[(i + (e.key==='ArrowRight'?1:-1) + tabs.length) % tabs.length], true); }
+ });
+});
+document.addEventListener('keydown', e => {
+ if (e.target.closest('input,textarea') || e.metaKey || e.ctrlKey || e.altKey) return;
+ const n = parseInt(e.key, 10);
+ if (n >= 1 && n <= tabs.length) selectTab(tabs[n-1], true);
+});
+
+selectTab(document.getElementById('tab-a'));
+for (const dir of Object.keys(DIRS)) render(dir);
+})();
+</script>
+
+</body>
+</html>
diff --git a/mobile/lib/shared/theme/swarm_tokens_set_b.dart b/mobile/lib/shared/theme/swarm_tokens_set_b.dart
index 167296eb9..e6b094dbf 100644
--- a/mobile/lib/shared/theme/swarm_tokens_set_b.dart
+++ b/mobile/lib/shared/theme/swarm_tokens_set_b.dart
@@ -41,9 +41,9 @@ abstract final class SwarmComposer {
/// The toolbar's 44pt row inside the card.
static const EdgeInsets toolbarPadding = EdgeInsets.fromLTRB(6, 0, 6, 4);
- /// The @ Tag chip's pill.
- static const EdgeInsets tagPadding = EdgeInsets.only(left: 10, right: 13);
- static const double tagRadius = 18;
+ /// The New session chip's pill.
+ static const EdgeInsets pillPadding = EdgeInsets.only(left: 10, right: 13);
+ static const double pillRadius = 18;
/// The voice row's stop: a filled square with softened corners.
static const double stopRadius = 2;
diff --git a/mobile/lib/swarm/model.dart b/mobile/lib/swarm/model.dart
index 791678939..a92379a0c 100644
--- a/mobile/lib/swarm/model.dart
+++ b/mobile/lib/swarm/model.dart
@@ -51,6 +51,7 @@ class SuperTabPerson {
email = _text(row, 'email'),
role = _text(row, 'role'),
generation = row['generation'] as String?,
+ joinedVia = row['joinedVia'] as String?,
avatar = SuperTabAvatarPicture.fromJson(row['avatar']),
status = SuperTabPersonStatus.fromJson(row['status']),
chosenUsername = row['username'] as String?,
@@ -62,6 +63,7 @@ class SuperTabPerson {
email = person.email,
role = person.role,
generation = person.generation,
+ joinedVia = person.joinedVia,
avatar = person.avatar,
status = person.status,
chosenUsername = person.chosenUsername;
@@ -83,6 +85,11 @@ class SuperTabPerson {
/// This membership: a new one each time the person joins the Swarm. Null
/// from a backend that does not send it.
final String? generation;
+
+ /// How they joined: `domain` when they were added automatically for their
+ /// email's domain. Null otherwise and from an older server. Read as the
+ /// desktop's model reads it; the phone does not show it yet.
+ final String? joinedVia;
bool get canWrite => role == 'owner' || role == 'collaborator';
}
@@ -473,6 +480,7 @@ class SuperTabProject {
instructionsRevision =
(row['instructionsRevision'] as num?)?.toInt() ?? 0,
notesRevision = (row['notesRevision'] as num?)?.toInt() ?? 0,
+ githubRevision = (row['githubRevision'] as num?)?.toInt() ?? 0,
isPrivate = row['visibility'] == 'private',
memberIds = [
for (final member in row['members'] as List? ?? const [])
@@ -497,6 +505,12 @@ class SuperTabProject {
final String? coordinatorName;
final int instructionsRevision, notesRevision;
+ /// Moves when its repository's GitHub access may have changed (someone
+ /// allowed it, or the app was installed); 0 from a backend before it (task
+ /// #2316). Read as the desktop's model reads it; the phone reads no GitHub
+ /// access.
+ final int githubRevision;
+
/// Whether the backend keeps an instruction document for it.
bool get hasInstructions => coordinatorName != null;
final bool isPrivate;
@@ -590,6 +604,7 @@ class SuperTabSnapshot {
threadSessions = row['threadSessions'] == true,
sessionsFromChat = row['sessionsFromChat'] == true,
swarmBuddy = row['swarmBuddy'] == true,
+ autoJoin = row['autoJoin'] == true,
mentionsWaiting = (row['mentionsWaiting'] as num?)?.toInt() ?? 0,
mentionsDigest = row['mentionsDigest'] as String?,
decisionsWaiting = (row['decisionsWaiting'] as num?)?.toInt() ?? 0,
@@ -686,6 +701,12 @@ class SuperTabSnapshot {
/// does not draw it yet.
final bool swarmBuddy;
+ /// People at the owner's email domain are added automatically (head
+ /// `autoJoin`, every member reads it): someone who leaves is not added
+ /// back. Read as the desktop's model reads it; the phone does not show it
+ /// yet.
+ final bool autoJoin;
+
/// The reader's tags still waiting for them, Swarm-wide; 0 from a backend
/// before tags (spec 2026-10-24-lead-mentions.md).
final int mentionsWaiting;
diff --git a/mobile/lib/swarm/swarm_activity.dart b/mobile/lib/swarm/swarm_activity.dart
index 2557b937c..ecfc3aef3 100644
--- a/mobile/lib/swarm/swarm_activity.dart
+++ b/mobile/lib/swarm/swarm_activity.dart
@@ -17,8 +17,9 @@ enum SwarmActivityFilter {
/// Decisions asked of the person and work waiting on them.
needsYou('Needs you'),
- /// The Product Manager's tags of the person.
- mentions('@'),
+ /// The Product Manager's tags of the person: "Mentions" on the phone, a
+ /// word a screen reader says, where the desktop has "@" (Tony, 2026-11-03).
+ mentions('Mentions'),
/// Threads the person wrote in or was tagged in.
threads('Threads'),
@@ -105,6 +106,42 @@ class SwarmActivityNeed extends SwarmActivityItem {
};
}
+/// Activity's All (Slack's one feed, Tony, 2026-11-03): what needs the
+/// person and is still to handle first, as Needs you lists it; then every
+/// other row — tags, replies, reactions — newest first, those with no time
+/// last; then the needs handled. Each row once.
+List<SwarmActivityItem> swarmActivityAll(SwarmActivity activity) {
+ final needs = activity.items(SwarmActivityFilter.needsYou);
+ final seen = <String>{};
+ final waiting = [
+ for (final item in needs)
+ if (activity.handled(item) == null && seen.add(item.key)) item,
+ ];
+ final rest = [
+ for (final filter in SwarmActivityFilter.values)
+ if (filter != SwarmActivityFilter.needsYou)
+ for (final item in activity.items(filter))
+ if (seen.add(item.key)) item,
+ ];
+ // Stable: rows at the same time keep their filter's order.
+ final order = {for (final (i, item) in rest.indexed) item.key: i};
+ rest.sort((a, b) {
+ final (atA, atB) = (a.at, b.at);
+ if (atA == null || atB == null) {
+ if (atA != atB) return atA == null ? 1 : -1;
+ } else if (atA != atB) {
+ return atB.compareTo(atA);
+ }
+ return order[a.key]!.compareTo(order[b.key]!);
+ });
+ return [
+ ...waiting,
+ ...rest,
+ for (final item in needs)
+ if (seen.add(item.key)) item,
+ ];
+}
+
/// Whether [item] is of project [projectId], as [snapshot] — its Swarm's read
/// — has it: what it names and where it was asked must both be that project,
/// so a row whose chat moved, or that the read no longer has, shows in no
diff --git a/mobile/lib/swarm/swarm_activity_page.dart b/mobile/lib/swarm/swarm_activity_page.dart
index 691311221..6ae7358bc 100644
--- a/mobile/lib/swarm/swarm_activity_page.dart
+++ b/mobile/lib/swarm/swarm_activity_page.dart
@@ -1,11 +1,14 @@
import 'dart:async';
+import 'package:flutter/foundation.dart' show ValueListenable;
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
import 'package:harness_mobile/phone/fzf.dart' show fzfAge;
import 'package:harness_mobile/phone/out_of_sight.dart';
import 'package:harness_mobile/phone/phone_navigation.dart';
+import 'package:harness_mobile/phone/tty.dart';
+import 'package:harness_mobile/phone/tty_controls.dart' show TtySize;
import 'package:harness_mobile/shared/theme/app_space.dart';
import 'package:harness_mobile/shared/theme/app_theme.dart';
import 'package:harness_mobile/shared/theme/app_type.dart';
@@ -14,7 +17,7 @@ import 'model.dart';
import 'swarm_activity.dart';
import 'swarm_activity_feed.dart';
import 'swarm_asks.dart' show SwarmAsks;
-import 'swarm_home_rows.dart' show swarmNeedAsk;
+import 'swarm_home_rows.dart' show SwarmInvitationRow, swarmNeedAsk;
import 'swarm_inbox.dart';
import 'swarm_need_rows.dart';
import 'swarm_project_page.dart' show swarmChatRoute;
@@ -23,6 +26,40 @@ import 'swarm_reader.dart';
import 'swarm_row.dart';
import 'swarm_session.dart';
import 'swarm_style.dart';
+import 'swarm_you_page.dart' show SwarmYouButton;
+
+/// Activity asked, from elsewhere in the tabs, to show [filter]: a tile on
+/// Home asking for what needs the person, say ([showSwarmTab]). [n] tells one
+/// ask from the next, so the same filter asked twice is shown twice.
+typedef SwarmActivityAsk = ({SwarmActivityFilter filter, int n});
+
+/// What Activity under the tabs was last asked to show ([SwarmActivityAsk]):
+/// the tab's Activity listens, from the first time it builds, so an ask made
+/// as it opens is shown too. None over a pushed Activity.
+class SwarmActivityAsks extends InheritedWidget {
+ const SwarmActivityAsks({
+ super.key,
+ required this.asks,
+ required super.child,
+ });
+
+ final ValueListenable<SwarmActivityAsk?> asks;
+
+ /// The asks [context] is under, or null under none.
+ static ValueListenable<SwarmActivityAsk?>? maybeOf(BuildContext context) =>
+ context.getInheritedWidgetOfExactType<SwarmActivityAsks>()?.asks;
+
+ @override
+ bool updateShouldNotify(SwarmActivityAsks oldWidget) =>
+ !identical(asks, oldWidget.asks);
+}
+
+/// The count on the Activity tab: what waits on the person in their Swarms,
+/// and the invitations to a Swarm waiting on their answer, which Activity
+/// lists under All and Needs you (Tony, 2026-11-03): they left the top of
+/// Home, and the tab is how the person learns one came.
+int swarmActivityTabBadge(SwarmSession session) =>
+ session.activity.badge + session.inbox.invitations.length;
/// Opens Activity over [context]'s page: [focus] — a row's key — open in
/// full under its filter; only Swarm [swarmId]'s rows when Home shows that
@@ -81,13 +118,18 @@ class SwarmActivityPage extends StatelessWidget {
}
/// Activity, in place of Needs you (Tony's prototype C3): its title in the
-/// terminal's face, the filters — Needs you · @ · Replies · Reactions (Threads
-/// from a server before Activity) — each with its count, then the open
-/// filter's rows: where and who over what, and Approve (which asks first) or
-/// Reply at the row's end. A need the person handled stays, dimmed, under the
-/// others; a reply or reaction is bold while unread. The rows shown are read
-/// on every device once Activity is left ([SwarmActivity.showing]). The
-/// Activity tab's screen, and [SwarmActivityPage]'s.
+/// terminal's face, the filters — All · Needs you · Mentions · Replies ·
+/// Reactions (Threads from a server before Activity) — each with its count,
+/// then the open filter's rows. All, the tab's first (Slack's one feed, Tony,
+/// 2026-11-03), has what needs the person first, then the rest newest first.
+/// On the tab, the invitations to a Swarm head All and Needs you, counted in
+/// both and on the tab's badge ([swarmActivityTabBadge]): they wait on the
+/// person's answer. Each row: where and who over what, and Approve (which
+/// asks first) or Reply at the row's end. A need the person handled stays,
+/// dimmed, under the others; a reply or reaction is bold while unread. The
+/// rows shown are read on every device once Activity is left
+/// ([SwarmActivity.showing]). The Activity tab's screen, and
+/// [SwarmActivityPage]'s.
///
/// Only while it is in sight ([OutOfSight]) does it read the project chats
/// ([SwarmActivity.watch]) and keep the Swarm's notices quiet.
@@ -120,24 +162,69 @@ class SwarmActivityView extends StatefulWidget {
class _SwarmActivityViewState extends State<SwarmActivityView> {
SwarmSession? _session;
bool _seen = false;
- late SwarmActivityFilter _filter = _filterOf(widget.focus);
+
+ /// The open filter; null for All, the tab's first. A page pushed for what
+ /// needs the person (`openSwarmNeeds`) opens on Needs you, as before.
+ late SwarmActivityFilter? _filter = _filterOf(
+ widget.focus,
+ all: widget.leading == null && widget.projectId == null,
+ );
late String? _open = widget.focus;
+ /// What the tabs asked this Activity to show, listened to on the tab.
+ ValueListenable<SwarmActivityAsk?>? _asks;
+
+ /// The last ask shown, by its [SwarmActivityAsk.n].
+ int? _asked;
+
/// The focused row, brought into view once it is drawn.
final _focusKey = GlobalKey();
bool _focusShown = false;
- static SwarmActivityFilter _filterOf(String? key) => switch (key) {
+ /// The filter a row's [key] is under; with none, All when [all] allows it,
+ /// else Needs you (a project's status card, or a page asked for what needs
+ /// the person, opens on what waits).
+ static SwarmActivityFilter? _filterOf(
+ String? key, {
+ required bool all,
+ }) => switch (key) {
final key? when key.startsWith('mention:') => SwarmActivityFilter.mentions,
final key? when key.startsWith('thread:') => SwarmActivityFilter.threads,
final key? when key.startsWith('reaction:') =>
SwarmActivityFilter.reactions,
+ null when all => null,
_ => SwarmActivityFilter.needsYou,
};
+ /// Shows what the tabs asked for last, once.
+ void _showAsked() {
+ final ask = _asks?.value;
+ if (ask == null || ask.n == _asked) return;
+ _asked = ask.n;
+ if (!mounted) return;
+ setState(() {
+ _filter = ask.filter;
+ _open = null;
+ });
+ }
+
@override
void didChangeDependencies() {
super.didChangeDependencies();
+ // The tab's Activity only: a pushed one has its own filter.
+ final asks = widget.leading == null
+ ? SwarmActivityAsks.maybeOf(context)
+ : null;
+ if (!identical(asks, _asks)) {
+ _asks?.removeListener(_showAsked);
+ _asks = asks?..addListener(_showAsked);
+ final ask = asks?.value;
+ if (ask != null && ask.n != _asked) {
+ _asked = ask.n;
+ _filter = ask.filter;
+ _open = null;
+ }
+ }
final session = SwarmScope.of(context);
final seen = session != null && !OutOfSight.of(context);
if (identical(session, _session) && seen == _seen) return;
@@ -164,6 +251,7 @@ class _SwarmActivityViewState extends State<SwarmActivityView> {
@override
void dispose() {
+ _asks?.removeListener(_showAsked);
_see(false);
super.dispose();
}
@@ -200,7 +288,7 @@ class _SwarmActivityViewState extends State<SwarmActivityView> {
),
)
else
- const SwarmTabHeader('Activity'),
+ const SwarmTabHeader('Activity', trailing: SwarmYouButton()),
if (session != null)
Expanded(
child: ListenWhileInSight(
@@ -214,19 +302,24 @@ class _SwarmActivityViewState extends State<SwarmActivityView> {
);
}
- /// [filter]'s rows, of [widget.swarmId] alone when it names one, and of
- /// [widget.projectId] alone when it names one.
+ /// [filter]'s rows (All's for null: [swarmActivityAll]), of
+ /// [widget.swarmId] alone when it names one, and of [widget.projectId]
+ /// alone when it names one.
List<SwarmActivityItem> _items(
SwarmSession session,
- SwarmActivityFilter filter,
+ SwarmActivityFilter? filter,
) {
final projectId = widget.projectId;
final reader = projectId == null || widget.swarmId == null
? null
: session.inbox.reader(widget.swarmId!);
final snapshot = _project(session) == null ? null : reader?.snapshot;
+ final activity = session.activity;
return [
- for (final item in session.activity.items(filter))
+ for (final item
+ in filter == null
+ ? swarmActivityAll(activity)
+ : activity.items(filter))
if ((widget.swarmId == null || item.swarmId == widget.swarmId) &&
(projectId == null ||
snapshot != null &&
@@ -249,7 +342,7 @@ class _SwarmActivityViewState extends State<SwarmActivityView> {
}
Widget _body(BuildContext context, SwarmSession session) {
- final activity = session.activity;
+ final activity = session.activity, inbox = session.inbox;
final items = _items(session, _filter);
// What is open here is what goes read once Activity is left.
activity.showing(items);
@@ -266,13 +359,20 @@ class _SwarmActivityViewState extends State<SwarmActivityView> {
),
child: Row(
children: [
- for (final (i, filter) in SwarmActivityFilter.values.indexed) ...[
+ for (final (i, filter) in [
+ null,
+ ...SwarmActivityFilter.values,
+ ].indexed) ...[
if (i > 0) const SizedBox(width: AppSpace.s),
SwarmActivityFilterPill(
- key: ValueKey('swarm-activity-filter-${filter.name}'),
+ key: ValueKey(
+ 'swarm-activity-filter-${filter?.name ?? 'all'}',
+ ),
filter: filter,
- label: activity.label(filter),
- count: _items(session, filter).where(activity.waiting).length,
+ label: filter == null ? null : activity.label(filter),
+ count:
+ _items(session, filter).where(activity.waiting).length +
+ (_invitesIn(filter) ? inbox.invitations.length : 0),
selected: filter == _filter,
onTap: () => setState(() => _filter = filter),
),
@@ -302,12 +402,45 @@ class _SwarmActivityViewState extends State<SwarmActivityView> {
) {
final activity = session.activity, inbox = session.inbox;
final fromChats =
+ _filter == null ||
_filter == SwarmActivityFilter.threads ||
_filter == SwarmActivityFilter.reactions;
final note = AppType.caption(color: AppPalette.textSecondary, height: 1.35);
final missing = _focusMissing(session, items);
if (missing == null) _showFocus();
+ // The account's invitations, on the tab's All and Needs you: what a
+ // Swarm asks of the person before they are in it (Slack's Activity has
+ // them too).
+ final invited = _invitesIn(_filter)
+ ? inbox.invitations
+ : const <SwarmInvitation>[];
return [
+ if (invited.isNotEmpty) ...[
+ SwarmGroup(
+ key: const ValueKey('swarm-activity-invitations'),
+ children: [
+ for (final invitation in invited)
+ SwarmInvitationRow(
+ key: ValueKey('swarm-invitation-${invitation.inviteId}'),
+ invitation: invitation,
+ joining: inbox.joining.contains(invitation.inviteId),
+ onJoin: () => unawaited(inbox.join(invitation)),
+ onLater: () => inbox.notNow(invitation),
+ ),
+ ],
+ ),
+ if (inbox.joinError case final error?)
+ Padding(
+ key: const ValueKey('swarm-invitation-error'),
+ padding: const EdgeInsets.only(top: AppSpace.s),
+ child: Text(
+ error,
+ style: Tty.of(context)
+ .style(color: Tty.of(context).red, size: TtySize.meta),
+ ),
+ ),
+ const SizedBox(height: AppSpace.m),
+ ],
if (missing case (:final asks?))
_Note(
key: const ValueKey('swarm-activity-focus-failed'),
@@ -356,6 +489,8 @@ class _SwarmActivityViewState extends State<SwarmActivityView> {
else if (items.isEmpty &&
(!inbox.loaded || fromChats && activity.reading))
SwarmSkeletonRows(id: 'swarm-activity-loading', round: true)
+ else if (items.isEmpty && invited.isNotEmpty)
+ const SizedBox.shrink()
else if (items.isEmpty)
Padding(
padding: const EdgeInsets.symmetric(
@@ -423,15 +558,25 @@ class _SwarmActivityViewState extends State<SwarmActivityView> {
});
}
- static String _nothing(SwarmActivityFilter filter, {required bool replies}) =>
- switch (filter) {
- SwarmActivityFilter.needsYou => 'Nothing needs you.',
- SwarmActivityFilter.mentions => 'No one tagged you.',
- SwarmActivityFilter.threads when replies =>
- 'No replies to your messages yet.',
- SwarmActivityFilter.threads => 'No threads with you yet.',
- SwarmActivityFilter.reactions => 'No reactions to you yet.',
- };
+ /// Whether [filter] lists the account's invitations: All and Needs you, on
+ /// the tab alone — not on a page pushed for one Swarm or one project.
+ bool _invitesIn(SwarmActivityFilter? filter) =>
+ (filter == null || filter == SwarmActivityFilter.needsYou) &&
+ widget.swarmId == null &&
+ widget.leading == null;
+
+ static String _nothing(
+ SwarmActivityFilter? filter, {
+ required bool replies,
+ }) => switch (filter) {
+ null => "You're all caught up.",
+ SwarmActivityFilter.needsYou => 'Nothing needs you.',
+ SwarmActivityFilter.mentions => 'No one tagged you.',
+ SwarmActivityFilter.threads when replies =>
+ 'No replies to your messages yet.',
+ SwarmActivityFilter.threads => 'No threads with you yet.',
+ SwarmActivityFilter.reactions => 'No reactions to you yet.',
+ };
Widget _row(
BuildContext context,
@@ -818,9 +963,10 @@ class SwarmActivityFilterPill extends StatelessWidget {
this.label,
});
- final SwarmActivityFilter filter;
+ /// The filter it opens; null for All.
+ final SwarmActivityFilter? filter;
- /// What it is called, when not [SwarmActivityFilter.label].
+ /// What it is called, when not [SwarmActivityFilter.label] (or All).
final String? label;
final int count;
final bool selected;
@@ -830,12 +976,11 @@ class SwarmActivityFilterPill extends StatelessWidget {
Widget build(BuildContext context) {
AppTheme.watch(context);
final ink = selected ? AppPalette.windowBg : AppPalette.textPrimary;
- final name = label ?? filter.label;
- final heard = filter == SwarmActivityFilter.mentions ? 'Mentions' : name;
+ final name = label ?? filter?.label ?? 'All';
return Semantics(
button: true,
selected: selected,
- label: '$heard, $count',
+ label: '$name, $count',
excludeSemantics: true,
child: Material(
color: selected
diff --git a/mobile/lib/swarm/swarm_agents.dart b/mobile/lib/swarm/swarm_agents.dart
new file mode 100644
index 000000000..26e704640
--- /dev/null
+++ b/mobile/lib/swarm/swarm_agents.dart
@@ -0,0 +1,48 @@
+import 'package:flutter/widgets.dart';
+
+import 'swarm_session.dart';
+
+/// One harness on the person's computers, as Swarm's Search lists it.
+typedef SwarmAgentRef = ({
+ String machineId,
+ String agentId,
+ String name,
+ String machine,
+ String? engine,
+ bool working,
+ bool waiting,
+});
+
+/// The harnesses on the person's computers, for Swarm's way into Harness:
+/// Home's Agents tile and Search (Tony, 2026-11-03). Swarm had none before,
+/// only Open terminal in four menus.
+///
+/// Tells only when how many work or wait, or which agents there are,
+/// changes: not at every frame a terminal sends.
+abstract interface class SwarmAgents implements Listenable {
+ /// How many work now; null until the computers have answered.
+ int? get working;
+
+ /// Every agent the person can open, waiting ones first.
+ List<SwarmAgentRef> get agents;
+
+ /// Opens every agent, by computer.
+ void openList(BuildContext context);
+
+ /// Opens [agent]'s terminal, as it opens anywhere else in the app.
+ void open(BuildContext context, SwarmAgentRef agent);
+}
+
+/// What also has the person's harnesses: the app's computers do
+/// ([SwarmScope.computersOf]); a test's may not, and Swarm then shows no way
+/// into them.
+abstract interface class SwarmAgentsSource {
+ SwarmAgents get agents;
+}
+
+/// The person's harnesses under [context]'s Swarm, or null with none.
+SwarmAgents? swarmAgentsOf(BuildContext context) =>
+ switch (SwarmScope.computersOf(context)) {
+ final SwarmAgentsSource source => source.agents,
+ _ => null,
+ };
diff --git a/mobile/lib/swarm/swarm_computers.dart b/mobile/lib/swarm/swarm_computers.dart
index 835f3ab47..b4155ecd1 100644
--- a/mobile/lib/swarm/swarm_computers.dart
+++ b/mobile/lib/swarm/swarm_computers.dart
@@ -4,10 +4,13 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import '../core/models.dart';
+import '../phone/agent_index.dart';
+import '../phone/agents_list_page.dart';
import '../phone/phone_navigation.dart';
import '../phone/phone_status.dart';
import '../phone/welcome/your_computer.dart';
import '../state/app_state.dart';
+import 'swarm_agents.dart';
import 'swarm_start.dart';
/// The account's computers for Swarm's start screens, from the app's own
@@ -18,7 +21,8 @@ import 'swarm_start.dart';
/// a Swarm read waiting for a computer needs, `SwarmInbox.computerUp`) — not
/// at every change of the app's state, which moves with every frame a
/// terminal sends.
-class AppSwarmComputers extends ChangeNotifier implements SwarmComputers {
+class AppSwarmComputers extends ChangeNotifier
+ implements SwarmComputers, SwarmAgentsSource {
AppSwarmComputers(this.notifier) {
notifier.addListener(_changed);
_changed();
@@ -104,6 +108,74 @@ class AppSwarmComputers extends ChangeNotifier implements SwarmComputers {
.push(phoneRoute((_) => YourComputerPage(notifier: notifier))),
);
+ /// The harnesses on them, told of on their own: a change there is no
+ /// computer coming or going for Swarm's reads.
+ @override
+ late final AppSwarmAgents agents = AppSwarmAgents(notifier);
+
+ @override
+ void dispose() {
+ notifier.removeListener(_changed);
+ agents.dispose();
+ super.dispose();
+ }
+}
+
+/// The app's harnesses for Swarm ([SwarmAgents]), from [agentIndex]: told of
+/// when how many work or wait — Search's dots — or the list itself, changes.
+class AppSwarmAgents extends ChangeNotifier implements SwarmAgents {
+ AppSwarmAgents(this.notifier) {
+ notifier.addListener(_changed);
+ _changed();
+ }
+
+ final AppNotifier notifier;
+ int? _working, _waiting;
+ List<AgentEntry>? _index;
+
+ @override
+ int? get working => _working;
+
+ @override
+ List<SwarmAgentRef> get agents => [
+ for (final entry in visibleAgents(agentIndex(notifier)))
+ if (entry.isOpenable)
+ (
+ machineId: entry.machineId,
+ agentId: entry.agent.id,
+ name: entry.agent.displayName,
+ machine: entry.machineName,
+ engine: entry.agent.engineDisplayName ?? entry.agent.engine,
+ working: entry.isWorking,
+ waiting: entry.isWaiting,
+ ),
+ ];
+
+ void _changed() {
+ final index = notifier.machinesAnswered ? agentIndex(notifier) : null;
+ final working = index?.where((entry) => entry.isWorking).length;
+ final waiting = index?.where((entry) => entry.isWaiting).length;
+ if (working == _working &&
+ waiting == _waiting &&
+ identical(index, _index)) {
+ return;
+ }
+ _working = working;
+ _waiting = waiting;
+ _index = index;
+ notifyListeners();
+ }
+
+ @override
+ void openList(BuildContext context) => unawaited(
+ Navigator.of(context)
+ .push(phoneRoute((_) => AgentsListPage(notifier: notifier))),
+ );
+
+ @override
+ void open(BuildContext context, SwarmAgentRef agent) =>
+ openAgent(context, notifier, agent.machineId, agent.agentId);
+
@override
void dispose() {
notifier.removeListener(_changed);
diff --git a/mobile/lib/swarm/swarm_conversation_page.dart b/mobile/lib/swarm/swarm_conversation_page.dart
index 8c2e0646d..c4ad8d0fb 100644
--- a/mobile/lib/swarm/swarm_conversation_page.dart
+++ b/mobile/lib/swarm/swarm_conversation_page.dart
@@ -14,6 +14,7 @@ import 'package:harness_mobile/shared/theme/app_space.dart';
import 'package:harness_mobile/shared/theme/app_theme.dart';
import 'package:harness_mobile/shared/theme/swarm_tokens_set_b.dart';
import 'package:harness_mobile/shared/theme/app_type.dart';
+import 'package:harness_mobile/shared/widgets/touch_target.dart';
import 'package:harness_mobile/shared/widgets/skeleton.dart';
import 'identity.dart';
@@ -1285,46 +1286,49 @@ class _SwarmConversationPageState extends State<SwarmConversationPage>
),
),
Expanded(
- child: title == null
- ? Column(
- key: const ValueKey('swarm-header-placeholder'),
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- SkeletonText(
- style: tty.style(
- size: TtySize.title,
- weight: FontWeight.w600,
- ),
- width: 140,
- ),
- SkeletonText(style: swarmChatText(13), width: 72),
- ],
- )
- : Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- title,
- key: const ValueKey('swarm-title'),
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: tty.style(
- size: TtySize.title,
- weight: FontWeight.w600,
+ child: _switchOnTitle(
+ title,
+ title == null
+ ? Column(
+ key: const ValueKey('swarm-header-placeholder'),
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SkeletonText(
+ style: tty.style(
+ size: TtySize.title,
+ weight: FontWeight.w600,
+ ),
+ width: 140,
),
- ),
- if (project != null)
+ SkeletonText(style: swarmChatText(13), width: 72),
+ ],
+ )
+ : Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
Text(
- project,
+ title,
+ key: const ValueKey('swarm-title'),
maxLines: 1,
overflow: TextOverflow.ellipsis,
- style: swarmChatText(
- 13,
- color: AppPalette.textSecondary,
+ style: tty.style(
+ size: TtySize.title,
+ weight: FontWeight.w600,
),
),
- ],
- ),
+ if (project != null)
+ Text(
+ project,
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: swarmChatText(
+ 13,
+ color: AppPalette.textSecondary,
+ ),
+ ),
+ ],
+ ),
+ ),
),
// The screen's side margin from its edge: the header's own end
// inset, and the rest of the margin.
@@ -1340,6 +1344,29 @@ class _SwarmConversationPageState extends State<SwarmConversationPage>
),
);
+ /// The Buddy tab's title, with several Swarms to switch between: a tap on
+ /// it opens the switcher, as Home's title does (Tony, 2026-11-03); the
+ /// menu's Swarm row stays. [words] alone otherwise.
+ Widget _switchOnTitle(String? title, Widget words) {
+ final swarm = widget.swarmSwitch;
+ if (!widget.tabRoot || swarm == null || title == null) return words;
+ return Semantics(
+ button: true,
+ label: '$title. Switch Swarm',
+ excludeSemantics: true,
+ onTap: swarm.open,
+ child: InkWell(
+ key: const ValueKey('swarm-buddy-title-switch'),
+ borderRadius: BorderRadius.circular(AppCard.insetRadius),
+ onTap: swarm.open,
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(minHeight: minTouchTarget),
+ child: Align(alignment: Alignment.centerLeft, child: words),
+ ),
+ ),
+ );
+ }
+
/// The header's inset at its end.
static const _headerEnd = AppSpace.s;
@@ -1562,8 +1589,12 @@ class _SwarmConversationPageState extends State<SwarmConversationPage>
Flexible(
child: ListenableBuilder(
listenable: Listenable.merge([c.composer, _voice]),
- builder: (context, _) =>
- _composer(c, tty, hint: view.hint),
+ builder: (context, _) => _composer(
+ c,
+ tty,
+ hint: view.hint,
+ buddy: view.buddyProject != null,
+ ),
),
)
else if (view.known)
@@ -2196,11 +2227,18 @@ class _SwarmConversationPageState extends State<SwarmConversationPage>
/// answers a message, what the last pick left out and what the mic could
/// not hear, then the card ([SwarmComposerCard]): the files going with the
/// post, a field that grows with what is typed and its X, and the toolbar —
- /// +, @ Tag, the mic and a round Send. While a take is under way the toolbar
+ /// +, @, the mic and a round Send. While a take is under way the toolbar
/// is the voice row ([SwarmVoiceRow]), with its own Send, and the picker
/// and X are hidden. An @
- /// is typed in the field or put there by Tag: both open the same picker.
- Widget _composer(SwarmConversation c, Tty tty, {required String hint}) {
+ /// is typed in the field or put there by the @: both open the same picker.
+ /// The person's own [buddy] chat has no @ in its toolbar: they talk to
+ /// their one Buddy there, and nobody else reads it (Tony, 11-03).
+ Widget _composer(
+ SwarmConversation c,
+ Tty tty, {
+ required String hint,
+ required bool buddy,
+ }) {
final snapshot = c.reader.snapshot;
final query = c.mentionQuery;
final replying = c.replyingTo;
@@ -2210,6 +2248,7 @@ class _SwarmConversationPageState extends State<SwarmConversationPage>
// again from where it shows. Files alone are a post too.
final canSend = c.canSend;
final taggable =
+ !buddy &&
snapshot != null &&
(c.mentionablePeople.isNotEmpty || c.mentionable.isNotEmpty);
return Padding(
@@ -2393,7 +2432,7 @@ class _SwarmConversationPageState extends State<SwarmConversationPage>
: () => unawaited(_pickFiles(c)),
),
if (taggable)
- _TagChip(
+ _TagButton(
open: query != null,
onTap: () {
c.toggleMention();
@@ -3729,6 +3768,9 @@ class SwarmRoundButton extends StatelessWidget {
button: true,
enabled: onTap != null,
label: label,
+ // The tap a screen reader sends: the detector's own is left out with
+ // what is under the label.
+ onTap: onTap,
excludeSemantics: true,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
@@ -3779,62 +3821,31 @@ class SwarmAttachButton extends StatelessWidget {
);
}
-/// The chat composer's @ Tag chip ([SwarmConversation.toggleMention]): ends
-/// the draft in an @, which opens the picker, or closes it again while no
-/// name is typed. In the accent while the picker is open.
-class _TagChip extends StatelessWidget {
- const _TagChip({required this.open, required this.onTap});
+/// The chat composer's @ ([SwarmConversation.toggleMention]): ends the draft
+/// in an @, which opens the picker, or closes it again while no name is
+/// typed. The sign alone on a round face, as + is (Tony, 11-03: the word Tag
+/// said nothing more); in the accent while the picker is open.
+class _TagButton extends StatelessWidget {
+ const _TagButton({required this.open, required this.onTap});
final bool open;
final VoidCallback onTap;
@override
- Widget build(BuildContext context) {
- final tty = Tty.of(context);
- final ink = open ? AppPalette.accentOnSurface : AppPalette.textSecondary;
- return Semantics(
- button: true,
- label: 'Tag a member or agent',
- excludeSemantics: true,
- onTap: onTap,
- child: GestureDetector(
- key: const ValueKey('swarm-tag'),
- behavior: HitTestBehavior.opaque,
- onTap: onTap,
- child: SizedBox(
- height: 44,
- child: Center(
- child: Container(
- height: 36,
- padding: SwarmComposer.tagPadding,
- decoration: BoxDecoration(
- color: open
- ? AppPalette.accentOnSurface.withValues(alpha: 0.16)
- : tty.text.withValues(alpha: 0.08),
- borderRadius: BorderRadius.circular(SwarmComposer.tagRadius),
- ),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- Icon(LucideIcons.atSign, size: 17, color: ink),
- const SizedBox(width: 5),
- Text(
- 'Tag',
- style: swarmChatText(
- 14,
- color: ink,
- weight: FontWeight.w500,
- height: 1.2,
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- ),
- );
- }
+ Widget build(BuildContext context) => SwarmRoundButton(
+ key: const ValueKey('swarm-tag'),
+ label: 'Tag a member or agent',
+ onTap: onTap,
+ face: 36,
+ fill: open
+ ? AppPalette.accentOnSurface.withValues(alpha: 0.16)
+ : Tty.of(context).text.withValues(alpha: 0.08),
+ child: Icon(
+ LucideIcons.atSign,
+ size: 20,
+ color: open ? AppPalette.accentOnSurface : AppPalette.textSecondary,
+ ),
+ );
}
/// A link in the accent: Earlier messages.
diff --git a/mobile/lib/swarm/swarm_home_rows.dart b/mobile/lib/swarm/swarm_home_rows.dart
index 1de84ed6d..b7cd1e46f 100644
--- a/mobile/lib/swarm/swarm_home_rows.dart
+++ b/mobile/lib/swarm/swarm_home_rows.dart
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import 'package:harness_mobile/phone/fzf.dart' show fzfAge;
import 'package:harness_mobile/phone/tty.dart';
import 'package:harness_mobile/phone/tty_controls.dart';
import 'package:harness_mobile/shared/theme/app_space.dart';
@@ -16,7 +15,6 @@ import 'swarm_home_list.dart';
import 'swarm_inbox.dart';
import 'swarm_row.dart';
import 'swarm_style.dart';
-import 'swarm_unread.dart';
import 'team_glance.dart';
/// The rows of Swarm Home: a project with how many people read it, how many
@@ -77,21 +75,6 @@ class SwarmTeamDots extends StatelessWidget {
}
}
-/// A project's line on Home: "5 humans • 8 agents running", leaving out what
-/// is none, then its Swarm, the first to go when the row is short, where Home
-/// shows several. Empty with nothing to say.
-String swarmProjectLine({
- required int humans,
- required SwarmTeamGlance glance,
- String? swarmName,
-}) => [
- if (humans > 0) swarmHumans(humans),
- ?glance.running,
- ?swarmName,
-].join(_lineGap);
-
-const _lineGap = ' • ';
-
/// What a need asks, as its Home row's title: a decision's question, a tag's
/// words, the question work waits on (or the work itself).
String swarmNeedAsk(SwarmNeed need) => switch (need) {
@@ -145,32 +128,30 @@ class SwarmInvitationRow extends StatelessWidget {
}
}
-/// One project on Home, as C1 draws it: a dot in the colour of how its team
-/// is ([swarmProjectColor]), its name as a channel's ("#openharness") — bold
-/// and bright with something new in it, quiet otherwise — how many people read
-/// it and how many agents are running ([swarmProjectLine]), and at its right
-/// how long ago it last moved, over the tags waiting in it ("@2", filled) or,
-/// unread, a dot; a skeleton in their place while what waits is on its way
-/// ([tagsLoading]). A tap opens it; a long press offers its pin ([onLongPress]).
+/// One project on Home, on one line as Slack's channels (Tony, 2026-11-03):
+/// its name as a channel's ("#openharness") — bold and bright with something
+/// new in it, quiet otherwise — its Swarm faint after it where Home shows
+/// several, the first to go when the row is short, and at its end the tags
+/// waiting in it ("@2", filled), or a skeleton in their place while what
+/// waits is on its way ([tagsLoading]). No dot for how its team is: one on
+/// every row said little, and the name already says what waits on the person
+/// (Tony, 2026-11-03). No second line: who reads it and how long ago it moved
+/// were the same on every row. A tap opens it; a long press offers its pin
+/// ([onLongPress]).
class SwarmHomeProjectRow extends StatelessWidget {
const SwarmHomeProjectRow({
super.key,
required this.project,
- required this.glance,
- required this.humans,
- required this.now,
this.swarmName,
this.tagsLoading = false,
required this.onTap,
this.onLongPress,
});
- final SwarmHomeProject project;
- final SwarmTeamGlance glance;
+ /// One line, as tall as a thumb's touch.
+ static const double height = minTouchTarget;
- /// How many people read it ([swarmProjectPeople]).
- final int humans;
- final DateTime now;
+ final SwarmHomeProject project;
/// Its Swarm, where Home shows several.
final String? swarmName;
@@ -185,112 +166,61 @@ class SwarmHomeProjectRow extends StatelessWidget {
AppTheme.watch(context);
final news = project.news;
final bright = news.bold || news.tags > 0;
- final age = switch (project.active) {
- final at? => fzfAge(at.toLocal(), now.toLocal()),
- null => '',
- };
- final line = swarmProjectLine(
- humans: humans,
- glance: glance,
- swarmName: swarmName,
- );
+ final name = '#${project.project.name}';
return _Tap(
onTap: onTap,
onLongPress: onLongPress,
child: ConstrainedBox(
- constraints: const BoxConstraints(minHeight: SwarmRow.height),
+ constraints: const BoxConstraints(minHeight: height),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: AppSpace.l,
- vertical: AppSpace.m,
+ vertical: AppSpace.xs,
),
child: Row(
children: [
- ExcludeSemantics(
- child: SizedBox(
- key: const ValueKey('swarm-project-dot'),
- width: 16,
- child: Center(
- child: _Dot(
- size: 8,
- color: swarmProjectColor(glance, news),
- ),
- ),
- ),
- ),
- const SizedBox(width: AppSpace.s),
Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisSize: MainAxisSize.min,
- children: [
- Semantics(
- label: bright && news.tags == 0
- ? 'Unread messages'
- : null,
- child: Text(
- '#${project.project.name}',
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: AppType.label(
- color: bright
- ? AppPalette.textPrimary
- : AppPalette.textSecondary,
- height: 1.3,
- fontWeight: bright ? AppFont.semibold : null,
- ),
- ),
+ child: Semantics(
+ label: bright && news.tags == 0 ? 'Unread messages' : null,
+ child: Text.rich(
+ TextSpan(
+ text: name,
+ children: [
+ if (swarmName case final swarm?)
+ TextSpan(
+ text: ' $swarm',
+ style: AppType.caption(
+ color: AppPalette.textFaint,
+ height: 1.3,
+ ),
+ ),
+ ],
),
- if (line.isNotEmpty) ...[
- const SizedBox(height: 3),
- Text(
- line,
- key: const ValueKey('swarm-project-line'),
- semanticsLabel: line.replaceAll(_lineGap, ', '),
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: AppType.caption(
- color: AppPalette.textSecondary,
- height: 1.35,
- ),
- ),
- ],
- ],
+ key: const ValueKey('swarm-project-name'),
+ semanticsLabel: [name, ?swarmName].join(', '),
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: AppType.label(
+ color: bright
+ ? AppPalette.textPrimary
+ : AppPalette.textSecondary,
+ height: 1.3,
+ fontWeight: bright ? AppFont.semibold : null,
+ ),
+ ),
),
),
- if (age.isNotEmpty || bright || tagsLoading) ...[
+ if (news.tags > 0) ...[
const SizedBox(width: 12),
- Column(
- crossAxisAlignment: CrossAxisAlignment.end,
- mainAxisSize: MainAxisSize.min,
- children: [
- if (age.isNotEmpty)
- Text(
- age,
- style: AppType.caption(
- color: AppPalette.textFaint,
- height: 1.3,
- ),
- ),
- if (news.tags > 0) ...[
- const SizedBox(height: 4),
- SwarmTags(news.tags, filled: true),
- ] else if (tagsLoading) ...[
- const SizedBox(height: 4),
- // As big as the filled tags it stands for.
- const Skeleton(
- key: ValueKey('swarm-project-tags-loading'),
- width: 36,
- height: 20,
- radius: 10,
- ),
- ] else if (news.bold) ...[
- const SizedBox(height: 8),
- ExcludeSemantics(
- child: _Dot(size: 7, color: AppPalette.textPrimary),
- ),
- ],
- ],
+ SwarmTags(news.tags, filled: true),
+ ] else if (tagsLoading) ...[
+ const SizedBox(width: 12),
+ // As big as the filled tags it stands for.
+ const Skeleton(
+ key: ValueKey('swarm-project-tags-loading'),
+ width: 36,
+ height: 20,
+ radius: 10,
),
],
],
@@ -360,18 +290,6 @@ class SwarmOtherProjectsRow extends StatelessWidget {
}
}
-/// How a project's team is, as its dot on Home: red with someone down,
-/// yellow with someone waiting or a tag waiting on the person, green with
-/// someone working, faint otherwise.
-Color swarmProjectColor(SwarmTeamGlance glance, SwarmProjectNews news) =>
- glance.down > 0
- ? swarmStateColor(SwarmAgentState.down)
- : glance.waiting > 0 || news.tags > 0 || news.hasWaitingTag
- ? swarmStateColor(SwarmAgentState.waiting)
- : glance.working > 0
- ? swarmStateColor(SwarmAgentState.working)
- : AppPalette.textFaint;
-
/// A row's ink on a tap, with a click a thumb can feel.
class _Tap extends StatelessWidget {
const _Tap({required this.onTap, this.onLongPress, required this.child});
@@ -396,25 +314,6 @@ class _Tap extends StatelessWidget {
);
}
-/// A small round mark: what waits on the person in the warning colour, or
-/// [color].
-class _Dot extends StatelessWidget {
- const _Dot({required this.size, this.color});
-
- final double size;
- final Color? color;
-
- @override
- Widget build(BuildContext context) => Container(
- width: size,
- height: size,
- decoration: BoxDecoration(
- color: color ?? AppColors.warning,
- shape: BoxShape.circle,
- ),
- );
-}
-
/// A project's pin, offered on a long press of its Home row: one row, Pin or
/// Unpin ([pinned]). Answers true when it was tapped, null when closed. While
/// it is open, [watch] tells of changes to what Home lists: once the project
diff --git a/mobile/lib/swarm/swarm_home_search.dart b/mobile/lib/swarm/swarm_home_search.dart
new file mode 100644
index 000000000..70c097dd6
--- /dev/null
+++ b/mobile/lib/swarm/swarm_home_search.dart
@@ -0,0 +1,154 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:lucide_icons_flutter/lucide_icons.dart';
+
+import 'package:harness_mobile/shared/theme/app_space.dart';
+import 'package:harness_mobile/shared/theme/app_theme.dart';
+import 'package:harness_mobile/shared/theme/app_type.dart';
+
+/// A pull down at the top of Home's list opens Search ([onPull]), Slack's
+/// way to it, in place of the pull that read the Swarms again (Refresh is in
+/// Sort and filter now). It counts only a drag that began with the list at
+/// its top and went past [reach]: a list stretched on Android (clamping) or
+/// pulled past its top on iOS (bouncing) alike; a flick, or a scroll back up
+/// from the middle of the list, opens nothing. While it pulls, a hint says
+/// what letting go does.
+class SwarmPullToSearch extends StatefulWidget {
+ const SwarmPullToSearch({
+ super.key,
+ required this.onPull,
+ required this.child,
+ this.reach = 72,
+ });
+
+ final VoidCallback onPull;
+
+ /// The scrolling list: its own scroll, not one nested in it, counts.
+ final Widget child;
+
+ /// How far a pull goes before letting go opens Search.
+ final double reach;
+
+ @override
+ State<SwarmPullToSearch> createState() => _SwarmPullToSearchState();
+}
+
+class _SwarmPullToSearchState extends State<SwarmPullToSearch> {
+ /// How far the drag under way has pulled past the top.
+ double _pull = 0;
+
+ /// The drag under way began at the top: only it may open Search.
+ bool _armed = false;
+
+ /// The drag under way: a pull counts while the finger is down.
+ bool _dragging = false;
+
+ void _set(double pull) {
+ if (pull == _pull) return;
+ final passed = pull >= widget.reach, was = _pull >= widget.reach;
+ setState(() => _pull = pull);
+ if (passed && !was) HapticFeedback.selectionClick();
+ }
+
+ /// The finger lifted: past [SwarmPullToSearch.reach], Search opens.
+ void _release() {
+ final open = _armed && _pull >= widget.reach;
+ _armed = false;
+ _dragging = false;
+ _set(0);
+ if (open) widget.onPull();
+ }
+
+ bool _onScroll(ScrollNotification note) {
+ if (note.depth != 0 || note.metrics.axis != Axis.vertical) return false;
+ final metrics = note.metrics;
+ switch (note) {
+ case ScrollStartNotification(:final dragDetails):
+ _dragging = dragDetails != null;
+ _armed = _dragging && metrics.pixels <= metrics.minScrollExtent;
+ _set(0);
+ // Clamping: the list stays put and says how far it was pulled.
+ case OverscrollNotification(:final overscroll, dragDetails: _?)
+ when _armed && overscroll < 0:
+ _set(_pull - overscroll);
+ case ScrollUpdateNotification(:final dragDetails) when _dragging:
+ if (dragDetails == null) {
+ // Let go, the list bouncing back: decided now, not once it rests.
+ _release();
+ } else if (_armed) {
+ // Bouncing: the list goes past its top; scrolled back into the
+ // list, the pull is undone.
+ _set(
+ metrics.pixels < metrics.minScrollExtent
+ ? metrics.minScrollExtent - metrics.pixels
+ : metrics.pixels > metrics.minScrollExtent
+ ? 0
+ : _pull,
+ );
+ }
+ case ScrollEndNotification():
+ _release();
+ default:
+ break;
+ }
+ return false;
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ AppTheme.watch(context);
+ final progress = (_pull / widget.reach).clamp(0.0, 1.0);
+ final ready = _pull >= widget.reach;
+ return NotificationListener<ScrollNotification>(
+ onNotification: _onScroll,
+ child: Stack(
+ children: [
+ widget.child,
+ if (_pull > 0)
+ Positioned(
+ top: AppSpace.s,
+ left: 0,
+ right: 0,
+ child: IgnorePointer(
+ child: Opacity(
+ opacity: progress,
+ child: Center(
+ child: Container(
+ key: const ValueKey('swarm-pull-search-hint'),
+ padding: const EdgeInsets.symmetric(
+ horizontal: AppSpace.m,
+ vertical: AppSpace.xs + 2,
+ ),
+ decoration: ShapeDecoration(
+ color: AppPalette.swarmSearchSurface,
+ shape: const StadiumBorder(),
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Icon(
+ ready
+ ? LucideIcons.search300
+ : LucideIcons.arrowDown300,
+ size: 14,
+ color: AppPalette.textSecondary,
+ ),
+ const SizedBox(width: AppSpace.xs + 2),
+ Text(
+ ready ? 'Release to search' : 'Pull to search',
+ style: AppType.caption(
+ color: AppPalette.textSecondary,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/mobile/lib/swarm/swarm_home_tiles.dart b/mobile/lib/swarm/swarm_home_tiles.dart
new file mode 100644
index 000000000..c00d57775
--- /dev/null
+++ b/mobile/lib/swarm/swarm_home_tiles.dart
@@ -0,0 +1,346 @@
+import 'package:flutter/material.dart';
+import 'package:lucide_icons_flutter/lucide_icons.dart';
+
+import 'package:harness_mobile/phone/fzf.dart' show fzfAge;
+import 'package:harness_mobile/shared/theme/app_space.dart';
+import 'package:harness_mobile/shared/theme/app_theme.dart';
+import 'package:harness_mobile/shared/theme/app_type.dart';
+import 'package:harness_mobile/shared/widgets/skeleton.dart';
+import 'package:harness_mobile/theme/app_theme.dart' show AppColors;
+
+import 'swarm_agents.dart';
+import 'swarm_style.dart';
+import 'swarm_threads.dart';
+
+/// The tiles at the top of Swarm Home, Slack's tile bar (Tony, 2026-11-03):
+/// While you were away, Threads and Agents side by side, scrolling sideways
+/// when they do not fit. One row of tiles in place of two cards leaves the
+/// screen to the projects.
+class SwarmHomeTiles extends StatelessWidget {
+ const SwarmHomeTiles({super.key, required this.children});
+
+ final List<Widget> children;
+
+ @override
+ Widget build(BuildContext context) => SingleChildScrollView(
+ key: const ValueKey('swarm-home-tiles'),
+ scrollDirection: Axis.horizontal,
+ clipBehavior: Clip.none,
+ child: IntrinsicHeight(
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ for (final (i, tile) in children.indexed) ...[
+ if (i > 0) const SizedBox(width: AppSpace.s),
+ tile,
+ ],
+ ],
+ ),
+ ),
+ );
+}
+
+/// While you were away as a tile: how long the person was away, from leaving
+/// the app ([since]) to coming back ([back]), over the work done since
+/// ([done], green) and what needs them now ([needs], yellow), each a skeleton
+/// until it is known. A tap opens what needs them ([onTap]).
+class SwarmAwayTile extends StatelessWidget {
+ const SwarmAwayTile({
+ super.key,
+ required this.since,
+ required this.back,
+ required this.done,
+ required this.needs,
+ required this.onTap,
+ });
+
+ final DateTime since, back;
+ final int? done, needs;
+ final VoidCallback onTap;
+
+ @override
+ Widget build(BuildContext context) {
+ AppTheme.watch(context);
+ final age = fzfAge(since.toLocal(), back.toLocal());
+ final words = AppType.caption(color: AppPalette.textSecondary);
+ // A figure and its words, as one: its count, or a skeleton as tall.
+ Widget stat(Key key, int? value, String label, Color color) {
+ final style = AppType.label(
+ color: (value ?? 0) > 0 ? color : AppPalette.textSecondary,
+ fontWeight: AppFont.semibold,
+ height: 1.2,
+ );
+ return Row(
+ key: key,
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ if (value == null)
+ SkeletonText(style: style, width: 20)
+ else
+ Text('$value', style: style),
+ const SizedBox(width: AppSpace.xs),
+ // Large type, or a long count, gives up the words first.
+ Flexible(
+ child: Text(
+ label,
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: words,
+ ),
+ ),
+ ],
+ );
+ }
+
+ return _Tile(
+ key: const ValueKey('swarm-away'),
+ width: 214,
+ icon: LucideIcons.clock300,
+ title: 'While you were away',
+ titleEnd: age,
+ label:
+ 'While you were away, $age: ${done ?? 'not known how many'} done, '
+ '${needs ?? 'not known how many'} need you',
+ onTap: onTap,
+ value: Row(
+ children: [
+ Flexible(
+ child: stat(
+ const ValueKey('swarm-away-done'),
+ done,
+ 'done',
+ AppColors.success,
+ ),
+ ),
+ const SizedBox(width: AppSpace.m),
+ Flexible(
+ flex: 2,
+ child: stat(
+ const ValueKey('swarm-away-needs'),
+ needs,
+ 'need you',
+ AppColors.warning,
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+/// Threads as a tile: the threads the person follows ([threads]), the tags
+/// of them in threads filled, else New replies while one has some. A tap
+/// opens Threads ([onTap]).
+class SwarmThreadsTile extends StatelessWidget {
+ const SwarmThreadsTile({
+ super.key,
+ required this.threads,
+ required this.onTap,
+ });
+
+ final SwarmThreadsMerge threads;
+ final VoidCallback onTap;
+
+ @override
+ Widget build(BuildContext context) => ListenableBuilder(
+ listenable: threads,
+ builder: (context, _) {
+ AppTheme.watch(context);
+ final unread = threads.unread, tags = threads.mentions;
+ return _Tile(
+ key: const ValueKey('swarm-threads-row'),
+ width: 104,
+ icon: LucideIcons.messagesSquare300,
+ title: 'Threads',
+ bright: unread || tags > 0,
+ label: tags > 0
+ ? 'Threads, $tags ${tags == 1 ? 'mention' : 'mentions'}'
+ : unread
+ ? 'Threads, new replies'
+ : 'Threads',
+ onTap: onTap,
+ value: tags > 0
+ ? Align(
+ alignment: Alignment.centerLeft,
+ child: SwarmTags(
+ tags,
+ key: const ValueKey('swarm-threads-tags'),
+ filled: true,
+ ),
+ )
+ : Text(
+ unread ? 'New replies' : 'No new replies',
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: unread
+ ? AppType.label(
+ color: AppPalette.textPrimary,
+ fontWeight: AppFont.semibold,
+ height: 1.2,
+ )
+ : AppType.caption(color: AppPalette.textFaint),
+ ),
+ );
+ },
+ );
+}
+
+/// Agents as a tile: how many of the person's harnesses work now
+/// ([SwarmAgents.working]), a skeleton until the computers answer. A tap
+/// opens every agent, by computer ([onTap]): Swarm's way into Harness.
+class SwarmAgentsTile extends StatelessWidget {
+ const SwarmAgentsTile({super.key, required this.agents, required this.onTap});
+
+ final SwarmAgents agents;
+ final VoidCallback onTap;
+
+ @override
+ Widget build(BuildContext context) => ListenableBuilder(
+ listenable: agents,
+ builder: (context, _) {
+ AppTheme.watch(context);
+ final working = agents.working;
+ final style = AppType.label(
+ color: AppPalette.textPrimary,
+ fontWeight: AppFont.semibold,
+ height: 1.2,
+ );
+ return _Tile(
+ key: const ValueKey('swarm-agents-tile'),
+ width: 104,
+ icon: LucideIcons.squareTerminal300,
+ title: 'Agents',
+ label: switch (working) {
+ null => 'Agents',
+ 0 => 'Agents, none working',
+ final n => 'Agents, $n working',
+ },
+ onTap: onTap,
+ value: switch (working) {
+ null => SkeletonText(
+ key: const ValueKey('swarm-agents-loading'),
+ style: style,
+ width: 60,
+ ),
+ 0 => Text(
+ 'None working',
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: AppType.caption(color: AppPalette.textFaint),
+ ),
+ final n => Row(
+ children: [
+ Container(
+ width: 8,
+ height: 8,
+ decoration: BoxDecoration(
+ color: AppColors.success,
+ shape: BoxShape.circle,
+ ),
+ ),
+ const SizedBox(width: 6),
+ Flexible(
+ child: Text(
+ '$n working',
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: style,
+ ),
+ ),
+ ],
+ ),
+ },
+ );
+ },
+ );
+}
+
+/// One tile: its glyph and [title] over its [value], heard as [label].
+class _Tile extends StatelessWidget {
+ const _Tile({
+ super.key,
+ required this.width,
+ required this.icon,
+ required this.title,
+ required this.value,
+ required this.label,
+ required this.onTap,
+ this.titleEnd,
+ this.bright = false,
+ });
+
+ final double width;
+ final IconData icon;
+ final String title;
+
+ /// Quiet words at the title's end: how long ago.
+ final String? titleEnd;
+ final Widget value;
+ final String label;
+ final VoidCallback onTap;
+
+ /// Something new in it: its title in the main ink.
+ final bool bright;
+
+ @override
+ Widget build(BuildContext context) {
+ final ink = bright ? AppPalette.textPrimary : AppPalette.textSecondary;
+ return Semantics(
+ button: true,
+ label: label,
+ excludeSemantics: true,
+ onTap: onTap,
+ child: Material(
+ color: AppGlass.rowFill,
+ borderRadius: BorderRadius.circular(AppCard.radius),
+ child: InkWell(
+ borderRadius: BorderRadius.circular(AppCard.radius),
+ onTap: onTap,
+ child: SizedBox(
+ width: width,
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(
+ AppSpace.m,
+ AppSpace.s + 2,
+ AppSpace.s + 2,
+ AppSpace.s + 2,
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Row(
+ children: [
+ Icon(icon, size: 16, color: ink),
+ const SizedBox(width: 6),
+ Expanded(
+ child: Text(
+ title,
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: AppType.caption(
+ color: ink,
+ fontWeight: bright ? AppFont.semibold : null,
+ ),
+ ),
+ ),
+ if (titleEnd case final end?) ...[
+ const SizedBox(width: AppSpace.xs),
+ Text(
+ end,
+ style: AppType.caption(color: AppPalette.textFaint),
+ ),
+ ],
+ ],
+ ),
+ const SizedBox(height: 6),
+ value,
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/mobile/lib/swarm/swarm_home_top.dart b/mobile/lib/swarm/swarm_home_top.dart
index 60bf9c787..a84b52dc1 100644
--- a/mobile/lib/swarm/swarm_home_top.dart
+++ b/mobile/lib/swarm/swarm_home_top.dart
@@ -3,12 +3,9 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
-import 'package:harness_mobile/phone/fzf.dart' show fzfAge;
import 'package:harness_mobile/shared/theme/app_space.dart';
import 'package:harness_mobile/shared/theme/app_theme.dart';
-import 'package:harness_mobile/shared/theme/app_type.dart';
import 'package:harness_mobile/shared/widgets/skeleton.dart';
-import 'package:harness_mobile/theme/app_theme.dart' show AppColors;
import 'model.dart';
import 'swarm_inbox.dart';
@@ -20,8 +17,8 @@ import 'swarm_start.dart';
import 'swarm_style.dart';
/// The top of Swarm Home, direction C, as Tony's prototype C1 draws it
-/// (2026-10-30): the Swarm switcher in its title ([showSwarmSwitcher]) and
-/// While you were away ([SwarmAwayCard]).
+/// (2026-10-30): the Swarm switcher in its title ([showSwarmSwitcher]). While
+/// you were away is a tile since 2026-11-03 (`SwarmAwayTile`).
/// Whether the account's Swarms are still to come, a failed read still trying:
/// never from a server without the list, which no read will bring.
@@ -212,140 +209,3 @@ int swarmDoneSince(SuperTabSnapshot snapshot, DateTime since) => snapshot
(swarmProgressAt(g)?.isAfter(since) ?? false),
)
.length;
-
-/// While you were away, as C1 draws it: how long the person was away, from
-/// leaving the app ([since]) to coming back ([back]), then the work done
-/// since ([done], green) and what needs them now ([needs], yellow), each a
-/// skeleton until it is known. A tap opens what needs them ([onTap]).
-class SwarmAwayCard extends StatelessWidget {
- const SwarmAwayCard({
- super.key,
- required this.since,
- required this.back,
- required this.done,
- required this.needs,
- required this.onTap,
- });
-
- final DateTime since, back;
- final int? done, needs;
- final VoidCallback onTap;
-
- @override
- Widget build(BuildContext context) {
- AppTheme.watch(context);
- final age = fzfAge(since.toLocal(), back.toLocal());
- return Semantics(
- button: true,
- label:
- 'While you were away, $age: ${done ?? 'not known how many'} done, '
- '${needs ?? 'not known how many'} need you',
- excludeSemantics: true,
- onTap: onTap,
- child: Material(
- color: AppGlass.rowFill,
- borderRadius: BorderRadius.circular(AppCard.radius),
- child: InkWell(
- borderRadius: BorderRadius.circular(AppCard.radius),
- onTap: onTap,
- child: Padding(
- padding: const EdgeInsets.fromLTRB(
- AppSpace.l,
- AppSpace.m,
- AppSpace.m,
- AppSpace.m,
- ),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- children: [
- Expanded(
- child: Text(
- 'While you were away',
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: AppType.label(
- color: AppPalette.textPrimary,
- fontWeight: AppFont.semibold,
- ),
- ),
- ),
- Text(
- age,
- style: AppType.caption(color: AppPalette.textFaint),
- ),
- const SizedBox(width: AppSpace.xs),
- Icon(
- LucideIcons.chevronRight300,
- size: 18,
- color: AppPalette.textFaint,
- ),
- ],
- ),
- const SizedBox(height: AppSpace.s),
- Row(
- children: [
- Expanded(
- child: _Stat(
- key: const ValueKey('swarm-away-done'),
- count: done,
- label: 'done',
- color: AppColors.success,
- ),
- ),
- Expanded(
- child: _Stat(
- key: const ValueKey('swarm-away-needs'),
- count: needs,
- label: 'need you',
- color: AppColors.warning,
- ),
- ),
- // Where new threads goes, once the server can tell them.
- const Spacer(),
- ],
- ),
- ],
- ),
- ),
- ),
- ),
- );
- }
-}
-
-/// One figure of While you were away: its count, large, over its words.
-class _Stat extends StatelessWidget {
- const _Stat({
- super.key,
- required this.count,
- required this.label,
- required this.color,
- });
-
- /// Null until it is known: a skeleton as tall as the figure.
- final int? count;
- final String label;
- final Color color;
-
- @override
- Widget build(BuildContext context) {
- final count = this.count;
- final style = AppType.title(
- color: (count ?? 0) > 0 ? color : AppPalette.textSecondary,
- fontWeight: AppFont.semibold,
- height: 1.2,
- );
- return Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- if (count == null)
- SkeletonText(style: style, width: 28)
- else
- Text('$count', style: style),
- Text(label, style: AppType.caption(color: AppPalette.textSecondary)),
- ],
- );
- }
-}
diff --git a/mobile/lib/swarm/swarm_home_view_sheet.dart b/mobile/lib/swarm/swarm_home_view_sheet.dart
index 3354a3a03..0304a9195 100644
--- a/mobile/lib/swarm/swarm_home_view_sheet.dart
+++ b/mobile/lib/swarm/swarm_home_view_sheet.dart
@@ -3,6 +3,7 @@ import 'package:lucide_icons_flutter/lucide_icons.dart';
import 'package:harness_mobile/shared/theme/app_space.dart';
import 'package:harness_mobile/shared/theme/app_theme.dart';
+import 'package:harness_mobile/shared/theme/app_type.dart';
import 'swarm_home_list.dart';
import 'swarm_home_prefs.dart';
@@ -28,24 +29,44 @@ String swarmHomeFilterLabel(SwarmHomeFilter filter) => switch (filter) {
/// Sort by and Filter, from Home's top bar: each says what is on, and opens to
/// its options with a tick on the one chosen. A choice applies at once and the
-/// menu stays. It holds nothing of a Swarm; signed out, another account, or no
-/// Swarm left to sort, it closes, and a tap changes nothing.
+/// menu stays. Under them, Mark all read ([onMarkAllRead], greyed while
+/// [unread] says nothing is) and Refresh ([onRefresh]), moved here from the
+/// top bar and the pull (Tony, 2026-11-03): each closes the menu, then runs.
+/// It holds nothing of a Swarm; signed out, another account, or no Swarm left
+/// to sort, it closes, and a tap changes nothing.
Future<void> showSwarmHomeViewSheet(
BuildContext context,
- SwarmSession session,
-) => showModalBottomSheet<void>(
+ SwarmSession session, {
+ bool Function()? unread,
+ VoidCallback? onMarkAllRead,
+ VoidCallback? onRefresh,
+}) => showModalBottomSheet<void>(
context: context,
backgroundColor: AppGlass.rowFill,
shape: AppControl.sheetShape,
isScrollControlled: true,
- builder: (_) => _ViewSheet(session: session),
+ builder: (_) => _ViewSheet(
+ session: session,
+ unread: unread,
+ onMarkAllRead: onMarkAllRead,
+ onRefresh: onRefresh,
+ ),
);
class _ViewSheet extends StatefulWidget {
- const _ViewSheet({required this.session});
+ const _ViewSheet({
+ required this.session,
+ this.unread,
+ this.onMarkAllRead,
+ this.onRefresh,
+ });
final SwarmSession session;
+ /// Whether anything Home shows is unread: Mark all read is greyed without.
+ final bool Function()? unread;
+ final VoidCallback? onMarkAllRead, onRefresh;
+
@override
State<_ViewSheet> createState() => _ViewSheetState();
}
@@ -74,6 +95,14 @@ class _ViewSheetState extends State<_ViewSheet> {
});
}
+ /// Closes the menu, then does [action], unless the menu is going already.
+ void _closeThen(VoidCallback action) {
+ if (!_live) return;
+ _closing = true;
+ Navigator.of(context).pop();
+ action();
+ }
+
Widget _heading({
required String keyName,
required String title,
@@ -217,6 +246,30 @@ class _ViewSheetState extends State<_ViewSheet> {
on: home.filter == filter,
choose: () => home.setFilter(filter),
),
+ if (widget.onMarkAllRead != null || widget.onRefresh != null)
+ Divider(
+ height: AppSpace.l,
+ thickness: 1,
+ indent: AppSpace.l,
+ endIndent: AppSpace.l,
+ color: AppGlass.hair,
+ ),
+ if (widget.onMarkAllRead case final mark?)
+ SwarmHomeViewAction(
+ key: const ValueKey('swarm-mark-all-read'),
+ icon: LucideIcons.checkCheck300,
+ title: 'Mark all read',
+ onTap: widget.unread?.call() ?? false
+ ? () => _closeThen(mark)
+ : null,
+ ),
+ if (widget.onRefresh case final refresh?)
+ SwarmHomeViewAction(
+ key: const ValueKey('swarm-home-refresh'),
+ icon: LucideIcons.refreshCw300,
+ title: 'Refresh',
+ onTap: () => _closeThen(refresh),
+ ),
],
),
),
@@ -225,3 +278,58 @@ class _ViewSheetState extends State<_ViewSheet> {
);
}
}
+
+/// A thing Sort and filter does, not a way Home is shown — Mark all read,
+/// Refresh: its glyph and its name, greyed and heard as off with nothing to
+/// do ([onTap] null).
+class SwarmHomeViewAction extends StatelessWidget {
+ const SwarmHomeViewAction({
+ super.key,
+ required this.icon,
+ required this.title,
+ required this.onTap,
+ });
+
+ final IconData icon;
+ final String title;
+ final VoidCallback? onTap;
+
+ @override
+ Widget build(BuildContext context) {
+ final ink = onTap == null ? AppPalette.textFaint : AppPalette.textPrimary;
+ return Semantics(
+ button: true,
+ enabled: onTap != null,
+ label: title,
+ excludeSemantics: true,
+ onTap: onTap,
+ child: Material(
+ color: Colors.transparent,
+ child: InkWell(
+ borderRadius: BorderRadius.circular(AppCard.radius),
+ onTap: onTap,
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(minHeight: SwarmRow.height),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: AppSpace.l),
+ child: Row(
+ children: [
+ Icon(icon, size: 20, color: ink),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Text(
+ title,
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: AppType.label(color: ink, height: 1.3),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/mobile/lib/swarm/swarm_page.dart b/mobile/lib/swarm/swarm_page.dart
index a6e773917..e6d46f990 100644
--- a/mobile/lib/swarm/swarm_page.dart
+++ b/mobile/lib/swarm/swarm_page.dart
@@ -8,18 +8,20 @@ import 'package:harness_mobile/phone/out_of_sight.dart';
import 'package:harness_mobile/phone/phone_navigation.dart';
import 'package:harness_mobile/phone/phone_shell_scope.dart';
import 'package:harness_mobile/phone/tty.dart';
-import 'package:harness_mobile/phone/tty_controls.dart';
import 'package:harness_mobile/shared/theme/app_space.dart';
import 'package:harness_mobile/shared/theme/app_theme.dart';
import 'package:harness_mobile/shared/theme/app_type.dart';
import 'package:harness_mobile/shared/widgets/skeleton.dart';
+import 'swarm_activity.dart' show SwarmActivityFilter;
+import 'swarm_agents.dart';
import 'swarm_conversation_page.dart' show openSwarmConversation;
import 'swarm_home_list.dart';
import 'swarm_home_rows.dart';
+import 'swarm_home_search.dart';
+import 'swarm_home_tiles.dart';
import 'swarm_home_top.dart';
import 'swarm_inbox.dart';
-import 'swarm_leaderboard.dart' show swarmProjectPeople;
import 'swarm_mark_all.dart';
import 'swarm_needs_page.dart';
import 'swarm_new_message_sheet.dart';
@@ -28,6 +30,7 @@ import 'swarm_project_page.dart';
import 'swarm_reader.dart';
import 'swarm_row.dart';
import 'swarm_home_view_sheet.dart';
+import 'swarm_search_page.dart';
import 'swarm_session.dart';
import 'swarm_start.dart';
import 'swarm_style.dart';
@@ -35,7 +38,7 @@ import 'swarm_tabs.dart';
import 'swarm_threads.dart';
import 'swarm_threads_page.dart';
import 'swarm_unread.dart';
-import 'team_glance.dart';
+import 'swarm_you_page.dart' show SwarmYouButton;
/// Swarm Home from anywhere in the shell: every page closed and Swarm Home
/// the root again ([PhoneShellScope.onShowSwarm]). Without the shell — a
@@ -59,21 +62,24 @@ bool swarmHomeListed(SwarmInbox inbox, String swarmId, String projectId) {
(reader.snapshot?.projects.any((p) => p.id == projectId) ?? false);
}
-/// Swarm Home, direction C (Tony's prototype C1, 2026-10-30), the Home tab:
-/// its title the Swarm shown, with a switcher to every Swarm, All Swarms and
-/// Join or create ([showSwarmSwitcher]); While you were away, whenever there is
-/// a Swarm to report on ([SwarmAwayCard]); then Threads; then the projects
-/// they pinned on this phone, then the others by their latest activity,
-/// those quiet for a day folded under "Other projects" ([swarmHomeLists]).
-/// Every Swarm's, or the one picked ([SwarmHomePrefs.swarmId]). A round +
-/// floats at its bottom right over them: New message (Tony, 10-30: Slack
-/// Mobile's; [showSwarmNewMessage]). What needs the person is the Activity
-/// tab's; who they are, their models and devices, and Settings, the You
-/// tab's.
+/// Swarm Home, direction C (Tony's prototype C1, 2026-10-30) tuned as
+/// Slack's (2026-11-03), the Home tab: its title the Swarm shown, with a
+/// switcher to every Swarm, All Swarms and Join or create
+/// ([showSwarmSwitcher]), then Search ([openSwarmSearch]) and the person's
+/// avatar, which opens You ([SwarmYouButton]); a pull down at the top opens
+/// Search too ([SwarmPullToSearch]); a row of tiles ([SwarmHomeTiles]): While
+/// you were away whenever there is a Swarm to report on, Threads, and the
+/// agents on the person's computers; then the projects they pinned on this
+/// phone, one line each, then the others by their latest activity, those
+/// quiet for a day folded under "Other projects" ([swarmHomeLists]), Sort and
+/// filter at the right of their first caption. Every Swarm's, or
+/// the one picked ([SwarmHomePrefs.swarmId]). A round + floats at its bottom
+/// right over them: New message (Tony, 10-30: Slack Mobile's;
+/// [showSwarmNewMessage]). What needs the person, and the invitations to a
+/// Swarm, are the Activity tab's.
///
-/// Over the projects, the Threads row ([SwarmThreadsRow]): the threads the
-/// person follows in the Swarms shown, bold while one has new replies.
-/// While you were away's new threads still wait for their own count.
+/// The Threads tile ([SwarmThreadsTile]): the threads the person follows in
+/// the Swarms shown, bright while one has new replies.
///
/// Pushed over another page it has a back button instead of the switcher.
/// Reads the account's [SwarmSession] from the shell; with none, its skeleton
@@ -95,7 +101,7 @@ class SwarmPage extends StatefulWidget {
class _SwarmPageState extends State<SwarmPage> {
SwarmSession? _session;
- /// The Threads row's threads, over the Swarms Home shows, while it is in
+ /// The Threads tile's threads, over the Swarms Home shows, while it is in
/// sight: out of sight, it asks for none.
SwarmThreadsMerge? _threads;
@@ -227,8 +233,24 @@ class _SwarmPageState extends State<SwarmPage> {
openSwarmConversation(context, sent.swarmId, sent.chatId);
}
- /// A pull on Home reads the Swarms; with no computer answering, after looking
- /// for the computers, whatever that finds.
+ /// Refresh, from Sort and filter, reads the Swarms, as a pull on Home did;
+ /// with no computer answering, after looking for the computers, whatever
+ /// that finds. A toast says it is on its way.
+ Future<void> _refresh(BuildContext context, SwarmSession session) async {
+ ScaffoldMessenger.maybeOf(context)
+ ?..hideCurrentSnackBar()
+ ..showSnackBar(
+ const SnackBar(
+ key: ValueKey('swarm-refresh-toast'),
+ duration: Duration(seconds: 2),
+ content: Text('Refreshing…'),
+ ),
+ );
+ await _pulled(context, session);
+ }
+
+ /// Reads the Swarms; with no computer answering, after looking for the
+ /// computers, whatever that finds.
Future<void> _pulled(BuildContext context, SwarmSession session) async {
final inbox = session.inbox;
if (inbox.noComputer) {
@@ -302,14 +324,7 @@ class _SwarmPageState extends State<SwarmPage> {
// place of the body, under the same top bar.
builder: (context) =>
swarmStartView(context, session) ??
- RefreshIndicator(
- onRefresh: () => _pulled(context, session),
- child: ListView(
- physics: const AlwaysScrollableScrollPhysics(),
- padding: _listPadding(context),
- children: _body(context, session),
- ),
- ),
+ _list(context, session, pushed: pushed),
),
),
],
@@ -318,6 +333,26 @@ class _SwarmPageState extends State<SwarmPage> {
);
}
+ /// Home's list: at the root, pulled down at its top, Search; pushed, the
+ /// list alone, with no Sort and filter.
+ Widget _list(
+ BuildContext context,
+ SwarmSession session, {
+ required bool pushed,
+ }) {
+ final list = ListView(
+ key: const ValueKey('swarm-home-list'),
+ physics: const AlwaysScrollableScrollPhysics(),
+ padding: _listPadding(context),
+ children: _body(context, session, pushed: pushed),
+ );
+ if (pushed) return list;
+ return SwarmPullToSearch(
+ onPull: () => openSwarmSearch(context),
+ child: list,
+ );
+ }
+
/// Around Home's rows: the last clears the floating +.
EdgeInsets _listPadding(BuildContext context) => EdgeInsets.fromLTRB(
AppSpace.m,
@@ -343,7 +378,7 @@ class _SwarmPageState extends State<SwarmPage> {
}
if (session == null) {
if (!SwarmScope.accountComingOf(context)) {
- return const SwarmTabHeader('Swarm');
+ return const SwarmTabHeader('Swarm', trailing: SwarmYouButton());
}
// Where the Swarm's name will be: its button has nothing to switch yet.
return SwarmTabHeader(
@@ -352,6 +387,7 @@ class _SwarmPageState extends State<SwarmPage> {
leading: _loadingTile,
titleLabel: 'Loading your Swarm',
onTitle: () {},
+ trailing: const SwarmYouButton(),
);
}
final shown = _shown(session);
@@ -364,9 +400,10 @@ class _SwarmPageState extends State<SwarmPage> {
swarmStartView(context, session) == null;
return SwarmTabHeader(
title,
- trailing: listing || session.inbox.swarms.isEmpty
- ? null
- : _attention(context, session, shown),
+ trailing: _trailing(
+ context,
+ search: swarmStartView(context, session) == null,
+ ),
loading: listing,
leading: listing
? _loadingTile
@@ -380,40 +417,50 @@ class _SwarmPageState extends State<SwarmPage> {
);
}
- /// Sort and filter and Mark all read, at the end of the top bar (the
- /// desktop's, on its Projects heading): a dot on the first with anything but
- /// the defaults on; Mark all read greyed with nothing unread in the Swarms
- /// [shown].
- Widget _attention(
- BuildContext context,
- SwarmSession session,
- List<SwarmListing> shown,
- ) {
- final home = session.home;
- final unread = swarmAnyUnread([
- for (final swarm in shown) ?session.inbox.reader(swarm.id),
- ]);
- return Row(
- mainAxisSize: MainAxisSize.min,
- children: [
+ /// Search, where Home has a list to search ([search]), then the person's
+ /// avatar, at the end of the top bar (Slack's two, Tony 2026-11-03): Search
+ /// in place of Home's search field, and of Sort and filter, which went to
+ /// the projects it sorts ([_viewButton]).
+ Widget _trailing(BuildContext context, {required bool search}) => Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ if (search)
SwarmIconButton(
- key: const ValueKey('swarm-home-view'),
- icon: LucideIcons.listFilter300,
- label:
- 'Sort and filter: ${swarmHomeSortLabel(home)}, '
- '${swarmHomeFilterLabel(home.filter)}',
- dot: home.viewChanged,
- onPressed: () => unawaited(showSwarmHomeViewSheet(context, session)),
+ key: const ValueKey('swarm-home-search'),
+ icon: LucideIcons.search300,
+ label: 'Search',
+ onPressed: () => openSwarmSearch(context),
),
- SwarmIconButton(
- key: const ValueKey('swarm-mark-all-read'),
- icon: LucideIcons.checkCheck300,
- label: 'Mark all read',
- onPressed: unread
- ? () => _markAllRead(context, session, shown)
- : null,
+ const SwarmYouButton(),
+ ],
+ );
+
+ /// Sort and filter, at the right of the projects' first caption (Tony,
+ /// 2026-11-03): a dot with anything but the defaults on, said in words too.
+ /// Mark all read and Refresh are in its sheet, Mark all read greyed with
+ /// nothing unread in the Swarms shown.
+ Widget _viewButton(BuildContext context, SwarmSession session) {
+ final home = session.home;
+ return SwarmIconButton(
+ key: const ValueKey('swarm-home-view'),
+ icon: LucideIcons.listFilter300,
+ size: 20,
+ label:
+ 'Sort and filter: ${swarmHomeSortLabel(home)}, '
+ '${swarmHomeFilterLabel(home.filter)}',
+ dot: home.viewChanged,
+ onPressed: () => unawaited(
+ showSwarmHomeViewSheet(
+ context,
+ session,
+ unread: () => swarmAnyUnread([
+ for (final swarm in _shown(session))
+ ?session.inbox.reader(swarm.id),
+ ]),
+ onMarkAllRead: () => _markAllRead(context, session, _shown(session)),
+ onRefresh: () => unawaited(_refresh(context, session)),
),
- ],
+ ),
);
}
@@ -453,7 +500,13 @@ class _SwarmPageState extends State<SwarmPage> {
];
}
- List<Widget> _body(BuildContext context, SwarmSession session) {
+ /// Pushed over another page ([pushed]), its projects have no Sort and
+ /// filter.
+ List<Widget> _body(
+ BuildContext context,
+ SwarmSession session, {
+ required bool pushed,
+ }) {
final inbox = session.inbox;
// A list that could not be read, no computer answering included, says
// nothing here: it is in the app's log and read again soon, Home as it
@@ -461,7 +514,7 @@ class _SwarmPageState extends State<SwarmPage> {
// ever bring its rows.
if (!inbox.loaded && inbox.swarms.isEmpty) {
final away = swarmHomeListing(inbox)
- ? _awayCard(context, session, const [], null, widget.now())
+ ? _tiles(context, session, const [], null, widget.now())
: null;
return [
?away,
@@ -488,32 +541,56 @@ class _SwarmPageState extends State<SwarmPage> {
? shown.single.id
: null;
final now = widget.now();
- final away = _awayCard(context, session, shown, picked, now);
- final threads = _threads;
+ final tiles = _tiles(context, session, shown, picked, now);
return [
+ ?tiles,
+ ..._projects(
+ context,
+ session,
+ shown,
+ now,
+ first: tiles == null,
+ view: pushed ? null : _viewButton(context, session),
+ ),
+ ];
+ }
+
+ /// The row of tiles over the projects: While you were away ([_awayTile]),
+ /// Threads over the Swarms [shown], and the agents on the person's
+ /// computers, where the app has them; none with none of the three.
+ Widget? _tiles(
+ BuildContext context,
+ SwarmSession session,
+ List<SwarmListing> shown,
+ String? picked,
+ DateTime now,
+ ) {
+ final away = _awayTile(context, session, shown, picked, now);
+ final threads = _threads;
+ final agents = swarmAgentsOf(context);
+ final tiles = [
?away,
if (threads != null && shown.isNotEmpty)
- Padding(
- padding: EdgeInsets.only(top: away == null ? AppSpace.s : AppSpace.m),
- child: SwarmGroup(
- children: [
- SwarmThreadsRow(
- threads: threads,
- onTap: () => openSwarmThreads(context, swarmId: picked),
- ),
- ],
- ),
+ SwarmThreadsTile(
+ threads: threads,
+ onTap: () => openSwarmThreads(context, swarmId: picked),
),
- ..._projects(context, session, shown, now, first: false),
+ if (agents != null)
+ SwarmAgentsTile(agents: agents, onTap: () => agents.openList(context)),
];
+ if (tiles.isEmpty) return null;
+ return Padding(
+ padding: const EdgeInsets.only(top: AppSpace.xs),
+ child: SwarmHomeTiles(children: tiles),
+ );
}
/// While you were away: the work done in the Swarms shown since the person
/// last left the app, or on a first open since it opened, and what needs them
/// there now, each a skeleton while the Swarms, or what waits in them, are
/// not read. Always there, unless no Swarm is left to report on. A tap opens
- /// Activity.
- Widget? _awayCard(
+ /// Activity on Needs you.
+ Widget? _awayTile(
BuildContext context,
SwarmSession session,
List<SwarmListing> shown,
@@ -544,23 +621,21 @@ class _SwarmPageState extends State<SwarmPage> {
if (done == null) break;
}
final needs = swarmNeedsOf(inbox, picked).length;
- return Padding(
- padding: const EdgeInsets.only(top: AppSpace.s),
- child: SwarmAwayCard(
- key: const ValueKey('swarm-away'),
- since: since,
- back: back,
- done: done,
- // None found is not none waiting until all of it is read.
- needs: !listing && (needs > 0 || _needsRead(inbox, shown))
- ? needs
- : null,
- onTap: () {
- if (!showSwarmTab(context, SwarmTab.activity)) {
- openSwarmNeeds(context, swarmId: picked);
- }
- },
- ),
+ return SwarmAwayTile(
+ since: since,
+ back: back,
+ done: done,
+ // None found is not none waiting until all of it is read.
+ needs: !listing && (needs > 0 || _needsRead(inbox, shown)) ? needs : null,
+ onTap: () {
+ if (!showSwarmTab(
+ context,
+ SwarmTab.activity,
+ activity: SwarmActivityFilter.needsYou,
+ )) {
+ openSwarmNeeds(context, swarmId: picked);
+ }
+ },
);
}
@@ -568,13 +643,14 @@ class _SwarmPageState extends State<SwarmPage> {
/// [swarmHomeLists]; a Swarm still to be read has rows on their way, a
/// failed read still trying too, as it is in the log. One no read will bring
/// says so. The first caption is the screen's [first] thing, with nothing
- /// over it.
+ /// over it, and Sort and filter ([view]) at its right.
List<Widget> _projects(
BuildContext context,
SwarmSession session,
List<SwarmListing> shown,
DateTime now, {
required bool first,
+ Widget? view,
}) {
final inbox = session.inbox;
if (inbox.swarms.isEmpty) {
@@ -591,8 +667,6 @@ class _SwarmPageState extends State<SwarmPage> {
}
final several = shown.length > 1;
final projects = <SwarmHomeProject>[];
- final glances = <String, SwarmTeamGlance>{};
- final humans = <String, int>{};
final names = <String, String>{};
final reading = <String>[];
final failed = <(String, String)>[];
@@ -613,8 +687,6 @@ class _SwarmPageState extends State<SwarmPage> {
news: projectNews ?? swarmNoProjectNews,
);
projects.add(row);
- glances[row.key] = swarmTeamGlance(snapshot, projectId: project.id);
- humans[row.key] = swarmProjectPeople(snapshot, project).length;
names[row.key] = swarm.name;
}
case final SwarmReader reader
@@ -657,9 +729,6 @@ class _SwarmPageState extends State<SwarmPage> {
Widget row(SwarmHomeProject project) => SwarmHomeProjectRow(
key: ValueKey('swarm-project-${project.swarmId}-${project.project.id}'),
project: project,
- glance: glances[project.key]!,
- humans: humans[project.key]!,
- now: now,
swarmName: several ? names[project.key] : null,
tagsLoading: asking.contains(project.swarmId),
onTap: () => _openProject(context, project.swarmId, project.project.id),
@@ -674,35 +743,9 @@ class _SwarmPageState extends State<SwarmPage> {
onTap: () => unawaited(_newProject(session, shown)),
)
: null;
- final invited = inbox.invitations;
return [
- if (invited.isNotEmpty) ...[
- SwarmCaption('Invitations', first: first),
- SwarmGroup(
- children: [
- for (final invitation in invited)
- SwarmInvitationRow(
- key: ValueKey('swarm-invitation-${invitation.inviteId}'),
- invitation: invitation,
- joining: inbox.joining.contains(invitation.inviteId),
- onJoin: () => unawaited(inbox.join(invitation)),
- onLater: () => inbox.notNow(invitation),
- ),
- ],
- ),
- if (inbox.joinError case final error?)
- Padding(
- key: const ValueKey('swarm-invitation-error'),
- padding: const EdgeInsets.only(top: AppSpace.s),
- child: Text(
- error,
- style: Tty.of(context)
- .style(color: Tty.of(context).red, size: TtySize.meta),
- ),
- ),
- ],
if (lists.pinned.isNotEmpty) ...[
- SwarmCaption('Pinned', first: first && invited.isEmpty),
+ SwarmCaption('Pinned', first: first, trailing: view),
SwarmGroup(children: [for (final p in lists.pinned) row(p)]),
],
if (lists.recent.isNotEmpty ||
@@ -713,7 +756,8 @@ class _SwarmPageState extends State<SwarmPage> {
create != null) ...[
SwarmCaption(
'Projects',
- first: first && invited.isEmpty && lists.pinned.isEmpty,
+ first: first && lists.pinned.isEmpty,
+ trailing: lists.pinned.isEmpty ? view : null,
),
SwarmGroup(
children: [
@@ -754,16 +798,17 @@ class _SwarmPageState extends State<SwarmPage> {
] else if (reading.isNotEmpty || failed.isNotEmpty)
SwarmCaption(
'Projects',
- first: first && invited.isEmpty && lists.pinned.isEmpty,
+ first: first && lists.pinned.isEmpty,
+ trailing: lists.pinned.isEmpty ? view : null,
),
// A Swarm still to be read has its skeleton below: one is enough.
if (mentionsComing && reading.isEmpty) ...[
const SizedBox(height: 8),
- SwarmSkeletonRows(id: 'swarm-mentions-loading', dot: true),
+ SwarmSkeletonRows(id: 'swarm-mentions-loading', nameOnly: true),
],
for (final (i, id) in reading.indexed) ...[
if (projects.isNotEmpty || i > 0) const SizedBox(height: 8),
- SwarmSkeletonRows(id: 'swarm-projects-loading-$id', dot: true),
+ SwarmSkeletonRows(id: 'swarm-projects-loading-$id', nameOnly: true),
],
for (final (id, error) in failed) ...[
const SizedBox(height: 8),
@@ -821,7 +866,7 @@ class _SwarmPageState extends State<SwarmPage> {
/// Home before the list answers: the projects as rows on their way.
List<Widget> _reading({required bool first}) => [
SwarmCaption('Projects', first: first),
- SwarmSkeletonRows(id: 'swarm-projects-loading', dot: true),
+ SwarmSkeletonRows(id: 'swarm-projects-loading', nameOnly: true),
];
}
diff --git a/mobile/lib/swarm/swarm_project_details.dart b/mobile/lib/swarm/swarm_project_details.dart
new file mode 100644
index 000000000..2a1bc21c8
--- /dev/null
+++ b/mobile/lib/swarm/swarm_project_details.dart
@@ -0,0 +1,283 @@
+import 'package:flutter/material.dart';
+import 'package:lucide_icons_flutter/lucide_icons.dart';
+
+import 'package:harness_mobile/phone/phone_sheet.dart' show PhoneSheetAction;
+import 'package:harness_mobile/phone/phone_shell_scope.dart';
+import 'package:harness_mobile/phone/tty.dart';
+import 'package:harness_mobile/shared/theme/app_space.dart';
+import 'package:harness_mobile/shared/theme/app_theme.dart';
+import 'package:harness_mobile/shared/theme/app_type.dart';
+import 'package:harness_mobile/shared/widgets/touch_target.dart';
+
+import 'swarm_invites.dart' show swarmMayInvite;
+import 'swarm_leaderboard.dart' show swarmProjectPeople;
+import 'swarm_project_team.dart' show swarmProjectHeads;
+import 'swarm_reader.dart';
+import 'swarm_row.dart';
+import 'swarm_session.dart';
+import 'swarm_start.dart' show SwarmComputers;
+import 'team_glance.dart';
+
+/// A project's details, from a tap on its name in its chat's header, as a
+/// channel's name opens them in Slack (Tony, 2026-11-03): its #name over who
+/// is on it; quick actions — its chat's Notifications ([onNotifications]),
+/// Invite for the Swarm's owner alone ([onInvite], [swarmMayInvite]), and
+/// Open terminal for someone who may write, by the menu's rule
+/// (`swarmTerminalAction`); then Status, Work, Team with who is on it, and
+/// Leaderboard. A tap closes the sheet and hands back what it opens, for the
+/// page to open once the sheet is gone; the terminal opens at once, as the
+/// menu's does.
+class SwarmProjectDetailsSheet extends StatelessWidget {
+ const SwarmProjectDetailsSheet({
+ super.key,
+ required this.reader,
+ required this.projectId,
+ required this.terminal,
+ required this.onStatus,
+ required this.onWork,
+ required this.onTeam,
+ required this.onLeaderboard,
+ this.onNotifications,
+ this.onInvite,
+ });
+
+ final SwarmReader reader;
+ final String projectId;
+
+ /// The PM's terminal, read at each build: null for someone who may not
+ /// write, or with the project gone.
+ final PhoneSheetActionOf terminal;
+
+ final VoidCallback onStatus, onWork, onTeam, onLeaderboard;
+
+ /// Null while the project chat is not read.
+ final VoidCallback? onNotifications;
+
+ /// Null for anyone but the Swarm's owner.
+ final VoidCallback? onInvite;
+
+ @override
+ Widget build(BuildContext context) => ListenableBuilder(
+ listenable: reader,
+ builder: (context, _) {
+ AppTheme.watch(context);
+ final snapshot = reader.snapshot;
+ final project = snapshot?.projectById(projectId);
+ if (snapshot == null || project == null || reader.accessRevoked) {
+ // The page closes it: blank meanwhile.
+ return const SizedBox.shrink();
+ }
+ final heads = swarmProjectHeads(
+ humans: swarmProjectPeople(snapshot, project).length,
+ agents: swarmTeamGlance(snapshot, projectId: projectId).agents.length,
+ );
+ final term = terminal(
+ PhoneShellScope.maybeOf(context),
+ SwarmScope.computersOf(context),
+ );
+ void choose(VoidCallback action) => Navigator.of(context).pop(action);
+ final quick = [
+ if (onNotifications case final open?)
+ _Quick(
+ key: const ValueKey('swarm-project-details-notifications'),
+ icon: LucideIcons.bell300,
+ label: 'Notifications',
+ onTap: () => choose(open),
+ ),
+ if (onInvite case final open? when swarmMayInvite(reader))
+ _Quick(
+ key: const ValueKey('swarm-project-details-invite'),
+ icon: LucideIcons.userPlus300,
+ label: 'Invite',
+ onTap: () => choose(open),
+ ),
+ if (term case final term?)
+ _Quick(
+ key: const ValueKey('swarm-project-details-terminal'),
+ icon: LucideIcons.squareTerminal300,
+ label: term.label,
+ hint: term.value,
+ onTap: term.enabled
+ ? () {
+ Navigator.of(context).pop();
+ term.onTap();
+ }
+ : null,
+ ),
+ ];
+ return SafeArea(
+ top: false,
+ child: ListView(
+ shrinkWrap: true,
+ padding: const EdgeInsets.fromLTRB(
+ AppSpace.m,
+ 0,
+ AppSpace.m,
+ AppSpace.l,
+ ),
+ children: [
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: AppSpace.xs),
+ child: Text(
+ '#${project.name}',
+ key: const ValueKey('swarm-project-details-title'),
+ maxLines: 2,
+ overflow: TextOverflow.ellipsis,
+ style: Tty.of(context)
+ .style(size: 20, weight: FontWeight.w600)
+ .copyWith(height: 1.25),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.fromLTRB(
+ AppSpace.xs,
+ AppSpace.xs,
+ AppSpace.xs,
+ 0,
+ ),
+ child: Text(
+ heads,
+ style: AppType.caption(color: AppPalette.textSecondary),
+ ),
+ ),
+ if (quick.isNotEmpty) ...[
+ const SizedBox(height: AppSpace.l),
+ Row(
+ children: [
+ for (final (i, action) in quick.indexed) ...[
+ if (i > 0) const SizedBox(width: AppSpace.s),
+ Expanded(child: action),
+ ],
+ ],
+ ),
+ ],
+ const SizedBox(height: AppSpace.m),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ _row(
+ 'status',
+ LucideIcons.activity300,
+ 'Status',
+ () => choose(onStatus),
+ ),
+ _row(
+ 'work',
+ LucideIcons.listChecks300,
+ 'Work',
+ () => choose(onWork),
+ ),
+ _row(
+ 'team',
+ LucideIcons.users300,
+ 'Team',
+ () => choose(onTeam),
+ value: heads,
+ ),
+ _row(
+ 'leaderboard',
+ LucideIcons.trophy300,
+ 'Leaderboard',
+ () => choose(onLeaderboard),
+ ),
+ ],
+ ),
+ ],
+ ),
+ );
+ },
+ );
+
+ Widget _row(
+ String name,
+ IconData icon,
+ String title,
+ VoidCallback onTap, {
+ String? value,
+ }) => SwarmRow(
+ key: ValueKey('swarm-project-details-$name'),
+ leading: Icon(icon, size: 18, color: AppPalette.textSecondary),
+ title: title,
+ trailing: value == null
+ ? null
+ : Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(value, style: AppType.caption(color: AppPalette.textFaint)),
+ const SizedBox(width: AppSpace.xs),
+ Icon(
+ LucideIcons.chevronRight300,
+ size: 18,
+ color: AppPalette.textFaint,
+ ),
+ ],
+ ),
+ onTap: onTap,
+ );
+}
+
+/// The terminal's action for the shell and computers a sheet is under.
+typedef PhoneSheetActionOf = PhoneSheetAction? Function(
+ PhoneShellScope? shell,
+ SwarmComputers? computers,
+);
+
+/// A quick action: its glyph in a round, its name under it; greyed, with
+/// why ([hint]) heard, when it cannot open.
+class _Quick extends StatelessWidget {
+ const _Quick({
+ super.key,
+ required this.icon,
+ required this.label,
+ required this.onTap,
+ this.hint,
+ });
+
+ final IconData icon;
+ final String label;
+ final String? hint;
+ final VoidCallback? onTap;
+
+ @override
+ Widget build(BuildContext context) {
+ final ink = onTap == null ? AppPalette.textFaint : AppPalette.textPrimary;
+ return Semantics(
+ button: true,
+ enabled: onTap != null,
+ label: [label, ?hint].join(', '),
+ excludeSemantics: true,
+ onTap: onTap,
+ child: Material(
+ color: AppPalette.swarmSearchSurface,
+ borderRadius: BorderRadius.circular(AppCard.radius),
+ child: InkWell(
+ borderRadius: BorderRadius.circular(AppCard.radius),
+ onTap: onTap,
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(minHeight: minTouchTarget + 28),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(
+ horizontal: AppSpace.xs,
+ vertical: AppSpace.m,
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Icon(icon, size: 22, color: ink),
+ const SizedBox(height: AppSpace.xs + 2),
+ Text(
+ label,
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ textAlign: TextAlign.center,
+ style: AppType.caption(color: ink),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/mobile/lib/swarm/swarm_project_page.dart b/mobile/lib/swarm/swarm_project_page.dart
index f9f3c97fe..2254b85ab 100644
--- a/mobile/lib/swarm/swarm_project_page.dart
+++ b/mobile/lib/swarm/swarm_project_page.dart
@@ -22,9 +22,11 @@ import 'swarm_conversation_page.dart';
import 'swarm_home_keeper.dart';
import 'swarm_home_rows.dart';
import 'swarm_inbox.dart';
+import 'swarm_invites_sheet.dart' show SwarmInvitesSheet;
import 'swarm_leaderboard.dart';
import 'swarm_message_row.dart';
import 'swarm_pm_chat.dart';
+import 'swarm_project_details.dart';
import 'swarm_project_status.dart';
import 'swarm_project_tabs.dart';
import 'swarm_project_tasks.dart';
@@ -502,6 +504,55 @@ class _SwarmProjectPageState extends State<SwarmProjectPage> {
),
);
+ /// The project's details, from a tap on its name ([SwarmProjectDetailsSheet]),
+ /// as the menu's sheets open: what it hands back opens once it is gone.
+ void _openDetails(
+ SwarmSession session,
+ SwarmReader reader,
+ SuperTabSnapshot snapshot,
+ SuperTabProject project,
+ ) {
+ if (_sheet != null || !mounted) return;
+ bool allowed() =>
+ !reader.accessRevoked &&
+ reader.snapshot?.projectById(project.id) != null &&
+ swarmCanWrite(reader);
+ final chatId = project.leadConversationId;
+ final route = swarmSheetRoute<VoidCallback>(
+ context,
+ builder: (_) => SwarmProjectDetailsSheet(
+ reader: reader,
+ projectId: project.id,
+ terminal: (shell, computers) => allowed()
+ ? swarmTerminalAction(
+ agent: () => swarmProjectPm(reader.snapshot, project.id),
+ allowed: allowed,
+ shell: shell,
+ computers: computers,
+ )
+ : null,
+ onStatus: _openStatusSheet,
+ onWork: _openWork,
+ onTeam: _openTeamSheet,
+ onLeaderboard: _openLeaderboardSheet,
+ onNotifications: snapshot.conversation(chatId) == null
+ ? null
+ : () => unawaited(showSwarmNotifySheet(context, reader, chatId)),
+ onInvite: () => _openSheet(
+ (_) => SwarmInvitesSheet(session: session, reader: reader),
+ ),
+ ),
+ );
+ setState(() => _sheet = route);
+ unawaited(
+ Navigator.of(context).push(route).then((action) {
+ if (!mounted) return;
+ if (_sheet == route) setState(() => _sheet = null);
+ action?.call();
+ }),
+ );
+ }
+
/// Closes the sheet open, if any, and a dialog or sheet over it, with what
/// it shows (Approve's question): once this frame is done, as a page that
/// lost its project, or is going away, may not change the navigator while
@@ -541,6 +592,11 @@ class _SwarmProjectPageState extends State<SwarmProjectPage> {
return SwarmTopBar(
leading: back,
title: _homeC ? '#${project.name}' : project.name,
+ // Swarm Home C: the name opens the project's details, as Slack's does.
+ onTitle: _homeC
+ ? () => _openDetails(session, reader, snapshot, project)
+ : null,
+ titleLabel: _homeC ? '#${project.name}, project details' : null,
line: KeyedSubtree(
key: const ValueKey('swarm-project-team-line'),
child: _homeC
diff --git a/mobile/lib/swarm/swarm_search_page.dart b/mobile/lib/swarm/swarm_search_page.dart
new file mode 100644
index 000000000..782792fbe
--- /dev/null
+++ b/mobile/lib/swarm/swarm_search_page.dart
@@ -0,0 +1,639 @@
+import 'dart:async';
+
+import 'package:flutter/material.dart';
+import 'package:lucide_icons_flutter/lucide_icons.dart';
+
+import 'package:harness_mobile/phone/out_of_sight.dart';
+import 'package:harness_mobile/phone/phone_navigation.dart';
+import 'package:harness_mobile/phone/tty.dart';
+import 'package:harness_mobile/shared/theme/app_space.dart';
+import 'package:harness_mobile/shared/theme/app_theme.dart';
+import 'package:harness_mobile/shared/theme/app_type.dart';
+import 'package:harness_mobile/shared/widgets/touch_target.dart';
+
+import 'swarm_agents.dart';
+import 'swarm_buddy.dart';
+import 'swarm_conversation_page.dart' show openSwarmConversation;
+import 'swarm_home_list.dart' show swarmProjectActivity;
+import 'swarm_new_message_sheet.dart' show swarmSearchFold;
+import 'swarm_project_page.dart' show openSwarmProject;
+import 'swarm_row.dart';
+import 'swarm_session.dart';
+import 'swarm_style.dart';
+import 'team_glance.dart' show SwarmAgentState;
+
+/// What Search lists, one kind to a chip (Slack's Search, Tony, 2026-11-03).
+/// People have no page of their own in Swarm yet, so Search has none.
+enum SwarmSearchKind {
+ /// What moved last, before anything is typed; every kind once there is.
+ recent('Recent'),
+ projects('Projects'),
+
+ /// The person's own Buddy chats.
+ chats('Chats'),
+
+ /// The harnesses on their computers ([SwarmAgents]).
+ agents('Agents');
+
+ const SwarmSearchKind(this.label);
+ final String label;
+}
+
+/// One thing Search can open.
+@immutable
+class SwarmSearchHit {
+ const SwarmSearchHit({
+ required this.kind,
+ required this.key,
+ required this.title,
+ required this.detail,
+ required this.open,
+ this.at,
+ this.state,
+ });
+
+ /// Projects, Chats or Agents: never Recent.
+ final SwarmSearchKind kind;
+
+ /// Stable across reads: the row's key.
+ final String key;
+
+ /// "#mobile", "Wren · mobile", an agent's name.
+ final String title;
+
+ /// Where it is: its Swarm, or the agent's computer and engine.
+ final String detail;
+
+ /// When it last moved, where that is known: Recent's order.
+ final DateTime? at;
+
+ /// An agent's state, as its dot: working, waiting, or neither.
+ final SwarmAgentState? state;
+
+ /// Opens it over [context]'s page.
+ final void Function(BuildContext context) open;
+}
+
+/// Everything Search can open in [session]'s Swarms, and of [agents]: each
+/// project the person reads and their own Buddy chat in it, by Swarm, then
+/// the agents. A Swarm not read, or no longer theirs to read, has nothing;
+/// [failed] says when one could not be read, so none found is never said for
+/// a Swarm that failed.
+({List<SwarmSearchHit> hits, bool reading, bool failed}) swarmSearchCatalog(
+ SwarmSession session,
+ SwarmAgents? agents,
+) {
+ final inbox = session.inbox;
+ final hits = <SwarmSearchHit>[];
+ var reading = !inbox.loaded && inbox.error == null && !inbox.noComputer;
+ var failed = !inbox.loaded && (inbox.error != null || inbox.noComputer);
+ for (final swarm in inbox.swarms) {
+ final reader = inbox.reader(swarm.id);
+ if (reader == null || reader.accessRevoked) continue;
+ final snapshot = reader.snapshot;
+ if (snapshot == null) {
+ if (reader.error != null && !reader.updateRequired) {
+ failed = true;
+ } else if (!reader.updateRequired) {
+ reading = true;
+ }
+ continue;
+ }
+ final activity = swarmProjectActivity(snapshot, reader.buddies);
+ final me = snapshot.people
+ .where((p) => p.id == reader.accountId)
+ .firstOrNull;
+ for (final project in snapshot.projects) {
+ // As New message reads it: a private project is its owner's and its
+ // members'.
+ if (project.isPrivate &&
+ project.ownerId != reader.accountId &&
+ (me == null || !project.hasMember(me))) {
+ continue;
+ }
+ final (swarmId, projectId) = (swarm.id, project.id);
+ hits.add(
+ SwarmSearchHit(
+ kind: SwarmSearchKind.projects,
+ key: 'project-$swarmId-$projectId',
+ title: '#${project.name}',
+ detail: swarm.name,
+ at: activity[projectId],
+ open: (context) =>
+ openSwarmProject(context, swarmId: swarmId, projectId: projectId),
+ ),
+ );
+ final own = swarmBuddyChat(reader, projectId);
+ if (own != null &&
+ own.projectId == projectId &&
+ !own.archived &&
+ !swarmIsOldBuddyChat(reader, own.id) &&
+ own.buddyOwnerId == reader.accountId) {
+ final chatId = own.id;
+ hits.add(
+ SwarmSearchHit(
+ kind: SwarmSearchKind.chats,
+ key: 'chat-$swarmId-$chatId',
+ title: '${swarmBuddyName(reader, projectId)} · ${project.name}',
+ detail: swarm.name,
+ at: own.changedAt,
+ open: (context) => openSwarmConversation(context, swarmId, chatId),
+ ),
+ );
+ }
+ }
+ }
+ for (final agent in agents?.agents ?? const <SwarmAgentRef>[]) {
+ hits.add(
+ SwarmSearchHit(
+ kind: SwarmSearchKind.agents,
+ key: 'agent-${agent.machineId}-${agent.agentId}',
+ title: agent.name,
+ detail: [agent.machine, ?agent.engine].join(' · '),
+ state: agent.waiting
+ ? SwarmAgentState.waiting
+ : agent.working
+ ? SwarmAgentState.working
+ : null,
+ open: (context) => agents!.open(context, agent),
+ ),
+ );
+ }
+ return (hits: hits, reading: reading, failed: failed);
+}
+
+/// How many Recent lists before anything is typed.
+const swarmSearchRecent = 12;
+
+/// What [kind] lists of [hits] for [query]. With nothing typed: Recent, what
+/// moved last first; any other kind, all of it in the catalog's order. With
+/// something typed, what matches it — case and accents aside, as New
+/// message's To: matches ([swarmSearchFold]) — those starting with it first,
+/// then those with a word starting with it, then the rest that hold it, its
+/// title before where it is; Recent then lists every kind.
+List<SwarmSearchHit> swarmSearchFind(
+ List<SwarmSearchHit> hits,
+ SwarmSearchKind kind,
+ String query,
+) {
+ final q = swarmSearchFold(query.trim());
+ final of = kind == SwarmSearchKind.recent
+ ? hits
+ : [
+ for (final hit in hits)
+ if (hit.kind == kind) hit,
+ ];
+ if (q.isEmpty) {
+ if (kind != SwarmSearchKind.recent) return of;
+ final moved = [
+ for (final hit in of)
+ if (hit.at != null) hit,
+ ]..sort((a, b) => b.at!.compareTo(a.at!));
+ return moved.take(swarmSearchRecent).toList();
+ }
+ int? rank(SwarmSearchHit hit) {
+ final title = swarmSearchFold(hit.title);
+ final bare = title.startsWith('#') ? title.substring(1) : title;
+ if (bare.startsWith(q) || title.startsWith(q)) return 0;
+ if (title.split(_wordGap).any((word) => word.startsWith(q))) return 1;
+ if (title.contains(q)) return 2;
+ if (swarmSearchFold(hit.detail).contains(q)) return 3;
+ return null;
+ }
+
+ final ranked = [
+ for (final (i, hit) in of.indexed)
+ if (rank(hit) case final r?) (r, i, hit),
+ ]..sort((a, b) => a.$1 != b.$1 ? a.$1 - b.$1 : a.$2 - b.$2);
+ return [for (final (_, _, hit) in ranked) hit];
+}
+
+final _wordGap = RegExp(r'[\s·_\-./]+');
+
+/// Opens Search over [context]'s page: from Home's search field, or a pull
+/// down at the top of Home.
+void openSwarmSearch(BuildContext context) => unawaited(
+ Navigator.of(context)
+ .push(phoneRoute((_) => const SwarmSearchPage(), listensForItself: true)),
+);
+
+/// Search (Slack's, Tony 2026-11-03): the field, focused, over chips —
+/// Recent · Projects · Chats · Agents — each a page a sideways swipe also
+/// turns to; under them what the open chip lists for what is typed
+/// ([swarmSearchFind]). A row opens its project, chat or agent over Search,
+/// and back comes back to it as it was.
+class SwarmSearchPage extends StatefulWidget {
+ const SwarmSearchPage({super.key});
+
+ @override
+ State<SwarmSearchPage> createState() => _SwarmSearchPageState();
+}
+
+class _SwarmSearchPageState extends State<SwarmSearchPage> {
+ final _field = TextEditingController();
+ final _pages = PageController();
+ var _kind = SwarmSearchKind.recent;
+
+ @override
+ void initState() {
+ super.initState();
+ _field.addListener(_typed);
+ }
+
+ String _query = '';
+
+ void _typed() {
+ if (_field.text == _query) return;
+ setState(() => _query = _field.text);
+ }
+
+ @override
+ void dispose() {
+ _field
+ ..removeListener(_typed)
+ ..dispose();
+ _pages.dispose();
+ super.dispose();
+ }
+
+ List<SwarmSearchKind> _kinds(SwarmAgents? agents) => [
+ for (final kind in SwarmSearchKind.values)
+ if (kind != SwarmSearchKind.agents || agents != null) kind,
+ ];
+
+ void _choose(List<SwarmSearchKind> kinds, SwarmSearchKind kind) {
+ final page = kinds.indexOf(kind);
+ if (page < 0 || !_pages.hasClients) return;
+ setState(() => _kind = kind);
+ if (MediaQuery.disableAnimationsOf(context)) {
+ _pages.jumpToPage(page);
+ } else {
+ unawaited(
+ _pages.animateToPage(
+ page,
+ duration: const Duration(milliseconds: 220),
+ curve: Curves.easeOutCubic,
+ ),
+ );
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ AppTheme.watch(context);
+ final session = SwarmScope.of(context);
+ final agents = swarmAgentsOf(context);
+ final kinds = _kinds(agents);
+ return Scaffold(
+ backgroundColor: Tty.of(context).ground,
+ body: SafeArea(
+ bottom: false,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ _top(context),
+ SingleChildScrollView(
+ scrollDirection: Axis.horizontal,
+ padding: const EdgeInsets.fromLTRB(
+ AppSpace.m,
+ AppSpace.xs,
+ AppSpace.m,
+ AppSpace.s,
+ ),
+ child: Row(
+ children: [
+ for (final (i, kind) in kinds.indexed) ...[
+ if (i > 0) const SizedBox(width: AppSpace.s),
+ _Chip(
+ key: ValueKey('swarm-search-kind-${kind.name}'),
+ label: kind == SwarmSearchKind.recent && _query.isNotEmpty
+ ? 'All'
+ : kind.label,
+ selected: kind == _kind,
+ onTap: () => _choose(kinds, kind),
+ ),
+ ],
+ ],
+ ),
+ ),
+ Expanded(
+ child: session == null
+ ? const SizedBox.shrink()
+ : ListenWhileInSight(
+ listenable: Listenable.merge([
+ session,
+ session.inbox,
+ session.home,
+ ?agents,
+ ]),
+ builder: (context) {
+ final catalog = swarmSearchCatalog(session, agents);
+ return PageView(
+ key: const ValueKey('swarm-search-pages'),
+ controller: _pages,
+ onPageChanged: (page) =>
+ setState(() => _kind = kinds[page]),
+ children: [
+ for (final kind in kinds)
+ _Results(
+ key: ValueKey('swarm-search-page-${kind.name}'),
+ kind: kind,
+ query: _query,
+ hits: swarmSearchFind(
+ catalog.hits,
+ kind,
+ _query,
+ ),
+ reading: catalog.reading,
+ failed: catalog.failed,
+ ),
+ ],
+ );
+ },
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+
+ Widget _top(BuildContext context) => Padding(
+ padding: const EdgeInsets.fromLTRB(
+ AppSpace.xs,
+ AppSpace.xs,
+ AppSpace.m,
+ AppSpace.xs,
+ ),
+ child: Row(
+ children: [
+ SwarmBackButton(onPressed: () => Navigator.of(context).maybePop()),
+ Expanded(
+ child: Material(
+ color: AppPalette.swarmSearchSurface,
+ shape: const StadiumBorder(),
+ clipBehavior: Clip.antiAlias,
+ child: TextField(
+ key: const ValueKey('swarm-search-field'),
+ controller: _field,
+ autofocus: true,
+ textInputAction: TextInputAction.search,
+ style: AppType.label(color: AppPalette.textPrimary),
+ cursorColor: AppPalette.swarmAccent,
+ // None of the app's field look: its fill and its outline,
+ // accent once focused, would be cut by the pill to two blue
+ // arcs at its ends.
+ decoration: InputDecoration(
+ isDense: true,
+ filled: false,
+ border: InputBorder.none,
+ enabledBorder: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: 'Search chats, projects, agents',
+ hintStyle: AppType.label(color: AppPalette.textFaint),
+ prefixIcon: Icon(
+ LucideIcons.search300,
+ size: 18,
+ color: AppPalette.textSecondary,
+ ),
+ suffixIcon: _query.isEmpty
+ ? null
+ : SwarmIconButton(
+ key: const ValueKey('swarm-search-clear'),
+ icon: LucideIcons.x300,
+ label: 'Clear search',
+ onPressed: _field.clear,
+ ),
+ contentPadding: const EdgeInsets.symmetric(
+ vertical: AppSpace.m,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+}
+
+/// One chip's page: its hits, or why there are none.
+class _Results extends StatelessWidget {
+ const _Results({
+ super.key,
+ required this.kind,
+ required this.query,
+ required this.hits,
+ required this.reading,
+ required this.failed,
+ });
+
+ final SwarmSearchKind kind;
+ final String query;
+ final List<SwarmSearchHit> hits;
+ final bool reading, failed;
+
+ @override
+ Widget build(BuildContext context) {
+ final note = AppType.caption(color: AppPalette.textSecondary, height: 1.35);
+ final typed = query.trim().isNotEmpty;
+ // A drag on the results puts the keyboard away, as Slack's does — a
+ // short list too, and on Android, where a list that cannot scroll
+ // sends no scroll update for `keyboardDismissBehavior` to hear.
+ return NotificationListener<ScrollStartNotification>(
+ onNotification: (scroll) {
+ if (scroll.dragDetails != null) FocusScope.of(context).unfocus();
+ return false;
+ },
+ child: _list(context, note, typed),
+ );
+ }
+
+ Widget _list(BuildContext context, TextStyle note, bool typed) {
+ return ListView(
+ physics: const AlwaysScrollableScrollPhysics(),
+ padding: EdgeInsets.fromLTRB(
+ AppSpace.m,
+ AppSpace.xs,
+ AppSpace.m,
+ MediaQuery.paddingOf(context).bottom + AppSpace.xl,
+ ),
+ children: [
+ if (failed)
+ Padding(
+ padding: const EdgeInsets.fromLTRB(
+ AppSpace.xs,
+ 0,
+ AppSpace.xs,
+ AppSpace.s,
+ ),
+ child: Text(
+ 'Some Swarms could not be read.',
+ key: const ValueKey('swarm-search-failed'),
+ style: note,
+ ),
+ ),
+ if (hits.isEmpty && reading)
+ SwarmSkeletonRows(id: 'swarm-search-loading')
+ else if (hits.isEmpty)
+ Padding(
+ padding: const EdgeInsets.symmetric(
+ horizontal: AppSpace.xs,
+ vertical: AppSpace.s,
+ ),
+ child: Text(
+ typed
+ ? 'Nothing matches “${query.trim()}”.'
+ : switch (kind) {
+ SwarmSearchKind.recent => 'Nothing moved yet.',
+ SwarmSearchKind.projects => 'No project yet.',
+ SwarmSearchKind.chats => 'No Buddy chat yet.',
+ SwarmSearchKind.agents => 'No agent yet.',
+ },
+ key: const ValueKey('swarm-search-none'),
+ style: note,
+ ),
+ )
+ else
+ SwarmGroup(
+ children: [
+ for (final hit in hits)
+ SwarmRow(
+ key: ValueKey('swarm-search-hit-${hit.key}'),
+ leading: _Lead(hit),
+ title: hit.title,
+ detail: SwarmRow.line(hit.detail),
+ onTap: () => hit.open(context),
+ ),
+ ],
+ ),
+ ],
+ );
+ }
+}
+
+/// A hit's mark: its kind's glyph, or an agent's state as a dot.
+class _Lead extends StatelessWidget {
+ const _Lead(this.hit);
+
+ final SwarmSearchHit hit;
+
+ @override
+ Widget build(BuildContext context) => ExcludeSemantics(
+ child: SizedBox.square(
+ dimension: 20,
+ child: switch (hit.kind) {
+ SwarmSearchKind.agents => Center(
+ child: Container(
+ width: 8,
+ height: 8,
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ color: switch (hit.state) {
+ final state? => swarmStateColor(state),
+ null => AppPalette.textFaint,
+ },
+ ),
+ ),
+ ),
+ SwarmSearchKind.chats => Icon(
+ LucideIcons.messageCircle300,
+ size: 18,
+ color: AppPalette.textSecondary,
+ ),
+ _ => Icon(
+ LucideIcons.hash300,
+ size: 18,
+ color: AppPalette.textSecondary,
+ ),
+ },
+ ),
+ );
+}
+
+/// A chip: its name in a pill a thumb can find, filled while it is open.
+/// The row of them scrolls sideways on a narrow phone, as Activity's does:
+/// a chip opened by a swipe of the pages scrolls into sight.
+class _Chip extends StatefulWidget {
+ const _Chip({
+ super.key,
+ required this.label,
+ required this.selected,
+ required this.onTap,
+ });
+
+ final String label;
+ final bool selected;
+ final VoidCallback onTap;
+
+ @override
+ State<_Chip> createState() => _ChipState();
+}
+
+class _ChipState extends State<_Chip> {
+ @override
+ void didUpdateWidget(_Chip old) {
+ super.didUpdateWidget(old);
+ if (widget.selected && !old.selected) {
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ if (!mounted) return;
+ unawaited(
+ Scrollable.ensureVisible(
+ context,
+ alignment: 0.5,
+ duration: MediaQuery.disableAnimationsOf(context)
+ ? Duration.zero
+ : const Duration(milliseconds: 220),
+ curve: Curves.easeOutCubic,
+ ),
+ );
+ });
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final (label, selected, onTap) = (
+ widget.label,
+ widget.selected,
+ widget.onTap,
+ );
+ final ink = selected ? AppPalette.windowBg : AppPalette.textPrimary;
+ return Semantics(
+ button: true,
+ selected: selected,
+ label: label,
+ excludeSemantics: true,
+ onTap: onTap,
+ child: Material(
+ color: selected
+ ? AppPalette.textPrimary
+ : AppPalette.swarmSearchSurface,
+ shape: const StadiumBorder(),
+ clipBehavior: Clip.antiAlias,
+ child: InkWell(
+ onTap: onTap,
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(
+ minHeight: minTouchTarget,
+ minWidth: minTouchTarget,
+ ),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: AppSpace.l),
+ child: Center(
+ widthFactor: 1,
+ child: Text(
+ label,
+ style: AppType.label(
+ color: ink,
+ fontWeight: AppFont.semibold,
+ height: 1,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/mobile/lib/swarm/swarm_session_widgets.dart b/mobile/lib/swarm/swarm_session_widgets.dart
index c2cca8a97..4efc30a4d 100644
--- a/mobile/lib/swarm/swarm_session_widgets.dart
+++ b/mobile/lib/swarm/swarm_session_widgets.dart
@@ -19,8 +19,8 @@ import 'swarm_thread.dart';
// the chat's composer and the thread page put together. What each shows is
// worked out by SwarmConversation and SwarmThread; these only draw it.
-/// New session in the chat composer's toolbar, beside @ Tag: on in the
-/// accent. Disabled while the chat [blocked] it, a tap saying why through
+/// New session in the Buddy chat composer's toolbar, right after +: on in
+/// the accent. Disabled while the chat [blocked] it, a tap saying why through
/// [onBlocked] (a phone has no hover).
class SwarmNewSessionChip extends StatelessWidget {
const SwarmNewSessionChip({
@@ -70,12 +70,12 @@ class SwarmNewSessionChip extends StatelessWidget {
widthFactor: 1,
child: Container(
height: 36,
- padding: SwarmComposer.tagPadding,
+ padding: SwarmComposer.pillPadding,
decoration: BoxDecoration(
color: on && !disabled
? AppPalette.accentOnSurface.withValues(alpha: 0.16)
: tty.text.withValues(alpha: 0.08),
- borderRadius: BorderRadius.circular(SwarmComposer.tagRadius),
+ borderRadius: BorderRadius.circular(SwarmComposer.pillRadius),
),
child: Row(
mainAxisSize: MainAxisSize.min,
diff --git a/mobile/lib/swarm/swarm_style.dart b/mobile/lib/swarm/swarm_style.dart
index 01d84bbd9..d63df9b7d 100644
--- a/mobile/lib/swarm/swarm_style.dart
+++ b/mobile/lib/swarm/swarm_style.dart
@@ -57,6 +57,8 @@ class SwarmTopBar extends StatelessWidget {
this.subtitle,
this.line,
this.trailing,
+ this.onTitle,
+ this.titleLabel,
});
final Widget leading;
@@ -69,10 +71,56 @@ class SwarmTopBar extends StatelessWidget {
/// At the bar's end: a [SwarmIconButton].
final Widget? trailing;
+ /// The title, with its line, is a button too: a channel's name opens its
+ /// details in Slack, a project's here. [titleLabel] is how it is heard.
+ final VoidCallback? onTitle;
+ final String? titleLabel;
+
@override
Widget build(BuildContext context) {
AppTheme.watch(context);
final tty = Tty.of(context);
+ Widget words = Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(
+ title,
+ key: const ValueKey('swarm-title'),
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: tty
+ .style(size: 17, weight: FontWeight.w600)
+ .copyWith(height: 1.25),
+ ),
+ if (line case final line?)
+ line
+ else if (subtitle case final subtitle?)
+ Text(
+ subtitle,
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: AppType.caption(color: AppPalette.textSecondary),
+ ),
+ ],
+ );
+ if (onTitle case final onTitle?) {
+ words = Semantics(
+ button: true,
+ label: titleLabel,
+ onTap: onTitle,
+ excludeSemantics: titleLabel != null,
+ child: InkWell(
+ key: const ValueKey('swarm-title-button'),
+ borderRadius: BorderRadius.circular(AppCard.insetRadius),
+ onTap: onTitle,
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(minHeight: minTouchTarget),
+ child: Align(alignment: Alignment.centerLeft, child: words),
+ ),
+ ),
+ );
+ }
return ConstrainedBox(
constraints: const BoxConstraints(minHeight: 52),
child: Padding(
@@ -86,32 +134,7 @@ class SwarmTopBar extends StatelessWidget {
children: [
leading,
const SizedBox(width: 4),
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisSize: MainAxisSize.min,
- children: [
- Text(
- title,
- key: const ValueKey('swarm-title'),
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: tty
- .style(size: 17, weight: FontWeight.w600)
- .copyWith(height: 1.25),
- ),
- if (line case final line?)
- line
- else if (subtitle case final subtitle?)
- Text(
- subtitle,
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: AppType.caption(color: AppPalette.textSecondary),
- ),
- ],
- ),
- ),
+ Expanded(child: words),
?trailing,
],
),
@@ -251,7 +274,7 @@ class SwarmTabHeader extends StatelessWidget {
}
/// A caption over a card, in sentence case, with maybe a count, or a
-/// [note], at its right.
+/// [note], or a control ([trailing]), at its right.
class SwarmCaption extends StatelessWidget {
const SwarmCaption(
this.text, {
@@ -261,6 +284,7 @@ class SwarmCaption extends StatelessWidget {
this.countKey = const ValueKey('swarm-needs-count'),
this.note,
this.first = false,
+ this.trailing,
});
final String text;
@@ -278,6 +302,12 @@ class SwarmCaption extends StatelessWidget {
/// The first thing on the screen: less room above it.
final bool first;
+ /// A control at its right end, a thumb's touch tall (44 points): Home's
+ /// Sort and filter on its projects (Tony, 2026-11-03). Centred on the
+ /// words, it takes the room above and under them, so they stay about where
+ /// they are without it.
+ final Widget? trailing;
+
@override
Widget build(BuildContext context) {
AppTheme.watch(context);
@@ -285,6 +315,22 @@ class SwarmCaption extends StatelessWidget {
final quiet = AppType.caption(
color: Color.lerp(AppPalette.textFaint, AppPalette.textSecondary, .5),
);
+ if (trailing case final trailing?) {
+ return Padding(
+ padding: EdgeInsets.fromLTRB(
+ AppSpace.xs,
+ first ? 0 : AppSpace.s + 2,
+ 0,
+ 0,
+ ),
+ child: Row(
+ children: [
+ Expanded(child: Text(text, style: quiet)),
+ trailing,
+ ],
+ ),
+ );
+ }
return Padding(
padding: EdgeInsets.fromLTRB(
AppSpace.xs,
@@ -354,13 +400,13 @@ class SwarmGroup extends StatelessWidget {
/// tall as the line it stands for ([SkeletonText]), so nothing moves when the
/// row arrives. It stands for a card's row (`SwarmRow`) with a line under its
/// title — a need's — or its title alone ([titleOnly]), or a project's on Home
-/// ([dot]).
+/// ([nameOnly]).
class SwarmSkeletonRow extends StatelessWidget {
const SwarmSkeletonRow({
super.key,
this.round = false,
this.titleOnly = false,
- this.dot = false,
+ this.nameOnly = false,
this.width = .45,
});
@@ -370,9 +416,9 @@ class SwarmSkeletonRow extends StatelessWidget {
/// The row it stands for has no line under its title.
final bool titleOnly;
- /// A project's small dot on Home ([SwarmHomeProjectRow]) rather than a tile,
- /// in the room that row keeps for it.
- final bool dot;
+ /// A project's row on Home ([SwarmHomeProjectRow]): its name alone, with no
+ /// mark before it, on its one line, as tall as it.
+ final bool nameOnly;
/// The title bar's share of the row's words.
final double width;
@@ -382,24 +428,17 @@ class SwarmSkeletonRow extends StatelessWidget {
// The real rows' metrics.
final title = AppType.label(height: 1.3);
final line = AppType.caption(height: 1.35);
+ final titleOnly = this.titleOnly || nameOnly;
return ConstrainedBox(
- constraints: const BoxConstraints(minHeight: 56),
+ constraints: BoxConstraints(minHeight: nameOnly ? minTouchTarget : 56),
child: Padding(
- padding: const EdgeInsets.symmetric(
+ padding: EdgeInsets.symmetric(
horizontal: AppSpace.l,
- vertical: AppSpace.m,
+ vertical: nameOnly ? AppSpace.xs : AppSpace.m,
),
child: Row(
children: [
- if (dot) ...[
- const SizedBox(
- width: 16,
- child: Center(
- child: Skeleton(width: 8, height: 8, shape: BoxShape.circle),
- ),
- ),
- const SizedBox(width: AppSpace.s),
- ] else ...[
+ if (!nameOnly) ...[
Skeleton(
width: 32,
height: 32,
@@ -440,7 +479,7 @@ class SwarmSkeletonRows extends StatelessWidget {
this.rows = 2,
this.round = false,
this.titleOnly = false,
- this.dot = false,
+ this.nameOnly = false,
}) : super(key: ValueKey(id));
final String id;
@@ -452,8 +491,8 @@ class SwarmSkeletonRows extends StatelessWidget {
/// Rows with no line under their titles ([SwarmSkeletonRow.titleOnly]).
final bool titleOnly;
- /// Projects' dots on Home ([SwarmSkeletonRow.dot]).
- final bool dot;
+ /// Projects' rows on Home ([SwarmSkeletonRow.nameOnly]).
+ final bool nameOnly;
@override
Widget build(BuildContext context) {
@@ -465,7 +504,7 @@ class SwarmSkeletonRows extends StatelessWidget {
key: ValueKey('$id-$i'),
round: round,
titleOnly: titleOnly,
- dot: dot,
+ nameOnly: nameOnly,
width: i.isEven ? .45 : .6,
),
),
diff --git a/mobile/lib/swarm/swarm_tabs.dart b/mobile/lib/swarm/swarm_tabs.dart
index 709c02455..e517d078e 100644
--- a/mobile/lib/swarm/swarm_tabs.dart
+++ b/mobile/lib/swarm/swarm_tabs.dart
@@ -8,6 +8,7 @@ import 'package:harness_mobile/shared/theme/app_space.dart';
import 'package:harness_mobile/shared/theme/app_theme.dart';
import 'package:harness_mobile/shared/theme/app_type.dart';
+import 'swarm_activity.dart' show SwarmActivityFilter;
import 'swarm_activity_page.dart';
import 'swarm_buddy_tab.dart';
import 'swarm_page.dart';
@@ -15,8 +16,9 @@ import 'swarm_session.dart';
import 'swarm_style.dart';
import 'swarm_you_page.dart';
-/// Swarm's four tabs, along the foot of the screen in this order, as Tony's
-/// prototype C draws them (2026-10-30).
+/// Swarm's three tabs, along the foot of the screen in this order: Slack's
+/// trio (Tony, 2026-11-03), from prototype C's four (2026-10-30) with You
+/// moved to the avatar at the top of Home and Activity ([SwarmYouButton]).
enum SwarmTab {
/// Swarm Home: the Swarms' projects, and what moved in them.
home,
@@ -26,9 +28,6 @@ enum SwarmTab {
/// What needs the person, and what came for them.
activity,
-
- /// The person: their status, models, devices and Settings.
- you,
}
/// A count on a tab's glyph: blue, or yellow ([warn]) for what waits on the
@@ -66,12 +65,10 @@ class SwarmTabEntry {
/// Swarm's tabs, in the bar's order: each part of Swarm plugs its screen in
/// here, one entry each: Home; Buddy ([SwarmBuddyTabView]) with the Swarms whose
-/// Buddy chat has something unread counted, lit while the Buddy runs; Activity ([SwarmActivityView])
-/// with what waits on the person counted; and You ([SwarmYouPage]).
-/// [onSettings] opens the phone's Settings over the tabs, from You.
-List<SwarmTabEntry> swarmTabs({
- void Function(BuildContext context)? onSettings,
-}) => [
+/// Buddy chat has something unread counted, lit while the Buddy runs; and
+/// Activity ([SwarmActivityView]) with what waits on the person counted. You
+/// ([SwarmYouPage]) is no tab: the avatar on Home and Activity opens it.
+List<SwarmTabEntry> swarmTabs() => [
SwarmTabEntry(
tab: SwarmTab.home,
label: 'Home',
@@ -91,21 +88,21 @@ List<SwarmTabEntry> swarmTabs({
label: 'Activity',
icon: LucideIcons.bell300,
screen: (_) => const SwarmActivityView(),
- badge: (session) => (count: session.activity.badge, warn: true),
- ),
- SwarmTabEntry(
- tab: SwarmTab.you,
- label: 'You',
- icon: LucideIcons.circleUser300,
- screen: (_) => SwarmYouPage(onSettings: onSettings),
+ badge: (session) => (count: swarmActivityTabBadge(session), warn: true),
),
];
/// Opens [tab] of the tabs [context] is under; false under none, as on a
-/// page pushed over them.
-bool showSwarmTab(BuildContext context, SwarmTab tab) {
+/// page pushed over them. With [activity], Activity opens on that filter: a
+/// tile on Home asking for what needs the person, say.
+bool showSwarmTab(
+ BuildContext context,
+ SwarmTab tab, {
+ SwarmActivityFilter? activity,
+}) {
final scope = context.getInheritedWidgetOfExactType<_SwarmTabsScope>();
if (scope == null) return false;
+ if (activity != null) scope.ask(activity);
scope.show(tab);
return true;
}
@@ -121,7 +118,7 @@ bool showSwarmTab(BuildContext context, SwarmTab tab) {
class SwarmTabsPage extends StatefulWidget {
const SwarmTabsPage({super.key, this.onSettings, this.tabs});
- /// The phone's Settings over the tabs, from You.
+ /// The phone's Settings, from You ([SwarmYouSettings]).
final void Function(BuildContext context)? onSettings;
/// The tabs, in the bar's order; [swarmTabs] when null.
@@ -132,8 +129,24 @@ class SwarmTabsPage extends StatefulWidget {
}
class _SwarmTabsPageState extends State<SwarmTabsPage> {
- late final List<SwarmTabEntry> _tabs =
- widget.tabs ?? swarmTabs(onSettings: widget.onSettings);
+ late final List<SwarmTabEntry> _tabs = widget.tabs ?? swarmTabs();
+
+ /// What Activity was last asked to show ([showSwarmTab]).
+ final _activityAsks = ValueNotifier<SwarmActivityAsk?>(null);
+
+ void _ask(SwarmActivityFilter filter) => _activityAsks.value = (
+ filter: filter,
+ n: (_activityAsks.value?.n ?? 0) + 1,
+ );
+
+ /// You, each time the avatar opened it over the tabs. It goes with them:
+ /// Swarm turned off from its own Settings puts the terminal at the root,
+ /// and back from Settings is then the terminal, not a You with no Swarm.
+ final _yous = <Route<void>>[];
+
+ void _youOpened(Route<void> route) => _yous
+ ..removeWhere((you) => !you.isActive)
+ ..add(route);
late SwarmTab _open = _tabs.first.tab;
@@ -157,6 +170,19 @@ class _SwarmTabsPageState extends State<SwarmTabsPage> {
@override
void dispose() {
_session?.showBuddyTab = null;
+ _activityAsks.dispose();
+ // Not while the tree is torn down: once this frame is done.
+ final yous = [..._yous];
+ if (yous.isNotEmpty) {
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ for (final you in yous) {
+ final navigator = you.navigator;
+ if (navigator != null && navigator.mounted && you.isActive) {
+ navigator.removeRoute(you);
+ }
+ }
+ });
+ }
super.dispose();
}
@@ -181,24 +207,32 @@ class _SwarmTabsPageState extends State<SwarmTabsPage> {
},
child: _SwarmTabsScope(
show: _show,
- child: Scaffold(
- backgroundColor: Tty.of(context).ground,
- body: Stack(
- fit: StackFit.expand,
- children: [
- for (final entry in _tabs)
- if (_screens[entry.tab] case final screen?)
- KeptOutOfSight(
- key: ValueKey('swarm-tab-screen-${entry.tab.name}'),
- hidden: entry.tab != _open,
- child: screen,
- ),
- ],
- ),
- bottomNavigationBar: SwarmTabBar(
- tabs: _tabs,
- open: _open,
- onOpen: _show,
+ ask: _ask,
+ child: SwarmActivityAsks(
+ asks: _activityAsks,
+ child: SwarmYouSettings(
+ onSettings: widget.onSettings,
+ onOpened: _youOpened,
+ child: Scaffold(
+ backgroundColor: Tty.of(context).ground,
+ body: Stack(
+ fit: StackFit.expand,
+ children: [
+ for (final entry in _tabs)
+ if (_screens[entry.tab] case final screen?)
+ KeptOutOfSight(
+ key: ValueKey('swarm-tab-screen-${entry.tab.name}'),
+ hidden: entry.tab != _open,
+ child: screen,
+ ),
+ ],
+ ),
+ bottomNavigationBar: SwarmTabBar(
+ tabs: _tabs,
+ open: _open,
+ onOpen: _show,
+ ),
+ ),
),
),
),
@@ -208,16 +242,23 @@ class _SwarmTabsPageState extends State<SwarmTabsPage> {
/// How a screen under the tabs opens another ([showSwarmTab]).
class _SwarmTabsScope extends InheritedWidget {
- const _SwarmTabsScope({required this.show, required super.child});
+ const _SwarmTabsScope({
+ required this.show,
+ required this.ask,
+ required super.child,
+ });
final ValueChanged<SwarmTab> show;
+ /// Activity is asked to show this filter next.
+ final ValueChanged<SwarmActivityFilter> ask;
+
@override
bool updateShouldNotify(_SwarmTabsScope oldWidget) => false;
}
/// The bar along the foot of Swarm's tabs: each tab its glyph over its name,
-/// a quarter of the width and at least 52 points tall, the open one in the
+/// an equal share of the width and at least 52 points tall, the open one in the
/// main ink, a count on a glyph while there is one; over the home indicator,
/// under a hairline.
class SwarmTabBar extends StatelessWidget {
diff --git a/mobile/lib/swarm/swarm_threads_page.dart b/mobile/lib/swarm/swarm_threads_page.dart
index 43c463812..7b48e7b62 100644
--- a/mobile/lib/swarm/swarm_threads_page.dart
+++ b/mobile/lib/swarm/swarm_threads_page.dart
@@ -12,7 +12,6 @@ import 'package:harness_mobile/shared/theme/app_type.dart';
import 'swarm_inbox.dart' show SwarmListing;
import 'swarm_project_page.dart' show swarmChatRoute;
-import 'swarm_row.dart';
import 'swarm_session.dart';
import 'swarm_style.dart';
import 'swarm_threads.dart';
@@ -49,82 +48,6 @@ void openSwarmThreads(BuildContext context, {String? swarmId}) => unawaited(
),
);
-/// Home's Threads row, over the projects: bold while a followed thread has
-/// new replies, the person's tags in threads at its end (desktop's Threads
-/// row, #2434). A tap opens Threads.
-class SwarmThreadsRow extends StatelessWidget {
- const SwarmThreadsRow({
- super.key,
- required this.threads,
- required this.onTap,
- });
-
- final SwarmThreadsMerge threads;
- final VoidCallback onTap;
-
- @override
- Widget build(BuildContext context) => ListenableBuilder(
- listenable: threads,
- builder: (context, _) {
- AppTheme.watch(context);
- final unread = threads.unread, tags = threads.mentions;
- final bright = unread || tags > 0;
- return Material(
- type: MaterialType.transparency,
- child: InkWell(
- key: const ValueKey('swarm-threads-row'),
- onTap: onTap,
- child: ConstrainedBox(
- constraints: const BoxConstraints(minHeight: SwarmRow.height),
- child: Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: AppSpace.l,
- vertical: AppSpace.m,
- ),
- child: Row(
- children: [
- SizedBox(
- width: 16,
- child: Icon(
- LucideIcons.messagesSquare300,
- size: 16,
- color: bright
- ? AppPalette.textPrimary
- : AppPalette.textSecondary,
- ),
- ),
- const SizedBox(width: AppSpace.s),
- Expanded(
- child: Semantics(
- label: unread && tags == 0 ? 'New replies' : null,
- child: Text(
- 'Threads',
- style: AppType.label(
- color: bright
- ? AppPalette.textPrimary
- : AppPalette.textSecondary,
- height: 1.3,
- fontWeight: bright ? AppFont.semibold : null,
- ),
- ),
- ),
- ),
- if (tags > 0)
- SwarmTags(
- tags,
- key: const ValueKey('swarm-threads-tags'),
- filled: true,
- ),
- ],
- ),
- ),
- ),
- ),
- );
- },
- );
-}
-
/// Threads, as Slack's and the desktop's (#2434): the threads the person
/// follows, those with new replies first under New replies, each with its
/// newest replies, then Earlier. Opening it reads what it shows: each new
diff --git a/mobile/lib/swarm/swarm_you_page.dart b/mobile/lib/swarm/swarm_you_page.dart
index caa9fd63d..a8088222a 100644
--- a/mobile/lib/swarm/swarm_you_page.dart
+++ b/mobile/lib/swarm/swarm_you_page.dart
@@ -10,6 +10,7 @@ import 'package:harness_mobile/phone/tty.dart';
import 'package:harness_mobile/shared/theme/app_space.dart';
import 'package:harness_mobile/shared/theme/app_theme.dart';
import 'package:harness_mobile/shared/theme/app_type.dart';
+import 'package:harness_mobile/shared/widgets/touch_target.dart';
import 'package:harness_mobile/theme/app_theme.dart' show AppColors;
import 'model.dart';
@@ -23,7 +24,107 @@ import 'swarm_session.dart';
import 'swarm_start.dart';
import 'swarm_style.dart';
-/// You, the person's own tab, as Tony's prototype C4 draws it (2026-10-30):
+/// Where You's Settings row goes: the shell's, handed down by Swarm's tabs to
+/// whatever opens You from under them ([openSwarmYou]); and the tabs told of
+/// each You opened over them ([onOpened]), to take it with them when they go.
+class SwarmYouSettings extends InheritedWidget {
+ const SwarmYouSettings({
+ super.key,
+ required this.onSettings,
+ this.onOpened,
+ required super.child,
+ });
+
+ final void Function(BuildContext context)? onSettings;
+
+ /// A You opened over the tabs: it goes with them.
+ final ValueChanged<Route<void>>? onOpened;
+
+ @override
+ bool updateShouldNotify(SwarmYouSettings oldWidget) =>
+ onSettings != oldWidget.onSettings || onOpened != oldWidget.onOpened;
+}
+
+/// Opens You over [context]'s page, its Settings the tabs' ([SwarmYouSettings]),
+/// and tells the tabs, which take it with them when they go.
+void openSwarmYou(BuildContext context) {
+ final scope = context.getInheritedWidgetOfExactType<SwarmYouSettings>();
+ final route = phoneRoute(
+ (_) => SwarmYouPage(onSettings: scope?.onSettings),
+ listensForItself: true,
+ );
+ scope?.onOpened?.call(route);
+ unawaited(Navigator.of(context).push(route));
+}
+
+/// Who the person is on You and on its avatar: in the Swarm Home shows alone,
+/// else the first; nothing of them before that Swarm is read, or once the
+/// read is taken away.
+({SuperTabPerson? me, SwarmListing? swarm}) swarmYouOf(SwarmSession? session) {
+ final inbox = session?.inbox;
+ final swarms = inbox?.swarms ?? const <SwarmListing>[];
+ final you =
+ swarms.where((swarm) => swarm.id == session?.home.swarmId).firstOrNull ??
+ swarms.firstOrNull;
+ final reader = you == null ? null : inbox!.reader(you.id);
+ final me = reader == null || reader.accessRevoked
+ ? null
+ : reader.snapshot?.person(reader.accountId);
+ return (me: me, swarm: you);
+}
+
+/// The person's avatar at the end of Home's and Activity's top bars (Slack's
+/// You, Tony 2026-11-03): their face with their status, "You" in their
+/// initial before they are read. A tap opens You ([openSwarmYou]).
+class SwarmYouButton extends StatelessWidget {
+ const SwarmYouButton({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ AppTheme.watch(context);
+ final session = SwarmScope.of(context);
+ Widget face() {
+ final me = swarmYouOf(session).me;
+ final name = me == null || me.email.isEmpty ? 'You' : me.username;
+ final status = me?.statusAt(clock.now())?.label;
+ return Semantics(
+ button: true,
+ label: status == null ? 'You' : 'You, $status',
+ excludeSemantics: true,
+ onTap: () => openSwarmYou(context),
+ child: InkWell(
+ customBorder: const CircleBorder(),
+ onTap: () => openSwarmYou(context),
+ child: SizedBox.square(
+ dimension: minTouchTarget,
+ child: Center(
+ child: SwarmAvatar(
+ id: me?.id ?? 'you',
+ name: name,
+ picture: me?.avatar,
+ size: 30,
+ status: me?.status,
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ return KeyedSubtree(
+ key: const ValueKey('swarm-you-button'),
+ child: session == null
+ ? face()
+ : ListenWhileInSight(
+ listenable: Listenable.merge([session.inbox, session.home]),
+ builder: (context) => face(),
+ ),
+ );
+ }
+}
+
+/// You, as Tony's prototype C4 draws it (2026-10-30), opened from the avatar
+/// on Home and Activity since it stopped being a tab (2026-11-03):
/// who they are in the Swarm Home shows — their face, their name and that
/// Swarm — then their status and their username, each with Change for their
/// profile, where it is set ([showSwarmProfile]); Your models, with how many of their own machines'
@@ -46,6 +147,8 @@ class SwarmYouPage extends StatelessWidget {
AppTheme.watch(context);
final session = SwarmScope.of(context);
final computers = SwarmScope.computersOf(context);
+ // Opened over a page, as the avatar opens it: back to it.
+ final pushed = ModalRoute.isFirstOf(context) == false;
return Scaffold(
backgroundColor: Tty.of(context).ground,
body: SafeArea(
@@ -53,7 +156,15 @@ class SwarmYouPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
- const SwarmTabHeader('You'),
+ if (pushed)
+ SwarmTopBar(
+ leading: SwarmBackButton(
+ onPressed: () => Navigator.of(context).maybePop(),
+ ),
+ title: 'You',
+ )
+ else
+ const SwarmTabHeader('You'),
Expanded(
child: ListenWhileInSight(
listenable: Listenable.merge([
@@ -86,17 +197,9 @@ class SwarmYouPage extends StatelessWidget {
) {
final inbox = session?.inbox;
final swarms = inbox?.swarms ?? const <SwarmListing>[];
- // Who you are: in the Swarm Home shows alone, else the first.
- final you =
- swarms
- .where((swarm) => swarm.id == session?.home.swarmId)
- .firstOrNull ??
- swarms.firstOrNull;
- final reader = you == null ? null : inbox!.reader(you.id);
- // A read taken away keeps nothing of the person or the Swarm.
- final me = reader == null || reader.accessRevoked
- ? null
- : reader.snapshot?.person(reader.accountId);
+ // Who you are: in the Swarm Home shows alone, else the first. A read
+ // taken away keeps nothing of the person or the Swarm.
+ final (:me, swarm: you) = swarmYouOf(session);
final navigator = Navigator.of(context);
void open(Widget page) => unawaited(
navigator.push(phoneRoute((_) => page, listensForItself: true)),
diff --git a/mobile/test/phone/phone_shell_swarm_home_test.dart b/mobile/test/phone/phone_shell_swarm_home_test.dart
index 3456d82a1..79dedc651 100644
--- a/mobile/test/phone/phone_shell_swarm_home_test.dart
+++ b/mobile/test/phone/phone_shell_swarm_home_test.dart
@@ -16,8 +16,8 @@ import 'package:harness_mobile/swarm/swarm_you_page.dart';
import 'devices_fixture.dart';
/// With Swarm on, the app opens on Swarm Home, full screen, with Settings in
-/// the You tab and no way to Harness there: Settings ▸ Swarm off is the way
-/// back to it. With it off, the app opens on the terminal, as it always has.
+/// You — opened from the avatar on Home since 2026-11-03, no longer a tab —
+/// and no way to Harness there: Settings ▸ Swarm off is the way back to it. With it off, the app opens on the terminal, as it always has.
void main() {
late DevicesApp app;
@@ -50,10 +50,16 @@ void main() {
await frames(tester);
}
- /// Row [row] of the You tab, tapped.
- Future<void> youTo(WidgetTester tester, String row) async {
- await tester.tap(key('swarm-tab-you'));
+ /// You, from the avatar at the top of Home.
+ Future<void> openYou(WidgetTester tester) async {
+ expect(key('swarm-tab-you'), findsNothing, reason: 'no You tab');
+ await tester.tap(key('swarm-you-button'));
await frames(tester);
+ }
+
+ /// Row [row] of You, tapped.
+ Future<void> youTo(WidgetTester tester, String row) async {
+ await openYou(tester);
await tester.tap(key(row));
await frames(tester);
}
@@ -124,8 +130,7 @@ void main() {
testWidgets('with Swarm on, You has no Harness: its models, then '
'Settings at its foot', (tester) async {
await open(tester);
- await tester.tap(key('swarm-tab-you'));
- await frames(tester);
+ await openYou(tester);
final you = find.byType(SwarmYouPage);
expect(key('swarm-you-models'), findsOneWidget);
diff --git a/mobile/test/swarm/swarm_activity_feed_page_test.dart b/mobile/test/swarm/swarm_activity_feed_page_test.dart
index 90fb42ae0..d6c47998b 100644
--- a/mobile/test/swarm/swarm_activity_feed_page_test.dart
+++ b/mobile/test/swarm/swarm_activity_feed_page_test.dart
@@ -4,6 +4,7 @@ import 'package:harness_mobile/notify/system_notices.dart';
import 'package:harness_mobile/phone/out_of_sight.dart';
import 'package:harness_mobile/settings/experimental_features.dart';
import 'package:harness_mobile/shared/theme/app_theme.dart' show AppFont;
+import 'package:harness_mobile/swarm/swarm_activity.dart';
import 'package:harness_mobile/swarm/swarm_activity_page.dart';
import 'package:harness_mobile/swarm/swarm_session.dart';
@@ -175,6 +176,13 @@ void main() {
'every device; a list never opened stays unread', (tester) async {
final hidden = ValueNotifier(false);
addTearDown(hidden.dispose);
+ // The tab asked to open on Replies, as a tile asks it: All, which has
+ // the reaction too, is never open.
+ final asks = ValueNotifier<SwarmActivityAsk?>((
+ filter: SwarmActivityFilter.threads,
+ n: 1,
+ ));
+ addTearDown(asks.dispose);
final fake = await pump(
tester,
[
@@ -182,14 +190,22 @@ void main() {
activityRow('x1', kind: 'reaction', emoji: 'check', minute: 12),
],
home: Scaffold(
- body: ValueListenableBuilder(
- valueListenable: hidden,
- builder: (_, out, _) =>
- OutOfSight(hidden: out, child: const SwarmActivityView()),
+ body: SwarmActivityAsks(
+ asks: asks,
+ child: ValueListenableBuilder(
+ valueListenable: hidden,
+ builder: (_, out, _) =>
+ OutOfSight(hidden: out, child: const SwarmActivityView()),
+ ),
),
),
);
- await filter(tester, 'threads');
+ expect(
+ tester
+ .widget<SwarmActivityFilterPill>(key('swarm-activity-filter-threads'))
+ .selected,
+ isTrue,
+ );
// A chat opened from a row is over Activity, not instead of it.
await tester.tap(key('swarm-activity-reply-activity:$tab:r2'));
@@ -214,6 +230,45 @@ void main() {
expect(find.descendant(of: pill, matching: find.text('1')), findsOneWidget);
});
+ testWidgets('All, the tab\'s first, has every row: left, all it showed is '
+ 'read on every device', (tester) async {
+ final hidden = ValueNotifier(false);
+ addTearDown(hidden.dispose);
+ final fake = await pump(
+ tester,
+ [
+ activityRow('r2', minute: 9),
+ activityRow('x1', kind: 'reaction', emoji: 'check', minute: 12),
+ ],
+ home: Scaffold(
+ body: ValueListenableBuilder(
+ valueListenable: hidden,
+ builder: (_, out, _) =>
+ OutOfSight(hidden: out, child: const SwarmActivityView()),
+ ),
+ ),
+ );
+ expect(
+ tester
+ .widget<SwarmActivityFilterPill>(key('swarm-activity-filter-all'))
+ .selected,
+ isTrue,
+ );
+ expect(find.text('River replied to your message'), findsOneWidget);
+ expect(
+ key('swarm-activity-row-activity:$tab:x1'),
+ findsOneWidget,
+ reason: 'the reaction too',
+ );
+
+ hidden.value = true;
+ await tester.pumpAndSettle();
+
+ expect(marks(fake), [
+ {'through': DateTime.utc(2026, 11, 1, 7, 12).toIso8601String()},
+ ]);
+ });
+
testWidgets('a Swarm the person can no longer read leaves the list at once', (
tester,
) async {
diff --git a/mobile/test/swarm/swarm_activity_page_test.dart b/mobile/test/swarm/swarm_activity_page_test.dart
index a6888204e..eecd5b4de 100644
--- a/mobile/test/swarm/swarm_activity_page_test.dart
+++ b/mobile/test/swarm/swarm_activity_page_test.dart
@@ -70,15 +70,16 @@ void main() {
await tester.pumpAndSettle();
}
- testWidgets('four filters, each with its count, each a thumb tall', (
- tester,
- ) async {
+ testWidgets('five filters, All first, each with its count, each a thumb '
+ 'tall', (tester) async {
await pump(tester, activityBackend(page: activityPage));
expect(find.text('Activity'), findsOneWidget);
for (final (name, label, count) in [
+ ('all', 'All', '4'),
('needsYou', 'Needs you', '2'),
- ('mentions', '@', '1'),
+ // A word a screen reader says, on the phone (2026-11-03).
+ ('mentions', 'Mentions', '1'),
('threads', 'Threads', '1'),
('reactions', 'Reactions', '0'),
]) {
diff --git a/mobile/test/swarm/swarm_activity_test.dart b/mobile/test/swarm/swarm_activity_test.dart
index 74362114d..d8c7d98b0 100644
--- a/mobile/test/swarm/swarm_activity_test.dart
+++ b/mobile/test/swarm/swarm_activity_test.dart
@@ -799,6 +799,69 @@ void main() {
expect(reader.readMarks!.threadThrough(leadChat, 'root-1'), 12);
});
});
+
+ group('All', () {
+ List<String> all(SwarmActivity activity) => [
+ for (final item in swarmActivityAll(activity)) item.key,
+ ];
+
+ test('what needs the person first, as Needs you lists it; then tags, '
+ 'replies and reactions, newest first, those with no time last; each '
+ 'row once', () async {
+ final session = await start(backend(page: activityPage));
+ final activity = session.activity;
+ activity.watch();
+ addTearDown(activity.unwatch);
+ await settle();
+ final others = [
+ for (final filter in SwarmActivityFilter.values)
+ if (filter != SwarmActivityFilter.needsYou) ...activity.items(filter),
+ ];
+ expect(others, isNotEmpty, reason: 'tags, threads, reactions read');
+
+ final rows = swarmActivityAll(activity);
+
+ expect(
+ all(activity).take(2),
+ keys(activity, SwarmActivityFilter.needsYou),
+ );
+ expect(all(activity).toSet(), hasLength(rows.length), reason: 'once');
+ expect(all(activity).skip(2).toSet(), {
+ for (final item in others) item.key,
+ });
+ final times = [for (final item in rows.skip(2)) item.at];
+ final dated = times.takeWhile((at) => at != null).toList();
+ expect(times.skip(dated.length), everyElement(isNull));
+ for (var i = 1; i < dated.length; i++) {
+ expect(
+ dated[i]!.isAfter(dated[i - 1]!),
+ isFalse,
+ reason: 'newest first',
+ );
+ }
+ });
+
+ test('a need handled goes to the end, below everything else', () async {
+ final session = await start(backend());
+ final activity = session.activity;
+ final work = activity.items(SwarmActivityFilter.needsYou).last;
+
+ activity.replied(work);
+
+ expect(all(activity), ['decision:d1', 'mention:m1', work.key]);
+ });
+
+ test('nothing anywhere: nothing', () async {
+ final fake = backend();
+ fake.routes['/api/super-tabs/list'] = (_) => {
+ 'tabs': <Object>[],
+ 'next': null,
+ };
+ final session = await start(fake);
+
+ expect(swarmActivityAll(session.activity), isEmpty);
+ });
+ });
}
/// A phone store whose read of [slow] waits for [release].
diff --git a/mobile/test/swarm/swarm_buddy_tab_test.dart b/mobile/test/swarm/swarm_buddy_tab_test.dart
index 2fd1d76ea..cb3a6d595 100644
--- a/mobile/test/swarm/swarm_buddy_tab_test.dart
+++ b/mobile/test/swarm/swarm_buddy_tab_test.dart
@@ -620,6 +620,31 @@ void main() {
expect(host.session!.home.buddySwarmId, tab);
});
+ testWidgets('a tap on the title opens the same switcher, as Home\'s '
+ 'title does, said as Switch Swarm', (tester) async {
+ final semantics = tester.ensureSemantics();
+ final host = await pump(tester, two(mineMoved: 10, otherMoved: 20));
+ await openTab(tester);
+ expect(find.text('In the second Swarm'), findsOneWidget);
+ expect(
+ tester.getSize(key('swarm-buddy-title-switch')).height,
+ greaterThanOrEqualTo(44),
+ );
+ expect(
+ find.bySemanticsLabel(RegExp(r'\. Switch Swarm$')),
+ findsOneWidget,
+ );
+
+ await tester.tap(key('swarm-buddy-title-switch'));
+ await settle(tester);
+ await tester.tap(find.text('Swarm $tab'));
+ await settle(tester);
+
+ expect(find.text('In the first Swarm'), findsOneWidget);
+ expect(host.session!.home.buddySwarmId, tab);
+ semantics.dispose();
+ });
+
testWidgets('a chat moving elsewhere does not take the tab there', (
tester,
) async {
@@ -687,6 +712,12 @@ void main() {
expect(find.text('Swarm'), findsNothing);
});
+ testWidgets('with one Swarm the title is no button', (tester) async {
+ await pump(tester, backend());
+ await openTab(tester);
+ expect(key('swarm-buddy-title-switch'), findsNothing);
+ });
+
testWidgets('losing the Swarm shown moves to the other, and nothing of it '
'stays', (tester) async {
final host = await pump(tester, two(mineMoved: 20, otherMoved: 10));
diff --git a/mobile/test/swarm/swarm_chat_test.dart b/mobile/test/swarm/swarm_chat_test.dart
index c2aeb01c6..e068ed8d1 100644
--- a/mobile/test/swarm/swarm_chat_test.dart
+++ b/mobile/test/swarm/swarm_chat_test.dart
@@ -797,7 +797,7 @@ void main() {
expect(fake.commands.single['replyTo'], isNull);
});
- testWidgets('the composer has an @ Tag chip (Tony, 11-01): it and an @ '
+ testWidgets('the composer has an @ button (Tony, 11-01): it and an @ '
'typed in the field open the same picker', (tester) async {
await pump(tester, backend([message('m1', 1)]));
diff --git a/mobile/test/swarm/swarm_composer_test.dart b/mobile/test/swarm/swarm_composer_test.dart
index 6d4e3d61f..6235f494a 100644
--- a/mobile/test/swarm/swarm_composer_test.dart
+++ b/mobile/test/swarm/swarm_composer_test.dart
@@ -19,8 +19,8 @@ import 'package:lucide_icons_flutter/lucide_icons.dart';
import '../voice_fakes.dart';
import 'swarm_fixture.dart';
-/// The composer card (Tony, 11-01): the X that clears the text, the @ Tag
-/// chip, and the card's layout on the chat and in a thread — with the
+/// The composer card (Tony, 11-01): the X that clears the text, the @
+/// button, and the card's layout on the chat and in a thread — with the
/// keyboard up, on a 320pt phone, with files and a reply.
void main() {
const messages = '/api/super-tabs/$tab/conversations/g1/messages';
@@ -377,7 +377,7 @@ void main() {
});
});
- group('@ Tag on the chat', () {
+ group('@ on the chat', () {
testWidgets('on an empty box: an @ that opens the picker, focus in the '
'field; a second tap takes it back and closes it', (tester) async {
await pump(tester, backend([message('m1', 1)]));
@@ -486,6 +486,53 @@ void main() {
expect(key('swarm-mention-picker'), findsNothing);
});
+ testWidgets('the sign alone, no word (Tony, 11-03): a round 36pt face '
+ 'in a 44pt target, as + is', (tester) async {
+ await pump(tester, backend([message('m1', 1)]));
+
+ expect(find.text('Tag'), findsNothing);
+ // Still a button a screen reader can press, as the chip was; + and
+ // Send too.
+ for (final (button, label) in [
+ ('swarm-tag', 'Tag a member or agent'),
+ ('swarm-attach', 'Attach files'),
+ ]) {
+ expect(
+ tester.getSemantics(key(button)),
+ matchesSemantics(
+ label: label,
+ isButton: true,
+ hasEnabledState: true,
+ isEnabled: true,
+ hasTapAction: true,
+ ),
+ reason: button,
+ );
+ }
+ await type(tester, 'hi');
+ expect(
+ tester.getSemantics(key('swarm-send')),
+ matchesSemantics(
+ label: 'Send',
+ isButton: true,
+ hasEnabledState: true,
+ isEnabled: true,
+ hasTapAction: true,
+ ),
+ );
+ expect(tester.getSize(key('swarm-tag')), const Size(44, 44));
+ final tag = tester.widget<SwarmRoundButton>(key('swarm-tag'));
+ final attach = tester.widget<SwarmRoundButton>(
+ find.descendant(
+ of: key('swarm-attach'),
+ matching: find.byType(SwarmRoundButton),
+ ),
+ );
+ expect(tag.face, 36);
+ expect(tag.face, attach.face);
+ expect(tag.fill, attach.fill);
+ });
+
testWidgets('no chip when nobody can be tagged', (tester) async {
await pump(tester, backend([message('m1', 1)], agentIds: const []));
@@ -514,7 +561,7 @@ void main() {
group('card layout', () {
testWidgets('one line is a 98pt composer: an 86pt card, text over '
- '+, Tag, the mic and Send, all 44pt targets with 36pt faces', (
+ '+, @, the mic and Send, all 44pt targets with 36pt faces', (
tester,
) async {
phone(tester);
@@ -522,15 +569,14 @@ void main() {
expect(tester.getSize(key('swarm-composer-card')).height, 86);
expect(tester.getSize(key('swarm-field')).height, 36);
- for (final button in ['swarm-attach', 'swarm-send']) {
+ for (final button in ['swarm-attach', 'swarm-tag', 'swarm-send']) {
expect(tester.getSize(key(button)), const Size(44, 44));
}
- expect(tester.getSize(key('swarm-tag')).height, 44);
final card = tester.getRect(key('swarm-composer-card'));
final send = tester.getRect(key('swarm-send'));
final attach = tester.getRect(key('swarm-attach'));
final tag = tester.getRect(key('swarm-tag'));
- // The toolbar: + then Tag at the left, Send at the right, 4 from the foot.
+ // The toolbar: + then @ at the left, Send at the right, 4 from the foot.
expect(attach.left - card.left, 1 + 6);
expect(tag.left, attach.right);
expect(card.right - send.right, 1 + 6);
diff --git a/mobile/test/swarm/swarm_computers_test.dart b/mobile/test/swarm/swarm_computers_test.dart
index 4af3f1386..a785329cc 100644
--- a/mobile/test/swarm/swarm_computers_test.dart
+++ b/mobile/test/swarm/swarm_computers_test.dart
@@ -1,5 +1,8 @@
+import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:harness_mobile/core/models.dart';
+import 'package:harness_mobile/phone/agents_list_page.dart';
+import 'package:harness_mobile/swarm/swarm_agents.dart';
import 'package:harness_mobile/swarm/swarm_computers.dart';
import '../viewer_app_fixture.dart';
@@ -192,4 +195,165 @@ void main() {
expect(listed, 1);
expect(computers.rechecking, isFalse);
});
+
+ group("the person's agents, for Home's Agents tile and Search", () {
+ test('none known until the computers answer; then each agent that can '
+ 'open, by computer and engine, and how many work', () async {
+ final rig = viewerApp();
+ addTearDown(rig.app.dispose);
+ final computers = AppSwarmComputers(rig.app);
+ addTearDown(computers.dispose);
+ expect(computers, isA<SwarmAgentsSource>());
+ final agents = computers.agents;
+ expect(agents.working, isNull, reason: 'not answered yet');
+ expect(agents.agents, isEmpty);
+
+ rig.api.onMachines = () async => [remoteMachine('a', name: 'Studio')];
+ rig.conn('a').answers['agents_list'] = (_) => {
+ 'agents': [
+ agentJson('one', name: 'Wren'),
+ agentJson('two', name: 'Ivy', engine: 'codex'),
+ agentJson('gone', terminal: false),
+ ],
+ };
+ await rig.app.bootstrap();
+ await settle();
+ rig.app.connectionStatusForTest('a', ConnectionStatus.connected);
+ await settle();
+
+ expect(agents.working, 0);
+ expect(
+ [for (final a in agents.agents) (a.machineId, a.agentId, a.machine)],
+ unorderedEquals([('a', 'one', 'Studio'), ('a', 'two', 'Studio')]),
+ reason: 'one without a terminal cannot open',
+ );
+ final ivy = agents.agents.singleWhere((a) => a.agentId == 'two');
+ expect((ivy.name, ivy.engine), ('Ivy', 'codex'));
+ expect((ivy.working, ivy.waiting), (false, false));
+
+ await push(rig, 'a', 'turn_started', {'agentId': 'two'});
+
+ expect(agents.working, 1);
+ expect(
+ agents.agents.singleWhere((a) => a.agentId == 'two').working,
+ isTrue,
+ );
+ });
+
+ test('tells when how many work changes, not at every change of the app; '
+ "and never tells Swarm's computers, whose change reads Swarms "
+ 'again', () async {
+ final rig = await signedInWith({
+ 'a': ['one', 'two'],
+ });
+ addTearDown(rig.app.dispose);
+ final computers = AppSwarmComputers(rig.app);
+ addTearDown(computers.dispose);
+ var told = 0, computersTold = 0;
+ computers.agents.addListener(() => told++);
+ computers.addListener(() => computersTold++);
+
+ await push(rig, 'a', 'turn_started', {'agentId': 'one'});
+ expect(told, 1);
+
+ Map<String, dynamic> question() => {
+ 'agentId': 'two',
+ 'requestId': 'q1',
+ 'questions': [
+ {
+ 'q': 'Proceed?',
+ 'options': ['Yes'],
+ },
+ ],
+ };
+ await push(rig, 'a', 'commander_question', question());
+ expect(told, 2, reason: "one waits now: Search's dot");
+ expect(
+ computers.agents.agents.singleWhere((a) => a.agentId == 'two').waiting,
+ isTrue,
+ );
+
+ var appTold = 0;
+ void counted() => appTold++;
+ rig.app.addListener(counted);
+ addTearDown(() => rig.app.removeListener(counted));
+ // Re-announced after a reconnect: the app tells, nothing changed.
+ await push(rig, 'a', 'commander_question', question());
+ await push(rig, 'a', 'turn_heartbeat', {'agentId': 'one'});
+ await settle();
+ expect(appTold, greaterThan(0), reason: 'the app did tell');
+ expect(told, 2, reason: 'still one working, one waiting');
+
+ await push(rig, 'a', 'turn_ended', {'agentId': 'one'});
+ expect(told, 3);
+ expect(computers.agents.working, 0);
+ expect(computersTold, 0);
+ });
+
+ test(
+ 'tells when the agents themselves change, the count the same',
+ () async {
+ final rig = await signedInWith({
+ 'a': ['one'],
+ });
+ addTearDown(rig.app.dispose);
+ final computers = AppSwarmComputers(rig.app);
+ addTearDown(computers.dispose);
+ var told = 0;
+ computers.agents.addListener(() => told++);
+
+ rig.conn('a').answers['agents_list'] = (_) => {
+ 'agents': [agentJson('one'), agentJson('three')],
+ };
+ await rig.app.syncAgentsForTest('a');
+ await settle();
+
+ expect(told, 1);
+ expect(computers.agents.working, 0);
+ expect(
+ [for (final a in computers.agents.agents) a.agentId],
+ ['one', 'three'],
+ );
+ },
+ );
+
+ test('gone with its computers: a change of the app after tells no one '
+ 'and throws nothing', () async {
+ final rig = await signedInWith({
+ 'a': ['one'],
+ });
+ addTearDown(rig.app.dispose);
+ final computers = AppSwarmComputers(rig.app);
+ final agents = computers.agents;
+ computers.dispose();
+
+ await push(rig, 'a', 'turn_started', {'agentId': 'one'});
+
+ expect(agents.working, 0, reason: 'as it was left');
+ });
+
+ testWidgets('opens every agent, the Agents list, over the page', (
+ tester,
+ ) async {
+ final rig = await tester.runAsync(() => signedInWith({'a': []}));
+ addTearDown(rig!.app.dispose);
+ final computers = AppSwarmComputers(rig.app);
+ addTearDown(computers.dispose);
+ await tester.pumpWidget(
+ MaterialApp(
+ home: Builder(
+ builder: (context) => TextButton(
+ onPressed: () => computers.agents.openList(context),
+ child: const Text('Agents'),
+ ),
+ ),
+ ),
+ );
+
+ await tester.tap(find.text('Agents'));
+ await tester.pumpAndSettle();
+
+ expect(find.byType(AgentsListPage), findsOneWidget);
+ });
+ });
}
diff --git a/mobile/test/swarm/swarm_home_instant_test.dart b/mobile/test/swarm/swarm_home_instant_test.dart
index 4fac99294..e281c3f8b 100644
--- a/mobile/test/swarm/swarm_home_instant_test.dart
+++ b/mobile/test/swarm/swarm_home_instant_test.dart
@@ -136,10 +136,10 @@ void main() {
expect(
find.descendant(
of: key('swarm-project-$tab-$project'),
- matching: find.text('1 human'),
+ matching: find.textContaining('human'),
),
- findsOneWidget,
- reason: 'its people; Nova waits on the person, so none is running',
+ findsNothing,
+ reason: 'one line: its #name, not its people',
);
expect(
[for (final need in host.session!.inbox.needs) need.conversationId],
@@ -244,19 +244,19 @@ void main() {
stopReads(host);
});
- /// A pull on Home, up to the read it starts.
- Future<void> pull(WidgetTester tester) async {
- await tester.fling(
- key('swarm-project-$tab-$project'),
- const Offset(0, 400),
- 1000,
- );
+ /// Refresh, from Sort and filter (a pull on Home until 2026-11-03, which
+ /// opens Search now), up to the read it starts.
+ Future<void> refresh(WidgetTester tester) async {
+ await tester.tap(key('swarm-home-view'));
+ await tester.pump();
+ await tester.pump(const Duration(milliseconds: 400));
+ await tester.tap(key('swarm-home-refresh'));
for (var i = 0; i < 10; i++) {
await tester.pump(const Duration(milliseconds: 100));
}
}
- testWidgets('a pull looks for the computers, then reads the Swarms', (
+ testWidgets('Refresh looks for the computers, then reads the Swarms', (
tester,
) async {
var away = true;
@@ -276,13 +276,13 @@ void main() {
},
);
final inbox = host.session!.inbox;
- // The quick reads stopped: only the pull's is counted.
+ // The quick reads stopped: only Refresh's is counted.
stopReads(host);
int lists() =>
fake.paths.where((p) => p == '/api/super-tabs/list').length;
final before = lists();
- await pull(tester);
+ await refresh(tester);
expect(computers.rechecks, 1);
expect(lists(), before, reason: 'not before the look ends');
@@ -314,7 +314,7 @@ void main() {
fake.paths.where((p) => p == '/api/super-tabs/list').length;
final before = lists();
- await pull(tester);
+ await refresh(tester);
expect(computers.rechecks, 1);
expect(log.messages, contains('Computers not looked for'));
@@ -324,9 +324,8 @@ void main() {
stopReads(host);
});
- testWidgets('with the computers answering, a pull only reads the Swarms', (
- tester,
- ) async {
+ testWidgets('with the computers answering, Refresh only reads the '
+ 'Swarms', (tester) async {
final computers = FakeComputers([mac]);
final (:host, :fake) = await coldStart(
tester,
@@ -345,7 +344,7 @@ void main() {
fake.paths.where((p) => p == '/api/super-tabs/list').length;
final before = lists();
- await pull(tester);
+ await refresh(tester);
expect(computers.rechecks, 0);
expect(lists(), greaterThan(before));
diff --git a/mobile/test/swarm/swarm_home_project_row_test.dart b/mobile/test/swarm/swarm_home_project_row_test.dart
new file mode 100644
index 000000000..b0c653d12
--- /dev/null
+++ b/mobile/test/swarm/swarm_home_project_row_test.dart
@@ -0,0 +1,216 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:harness_mobile/shared/theme/app_space.dart';
+import 'package:harness_mobile/shared/theme/app_theme.dart';
+import 'package:harness_mobile/shared/widgets/skeleton.dart';
+import 'package:harness_mobile/shared/widgets/touch_target.dart';
+import 'package:harness_mobile/swarm/model.dart';
+import 'package:harness_mobile/swarm/parts.dart';
+import 'package:harness_mobile/swarm/swarm_home_list.dart';
+import 'package:harness_mobile/swarm/swarm_home_rows.dart';
+import 'package:harness_mobile/swarm/swarm_style.dart';
+import 'package:harness_mobile/swarm/swarm_unread.dart';
+
+import 'swarm_fixture.dart';
+
+/// A project on Swarm Home, one line as Slack's channels (2026-11-03): its
+/// #name — bold with something new — its Swarm where Home shows several, and
+/// its tags at the end. No dot, no second line, no time.
+void main() {
+ final now = DateTime(2026, 10, 27, 9);
+
+ SuperTabSnapshot read({int running = 0}) {
+ final busy = [for (var i = 0; i < running; i++) 'busy-$i'];
+ return SuperTabSnapshot.fromJson(
+ SuperTabParts.firstLoad(
+ firstLoad(
+ agents: [for (final id in busy) agent(id)],
+ groups: [
+ for (final id in busy)
+ groupData(
+ 'work-$id',
+ title: 'Task of $id',
+ agentIds: [id],
+ status: 'working',
+ workerId: id,
+ ),
+ ],
+ ),
+ ).state,
+ );
+ }
+
+ const row = ValueKey('row');
+ final name = find.byKey(const ValueKey('swarm-project-name'));
+
+ Future<void> pump(
+ WidgetTester tester, {
+ int running = 0,
+ String? swarmName,
+ SwarmProjectNews news = swarmNoProjectNews,
+ bool tagsLoading = false,
+ DateTime? active,
+ double width = 390,
+ VoidCallback? onTap,
+ VoidCallback? onLongPress,
+ }) {
+ final snapshot = read(running: running);
+ return tester.pumpWidget(
+ MaterialApp(
+ home: Scaffold(
+ // Scrolled, as Home's rows are: a row takes no more height than it
+ // needs.
+ body: SingleChildScrollView(
+ child: Align(
+ alignment: Alignment.topLeft,
+ child: SizedBox(
+ width: width,
+ child: SwarmHomeProjectRow(
+ key: row,
+ project: SwarmHomeProject(
+ swarmId: 'tab',
+ project: snapshot.projects.first,
+ active: active,
+ news: news,
+ ),
+ swarmName: swarmName,
+ tagsLoading: tagsLoading,
+ onTap: onTap ?? () {},
+ onLongPress: onLongPress,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ Text nameText(WidgetTester tester) => tester.widget<Text>(name);
+
+ testWidgets('is one line, a thumb tall: no humans line and no time', (
+ tester,
+ ) async {
+ await pump(tester, running: 2, active: now);
+
+ expect(tester.getSize(find.byKey(row)).height, minTouchTarget);
+ expect(SwarmHomeProjectRow.height, minTouchTarget);
+ expect(find.textContaining('human'), findsNothing);
+ expect(find.textContaining('running'), findsNothing);
+ expect(find.text('now'), findsNothing, reason: 'no time on the row');
+ expect(nameText(tester).maxLines, 1);
+ });
+
+ /// The round marks in the row.
+ Finder dots() => find.descendant(
+ of: find.byKey(row),
+ matching: find.byWidgetPredicate(
+ (w) =>
+ w is Container &&
+ w.decoration is BoxDecoration &&
+ (w.decoration! as BoxDecoration).shape == BoxShape.circle,
+ ),
+ );
+
+ testWidgets("no dot for how its team is, working, idle or with a tag "
+ "waiting: the name starts at the row's inset", (tester) async {
+ for (final (running, news) in [
+ (0, swarmNoProjectNews),
+ (1, swarmNoProjectNews),
+ (0, (bold: true, tags: 1, hasWaitingTag: true)),
+ ]) {
+ await pump(tester, running: running, news: news);
+
+ expect(dots(), findsNothing, reason: '$running running, $news');
+ expect(find.byKey(const ValueKey('swarm-project-dot')), findsNothing);
+ expect(tester.getTopLeft(name).dx, AppSpace.l);
+ }
+ });
+
+ testWidgets('quiet, the name in the second ink, not bold', (tester) async {
+ await pump(tester);
+
+ final style = nameText(tester).style!;
+ expect(style.color, AppPalette.textSecondary);
+ expect(style.fontWeight, isNot(FontWeight.w600));
+ expect(find.byType(SwarmTags), findsNothing);
+ });
+
+ testWidgets('something new: bold in the main ink, heard as unread, with no '
+ 'dot at its end', (tester) async {
+ final semantics = tester.ensureSemantics();
+ await pump(tester, news: (bold: true, tags: 0, hasWaitingTag: false));
+
+ final style = nameText(tester).style!;
+ expect(style.color, AppPalette.textPrimary);
+ expect(style.fontWeight, FontWeight.w600);
+ expect(find.bySemanticsLabel(RegExp('Unread messages')), findsOneWidget);
+ expect(dots(), findsNothing, reason: 'no unread dot at its end either');
+ semantics.dispose();
+ });
+
+ testWidgets('tags waiting: @N filled at its end, the name bright', (
+ tester,
+ ) async {
+ await pump(tester, news: (bold: false, tags: 2, hasWaitingTag: true));
+
+ final tags = tester.widget<SwarmTags>(find.byType(SwarmTags));
+ expect(tags.filled, isTrue);
+ expect(nameText(tester).style!.color, AppPalette.textPrimary);
+ final rowBox = tester.getRect(find.byKey(row));
+ expect(
+ tester.getRect(find.byType(SwarmTags)).right,
+ greaterThan(rowBox.right - 40),
+ reason: 'at the row\'s end',
+ );
+ });
+
+ testWidgets('tags on their way: a skeleton in their place', (tester) async {
+ await pump(tester, tagsLoading: true);
+
+ expect(
+ find.byKey(const ValueKey('swarm-project-tags-loading')),
+ findsOneWidget,
+ );
+ expect(find.byType(Skeleton), findsOneWidget);
+ });
+
+ testWidgets('with several Swarms, its Swarm follows the name, faint, and '
+ 'is heard after it', (tester) async {
+ final semantics = tester.ensureSemantics();
+ await pump(tester, swarmName: 'Acme');
+
+ final text = nameText(tester);
+ final swarm = text.textSpan!.toPlainText();
+ expect(swarm, endsWith(' Acme'));
+ expect(text.semanticsLabel, endsWith(', Acme'));
+ semantics.dispose();
+ });
+
+ testWidgets('a long name ellipsizes on its one line, the Swarm the first to '
+ 'go', (tester) async {
+ await pump(
+ tester,
+ swarmName: 'A Swarm with a name far too long for one row of a phone',
+ width: 240,
+ );
+
+ expect(tester.takeException(), isNull);
+ final text = nameText(tester);
+ expect(text.maxLines, 1);
+ expect(text.overflow, TextOverflow.ellipsis);
+ expect(text.textSpan!.toPlainText(), startsWith('#'));
+ expect(tester.getSize(find.byKey(row)).height, minTouchTarget);
+ });
+
+ testWidgets('a tap opens it, a long press offers its pin', (tester) async {
+ var taps = 0, presses = 0;
+ await pump(tester, onTap: () => taps++, onLongPress: () => presses++);
+
+ await tester.tap(find.byKey(row));
+ await tester.longPress(find.byKey(row));
+
+ expect(taps, 1);
+ expect(presses, 1);
+ });
+}
diff --git a/mobile/test/swarm/swarm_home_root_test.dart b/mobile/test/swarm/swarm_home_root_test.dart
index 68efe50f4..06a423cb7 100644
--- a/mobile/test/swarm/swarm_home_root_test.dart
+++ b/mobile/test/swarm/swarm_home_root_test.dart
@@ -29,7 +29,8 @@ void main() {
derived: derived,
head: headData(
projects: [
- for (var i = 0; i < 10; i++)
+ // One line each since 2026-11-03: ten fit on the phone now.
+ for (var i = 0; i < 20; i++)
{
'id': 'project-$i',
'name': 'Project $i',
@@ -107,9 +108,12 @@ void main() {
await tester.pumpAndSettle();
}
+ // Home's list, not its tiles, which scroll sideways.
Finder homeList() => find.descendant(
of: find.byType(SwarmPage),
- matching: find.byType(Scrollable),
+ matching: find.byWidgetPredicate(
+ (w) => w is Scrollable && w.axisDirection == AxisDirection.down,
+ ),
);
double offset(WidgetTester tester) =>
diff --git a/mobile/test/swarm/swarm_home_search_test.dart b/mobile/test/swarm/swarm_home_search_test.dart
new file mode 100644
index 000000000..ecc3078c2
--- /dev/null
+++ b/mobile/test/swarm/swarm_home_search_test.dart
@@ -0,0 +1,120 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:harness_mobile/swarm/swarm_home_search.dart';
+
+/// A way into Search from Home (Slack's, 2026-11-03): a pull down at the top
+/// of the list, on Android's clamping list and iOS's bouncing one alike. The
+/// other is the top bar's Search.
+void main() {
+ Finder key(String value) => find.byKey(ValueKey(value));
+ final hint = key('swarm-pull-search-hint');
+
+ /// A list of 40 rows under [SwarmPullToSearch], scrolling as [physics].
+ Future<List<int>> pumpList(
+ WidgetTester tester, {
+ required ScrollPhysics physics,
+ }) async {
+ final pulls = <int>[];
+ await tester.pumpWidget(
+ MaterialApp(
+ home: Scaffold(
+ body: SwarmPullToSearch(
+ onPull: () => pulls.add(1),
+ child: ListView(
+ key: const ValueKey('list'),
+ physics: AlwaysScrollableScrollPhysics(parent: physics),
+ children: [
+ for (var i = 0; i < 40; i++)
+ SizedBox(height: 44, child: Text('row $i')),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ return pulls;
+ }
+
+ /// A finger down on the list, [by] down, held while [held] looks, then up.
+ Future<void> pull(
+ WidgetTester tester,
+ double by, {
+ Future<void> Function()? held,
+ }) async {
+ final gesture = await tester.startGesture(
+ tester.getCenter(key('list')) - const Offset(0, 200),
+ );
+ for (var moved = 0.0; moved < by; moved += 10) {
+ await gesture.moveBy(const Offset(0, 10));
+ await tester.pump();
+ }
+ await held?.call();
+ await gesture.up();
+ await tester.pumpAndSettle();
+ }
+
+ for (final (name, physics) in [
+ ('Android, clamping', const ClampingScrollPhysics()),
+ ('iOS, bouncing', const BouncingScrollPhysics()),
+ ]) {
+ group(name, () {
+ testWidgets('a pull past the reach at the top opens Search, with a '
+ 'hint while it pulls', (tester) async {
+ final pulls = await pumpList(tester, physics: physics);
+
+ await pull(
+ tester,
+ // Bouncing gives back less than the finger moves.
+ physics is BouncingScrollPhysics ? 260 : 120,
+ held: () async {
+ expect(hint, findsOneWidget);
+ expect(find.text('Release to search'), findsOneWidget);
+ },
+ );
+
+ expect(pulls, hasLength(1));
+ expect(hint, findsNothing, reason: 'gone once let go');
+ });
+
+ testWidgets('a short pull opens nothing, and says to pull on', (
+ tester,
+ ) async {
+ final pulls = await pumpList(tester, physics: physics);
+
+ await pull(
+ tester,
+ 30,
+ held: () async =>
+ expect(find.text('Pull to search'), findsOneWidget),
+ );
+
+ expect(pulls, isEmpty);
+ });
+
+ testWidgets('scrolled into the list, a pull back up to the top and past '
+ 'it opens nothing: the drag began in the middle', (tester) async {
+ final pulls = await pumpList(tester, physics: physics);
+ await tester.drag(key('list'), const Offset(0, -300));
+ await tester.pumpAndSettle();
+ final position = tester
+ .state<ScrollableState>(find.byType(Scrollable))
+ .position;
+ expect(position.pixels, greaterThan(0));
+
+ await pull(tester, 300 + 200);
+
+ expect(pulls, isEmpty);
+ });
+
+ testWidgets('scrolling down the list opens nothing', (tester) async {
+ final pulls = await pumpList(tester, physics: physics);
+
+ await tester.fling(key('list'), const Offset(0, -400), 1500);
+ await tester.pumpAndSettle();
+
+ expect(pulls, isEmpty);
+ expect(hint, findsNothing);
+ });
+ });
+ }
+}
diff --git a/mobile/test/swarm/swarm_home_test.dart b/mobile/test/swarm/swarm_home_test.dart
index 7bf52cdc8..cbb229c38 100644
--- a/mobile/test/swarm/swarm_home_test.dart
+++ b/mobile/test/swarm/swarm_home_test.dart
@@ -10,7 +10,7 @@ import 'package:harness_mobile/notify/system_notices.dart';
import 'package:harness_mobile/phone/phone_navigation.dart';
import 'package:harness_mobile/settings/experimental_features.dart';
import 'package:harness_mobile/shared/theme/app_theme.dart'
- show AppFont, AppPalette;
+ show AppFont;
import 'package:harness_mobile/shared/widgets/skeleton.dart';
import 'package:harness_mobile/swarm/swarm_conversation_page.dart';
import 'package:harness_mobile/swarm/swarm_home_list.dart';
@@ -29,7 +29,6 @@ import 'package:harness_mobile/swarm/swarm_row.dart';
import 'package:harness_mobile/swarm/swarm_session.dart';
import 'package:harness_mobile/swarm/swarm_start.dart';
import 'package:harness_mobile/swarm/swarm_style.dart';
-import 'package:harness_mobile/swarm/team_glance.dart';
import 'package:harness_mobile/theme/app_theme.dart' show AppColors;
import '../voice_fakes.dart';
@@ -323,19 +322,6 @@ void main() {
};
}
- /// The colour of the dot before project row [k].
- Color? dotOf(WidgetTester tester, String k) =>
- ((tester
- .widget<Container>(
- find.descendant(
- of: inside(k, key('swarm-project-dot')),
- matching: find.byType(Container),
- ),
- )
- .decoration
- as BoxDecoration?)
- ?.color);
-
/// The weight of the words in row [k] that hold [words].
FontWeight? weightOf(WidgetTester tester, String k, String words) => tester
.widget<Text>(inside(k, find.textContaining(words)))
@@ -900,8 +886,9 @@ void main() {
expect(key('swarm-title-button'), findsOneWidget);
});
- testWidgets("a project's row counts who reads it and who is running: "
- 'a private one only its owner and members', (tester) async {
+ testWidgets("a project's row is one line: no count of who reads it nor "
+ 'of who is running, public or private (Slack\'s channels, '
+ '2026-11-03)', (tester) async {
final fake = backend();
Map<String, dynamic> inProject(String id, String visibility) => {
'id': id,
@@ -940,17 +927,23 @@ void main() {
const publicRow = 'swarm-project-$tab-$project';
const privateRow = 'swarm-project-$tab-$web';
+ for (final row in [publicRow, privateRow]) {
+ expect(inside(row, find.textContaining('human')), findsNothing);
+ expect(inside(row, find.textContaining('running')), findsNothing);
+ expect(inside(row, find.byType(SwarmAvatar)), findsNothing);
+ expect(tester.getSize(key(row)).height, SwarmHomeProjectRow.height);
+ }
expect(
- inside(publicRow, find.text('3 humans • 1 agent running')),
- findsOneWidget,
+ inside(publicRow, key('swarm-project-dot')),
+ findsNothing,
+ reason: 'who is running is not on the row, not even as a dot',
);
- expect(inside(privateRow, find.text('2 humans')), findsOneWidget);
- expect(inside(publicRow, find.byType(SwarmAvatar)), findsNothing);
});
testWidgets('a project with a task-chat tag stays bold without a number; '
- 'the rest are quiet; each has how many people read '
- 'it and when it last moved', (tester) async {
+ 'the rest are quiet; each on one line, with no people and no time', (
+ tester,
+ ) async {
final semantics = tester.ensureSemantics();
await pump(tester, backend());
@@ -962,18 +955,24 @@ void main() {
expect(weightOf(tester, webRow, 'Web'), isNot(AppFont.semibold));
expect(inside(webRow, find.textContaining('@')), findsNothing);
for (final row in [mobileRow, webRow]) {
- expect(inside(row, find.text('1 human')), findsOneWidget);
+ expect(inside(row, find.textContaining('human')), findsNothing);
expect(inside(row, find.byType(SwarmTeamDots)), findsNothing);
}
- expect(inside(mobileRow, find.text('30m')), findsOneWidget);
+ expect(inside(mobileRow, find.text('30m')), findsNothing);
expect(inside(mobileRow, find.text('#Mobile')), findsOneWidget);
expect(inside(webRow, find.text('#Web')), findsOneWidget);
+ for (final row in [mobileRow, webRow]) {
+ expect(
+ inside(row, key('swarm-project-dot')),
+ findsNothing,
+ reason: 'no dot, with someone down or all idle',
+ );
+ }
expect(
- dotOf(tester, mobileRow),
- AppColors.danger,
- reason: 'someone down comes first',
+ tester.getTopLeft(inside(webRow, find.text('#Web'))).dx,
+ tester.getTopLeft(inside(mobileRow, find.text('#Mobile'))).dx,
+ reason: 'the names stay in line',
);
- expect(dotOf(tester, webRow), AppPalette.textFaint, reason: 'all idle');
semantics.dispose();
});
@@ -1002,9 +1001,7 @@ void main() {
expect(inside(webRow, find.byType(SwarmTags)), findsNothing);
});
- testWidgets('projects newest first, each with how long ago it moved', (
- tester,
- ) async {
+ testWidgets('projects newest first, the time off the row', (tester) async {
final now = DateTime.utc(2026, 10, 29, 10);
int ago(int minutes) =>
now.subtract(Duration(minutes: minutes)).millisecondsSinceEpoch;
@@ -1016,8 +1013,11 @@ void main() {
y(tester, 'swarm-project-$tab-$web'),
lessThan(y(tester, 'swarm-project-$tab-$project')),
);
- expect(inside('swarm-project-$tab-$web', find.text('2m')), findsOne);
- expect(inside('swarm-project-$tab-$project', find.text('9m')), findsOne);
+ expect(inside('swarm-project-$tab-$web', find.text('2m')), findsNothing);
+ expect(
+ inside('swarm-project-$tab-$project', find.text('9m')),
+ findsNothing,
+ );
});
testWidgets('a project quiet for a day folds under Other projects, which '
@@ -1064,7 +1064,7 @@ void main() {
y(tester, 'swarm-other-projects'),
lessThan(y(tester, 'swarm-project-$tab-$project')),
);
- expect(inside('swarm-project-$tab-$project', find.text('2d')), findsOne);
+ expect(key('swarm-project-$tab-$project'), findsOneWidget);
await tester.tap(key('swarm-other-projects'));
await tester.pumpAndSettle();
@@ -1121,12 +1121,9 @@ void main() {
reason: "a project's dot, not its tile",
);
expect(
- tester
- .getSize(
- inside('swarm-project-$tab-$project', key('swarm-project-dot')),
- )
- .width,
- 16,
+ inside('swarm-project-$tab-$project', key('swarm-project-dot')),
+ findsNothing,
+ reason: 'no dot before the name',
);
});
@@ -1352,8 +1349,9 @@ void main() {
findsNothing,
);
expect(
- dotOf(tester, 'swarm-project-$tab-$project'),
- swarmStateColor(SwarmAgentState.waiting),
+ weightOf(tester, 'swarm-project-$tab-$project', 'Mobile'),
+ AppFont.semibold,
+ reason: 'the tag waiting on the person makes it bold',
);
});
@@ -1573,12 +1571,9 @@ void main() {
const mobileRow = 'swarm-project-$tab-$project';
const backendRow = 'swarm-project-$second-$project';
- expect(inside(mobileRow, find.text('#Mobile')), findsOneWidget);
- expect(inside(backendRow, find.text('#Backend')), findsOneWidget);
- expect(
- inside(backendRow, find.textContaining(' • Work Swarm')),
- findsOneWidget,
- );
+ // Its Swarm after its name, on its one line.
+ expect(inside(mobileRow, find.text('#Mobile Phone Swarm')), findsOne);
+ expect(inside(backendRow, find.text('#Backend Work Swarm')), findsOne);
await tester.longPress(key(backendRow));
await tester.pumpAndSettle();
@@ -2861,9 +2856,6 @@ void main() {
await pump(tester, fake, settle: false);
final row = height(tester, 'swarm-projects-loading-0');
final loading = find.byKey(const ValueKey('swarm-projects-loading-0'));
- final dot = tester.getCenter(
- find.descendant(of: loading, matching: find.byType(Skeleton)).first,
- );
final title = tester.getTopLeft(
find
.descendant(of: loading, matching: find.byType(SkeletonText))
@@ -2879,11 +2871,6 @@ void main() {
reason: 'its title and its team, as the skeleton draws them',
);
const webRow = 'swarm-project-$tab-$web';
- expect(
- tester.getCenter(inside(webRow, key('swarm-project-dot'))).dx,
- closeTo(dot.dx, .01),
- reason: 'the dot stays where its skeleton was',
- );
expect(
tester.getTopLeft(inside(webRow, find.text('#Web'))).dx,
closeTo(title.dx, .01),
diff --git a/mobile/test/swarm/swarm_home_tiles_test.dart b/mobile/test/swarm/swarm_home_tiles_test.dart
new file mode 100644
index 000000000..5111f6bf5
--- /dev/null
+++ b/mobile/test/swarm/swarm_home_tiles_test.dart
@@ -0,0 +1,185 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:harness_mobile/shared/widgets/skeleton.dart';
+import 'package:harness_mobile/swarm/swarm_agents.dart';
+import 'package:harness_mobile/swarm/swarm_home_tiles.dart';
+
+/// The person's agents as a test sets them.
+class _Agents extends ChangeNotifier implements SwarmAgents {
+ _Agents(this.working);
+
+ @override
+ int? working;
+
+ @override
+ List<SwarmAgentRef> get agents => const [];
+
+ var lists = 0;
+
+ @override
+ void openList(BuildContext context) => lists++;
+
+ @override
+ void open(BuildContext context, SwarmAgentRef agent) {}
+
+ void set(int? next) {
+ working = next;
+ notifyListeners();
+ }
+}
+
+/// Swarm Home's tiles (Slack's tile bar, 2026-11-03): While you were away,
+/// Threads and Agents in one row that scrolls sideways when it does not fit.
+void main() {
+ final back = DateTime(2026, 11, 3, 9);
+ Finder key(String value) => find.byKey(ValueKey(value));
+ Finder inside(String k, Finder matching) =>
+ find.descendant(of: key(k), matching: matching);
+
+ Future<void> pump(
+ WidgetTester tester,
+ List<Widget> tiles, {
+ double width = 390,
+ }) => tester.pumpWidget(
+ MaterialApp(
+ home: Scaffold(
+ body: Align(
+ alignment: Alignment.topLeft,
+ child: SizedBox(
+ width: width,
+ child: SwarmHomeTiles(children: tiles),
+ ),
+ ),
+ ),
+ ),
+ );
+
+ Widget away({int? done = 34, int? needs = 4, VoidCallback? onTap}) =>
+ SwarmAwayTile(
+ since: back.subtract(const Duration(hours: 21)),
+ back: back,
+ done: done,
+ needs: needs,
+ onTap: onTap ?? () {},
+ );
+
+ group('While you were away', () {
+ testWidgets('says how long, what was done and what needs the person', (
+ tester,
+ ) async {
+ await pump(tester, [away()]);
+
+ expect(inside('swarm-away', find.text('While you were away')), findsOne);
+ expect(inside('swarm-away', find.text('21h')), findsOneWidget);
+ expect(inside('swarm-away-done', find.text('34')), findsOneWidget);
+ expect(inside('swarm-away-done', find.text('done')), findsOneWidget);
+ expect(inside('swarm-away-needs', find.text('4')), findsOneWidget);
+ expect(inside('swarm-away-needs', find.text('need you')), findsOne);
+ expect(tester.takeException(), isNull);
+ });
+
+ testWidgets('a figure not known yet is a skeleton, and heard as such', (
+ tester,
+ ) async {
+ final semantics = tester.ensureSemantics();
+ await pump(tester, [away(done: null, needs: null)]);
+
+ expect(inside('swarm-away-done', find.byType(SkeletonText)), findsOne);
+ expect(inside('swarm-away-needs', find.byType(SkeletonText)), findsOne);
+ expect(
+ find.bySemanticsLabel(
+ 'While you were away, 21h: not known how many done, '
+ 'not known how many need you',
+ ),
+ findsOneWidget,
+ );
+ semantics.dispose();
+ });
+
+ testWidgets('is one button for a screen reader, and a tap opens it', (
+ tester,
+ ) async {
+ final semantics = tester.ensureSemantics();
+ var taps = 0;
+ await pump(tester, [away(onTap: () => taps++)]);
+
+ expect(
+ find.bySemanticsLabel('While you were away, 21h: 34 done, 4 need you'),
+ findsOneWidget,
+ );
+ await tester.tap(key('swarm-away'));
+ expect(taps, 1);
+ semantics.dispose();
+ });
+ });
+
+ group('Agents', () {
+ testWidgets('a skeleton until the computers answer, then how many work', (
+ tester,
+ ) async {
+ final agents = _Agents(null);
+ addTearDown(agents.dispose);
+ await pump(tester, [SwarmAgentsTile(agents: agents, onTap: () {})]);
+
+ expect(key('swarm-agents-loading'), findsOneWidget);
+
+ agents.set(2);
+ await tester.pump();
+
+ expect(key('swarm-agents-loading'), findsNothing);
+ expect(inside('swarm-agents-tile', find.text('2 working')), findsOne);
+
+ agents.set(0);
+ await tester.pump();
+
+ expect(inside('swarm-agents-tile', find.text('None working')), findsOne);
+ });
+
+ testWidgets('is heard with its count, and a tap opens every agent', (
+ tester,
+ ) async {
+ final semantics = tester.ensureSemantics();
+ final agents = _Agents(1);
+ addTearDown(agents.dispose);
+ var taps = 0;
+ await pump(tester, [
+ SwarmAgentsTile(agents: agents, onTap: () => taps++),
+ ]);
+
+ expect(find.bySemanticsLabel('Agents, 1 working'), findsOneWidget);
+ await tester.tap(key('swarm-agents-tile'));
+ expect(taps, 1);
+ semantics.dispose();
+ });
+ });
+
+ testWidgets('the row: away first and widest, the tiles as tall as each '
+ 'other and a thumb or more, scrolling sideways on a narrow phone', (
+ tester,
+ ) async {
+ final agents = _Agents(1);
+ addTearDown(agents.dispose);
+ await pump(tester, [
+ away(),
+ SwarmAgentsTile(agents: agents, onTap: () {}),
+ ], width: 280);
+
+ expect(tester.takeException(), isNull, reason: 'no overflow');
+ final first = tester.getRect(key('swarm-away'));
+ final second = tester.getRect(key('swarm-agents-tile'));
+ expect(first.left, lessThan(second.left));
+ expect(first.width, greaterThan(second.width));
+ expect(first.height, second.height);
+ expect(first.height, greaterThanOrEqualTo(44));
+ expect(second.right, greaterThan(280), reason: 'past the edge, to scroll');
+
+ await tester.drag(key('swarm-home-tiles'), const Offset(-200, 0));
+ await tester.pumpAndSettle();
+
+ expect(
+ tester.getRect(key('swarm-agents-tile')).right,
+ lessThanOrEqualTo(280),
+ reason: 'scrolled into sight',
+ );
+ });
+}
diff --git a/mobile/test/swarm/swarm_home_view_test.dart b/mobile/test/swarm/swarm_home_view_test.dart
index a7ae558df..9b243177f 100644
--- a/mobile/test/swarm/swarm_home_view_test.dart
+++ b/mobile/test/swarm/swarm_home_view_test.dart
@@ -13,6 +13,7 @@ import 'package:harness_mobile/swarm/model.dart';
import 'package:harness_mobile/swarm/swarm_home_list.dart';
import 'package:harness_mobile/swarm/swarm_home_prefs.dart';
import 'package:harness_mobile/swarm/swarm_home_rows.dart';
+import 'package:harness_mobile/swarm/swarm_home_view_sheet.dart';
import 'package:harness_mobile/swarm/swarm_page.dart';
import 'package:harness_mobile/swarm/swarm_session.dart';
import 'package:harness_mobile/swarm/swarm_style.dart';
@@ -568,6 +569,8 @@ void main() {
expect(project_(project), findsOneWidget);
expect(project_(web), findsNothing);
+ // Mark all read, in the same sheet (2026-11-03).
+ await open(tester);
await tester.tap(key('swarm-mark-all-read'));
await tester.pumpAndSettle();
expect(project_(project), findsNothing);
@@ -582,6 +585,130 @@ void main() {
await tester.pump(const Duration(seconds: 7));
});
+ /// The caption Sort and filter is at the right of.
+ Finder captionOf(Finder button) =>
+ find.ancestor(of: button, matching: find.byType(SwarmCaption));
+
+ testWidgets('Sort and filter is at the right of the Projects caption, '
+ 'not on the top bar (Tony, 2026-11-03); no Mark all read: that is in '
+ 'the sheet, under its options, with Refresh', (tester) async {
+ await pump(tester, backend());
+ final view = key('swarm-home-view');
+ expect(
+ key('swarm-mark-all-read'),
+ findsNothing,
+ reason: 'not on the screen',
+ );
+ expect(tester.widget<SwarmCaption>(captionOf(view)).text, 'Projects');
+ expect(
+ tester.getTopLeft(view).dy,
+ greaterThanOrEqualTo(tester.getBottomLeft(key('swarm-you-button')).dy),
+ reason: 'under the top bar',
+ );
+ final card = find
+ .ancestor(of: project_(project), matching: find.byType(SwarmGroup))
+ .first;
+ expect(
+ tester.getTopRight(view).dx,
+ closeTo(tester.getTopRight(card).dx, .01),
+ reason: "its target's end on the card's",
+ );
+ expect(
+ tester.getBottomLeft(view).dy,
+ lessThanOrEqualTo(tester.getTopLeft(card).dy),
+ reason: 'over the card',
+ );
+ expect(
+ tester.getCenter(find.text('Projects')).dy,
+ closeTo(tester.getCenter(view).dy, 1),
+ reason: 'on the words',
+ );
+
+ await open(tester);
+
+ expect(key('swarm-mark-all-read'), findsOneWidget);
+ expect(key('swarm-home-refresh'), findsOneWidget);
+ expect(
+ tester.getTopLeft(key('swarm-view-filter')).dy,
+ lessThan(tester.getTopLeft(key('swarm-mark-all-read')).dy),
+ );
+ expect(
+ tester.getTopLeft(key('swarm-mark-all-read')).dy,
+ lessThan(tester.getTopLeft(key('swarm-home-refresh')).dy),
+ );
+ });
+
+ testWidgets('with a project pinned, Sort and filter is on the Pinned '
+ 'caption, the first: once, over every project it sorts', (
+ tester,
+ ) async {
+ final host = await pump(tester, backend());
+ host.session!.home.pin(tab, project, true);
+ await tester.pumpAndSettle();
+
+ final view = key('swarm-home-view');
+ expect(view, findsOneWidget);
+ expect(tester.widget<SwarmCaption>(captionOf(view)).text, 'Pinned');
+ expect(find.text('Projects'), findsOneWidget, reason: 'web is unpinned');
+ });
+
+ testWidgets('Mark all read in the sheet closes it and marks, with its '
+ 'Undo; with nothing unread it is greyed and heard as off', (
+ tester,
+ ) async {
+ final handle = tester.ensureSemantics();
+ await pump(tester, backend());
+ SwarmHomeViewAction mark() =>
+ tester.widget<SwarmHomeViewAction>(key('swarm-mark-all-read'));
+ await open(tester);
+ expect(mark().onTap, isNotNull);
+
+ await tester.tap(key('swarm-mark-all-read'));
+ await tester.pump();
+ await tester.pump(const Duration(milliseconds: 500));
+
+ expect(key('swarm-view-sort'), findsNothing, reason: 'the sheet closed');
+ expect(
+ find.textContaining(RegExp(r'^Marked \d+ chats? read$')),
+ findsOne,
+ );
+ expect(find.text('Undo'), findsOneWidget);
+ await tester.pump(const Duration(seconds: 7));
+ await tester.pumpAndSettle();
+
+ await open(tester);
+ expect(mark().onTap, isNull);
+ expect(
+ tester.getSemantics(key('swarm-mark-all-read')),
+ matchesSemantics(
+ label: 'Mark all read',
+ isButton: true,
+ hasEnabledState: true,
+ isEnabled: false,
+ ),
+ );
+ handle.dispose();
+ });
+
+ testWidgets('Refresh in the sheet closes it, says so, and reads the '
+ 'Swarms again', (tester) async {
+ final fake = backend();
+ await pump(tester, fake);
+ int lists() =>
+ fake.paths.where((p) => p == '/api/super-tabs/list').length;
+ final before = lists();
+ await open(tester);
+
+ await tester.tap(key('swarm-home-refresh'));
+ await tester.pump();
+ await tester.pump(const Duration(milliseconds: 500));
+
+ expect(key('swarm-view-sort'), findsNothing, reason: 'the sheet closed');
+ expect(find.text('Refreshing…'), findsOneWidget);
+ expect(lists(), greaterThan(before));
+ await tester.pumpAndSettle();
+ });
+
Map<String, dynamic> tagInWeb() => {
'mentions': [
{
diff --git a/mobile/test/swarm/swarm_invitations_in_swarm_test.dart b/mobile/test/swarm/swarm_invitations_in_swarm_test.dart
index eb535eff5..1e68aae2a 100644
--- a/mobile/test/swarm/swarm_invitations_in_swarm_test.dart
+++ b/mobile/test/swarm/swarm_invitations_in_swarm_test.dart
@@ -3,8 +3,10 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:harness_mobile/notify/system_notices.dart';
import 'package:harness_mobile/settings/experimental_features.dart';
import 'package:harness_mobile/swarm/swarm_inbox.dart';
+import 'package:harness_mobile/swarm/swarm_activity_page.dart';
import 'package:harness_mobile/swarm/swarm_page.dart';
import 'package:harness_mobile/swarm/swarm_session.dart';
+import 'package:harness_mobile/swarm/swarm_tabs.dart';
import 'package:harness_mobile/swarm/swarm_request.dart';
import '../voice_fakes.dart';
@@ -117,8 +119,14 @@ void main() {
expect(i.invitations, isEmpty);
});
- group('Home', () {
- Future<SwarmHost> pump(WidgetTester tester, FakeSwarm fake) async {
+ /// The invitations moved from Home to Activity's All and Needs you, counted
+ /// on the tab (Slack's Activity, 2026-11-03).
+ group('Activity', () {
+ Future<SwarmHost> pump(
+ WidgetTester tester,
+ FakeSwarm fake, {
+ Widget page = const Scaffold(body: SwarmActivityView()),
+ }) async {
tester.view.physicalSize = const Size(1170, 2532);
tester.view.devicePixelRatio = 3;
addTearDown(tester.view.reset);
@@ -138,7 +146,7 @@ void main() {
MaterialApp(
builder: (context, child) =>
SwarmScope(notifier: host, child: child!),
- home: const SwarmPage(),
+ home: page,
),
);
await tester.pumpAndSettle();
@@ -146,9 +154,10 @@ void main() {
}
Finder key(String k) => find.byKey(ValueKey(k));
+ final section = key('swarm-activity-invitations');
- testWidgets('a person in a Swarm sees a new invitation, one line, and '
- 'joins it', (tester) async {
+ testWidgets('a person in a Swarm sees a new invitation in All, first and '
+ 'on one line, and joins it', (tester) async {
final fake = backend();
fake.routes['/api/super-tabs/t-i1/commands'] = (_) {
fake.routes['/api/super-tabs/list'] = (_) => {
@@ -164,13 +173,23 @@ void main() {
return <String, Object?>{};
};
await pump(tester, fake);
- expect(find.text('Invitations'), findsOneWidget);
+ expect(section, findsOneWidget);
final row = key('swarm-invitation-i1');
expect(
find.descendant(of: row, matching: find.text('Design Team')),
findsOneWidget,
);
double y(Finder f) => tester.getCenter(f).dy;
+ expect(
+ y(row),
+ greaterThan(y(key('swarm-activity-filter-all'))),
+ reason: 'under the filters, on All',
+ );
+ expect(
+ find.text("You're all caught up."),
+ findsNothing,
+ reason: 'one waits on the person',
+ );
final line = y(
find.descendant(of: row, matching: find.text('Design Team')),
);
@@ -179,7 +198,7 @@ void main() {
await tester.tap(key('swarm-invitation-join-i1'));
await tester.pumpAndSettle();
expect(fake.commands.last, {'type': 'invite.accept', 'inviteId': 'i1'});
- expect(find.text('Invitations'), findsNothing);
+ expect(section, findsNothing);
expect(row, findsNothing);
});
@@ -187,7 +206,7 @@ void main() {
final host = await pump(tester, backend());
await tester.tap(key('swarm-invitation-later-i1'));
await tester.pumpAndSettle();
- expect(find.text('Invitations'), findsNothing);
+ expect(section, findsNothing);
await host.session!.inbox.refreshAll();
await tester.pumpAndSettle();
expect(key('swarm-invitation-i1'), findsNothing);
@@ -212,6 +231,59 @@ void main() {
final fake = backend();
fake.routes[invitations] = (_) => <Object>[];
await pump(tester, fake);
+ expect(section, findsNothing);
+ });
+
+ testWidgets('All and Needs you have them, first, and count them: they '
+ 'wait on the person; Mentions and a page pushed over a page do not', (
+ tester,
+ ) async {
+ await pump(tester, backend());
+ Finder count(String filter, String n) => find.descendant(
+ of: key('swarm-activity-filter-$filter'),
+ matching: find.text(n),
+ );
+ expect(count('all', '1'), findsOneWidget);
+ expect(count('needsYou', '1'), findsOneWidget);
+ expect(count('mentions', '0'), findsOneWidget);
+
+ await tester.tap(key('swarm-activity-filter-needsYou'));
+ await tester.pumpAndSettle();
+ expect(key('swarm-invitation-i1'), findsOneWidget);
+ expect(find.text('Nothing needs you.'), findsNothing, reason: 'one does');
+
+ await tester.ensureVisible(key('swarm-activity-filter-mentions'));
+ await tester.tap(key('swarm-activity-filter-mentions'));
+ await tester.pumpAndSettle();
+ expect(key('swarm-invitation-i1'), findsNothing);
+
+ await pump(tester, backend(), page: const SwarmActivityPage());
+ expect(key('swarm-invitation-i1'), findsNothing);
+ });
+
+ testWidgets("the Activity tab's count has them, and loses one put off", (
+ tester,
+ ) async {
+ final host = await pump(tester, backend(), page: const SwarmTabsPage());
+ final badge = key('swarm-tab-badge-activity');
+ expect(swarmActivityTabBadge(host.session!), 1);
+ expect(
+ find.descendant(of: badge, matching: find.text('1')),
+ findsOneWidget,
+ );
+
+ await tester.tap(key('swarm-tab-activity'));
+ await tester.pumpAndSettle();
+ await tester.tap(key('swarm-invitation-later-i1'));
+ await tester.pumpAndSettle();
+
+ expect(swarmActivityTabBadge(host.session!), 0);
+ expect(badge, findsNothing);
+ });
+
+ testWidgets('Home lists none: they are Activity\'s', (tester) async {
+ await pump(tester, backend(), page: const SwarmPage());
+ expect(key('swarm-invitation-i1'), findsNothing);
expect(find.text('Invitations'), findsNothing);
});
});
diff --git a/mobile/test/swarm/swarm_mark_all_test.dart b/mobile/test/swarm/swarm_mark_all_test.dart
index 38285191b..7b5e675bb 100644
--- a/mobile/test/swarm/swarm_mark_all_test.dart
+++ b/mobile/test/swarm/swarm_mark_all_test.dart
@@ -9,11 +9,11 @@ import 'package:harness_mobile/notify/system_notices.dart';
import 'package:harness_mobile/settings/experimental_features.dart';
import 'package:harness_mobile/swarm/swarm_chat_notify.dart';
import 'package:harness_mobile/swarm/swarm_home_rows.dart';
+import 'package:harness_mobile/swarm/swarm_home_view_sheet.dart';
import 'package:harness_mobile/swarm/swarm_mark_all.dart';
import 'package:harness_mobile/swarm/swarm_page.dart';
import 'package:harness_mobile/swarm/swarm_reader.dart';
import 'package:harness_mobile/swarm/swarm_session.dart';
-import 'package:harness_mobile/swarm/swarm_style.dart';
import '../voice_fakes.dart' show MemoryKeyValueStore;
import 'swarm_fixture.dart';
@@ -484,8 +484,34 @@ void main() {
Finder row(String projectId) => key('swarm-project-$tab-$projectId');
bool bold(WidgetTester tester, String projectId) =>
tester.widget<SwarmHomeProjectRow>(row(projectId)).project.news.bold;
- SwarmIconButton button(WidgetTester tester, String k) =>
- tester.widget<SwarmIconButton>(key(k));
+
+ /// Opens Sort and filter, where Mark all read is (2026-11-03).
+ Future<void> openView(WidgetTester tester) async {
+ await tester.tap(key('swarm-home-view'));
+ await tester.pump();
+ await tester.pump(const Duration(milliseconds: 400));
+ }
+
+ /// Mark all read, from Sort and filter: the sheet closes, then it marks.
+ Future<void> markAll(WidgetTester tester) async {
+ await openView(tester);
+ await tester.tap(key('swarm-mark-all-read'));
+ }
+
+ /// Whether Mark all read has something to mark, as its row in Sort and
+ /// filter says; the sheet then closes.
+ Future<bool> markable(WidgetTester tester) async {
+ await openView(tester);
+ final on =
+ tester
+ .widget<SwarmHomeViewAction>(key('swarm-mark-all-read'))
+ .onTap !=
+ null;
+ Navigator.of(tester.element(key('swarm-mark-all-read'))).pop();
+ await tester.pump();
+ await tester.pump(const Duration(milliseconds: 400));
+ return on;
+ }
testWidgets('Mark all read tells how many with Undo; Undo puts the bold '
'back and sends nothing, and with nothing unread it is greyed', (
@@ -494,15 +520,15 @@ void main() {
final fake = backend();
await pump(tester, fake);
expect(bold(tester, project), isTrue);
- expect(button(tester, 'swarm-mark-all-read').onPressed, isNotNull);
+ expect(await markable(tester), isTrue);
- await tester.tap(key('swarm-mark-all-read'));
+ await markAll(tester);
await tester.pump();
await tester.pump(const Duration(milliseconds: 500));
expect(find.text('Marked 2 chats read'), findsOneWidget);
expect(bold(tester, project), isFalse);
- expect(button(tester, 'swarm-mark-all-read').onPressed, isNull);
+ expect(await markable(tester), isFalse);
await tester.tap(find.text('Undo'));
await tester.pump();
@@ -512,12 +538,12 @@ void main() {
expect(marksSent(fake), isEmpty);
expect(bold(tester, project), isTrue);
- await tester.tap(key('swarm-mark-all-read'));
+ await markAll(tester);
await tester.pump();
await tester.pump(const Duration(seconds: 7));
await tester.pumpAndSettle();
expect(marksSent(fake), [('g1', 5), ('g2', 4)]);
- expect(button(tester, 'swarm-mark-all-read').onPressed, isNull);
+ expect(await markable(tester), isFalse);
});
testWidgets('a chat muted on this phone a moment ago is not marked: the '
@@ -539,7 +565,7 @@ void main() {
reader.setNotify('g1', SwarmNotify.muted);
await tester.pump();
- await tester.tap(key('swarm-mark-all-read'));
+ await markAll(tester);
await tester.pump();
await tester.pump(const Duration(milliseconds: 500));
expect(find.text('Marked 1 chat read'), findsOneWidget);
@@ -550,7 +576,7 @@ void main() {
reader.setNotify('g2', SwarmNotify.muted);
await tester.pump();
- expect(button(tester, 'swarm-mark-all-read').onPressed, isNull);
+ expect(await markable(tester), isFalse);
expect(marksSent(fake), isEmpty);
for (final answer in answers) {
answer.complete({'notify': 'muted'});
@@ -562,7 +588,7 @@ void main() {
'with them', (tester) async {
final fake = backend();
await pump(tester, fake);
- await tester.tap(key('swarm-mark-all-read'));
+ await markAll(tester);
await tester.pump();
await tester.pump(const Duration(milliseconds: 500));
expect(find.text('Undo'), findsOneWidget);
@@ -587,7 +613,7 @@ void main() {
);
final fake = backend();
final host = await pump(tester, fake);
- await tester.tap(key('swarm-mark-all-read'));
+ await markAll(tester);
await tester.pump();
await tester.pump(const Duration(milliseconds: 500));
expect(find.text('Marked 2 chats read'), findsOneWidget);
@@ -605,7 +631,7 @@ void main() {
);
await host.session!.inbox.reader(tab)!.refresh();
await tester.pump();
- await tester.tap(key('swarm-mark-all-read'));
+ await markAll(tester);
for (var i = 0; i < 10; i++) {
await tester.pump(const Duration(milliseconds: 100));
}
@@ -625,7 +651,7 @@ void main() {
final fake = backend();
final host = await pump(tester, fake);
host.foreground = true;
- await tester.tap(key('swarm-mark-all-read'));
+ await markAll(tester);
await tester.pump();
await tester.pump(const Duration(milliseconds: 500));
expect(find.text('Undo'), findsOneWidget);
@@ -644,7 +670,7 @@ void main() {
final fake = backend();
final account = ValueNotifier<String?>(me);
await pump(tester, fake, signedIn: account);
- await tester.tap(key('swarm-mark-all-read'));
+ await markAll(tester);
await tester.pump();
await tester.pump(const Duration(milliseconds: 500));
expect(find.text('Undo'), findsOneWidget);
@@ -661,7 +687,7 @@ void main() {
'sent, and nothing is left to mark', (tester) async {
final fake = backend();
final host = await pump(tester, fake);
- await tester.tap(key('swarm-mark-all-read'));
+ await markAll(tester);
await tester.pump();
host.session!.inbox.reader(tab)!.revoke();
diff --git a/mobile/test/swarm/swarm_model_auto_join_test.dart b/mobile/test/swarm/swarm_model_auto_join_test.dart
new file mode 100644
index 000000000..3faae9cf8
--- /dev/null
+++ b/mobile/test/swarm/swarm_model_auto_join_test.dart
@@ -0,0 +1,76 @@
+import 'package:flutter_test/flutter_test.dart';
+import 'package:harness_mobile/swarm/model.dart';
+import 'package:harness_mobile/swarm/parts.dart';
+
+import 'swarm_fixture.dart';
+
+/// Fields the desktop's model reads since domain auto-join and the GitHub
+/// revision (#2736): the phone reads them too, so a read parsed on a computer
+/// is not dropped on the phone (desktop_parity_test.dart).
+void main() {
+ SuperTabSnapshot snapshot({
+ Map<String, dynamic> head = const {},
+ Map<String, dynamic> project = const {},
+ Map<String, dynamic> member = const {},
+ }) {
+ final base = headData();
+ final data = firstLoad(
+ head: {
+ ...base,
+ 'projects': [
+ {...(base['projects'] as List).single as Map, ...project},
+ ],
+ ...head,
+ },
+ );
+ data['members'] = [
+ part(me, 1, {...person(me), ...member}),
+ ];
+ return SuperTabSnapshot.fromJson(SuperTabParts.firstLoad(data).state);
+ }
+
+ test('a server that sends them: autoJoin on the head, joinedVia on a '
+ "member and a project's GitHub revision", () {
+ final read = snapshot(
+ head: {'autoJoin': true},
+ project: {'githubRevision': 3},
+ member: {'joinedVia': 'domain'},
+ );
+
+ expect(read.autoJoin, isTrue);
+ expect(read.projects.single.githubRevision, 3);
+ expect(read.people.single.joinedVia, 'domain');
+ });
+
+ test('an older server, which sends none: off, 0 and null', () {
+ final read = snapshot();
+
+ expect(read.autoJoin, isFalse);
+ expect(read.projects.single.githubRevision, 0);
+ expect(read.people.single.joinedVia, isNull);
+ });
+
+ test('autoJoin is on only when it is true', () {
+ expect(snapshot(head: {'autoJoin': false}).autoJoin, isFalse);
+ expect(snapshot(head: {'autoJoin': 'yes'}).autoJoin, isFalse);
+ });
+
+ test('a person the phone names from their email, as an older server '
+ 'sends no username, keeps how they joined', () {
+ final read = snapshot(member: {'joinedVia': 'domain'});
+
+ expect(read.people.single.chosenUsername, isNull);
+ expect(
+ read.people.single.username,
+ superTabDefaultUsername('[email protected]'),
+ );
+ expect(read.people.single.joinedVia, 'domain');
+ });
+
+ test('a person whose username the server sends keeps it too', () {
+ final read = snapshot(member: {'joinedVia': 'domain', 'username': 'tony'});
+
+ expect(read.people.single.username, 'tony');
+ expect(read.people.single.joinedVia, 'domain');
+ });
+}
diff --git a/mobile/test/swarm/swarm_project_details_test.dart b/mobile/test/swarm/swarm_project_details_test.dart
new file mode 100644
index 000000000..407945135
--- /dev/null
+++ b/mobile/test/swarm/swarm_project_details_test.dart
@@ -0,0 +1,375 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:harness_mobile/notify/system_notices.dart';
+import 'package:harness_mobile/phone/phone_shell_scope.dart';
+import 'package:harness_mobile/settings/experimental_features.dart';
+import 'package:harness_mobile/swarm/swarm_invites_sheet.dart';
+import 'package:harness_mobile/swarm/swarm_leaderboard.dart';
+import 'package:harness_mobile/swarm/swarm_project_details.dart';
+import 'package:harness_mobile/swarm/swarm_project_page.dart';
+import 'package:harness_mobile/swarm/swarm_project_status.dart';
+import 'package:harness_mobile/swarm/swarm_project_tabs.dart';
+import 'package:harness_mobile/swarm/swarm_project_team.dart';
+import 'package:harness_mobile/swarm/swarm_session.dart';
+
+import '../voice_fakes.dart';
+import 'swarm_computers_fake.dart';
+import 'swarm_fixture.dart';
+
+/// A project's details from a tap on its #name in its chat's header, as a
+/// channel's name opens them in Slack (Tony, 2026-11-03): #name over who is
+/// on it; Notifications, Invite for the Swarm's owner, Open terminal; then
+/// Status, Work, Team and Leaderboard, each opening what the ⋮ menu's row
+/// opens. Over one Swarm whose project Mobile has River, its PM, on mac-1.
+void main() {
+ const changesPath = '/api/super-tabs/$tab/changes';
+
+ FakeSwarm backend({
+ String role = 'owner',
+ String owner = me,
+ String leadOf = 'agent-lead',
+ }) {
+ final fake = FakeSwarm();
+ fake.routes['/api/super-tabs/list'] = (_) => {
+ 'tabs': [
+ {'id': tab, 'name': 'Phone Swarm', 'ownerId': owner},
+ ],
+ 'next': null,
+ };
+ fake.routes['/api/super-tabs/$tab/parts'] = (_) {
+ final read = firstLoad(
+ head: headData(ownerId: owner),
+ agents: [
+ agent('agent-lead', name: 'Lead', displayName: 'River'),
+ agent('agent-builder', displayName: 'Nova'),
+ ],
+ );
+ (read['groups'] as List)[0] = part(
+ leadChat,
+ 1,
+ groupData(
+ leadChat,
+ title: 'Mobile',
+ agentIds: [leadOf],
+ leadId: leadOf,
+ ),
+ );
+ return {
+ ...read,
+ 'members': [part(me, 1, person(me, role: role))],
+ };
+ };
+ fake.routes[changesPath] = (_) => changes(cursor: 'c2');
+ fake.routes['/api/super-tabs/$tab/decisions?state=open'] = (_) => {
+ 'decisions': <Object>[],
+ };
+ fake.routes['/api/super-tabs/$tab/mentions?state=waiting'] = (_) => {
+ 'mentions': <Object>[],
+ };
+ fake.routes['/api/super-tabs/$tab/conversations/$leadChat/messages'] = (
+ _,
+ ) => {'messages': <Object>[], 'next': null};
+ fake.routes['/api/super-tabs/$tab/leaderboard'] = (_) =>
+ leaderboardData(people: [scoreData(me, points: 10, rank: 1)]);
+ fake.routes['/api/super-tabs/$tab/invitations'] = (_) => {
+ 'invitations': <Object>[],
+ };
+ return fake;
+ }
+
+ late List<(String, String)> opened;
+ late Set<String> opens;
+
+ setUp(() {
+ opened = [];
+ opens = {'mac-1'};
+ });
+
+ Future<SwarmHost> pump(
+ WidgetTester tester,
+ FakeSwarm fake, {
+ ValueNotifier<String?>? account,
+ List<SwarmProjectTab> tabs = SwarmProjectTab.homeC,
+ }) async {
+ account ??= ValueNotifier<String?>(me);
+ final computers = FakeComputers(const [])
+ ..own = const [(id: 'mac-1', name: 'Tonys-MacBook-Pro', away: false)];
+ addTearDown(computers.dispose);
+ final host = SwarmHost(
+ accountId: () => account!.value,
+ account: account,
+ request: fake.request,
+ notices: SilentSystemNotices(),
+ computers: computers,
+ readMarks: MemoryKeyValueStore(),
+ features: ExperimentalFeaturesStore(storage: MemoryKeyValueStore())
+ ..value = {PhoneExperiment.swarm},
+ )..foreground = false;
+ addTearDown(host.dispose);
+ await tester.pumpWidget(
+ MaterialApp(
+ builder: (context, child) => PhoneShellScope(
+ onMachineLinked: (_) {},
+ onOpenAgent: (machine, agent) => opened.add((machine, agent)),
+ canOpenMachine: opens.contains,
+ child: SwarmScope(notifier: host, child: child!),
+ ),
+ home: SwarmProjectPage(swarmId: tab, projectId: project, tabs: tabs),
+ ),
+ );
+ await tester.pumpAndSettle();
+ return host;
+ }
+
+ Finder key(String value) => find.byKey(ValueKey(value));
+ Finder detail(String name) => key('swarm-project-details-$name');
+ bool detailsOpen() =>
+ find.byType(SwarmProjectDetailsSheet).evaluate().isNotEmpty;
+
+ Future<void> openDetails(WidgetTester tester) async {
+ await tester.tap(key('swarm-title-button'));
+ await tester.pumpAndSettle();
+ }
+
+ group('the header', () {
+ testWidgets("the #name is one button, heard as the project's details, "
+ 'and a thumb tall', (tester) async {
+ final semantics = tester.ensureSemantics();
+ await pump(tester, backend());
+
+ expect(
+ find.descendant(
+ of: key('swarm-title-button'),
+ matching: find.text('#Mobile'),
+ ),
+ findsOneWidget,
+ );
+ expect(
+ tester.getSemantics(key('swarm-title-button')),
+ isSemantics(
+ label: '#Mobile, project details',
+ isButton: true,
+ hasTapAction: true,
+ ),
+ );
+ expect(
+ tester.getSize(key('swarm-title-button')).height,
+ greaterThanOrEqualTo(44),
+ );
+ semantics.dispose();
+ });
+
+ testWidgets('a tap opens the details; ⋮ is still there', (tester) async {
+ await pump(tester, backend());
+ expect(key('swarm-project-menu'), findsOneWidget);
+
+ await openDetails(tester);
+
+ expect(detailsOpen(), isTrue);
+ });
+ });
+
+ group('what they hold', () {
+ testWidgets('#name over who is on it; Notifications, Invite and Open '
+ 'terminal; then Status, Work, Team and Leaderboard, in that order', (
+ tester,
+ ) async {
+ await pump(tester, backend());
+ await openDetails(tester);
+
+ expect(
+ find.descendant(
+ of: detail('title'),
+ matching: find.text('#Mobile'),
+ matchRoot: true,
+ ),
+ findsOneWidget,
+ );
+ expect(
+ find.descendant(
+ of: find.byType(SwarmProjectDetailsSheet),
+ matching: find.text('1 human · 2 agents'),
+ ),
+ findsNWidgets(2),
+ reason: 'under the name, and at the end of Team',
+ );
+ final quick = [
+ for (final name in ['notifications', 'invite', 'terminal'])
+ tester.getTopLeft(detail(name)),
+ ];
+ expect(quick.map((o) => o.dy).toSet(), hasLength(1), reason: 'a row');
+ expect(quick[0].dx, lessThan(quick[1].dx));
+ expect(quick[1].dx, lessThan(quick[2].dx));
+ final rows = [
+ for (final name in ['status', 'work', 'team', 'leaderboard'])
+ tester.getTopLeft(detail(name)).dy,
+ ];
+ expect(rows, [...rows]..sort());
+ expect(rows.first, greaterThan(quick.first.dy));
+ });
+
+ testWidgets("Invite is the Swarm owner's alone", (tester) async {
+ await pump(tester, backend(role: 'collaborator', owner: 'person-ken'));
+ await openDetails(tester);
+
+ expect(detail('invite'), findsNothing);
+ expect(detail('notifications'), findsOneWidget);
+ expect(detail('terminal'), findsOneWidget);
+ });
+
+ testWidgets('a viewer has no Open terminal', (tester) async {
+ await pump(tester, backend(role: 'viewer', owner: 'person-ken'));
+ await openDetails(tester);
+
+ expect(detail('terminal'), findsNothing);
+ expect(detail('status'), findsOneWidget);
+ });
+ });
+
+ group('Open terminal', () {
+ testWidgets("opens the PM's terminal at once, the details gone", (
+ tester,
+ ) async {
+ await pump(tester, backend());
+ await openDetails(tester);
+
+ await tester.tap(detail('terminal'));
+ await tester.pumpAndSettle();
+
+ expect(opened, [('mac-1', 'harness-agent-lead')]);
+ expect(detailsOpen(), isFalse);
+ });
+
+ testWidgets('no PM: greyed, why heard, and a tap does nothing', (
+ tester,
+ ) async {
+ final semantics = tester.ensureSemantics();
+ await pump(tester, backend(leadOf: 'agent-gone'));
+ await openDetails(tester);
+
+ expect(
+ tester.getSemantics(detail('terminal')),
+ isSemantics(
+ label: 'Open terminal, Stopped',
+ isButton: true,
+ hasEnabledState: true,
+ isEnabled: false,
+ ),
+ );
+ await tester.tap(detail('terminal'));
+ await tester.pumpAndSettle();
+
+ expect(opened, isEmpty);
+ expect(detailsOpen(), isTrue);
+ semantics.dispose();
+ });
+
+ testWidgets(
+ "its machine linked here but not answering: greyed, Offline, as the menu's",
+ (tester) async {
+ opens = {};
+ final semantics = tester.ensureSemantics();
+ await pump(tester, backend());
+ await openDetails(tester);
+
+ expect(
+ tester.getSemantics(detail('terminal')).label,
+ 'Open terminal, Offline',
+ );
+ semantics.dispose();
+ },
+ );
+ });
+
+ group('each row opens its sheet once the details are gone', () {
+ for (final (name, type) in [
+ ('status', SwarmProjectStatusSheet),
+ ('work', SwarmProjectSheet),
+ ('team', SwarmProjectTeamSheet),
+ ('leaderboard', SwarmLeaderboardPage),
+ ('invite', SwarmInvitesSheet),
+ ]) {
+ testWidgets(name, (tester) async {
+ await pump(tester, backend());
+ await openDetails(tester);
+
+ await tester.tap(detail(name));
+ await tester.pumpAndSettle();
+
+ expect(detailsOpen(), isFalse);
+ expect(find.byType(type), findsOneWidget);
+ });
+ }
+
+ testWidgets("notifications: the project chat's", (tester) async {
+ await pump(tester, backend());
+ await openDetails(tester);
+
+ await tester.tap(detail('notifications'));
+ await tester.pumpAndSettle();
+
+ expect(detailsOpen(), isFalse);
+ expect(find.text('All new messages'), findsOneWidget);
+ });
+
+ testWidgets('a sheet opened from the details closes with back, and the '
+ 'title opens the details again', (tester) async {
+ await pump(tester, backend());
+ await openDetails(tester);
+ await tester.tap(detail('team'));
+ await tester.pumpAndSettle();
+
+ await tester.tapAt(const Offset(200, 40));
+ await tester.pumpAndSettle();
+ expect(find.byType(SwarmProjectTeamSheet), findsNothing);
+
+ await openDetails(tester);
+ expect(detailsOpen(), isTrue);
+ });
+ });
+
+ group('lifecycle', () {
+ testWidgets('access lost with the details open closes them', (
+ tester,
+ ) async {
+ final host = await pump(tester, backend());
+ await openDetails(tester);
+
+ host.session!.inbox.reader(tab)!.revoke();
+ await tester.pumpAndSettle();
+
+ expect(detailsOpen(), isFalse);
+ expect(opened, isEmpty);
+ });
+
+ testWidgets('signing out with the details open closes them', (
+ tester,
+ ) async {
+ final account = ValueNotifier<String?>(me);
+ await pump(tester, backend(), account: account);
+ await openDetails(tester);
+
+ account.value = null;
+ await tester.pumpAndSettle();
+
+ expect(detailsOpen(), isFalse);
+ });
+
+ testWidgets('the project taken off the Swarm with them open closes them', (
+ tester,
+ ) async {
+ final fake = backend();
+ final host = await pump(tester, fake);
+ await openDetails(tester);
+
+ fake.routes[changesPath] = (_) => {
+ ...changes(cursor: 'c3', lastChangedAt: 200),
+ 'head': part('head', 2, headData(projects: [])),
+ };
+ await host.session!.inbox.reader(tab)!.refresh();
+ await tester.pumpAndSettle();
+
+ expect(detailsOpen(), isFalse);
+ });
+ });
+}
diff --git a/mobile/test/swarm/swarm_project_line_test.dart b/mobile/test/swarm/swarm_project_line_test.dart
deleted file mode 100644
index abac5ce32..000000000
--- a/mobile/test/swarm/swarm_project_line_test.dart
+++ /dev/null
@@ -1,186 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_test/flutter_test.dart';
-import 'package:harness_mobile/swarm/model.dart';
-import 'package:harness_mobile/swarm/parts.dart';
-import 'package:harness_mobile/swarm/swarm_home_list.dart';
-import 'package:harness_mobile/swarm/swarm_home_rows.dart';
-import 'package:harness_mobile/swarm/swarm_row.dart';
-import 'package:harness_mobile/swarm/swarm_style.dart';
-import 'package:harness_mobile/swarm/swarm_unread.dart';
-import 'package:harness_mobile/swarm/team_glance.dart';
-
-import 'swarm_fixture.dart';
-
-/// A project's subtitle on Swarm Home: how many humans read it and how many
-/// agents are running, leaving out what is none.
-void main() {
- final now = DateTime(2026, 10, 27, 9);
-
- SuperTabSnapshot read({int running = 0, int idle = 0}) {
- final busy = [for (var i = 0; i < running; i++) 'busy-$i'];
- return SuperTabSnapshot.fromJson(
- SuperTabParts.firstLoad(
- firstLoad(
- agents: [
- for (final id in busy) agent(id),
- for (var i = 0; i < idle; i++) agent('idle-$i'),
- ],
- groups: [
- for (final id in busy)
- groupData(
- 'work-$id',
- title: 'Task of $id',
- agentIds: [id],
- status: 'working',
- workerId: id,
- ),
- ],
- ),
- ).state,
- );
- }
-
- SwarmTeamGlance glance({int running = 0, int idle = 0}) => swarmTeamGlance(
- read(running: running, idle: idle),
- now: now,
- );
-
- const line = ValueKey('swarm-project-line');
-
- Future<void> pump(
- WidgetTester tester, {
- int humans = 0,
- int running = 0,
- String? swarmName,
- double width = 390,
- }) {
- final snapshot = read(running: running);
- return tester.pumpWidget(
- MaterialApp(
- home: Scaffold(
- // Scrolled, as Home's rows are: a row takes no more height than it
- // needs.
- body: SingleChildScrollView(
- child: Align(
- alignment: Alignment.topLeft,
- child: SizedBox(
- width: width,
- child: SwarmHomeProjectRow(
- key: const ValueKey('row'),
- project: SwarmHomeProject(
- swarmId: 'tab',
- project: snapshot.projects.first,
- active: null,
- news: swarmNoProjectNews,
- ),
- glance: swarmTeamGlance(snapshot, now: now),
- humans: humans,
- now: now,
- swarmName: swarmName,
- onTap: () {},
- ),
- ),
- ),
- ),
- ),
- ),
- );
- }
-
- group('swarmProjectLine', () {
- test('counts humans and the agents running, with a bullet between', () {
- expect(
- swarmProjectLine(humans: 5, glance: glance(running: 8)),
- '5 humans • 8 agents running',
- );
- });
-
- test('says one human and one agent in the singular', () {
- expect(
- swarmProjectLine(humans: 1, glance: glance(running: 1)),
- '1 human • 1 agent running',
- );
- });
-
- test('leaves out the agents when none is running, idle or not', () {
- expect(swarmProjectLine(humans: 3, glance: glance()), '3 humans');
- expect(swarmProjectLine(humans: 3, glance: glance(idle: 2)), '3 humans');
- });
-
- test('leaves out the humans when there are none', () {
- expect(
- swarmProjectLine(humans: 0, glance: glance(running: 2)),
- '2 agents running',
- );
- });
-
- test('is empty with nothing to say', () {
- expect(swarmProjectLine(humans: 0, glance: glance()), isEmpty);
- });
-
- test('ends in the Swarm, with or without counts', () {
- expect(
- swarmProjectLine(
- humans: 2,
- glance: glance(running: 3),
- swarmName: 'Acme',
- ),
- '2 humans • 3 agents running • Acme',
- );
- expect(
- swarmProjectLine(humans: 0, glance: glance(), swarmName: 'Acme'),
- 'Acme',
- );
- });
- });
-
- group('the row', () {
- testWidgets('draws the line and no faces', (tester) async {
- await pump(tester, humans: 5, running: 2);
-
- expect(find.text('5 humans • 2 agents running'), findsOneWidget);
- expect(find.byType(SwarmAvatar), findsNothing);
- });
-
- testWidgets('with nothing to say draws no line and keeps its height', (
- tester,
- ) async {
- await pump(tester);
-
- expect(find.byKey(line), findsNothing);
- expect(
- tester.getSize(find.byKey(const ValueKey('row'))).height,
- SwarmRow.height,
- );
- });
-
- testWidgets('is heard without the bullet', (tester) async {
- final semantics = tester.ensureSemantics();
- await pump(tester, humans: 5, running: 2, swarmName: 'Acme');
-
- expect(
- find.bySemanticsLabel(RegExp('5 humans, 2 agents running, Acme')),
- findsOneWidget,
- );
- semantics.dispose();
- });
-
- testWidgets('a long line ellipsizes, the Swarm the first to go', (
- tester,
- ) async {
- await pump(
- tester,
- humans: 12,
- running: 12,
- swarmName: 'A Swarm with a name far too long for one row of a phone',
- width: 240,
- );
-
- expect(tester.takeException(), isNull);
- final text = tester.widget<Text>(find.byKey(line));
- expect(text.maxLines, 1);
- expect(text.overflow, TextOverflow.ellipsis);
- expect(text.data, startsWith('12 humans • 12 agents running • '));
- });
- });
-}
diff --git a/mobile/test/swarm/swarm_screens_test.dart b/mobile/test/swarm/swarm_screens_test.dart
index e652058ad..91a81cc1e 100644
--- a/mobile/test/swarm/swarm_screens_test.dart
+++ b/mobile/test/swarm/swarm_screens_test.dart
@@ -256,9 +256,9 @@ void main() {
reason: "River's task-chat tag stays on its own row",
);
expect(
- find.descendant(of: row, matching: find.text('1 human')),
- findsOneWidget,
- reason: 'how many people read it, with no agent running',
+ find.descendant(of: row, matching: find.textContaining('human')),
+ findsNothing,
+ reason: 'one line: who reads it is on its Team, not on Home',
);
});
diff --git a/mobile/test/swarm/swarm_search_page_test.dart b/mobile/test/swarm/swarm_search_page_test.dart
new file mode 100644
index 000000000..695b54804
--- /dev/null
+++ b/mobile/test/swarm/swarm_search_page_test.dart
@@ -0,0 +1,792 @@
+import 'dart:async';
+
+import 'package:flutter/cupertino.dart' show CupertinoPageRoute;
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+
+import 'package:harness_mobile/notify/system_notices.dart';
+import 'package:harness_mobile/settings/experimental_features.dart';
+import 'package:harness_mobile/shared/theme/app_theme.dart' show buildAppTheme;
+import 'package:harness_mobile/swarm/swarm_agents.dart';
+import 'package:harness_mobile/swarm/swarm_conversation_page.dart';
+import 'package:harness_mobile/swarm/swarm_page.dart';
+import 'package:harness_mobile/swarm/swarm_project_page.dart';
+import 'package:harness_mobile/swarm/swarm_request.dart';
+import 'package:harness_mobile/swarm/swarm_search_page.dart';
+import 'package:harness_mobile/swarm/swarm_session.dart';
+import 'package:harness_mobile/swarm/swarm_start.dart' show SwarmComputers;
+
+import '../voice_fakes.dart';
+import 'swarm_computers_fake.dart';
+import 'swarm_fixture.dart';
+
+/// The person's agents as a test sets them.
+class _Agents extends ChangeNotifier implements SwarmAgents {
+ @override
+ int? working = 1;
+
+ @override
+ List<SwarmAgentRef> agents = [
+ (
+ machineId: 'mac-1',
+ agentId: 'one',
+ name: 'Wren',
+ machine: 'Studio',
+ engine: 'claude',
+ working: true,
+ waiting: false,
+ ),
+ (
+ machineId: 'mac-2',
+ agentId: 'two',
+ name: 'Ivy',
+ machine: 'Mac mini',
+ engine: null,
+ working: false,
+ waiting: true,
+ ),
+ ];
+
+ final opened = <String>[];
+
+ void keep(int count) {
+ agents = agents.take(count).toList();
+ notifyListeners();
+ }
+
+ @override
+ void openList(BuildContext context) {}
+
+ @override
+ void open(BuildContext context, SwarmAgentRef agent) =>
+ opened.add(agent.agentId);
+}
+
+/// Computers that also have the person's agents, as the app's do.
+class _AgentComputers extends FakeComputers implements SwarmAgentsSource {
+ _AgentComputers() : super(const []);
+
+ @override
+ final _Agents agents = _Agents();
+}
+
+/// Search (Slack's, Tony 2026-11-03), from Home's search field or a pull at
+/// its top: Recent · Projects · Chats · Agents. Over a scripted backend: one
+/// Swarm whose person reads Mobile, Web, Team (private, theirs) and Điện
+/// thoại, not Secret (private, another's); Mobile has their Buddy chat with
+/// Wren and another person's; Web their archived Buddy chat. A second Swarm,
+/// Lab, has a Mobile too.
+void main() {
+ const web = 'project-2', team = 'project-3', secret = 'project-4';
+ const phone = 'project-5';
+ const webLead = 'group-lead-web', teamLead = 'group-lead-team';
+ const secretLead = 'group-lead-secret', phoneLead = 'group-lead-phone';
+ const buddyChat = 'buddy-me';
+ const other = 'person-other';
+ const lab = 'tab-2';
+
+ Map<String, dynamic> projectRow(
+ String id,
+ String name,
+ String lead, {
+ bool private = false,
+ String owner = me,
+ List<String> members = const [],
+ }) => {
+ 'id': id,
+ 'name': name,
+ 'ownerId': owner,
+ 'leadConversationId': lead,
+ 'visibility': private ? 'private' : 'public',
+ 'members': [
+ for (final member in members) {'id': member, 'generation': 'gen-$member'},
+ ],
+ 'updateMinutes': 5,
+ };
+
+ Map<String, dynamic> inProject(String id, Map<String, dynamic> row) => {
+ ...row,
+ 'projectId': id,
+ };
+
+ final readable = [
+ projectRow(project, 'Mobile', leadChat),
+ projectRow(web, 'Web', webLead),
+ projectRow(
+ team,
+ 'Team',
+ teamLead,
+ private: true,
+ owner: other,
+ members: [me],
+ ),
+ projectRow(secret, 'Secret', secretLead, private: true, owner: other),
+ projectRow(phone, 'Điện thoại', phoneLead),
+ ];
+
+ void serve(
+ FakeSwarm fake, {
+ String tabId = tab,
+ String name = 'Phone Swarm',
+ List<Map<String, dynamic>>? projects,
+ }) {
+ fake.routes['/api/super-tabs/$tabId/parts'] = (_) => {
+ ...firstLoad(
+ tabId: tabId,
+ head: headData(id: tabId, name: name, projects: projects ?? readable),
+ agents: [
+ agent('agent-lead', name: 'Lead', displayName: 'River'),
+ buddyData('agent-wren', displayName: 'Wren'),
+ buddyData('agent-ivy', owner: other, displayName: 'Ivy'),
+ ],
+ groups: [
+ inProject(web, groupData(webLead, title: 'Web')),
+ inProject(team, groupData(teamLead, title: 'Team')),
+ inProject(secret, groupData(secretLead, title: 'Secret')),
+ inProject(phone, groupData(phoneLead, title: 'Điện thoại')),
+ buddyChatData(buddyChat, agentIds: ['agent-wren']),
+ buddyChatData('buddy-other', owner: other, agentIds: ['agent-ivy']),
+ inProject(web, {...buddyChatData('buddy-me-web'), 'archived': true}),
+ ],
+ ),
+ 'members': [
+ part(me, 1, person(me)),
+ part(other, 1, person(other, role: 'collaborator')),
+ ],
+ };
+ fake.routes['/api/super-tabs/$tabId/changes'] = (_) =>
+ changes(cursor: 'c2');
+ fake.routes['/api/super-tabs/$tabId/decisions?state=open'] = (_) => {
+ 'decisions': <Object>[],
+ };
+ fake.routes['/api/super-tabs/$tabId/mentions?state=waiting'] = (_) => {
+ 'mentions': <Object>[],
+ };
+ fake.routes['/api/super-tabs/$tabId/commands'] = (_) => {
+ 'result': <String, dynamic>{},
+ };
+ for (final chat in [leadChat, webLead, teamLead, phoneLead, buddyChat]) {
+ fake.routes['/api/super-tabs/$tabId/conversations/$chat/messages'] = (
+ _,
+ ) => {'messages': <Object>[], 'next': null};
+ }
+ }
+
+ FakeSwarm backend({bool twoSwarms = false}) {
+ final fake = FakeSwarm();
+ fake.routes['/api/super-tabs/list'] = (_) => {
+ 'tabs': [
+ {'id': tab, 'name': 'Phone Swarm', 'ownerId': me},
+ if (twoSwarms) {'id': lab, 'name': 'Lab Swarm', 'ownerId': me},
+ ],
+ 'next': null,
+ };
+ serve(fake);
+ if (twoSwarms) {
+ serve(
+ fake,
+ tabId: lab,
+ name: 'Lab Swarm',
+ projects: [projectRow(project, 'Mobile', leadChat)],
+ );
+ }
+ return fake;
+ }
+
+ /// Swarm on, on an iPhone's screen, 390 points wide: Home at the root of
+ /// its stack, or Search itself with [search].
+ Future<SwarmHost> pump(
+ WidgetTester tester,
+ FakeSwarm fake, {
+ SwarmComputers? computers,
+ bool search = false,
+ bool settle = true,
+ ThemeData? theme,
+ }) async {
+ tester.view.physicalSize = const Size(390, 844) * 3;
+ tester.view.devicePixelRatio = 3;
+ addTearDown(tester.view.reset);
+ final features = ExperimentalFeaturesStore(storage: MemoryKeyValueStore())
+ ..value = {PhoneExperiment.swarm};
+ final account = ValueNotifier<String?>(me);
+ final host = SwarmHost(
+ accountId: () => account.value,
+ account: account,
+ request: fake.request,
+ notices: SilentSystemNotices(),
+ features: features,
+ readMarks: MemoryKeyValueStore(),
+ computers: computers,
+ )..foreground = false;
+ addTearDown(host.dispose);
+ await tester.pumpWidget(
+ MaterialApp(
+ theme: theme,
+ builder: (context, child) => SwarmScope(notifier: host, child: child!),
+ onGenerateRoute: (_) => CupertinoPageRoute<void>(
+ builder: (_) => search ? const SwarmSearchPage() : const SwarmPage(),
+ ),
+ ),
+ );
+ settle ? await tester.pumpAndSettle() : await tester.pump();
+ return host;
+ }
+
+ Finder key(String value) => find.byKey(ValueKey(value));
+ Finder hit(String value) => key('swarm-search-hit-$value');
+ Finder chip(SwarmSearchKind kind) => key('swarm-search-kind-${kind.name}');
+ Finder inside(Finder of, Finder matching) =>
+ find.descendant(of: of, matching: matching);
+ double y(WidgetTester tester, Finder finder) => tester.getTopLeft(finder).dy;
+ final field = inside(key('swarm-search-field'), find.byType(EditableText));
+
+ Future<void> openSearch(WidgetTester tester) async {
+ await tester.tap(key('swarm-home-search'));
+ await tester.pumpAndSettle();
+ }
+
+ Future<void> type(WidgetTester tester, String text) async {
+ await tester.enterText(field, text);
+ await tester.pumpAndSettle();
+ }
+
+ /// A tap on [kind]'s chip, the row scrolled to it first as a thumb would.
+ Future<void> choose(WidgetTester tester, SwarmSearchKind kind) async {
+ await tester.ensureVisible(chip(kind));
+ await tester.pumpAndSettle();
+ await tester.tap(chip(kind));
+ await tester.pumpAndSettle();
+ }
+
+ /// Whether [kind]'s chip is the open one, as a screen reader hears it.
+ void expectOpen(WidgetTester tester, SwarmSearchKind kind) {
+ for (final each in SwarmSearchKind.values) {
+ if (chip(each).evaluate().isEmpty) continue;
+ expect(
+ tester.getSemantics(chip(each)),
+ isSemantics(isButton: true, isSelected: each == kind),
+ reason: each.name,
+ );
+ }
+ }
+
+ /// The open page's rows, top to bottom.
+ List<String> rows(WidgetTester tester) {
+ final found = find.byWidgetPredicate(
+ (w) =>
+ w.key is ValueKey<String> &&
+ (w.key! as ValueKey<String>).value.startsWith('swarm-search-hit-'),
+ );
+ final hits = found.evaluate().toList()
+ ..sort(
+ (a, b) => (a.renderObject! as RenderBox)
+ .localToGlobal(Offset.zero)
+ .dy
+ .compareTo(
+ (b.renderObject! as RenderBox).localToGlobal(Offset.zero).dy,
+ ),
+ );
+ return [
+ for (final element in hits)
+ (element.widget.key! as ValueKey<String>).value.substring(
+ 'swarm-search-hit-'.length,
+ ),
+ ];
+ }
+
+ group('the ways in', () {
+ testWidgets("the top bar's Search opens it, its field focused for typing, "
+ 'with Recent, Projects and Chats; no Agents without the agents', (
+ tester,
+ ) async {
+ await pump(tester, backend());
+
+ await openSearch(tester);
+
+ expect(find.byType(SwarmSearchPage), findsOneWidget);
+ expect(tester.widget<EditableText>(field).focusNode.hasFocus, isTrue);
+ expect(find.text('Search chats, projects, agents'), findsOneWidget);
+ for (final kind in [
+ SwarmSearchKind.recent,
+ SwarmSearchKind.projects,
+ SwarmSearchKind.chats,
+ ]) {
+ expect(chip(kind), findsOneWidget);
+ }
+ expect(chip(SwarmSearchKind.agents), findsNothing);
+ expectOpen(tester, SwarmSearchKind.recent);
+ });
+
+ testWidgets('a pull down at the top of Home opens it', (tester) async {
+ await pump(tester, backend());
+ final gesture = await tester.startGesture(
+ tester.getTopLeft(key('swarm-home-list')) + const Offset(195, 40),
+ );
+ for (var i = 0; i < 15; i++) {
+ await gesture.moveBy(const Offset(0, 10));
+ await tester.pump();
+ }
+ await gesture.up();
+ await tester.pumpAndSettle();
+
+ expect(find.byType(SwarmSearchPage), findsOneWidget);
+ });
+
+ testWidgets('back comes back to Home', (tester) async {
+ await pump(tester, backend());
+ await openSearch(tester);
+
+ await tester.tap(key('tty-back'));
+ await tester.pumpAndSettle();
+
+ expect(find.byType(SwarmSearchPage), findsNothing);
+ expect(key('swarm-home-search'), findsOneWidget);
+ });
+
+ testWidgets('Home has no search field: Search is a button on its top bar, '
+ 'before the avatar, heard as Search (Tony, 2026-11-03)', (
+ tester,
+ ) async {
+ final handle = tester.ensureSemantics();
+ await pump(tester, backend());
+
+ expect(key('swarm-search-pill'), findsNothing);
+ expect(find.text('Search chats, projects, agents'), findsNothing);
+ expect(
+ tester.getSemantics(key('swarm-home-search')),
+ isSemantics(label: 'Search', isButton: true, hasTapAction: true),
+ );
+ expect(
+ tester.getCenter(key('swarm-home-search')).dy,
+ closeTo(tester.getCenter(key('swarm-you-button')).dy, .01),
+ reason: 'on the top bar',
+ );
+ expect(
+ tester.getTopLeft(key('swarm-home-search')).dx,
+ lessThan(tester.getTopLeft(key('swarm-you-button')).dx),
+ reason: 'the avatar last',
+ );
+ expect(
+ tester.getBottomLeft(key('swarm-home-search')).dy,
+ lessThanOrEqualTo(tester.getTopLeft(key('swarm-home-list')).dy),
+ reason: 'over the list, not in it',
+ );
+ handle.dispose();
+ });
+ });
+
+ group('its field', () {
+ testWidgets("takes none of the app's field look, focused or not: no "
+ 'outline, which the pill cut to two blue arcs, and no fill of its '
+ 'own', (tester) async {
+ for (final brightness in Brightness.values) {
+ await pump(
+ tester,
+ backend(),
+ search: true,
+ theme: buildAppTheme(brightness: brightness),
+ );
+ final decorator = tester.widget<InputDecorator>(
+ inside(key('swarm-search-field'), find.byType(InputDecorator)),
+ );
+
+ expect(decorator.isFocused, isTrue, reason: 'it opens focused');
+ final decoration = decorator.decoration;
+ expect(
+ decoration.focusedBorder,
+ InputBorder.none,
+ reason: '$brightness',
+ );
+ expect(
+ decoration.enabledBorder,
+ InputBorder.none,
+ reason: '$brightness',
+ );
+ expect(decoration.border, InputBorder.none, reason: '$brightness');
+ expect(decoration.filled, isFalse, reason: '$brightness');
+ }
+ });
+ });
+
+ group('what it finds', () {
+ testWidgets('Projects: each the person reads, by Swarm; never a private '
+ "one of someone else's", (tester) async {
+ await pump(tester, backend(twoSwarms: true), search: true);
+
+ await choose(tester, SwarmSearchKind.projects);
+
+ expect(rows(tester), [
+ 'project-$tab-$project',
+ 'project-$tab-$web',
+ 'project-$tab-$team',
+ 'project-$tab-$phone',
+ 'project-$lab-$project',
+ ]);
+ expect(
+ inside(hit('project-$lab-$project'), find.text('Lab Swarm')),
+ findsOneWidget,
+ reason: 'which Mobile it is',
+ );
+ expect(find.text('#Secret'), findsNothing);
+ });
+
+ testWidgets("Chats: the person's own Buddy chat, by its Buddy and "
+ "project; not another's, nor one archived", (tester) async {
+ await pump(tester, backend(), search: true);
+
+ await choose(tester, SwarmSearchKind.chats);
+
+ expect(rows(tester), ['chat-$tab-$buddyChat']);
+ expect(
+ inside(hit('chat-$tab-$buddyChat'), find.text('Wren · Mobile')),
+ findsOneWidget,
+ );
+ });
+
+ testWidgets('Recent before anything is typed: what moved, last first', (
+ tester,
+ ) async {
+ await pump(tester, backend(), search: true);
+
+ final recent = rows(tester);
+
+ expect(recent, isNotEmpty);
+ expect(recent, isNot(contains('project-$tab-$secret')));
+ expect(recent.length, lessThanOrEqualTo(swarmSearchRecent));
+ });
+
+ testWidgets('typed: Recent becomes All and lists every kind, what starts '
+ 'with it first, then a word starting with it', (tester) async {
+ await pump(tester, backend(), search: true);
+
+ await type(tester, 'mo');
+
+ expect(inside(chip(SwarmSearchKind.recent), find.text('All')), findsOne);
+ expect(rows(tester), ['project-$tab-$project', 'chat-$tab-$buddyChat']);
+ });
+
+ testWidgets('case and accents aside', (tester) async {
+ await pump(tester, backend(), search: true);
+
+ await type(tester, 'DIEN');
+
+ expect(rows(tester), ['project-$tab-$phone']);
+ expect(find.text('#Điện thoại'), findsOneWidget);
+ });
+
+ testWidgets("a Swarm's name finds what is in it", (tester) async {
+ await pump(tester, backend(twoSwarms: true), search: true);
+
+ await type(tester, 'lab');
+
+ expect(rows(tester), ['project-$lab-$project', 'chat-$lab-$buddyChat']);
+ });
+
+ testWidgets('nothing matches says so; Clear empties the field and the '
+ 'list comes back', (tester) async {
+ await pump(tester, backend(), search: true);
+ final before = rows(tester);
+
+ await type(tester, 'zzz');
+
+ expect(rows(tester), isEmpty);
+ expect(find.text('Nothing matches “zzz”.'), findsOneWidget);
+
+ await tester.tap(key('swarm-search-clear'));
+ await tester.pumpAndSettle();
+
+ expect(tester.widget<EditableText>(field).controller.text, isEmpty);
+ expect(key('swarm-search-clear'), findsNothing);
+ expect(rows(tester), before);
+ expect(
+ inside(chip(SwarmSearchKind.recent), find.text('Recent')),
+ findsOne,
+ );
+ });
+ });
+
+ group('chips and pages', () {
+ testWidgets('a tap on a chip turns to its page; a sideways swipe turns '
+ 'it too, and the chip follows', (tester) async {
+ await pump(tester, backend(), search: true);
+
+ await choose(tester, SwarmSearchKind.chats);
+
+ expectOpen(tester, SwarmSearchKind.chats);
+ expect(key('swarm-search-page-chats'), findsOneWidget);
+
+ await tester.fling(key('swarm-search-pages'), const Offset(300, 0), 1000);
+ await tester.pumpAndSettle();
+
+ expectOpen(tester, SwarmSearchKind.projects);
+ expect(rows(tester), contains('project-$tab-$web'));
+ });
+
+ testWidgets('what is typed holds on every page', (tester) async {
+ await pump(tester, backend(), search: true);
+ await type(tester, 'web');
+
+ await choose(tester, SwarmSearchKind.projects);
+ expect(rows(tester), ['project-$tab-$web']);
+
+ await choose(tester, SwarmSearchKind.chats);
+ expect(rows(tester), isEmpty);
+ expect(find.text('Nothing matches “web”.'), findsOneWidget);
+ });
+ });
+
+ group('opening', () {
+ testWidgets('a project opens over Search, and back finds Search as it '
+ 'was left', (tester) async {
+ await pump(tester, backend());
+ await openSearch(tester);
+ await type(tester, 'web');
+
+ await tester.tap(hit('project-$tab-$web'));
+ await tester.pumpAndSettle();
+
+ expect(find.byType(SwarmProjectPage), findsOneWidget);
+
+ await tester.tap(key('tty-back'));
+ await tester.pumpAndSettle();
+
+ expect(find.byType(SwarmSearchPage), findsOneWidget);
+ expect(tester.widget<EditableText>(field).controller.text, 'web');
+ expect(rows(tester), ['project-$tab-$web']);
+ });
+
+ testWidgets('their Buddy chat opens it', (tester) async {
+ await pump(tester, backend());
+ await openSearch(tester);
+ await choose(tester, SwarmSearchKind.chats);
+
+ await tester.tap(hit('chat-$tab-$buddyChat'));
+ await tester.pumpAndSettle();
+
+ expect(find.byType(SwarmConversationPage), findsOneWidget);
+ });
+ });
+
+ group('agents', () {
+ testWidgets('with the computers\' agents: an Agents chip, each agent by '
+ 'its computer and engine, and a tap opens it', (tester) async {
+ final computers = _AgentComputers();
+ addTearDown(computers.dispose);
+ await pump(tester, backend(), computers: computers, search: true);
+
+ await choose(tester, SwarmSearchKind.agents);
+
+ expect(rows(tester), ['agent-mac-1-one', 'agent-mac-2-two']);
+ expect(
+ inside(hit('agent-mac-1-one'), find.text('Studio · claude')),
+ findsOne,
+ );
+ expect(inside(hit('agent-mac-2-two'), find.text('Mac mini')), findsOne);
+
+ await tester.tap(hit('agent-mac-2-two'));
+ expect(computers.agents.opened, ['two']);
+ });
+
+ testWidgets('a swipe on to Agents brings its chip into sight on a '
+ 'narrow phone', (tester) async {
+ final computers = _AgentComputers();
+ addTearDown(computers.dispose);
+ await pump(tester, backend(), computers: computers, search: true);
+ // Recent to Agents by swipes alone: the chips never touched.
+ for (var i = 0; i < 3; i++) {
+ await tester.fling(
+ key('swarm-search-pages'),
+ const Offset(-300, 0),
+ 1000,
+ );
+ await tester.pumpAndSettle();
+ }
+
+ expectOpen(tester, SwarmSearchKind.agents);
+ expect(rows(tester), ['agent-mac-1-one', 'agent-mac-2-two']);
+ final agents = tester.getRect(chip(SwarmSearchKind.agents));
+ expect(agents.left, greaterThanOrEqualTo(0));
+ expect(agents.right, lessThanOrEqualTo(390));
+ });
+
+ testWidgets('typed, an agent is found by name or by its computer', (
+ tester,
+ ) async {
+ final computers = _AgentComputers();
+ addTearDown(computers.dispose);
+ await pump(tester, backend(), computers: computers, search: true);
+
+ await type(tester, 'ivy');
+ expect(rows(tester), ['agent-mac-2-two']);
+
+ await type(tester, 'studio');
+ expect(rows(tester), ['agent-mac-1-one']);
+ });
+
+ testWidgets('an agent gone from the computers goes from the list', (
+ tester,
+ ) async {
+ final computers = _AgentComputers();
+ addTearDown(computers.dispose);
+ await pump(tester, backend(), computers: computers, search: true);
+ await choose(tester, SwarmSearchKind.agents);
+
+ computers.agents.keep(1);
+ await tester.pumpAndSettle();
+
+ expect(rows(tester), ['agent-mac-1-one']);
+ });
+ });
+
+ group('while it reads, and when it cannot', () {
+ testWidgets('while the Swarms are read: a skeleton, never "nothing"', (
+ tester,
+ ) async {
+ final fake = backend();
+ final held = Completer<Object?>();
+ fake.routes['/api/super-tabs/list'] = (_) => held.future;
+ await pump(tester, fake, search: true, settle: false);
+ await tester.pump();
+
+ expect(key('swarm-search-loading'), findsOneWidget);
+ expect(key('swarm-search-none'), findsNothing);
+
+ held.complete({
+ 'tabs': [
+ {'id': tab, 'name': 'Phone Swarm', 'ownerId': me},
+ ],
+ 'next': null,
+ });
+ await tester.pumpAndSettle();
+
+ expect(key('swarm-search-loading'), findsNothing);
+ expect(rows(tester), isNotEmpty);
+ });
+
+ testWidgets('a Swarm that could not be read: said, over what the others '
+ 'have', (tester) async {
+ final fake = backend(twoSwarms: true);
+ fake.routes['/api/super-tabs/$lab/parts'] = (_) =>
+ throw SuperTabFailure('INTERNAL', 'down', statusCode: 500);
+ await pump(tester, fake, search: true);
+
+ await choose(tester, SwarmSearchKind.projects);
+
+ expect(find.text('Some Swarms could not be read.'), findsOneWidget);
+ expect(rows(tester), contains('project-$tab-$web'));
+ expect(rows(tester), isNot(contains('project-$lab-$project')));
+ });
+ });
+
+ testWidgets('with the keyboard up: the field and chips stay on the screen, '
+ 'the results end at the keyboard, and dragging them puts it away', (
+ tester,
+ ) async {
+ await pump(tester, backend(), search: true);
+ const keyboard = 336.0;
+ tester.view.viewInsets = const FakeViewPadding(bottom: keyboard * 3);
+ addTearDown(tester.view.resetViewInsets);
+ await tester.pumpAndSettle();
+
+ expect(tester.takeException(), isNull, reason: 'no overflow');
+ expect(y(tester, key('swarm-search-field')), greaterThanOrEqualTo(0));
+ expect(
+ tester.getBottomLeft(chip(SwarmSearchKind.recent)).dy,
+ lessThan(844 - keyboard),
+ );
+ expect(
+ tester.getBottomLeft(key('swarm-search-pages')).dy,
+ closeTo(844 - keyboard, 0.5),
+ reason: 'once, not two keyboards up',
+ );
+ expect(tester.widget<EditableText>(field).focusNode.hasFocus, isTrue);
+
+ await tester.drag(key('swarm-search-page-recent'), const Offset(0, -80));
+ await tester.pumpAndSettle();
+
+ expect(tester.widget<EditableText>(field).focusNode.hasFocus, isFalse);
+ });
+
+ group('swarmSearchFind', () {
+ SwarmSearchHit h(
+ String key,
+ String title, {
+ SwarmSearchKind kind = SwarmSearchKind.projects,
+ String detail = 'Phone Swarm',
+ int? at,
+ }) => SwarmSearchHit(
+ kind: kind,
+ key: key,
+ title: title,
+ detail: detail,
+ at: at == null ? null : DateTime(2026, 11, 3, 9, at),
+ open: (_) {},
+ );
+
+ List<String> keys(List<SwarmSearchHit> hits) => [
+ for (final hit in hits) hit.key,
+ ];
+
+ test('nothing typed: Recent is what moved, last first, at most '
+ '$swarmSearchRecent; any other kind all of it, as listed', () {
+ final hits = [
+ for (var i = 0; i < 15; i++) h('p$i', '#p$i', at: i),
+ h('never', '#never'),
+ h('chat', 'Wren · p1', kind: SwarmSearchKind.chats, at: 30),
+ ];
+
+ final recent = keys(swarmSearchFind(hits, SwarmSearchKind.recent, ' '));
+ expect(recent, hasLength(swarmSearchRecent));
+ expect(recent.take(3), ['chat', 'p14', 'p13']);
+ expect(recent, isNot(contains('never')));
+
+ expect(keys(swarmSearchFind(hits, SwarmSearchKind.projects, '')), [
+ for (var i = 0; i < 15; i++) 'p$i',
+ 'never',
+ ]);
+ expect(keys(swarmSearchFind(hits, SwarmSearchKind.chats, '')), ['chat']);
+ });
+
+ test('typed: starts with it, then a word starts with it, then holds it, '
+ 'then where it is; the catalog order within each', () {
+ final hits = [
+ h('where', '#alpha', detail: 'Web Swarm'),
+ h('holds', '#cobweb'),
+ h('word', 'Wren · web'),
+ h('starts', '#web'),
+ h('starts-too', '#Website'),
+ h('none', '#other'),
+ ];
+
+ expect(keys(swarmSearchFind(hits, SwarmSearchKind.recent, 'web')), [
+ 'starts',
+ 'starts-too',
+ 'word',
+ 'holds',
+ 'where',
+ ]);
+ });
+
+ test('a # typed or not finds a project alike', () {
+ final hits = [h('mobile', '#Mobile')];
+
+ expect(keys(swarmSearchFind(hits, SwarmSearchKind.projects, '#mo')), [
+ 'mobile',
+ ]);
+ expect(keys(swarmSearchFind(hits, SwarmSearchKind.projects, 'MO')), [
+ 'mobile',
+ ]);
+ });
+
+ test('typed on a kind: only that kind', () {
+ final hits = [
+ h('project', '#web'),
+ h('chat', 'Wren · web', kind: SwarmSearchKind.chats),
+ ];
+
+ expect(keys(swarmSearchFind(hits, SwarmSearchKind.chats, 'web')), [
+ 'chat',
+ ]);
+ });
+ });
+}
diff --git a/mobile/test/swarm/swarm_session_widgets_test.dart b/mobile/test/swarm/swarm_session_widgets_test.dart
index bef705bad..a2fa056e2 100644
--- a/mobile/test/swarm/swarm_session_widgets_test.dart
+++ b/mobile/test/swarm/swarm_session_widgets_test.dart
@@ -143,10 +143,26 @@ void main() {
expect(key('swarm-session-project'), findsNothing);
});
+ for (final swarmChat in [true, false]) {
+ testWidgets('no @ in the ${swarmChat ? 'Swarm\'s' : 'project\'s'} '
+ 'Buddy chat (Tony, 11-03): the person talks to their one Buddy '
+ 'there', (tester) async {
+ await pump(
+ tester,
+ sessionBackend(swarmChat: swarmChat, swarmBuddy: swarmChat),
+ );
+ expect(key('swarm-field'), findsOneWidget);
+ expect(key('swarm-attach'), findsOneWidget);
+ expect(key('swarm-new-session'), findsOneWidget);
+ expect(key('swarm-tag'), findsNothing);
+ expect(find.text('Tag'), findsNothing);
+ });
+ }
+
testWidgets('the chip shows its whole label when the row has room for it '
'(the test font is wider than the phone\'s)', (tester) async {
await pump(tester, sessionBackend());
- // Room for the label beside + and Tag, but not for twice its width:
+ // Room for the label beside +, but not for twice its width:
// the chip is not squeezed to half of what is left.
tester.view.physicalSize = const Size(1680, 2532);
await tester.pumpAndSettle();
@@ -156,16 +172,16 @@ void main() {
expect(label.didExceedMaxLines, isFalse);
});
- testWidgets('the chip sits right after Tag, not in the middle of the '
+ testWidgets('the chip sits right after +, not in the middle of the '
'row', (tester) async {
await pump(tester, sessionBackend());
- // Room to spare beside + and Tag: the chip is not centred in it.
+ // Room to spare beside +: the chip is not centred in it.
tester.view.physicalSize = const Size(2100, 2532);
await tester.pumpAndSettle();
- final tag = tester.getTopRight(key('swarm-tag'));
+ final attach = tester.getTopRight(key('swarm-attach'));
// Its label, past the chip's own icon and padding.
final label = tester.getTopLeft(find.text('New session'));
- expect(label.dx - tag.dx, lessThan(60));
+ expect(label.dx - attach.dx, lessThan(60));
});
testWidgets('a chat that cannot start one says why when the chip is '
diff --git a/mobile/test/swarm/swarm_snapshot_glance_test.dart b/mobile/test/swarm/swarm_snapshot_glance_test.dart
index 8e81ceb12..b8fc62002 100644
--- a/mobile/test/swarm/swarm_snapshot_glance_test.dart
+++ b/mobile/test/swarm/swarm_snapshot_glance_test.dart
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:harness_mobile/notify/system_notices.dart';
import 'package:harness_mobile/settings/experimental_features.dart';
-import 'package:harness_mobile/swarm/swarm_home_rows.dart';
import 'package:harness_mobile/swarm/swarm_page.dart';
import 'package:harness_mobile/swarm/swarm_session.dart';
import 'package:harness_mobile/swarm/team_glance.dart';
@@ -11,7 +10,8 @@ import '../voice_fakes.dart';
import 'swarm_fixture.dart';
/// A project's team line is counted once per Swarm read: the project's page
-/// draws the one glance of the read it shows.
+/// draws the one glance of the read it shows. Home's rows draw none since
+/// they lost their dot (2026-11-03).
void main() {
FakeSwarm backend() {
final fake = FakeSwarm();
@@ -72,20 +72,16 @@ void main() {
Finder key(String value) => find.byKey(ValueKey(value));
- testWidgets("a project's row on Home draws the read's one glance", (
- tester,
- ) async {
+ testWidgets("a project's team is counted once per read: asked again, the "
+ 'same glance', (tester) async {
final host = await pump(tester);
final reader = host.session!.inbox.reader(tab)!;
final read = reader.snapshot!;
final glance = swarmTeamGlance(read, projectId: project);
expect(glance.line, '1 waiting');
-
- final row = tester
- .widget<SwarmHomeProjectRow>(key('swarm-project-$tab-$project'))
- .glance;
+ expect(key('swarm-project-$tab-$project'), findsOneWidget);
expect(reader.snapshot, same(read), reason: 'still the same read');
- expect(row, same(glance));
+ expect(swarmTeamGlance(read, projectId: project), same(glance));
});
}
diff --git a/mobile/test/swarm/swarm_style_test.dart b/mobile/test/swarm/swarm_style_test.dart
index 7b1b48cf0..a16863976 100644
--- a/mobile/test/swarm/swarm_style_test.dart
+++ b/mobile/test/swarm/swarm_style_test.dart
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:harness_mobile/shared/widgets/skeleton.dart';
+import 'package:harness_mobile/shared/widgets/touch_target.dart';
import 'package:harness_mobile/swarm/swarm_style.dart';
/// [child] at the top left of a screen, as big as it asks to be.
@@ -193,6 +194,31 @@ void main() {
});
});
+ group('a caption with a control', () {
+ testWidgets('has it at its right end, centred on its words, a thumb '
+ 'tall', (tester) async {
+ const control = ValueKey('control');
+ await show(
+ tester,
+ const SwarmCaption(
+ 'Projects',
+ trailing: SizedBox(key: control, width: 44, height: 44),
+ ),
+ );
+
+ final caption = find.byType(SwarmCaption);
+ expect(
+ tester.getTopRight(find.byKey(control)).dx,
+ tester.getTopRight(caption).dx,
+ );
+ expect(
+ tester.getCenter(find.text('Projects')).dy,
+ closeTo(tester.getCenter(find.byKey(control)).dy, .5),
+ );
+ expect(tester.getSize(caption).height, greaterThanOrEqualTo(44));
+ });
+ });
+
group('a card row on its way', () {
testWidgets("puts its mark 16 points in, as the real row's words are", (
tester,
@@ -203,5 +229,24 @@ void main() {
final mark = find.descendant(of: row, matching: find.byType(Skeleton));
expect(tester.getTopLeft(mark.first).dx - tester.getTopLeft(row).dx, 16);
});
+
+ testWidgets("a project's on Home: its name's bar alone, 16 points in, on "
+ 'one line a thumb tall', (tester) async {
+ await show(
+ tester,
+ SwarmSkeletonRows(id: 'rows', rows: 1, nameOnly: true),
+ );
+
+ final row = find.byType(SwarmSkeletonRow);
+ expect(
+ find.descendant(of: row, matching: find.byType(SkeletonText)),
+ findsOneWidget,
+ reason: 'no line under the name',
+ );
+ final bar = find.descendant(of: row, matching: find.byType(Skeleton));
+ expect(bar, findsOneWidget, reason: 'no mark before the name');
+ expect(tester.getTopLeft(bar).dx - tester.getTopLeft(row).dx, 16);
+ expect(tester.getSize(row).height, minTouchTarget);
+ });
});
}
diff --git a/mobile/test/swarm/swarm_tabs_shots_test.dart b/mobile/test/swarm/swarm_tabs_shots_test.dart
index fe2fbf947..139eddaba 100644
--- a/mobile/test/swarm/swarm_tabs_shots_test.dart
+++ b/mobile/test/swarm/swarm_tabs_shots_test.dart
@@ -304,11 +304,12 @@ void main() {
'swarm-title-button',
'swarm-new-message',
'swarm-away',
+ 'swarm-you-button',
+ 'swarm-home-search',
'swarm-project-$tab-p-oh',
])
rect(key),
- for (final tab in [SwarmTab.home, SwarmTab.activity, SwarmTab.you])
- rect('swarm-tab-${tab.name}'),
+ for (final tab in SwarmTab.values) rect('swarm-tab-${tab.name}'),
];
await tester.pump();
await capture('targets');
@@ -327,7 +328,8 @@ void main() {
await tester.tap(find.byKey(const ValueKey('swarm-tab-activity')));
await tester.pumpAndSettle();
await capture('activity');
- await tester.tap(find.byKey(const ValueKey('swarm-tab-you')));
+ // You is the avatar on Activity's title, as on Home's.
+ await tester.tap(find.byKey(const ValueKey('swarm-you-button')));
await tester.pumpAndSettle();
await capture('you');
targets.value = [
diff --git a/mobile/test/swarm/swarm_tabs_test.dart b/mobile/test/swarm/swarm_tabs_test.dart
index b567ef610..c5e90f936 100644
--- a/mobile/test/swarm/swarm_tabs_test.dart
+++ b/mobile/test/swarm/swarm_tabs_test.dart
@@ -50,8 +50,8 @@ class _ProbeState extends State<_Probe> {
child: Text('$name taps $_taps'),
),
TextButton(
- onPressed: () => showSwarmTab(context, SwarmTab.you),
- child: Text('$name to You'),
+ onPressed: () => showSwarmTab(context, SwarmTab.activity),
+ child: Text('$name to Activity'),
),
],
),
@@ -63,10 +63,9 @@ const _names = {
SwarmTab.home: 'Home',
SwarmTab.buddy: 'Buddy',
SwarmTab.activity: 'Activity',
- SwarmTab.you: 'You',
};
-/// All four tabs, each showing a [_Probe].
+/// All three tabs, each showing a [_Probe].
List<SwarmTabEntry> _probes(
List<SwarmTab> made, {
SwarmTabBadge? Function(SwarmSession session)? activity,
@@ -184,11 +183,14 @@ void main() {
Finder said(String text) => find.text(text, skipOffstage: false);
- testWidgets('the bar reads Home, Buddy, Activity and You, and opens on '
- 'Swarm Home', (tester) async {
+ testWidgets('the bar reads Home, Buddy and Activity, Slack\'s three, and '
+ 'opens on Swarm Home', (tester) async {
await pump(tester, _tabs);
const shown = SwarmTab.values;
+ expect(shown, [SwarmTab.home, SwarmTab.buddy, SwarmTab.activity]);
+ expect(find.byKey(const ValueKey('swarm-tab-you')), findsNothing);
+ expect(find.text('You'), findsNothing, reason: 'You is the avatar now');
final xs = [for (final tab in shown) tester.getCenter(tabOf(tab)).dx];
expect([...xs]..sort(), xs, reason: 'left to right in this order');
for (final tab in shown) {
@@ -318,11 +320,11 @@ void main() {
);
});
- for (final count in [3, 4]) {
+ for (final count in [2, 3]) {
testWidgets('$count tabs share the bar alike, each a thumb\'s width or '
'more, and each opens its own screen', (tester) async {
final tabs = _probes([]);
- if (count == 3) tabs.removeWhere((e) => e.tab == SwarmTab.buddy);
+ if (count == 2) tabs.removeWhere((e) => e.tab == SwarmTab.buddy);
await pump(tester, SwarmTabsPage(tabs: tabs));
final rects = [for (final e in tabs) tester.getRect(tabOf(e.tab))];
@@ -388,10 +390,10 @@ void main() {
'can', (tester) async {
await pump(tester, SwarmTabsPage(tabs: _probes([])));
- await tester.tap(find.text('home to You'));
+ await tester.tap(find.text('home to Activity'));
await tester.pumpAndSettle();
- expect(find.text('you screen'), findsOneWidget);
+ expect(find.text('activity screen'), findsOneWidget);
expect(said('home hidden: true'), findsOneWidget);
await pump(tester, const SizedBox());
@@ -419,13 +421,27 @@ void main() {
);
expect(find.byKey(const ValueKey('tty-back')), findsNothing);
expect(find.text('Ship it?'), findsOneWidget);
+ expect(
+ find.byKey(const ValueKey('swarm-you-button')),
+ findsOneWidget,
+ reason: 'the avatar, as on Home',
+ );
+ expect(
+ tester
+ .widget<SwarmActivityFilterPill>(
+ find.byKey(const ValueKey('swarm-activity-filter-all')),
+ )
+ .selected,
+ isTrue,
+ reason: 'All first on the tab',
+ );
});
- testWidgets('While you were away on Home opens the Activity tab, not a '
- 'page over Home', (tester) async {
+ testWidgets('While you were away on Home opens the Activity tab on Needs '
+ 'you, not a page over Home', (tester) async {
var now = DateTime.now();
final tabs = [
- for (final entry in swarmTabs(onSettings: _settings))
+ for (final entry in swarmTabs())
entry.tab == SwarmTab.home
? SwarmTabEntry(
tab: entry.tab,
@@ -474,25 +490,110 @@ void main() {
reason: 'the tab, not a page',
);
expect(find.text('Ship it?'), findsOneWidget);
+ bool selected(String filter) => tester
+ .widget<SwarmActivityFilterPill>(
+ find.byKey(ValueKey('swarm-activity-filter-$filter')),
+ )
+ .selected;
+ expect(selected('needsYou'), isTrue, reason: 'what the tile counts');
+
+ // Activity left on Mentions, and asked again: Needs you once more.
+ final mentions = find.byKey(
+ const ValueKey('swarm-activity-filter-mentions'),
+ );
+ await tester.ensureVisible(mentions);
+ await tester.pumpAndSettle();
+ await tester.tap(mentions);
+ await tester.pumpAndSettle();
+ expect(selected('mentions'), isTrue);
+ await open(tester, SwarmTab.home);
+ await tester.tap(away);
+ await tester.pumpAndSettle();
+
+ expect(selected('needsYou'), isTrue, reason: 'asked again, shown again');
+ expect(selected('mentions'), isFalse);
});
- testWidgets('You opens the person\'s own page, and its Settings the '
- 'phone\'s, over the tabs', (tester) async {
+ testWidgets('the avatar on Home opens You over the tabs, with a way back, '
+ 'and its Settings the phone\'s', (tester) async {
await pump(tester, _tabs);
+ final avatar = find.byKey(const ValueKey('swarm-you-button'));
+ expect(avatar, findsOneWidget, reason: 'with no Swarm listed too');
- await open(tester, SwarmTab.you);
+ await tester.tap(avatar);
+ await tester.pumpAndSettle();
expect(find.byType(SwarmYouPage), findsOneWidget);
expect(
tester.widget<Text>(find.byKey(const ValueKey('swarm-title'))).data,
'You',
);
+ expect(find.byType(SwarmTabBar), findsNothing, reason: 'a page over them');
await tester.tap(find.byKey(const ValueKey('swarm-you-settings')));
await tester.pumpAndSettle();
expect(find.text('the settings'), findsOneWidget);
- expect(find.byKey(const ValueKey('swarm-tab-you')), findsNothing);
+
+ final navigator = tester.state<NavigatorState>(find.byType(Navigator));
+ navigator.pop();
+ await tester.pumpAndSettle();
+ await tester.tap(find.byKey(const ValueKey('tty-back')));
+ await tester.pumpAndSettle();
+
+ expect(find.byType(SwarmYouPage), findsNothing);
+ expect(find.byType(SwarmPage), findsOneWidget, reason: 'back on Home');
+ });
+
+ testWidgets('You opened from the avatar goes with the tabs: Swarm turned '
+ 'off from its Settings, back from them is what took the tabs\' place', (
+ tester,
+ ) async {
+ final swarm = ValueNotifier(true);
+ addTearDown(swarm.dispose);
+ await pump(
+ tester,
+ ValueListenableBuilder(
+ valueListenable: swarm,
+ builder: (context, on, _) => on ? _tabs : const Text('the terminal'),
+ ),
+ );
+ await tester.tap(find.byKey(const ValueKey('swarm-you-button')));
+ await tester.pumpAndSettle();
+ await tester.tap(find.byKey(const ValueKey('swarm-you-settings')));
+ await tester.pumpAndSettle();
+
+ swarm.value = false;
+ await tester.pumpAndSettle();
+ expect(find.text('the settings'), findsOneWidget, reason: 'still open');
+
+ tester.state<NavigatorState>(find.byType(Navigator)).pop();
+ await tester.pumpAndSettle();
+
+ expect(find.byType(SwarmYouPage, skipOffstage: false), findsNothing);
+ expect(find.text('the terminal'), findsOneWidget);
+ });
+
+ testWidgets('a You closed before the tabs go is left alone', (tester) async {
+ final swarm = ValueNotifier(true);
+ addTearDown(swarm.dispose);
+ await pump(
+ tester,
+ ValueListenableBuilder(
+ valueListenable: swarm,
+ builder: (context, on, _) => on ? _tabs : const Text('the terminal'),
+ ),
+ );
+ await tester.tap(find.byKey(const ValueKey('swarm-you-button')));
+ await tester.pumpAndSettle();
+ await tester.tap(find.byKey(const ValueKey('tty-back')));
+ await tester.pumpAndSettle();
+
+ swarm.value = false;
+ await tester.pumpAndSettle();
+
+ expect(tester.takeException(), isNull);
+ expect(find.text('the terminal'), findsOneWidget);
});
testWidgets('Activity open mutes the notices it shows, and '