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.

fix(pro): Swarm Leads in app order, Lead notices open the Lead view, true project state (#1639)

0xdiego25e8a829a8b077
diff --git a/cli/src/superTabs/cards.spec.ts b/cli/src/superTabs/cards.spec.ts
index 87e3ade37..bab9c5c4c 100644
--- a/cli/src/superTabs/cards.spec.ts
+++ b/cli/src/superTabs/cards.spec.ts
@@ -48,6 +48,39 @@ describe('leadsOf', () => {
expect(leadsOf(swarm({ conversations: [...swarm().conversations, work('web', 'review')] }), 'm1', idle).leads[0].state).toBe('work')
})
+ // The app's working mark is each agent's own live turn (the Lead's and every worker's); the card says a project works when any of its agents is in a turn
+ // here, and goes by its open assignments for agents this machine cannot see.
+ it('reads a project as work when any of its agents is in a turn here, whatever its Lead and assignments say', () => {
+ const inTurn = (...ids: string[]) => (h: string) => ({ inTurn: ids.includes(h) })
+ const withWorkers = (over: Record<string, unknown> = {}) => swarm({
+ agents: [agent('a1'), agent('a2'), agent('b1', { projectId: 'web' }), agent('b2', { projectId: 'mobile' })],
+ conversations: [...swarm().conversations, work('web', 'done'), conv('w-old', null, { projectId: 'mobile', agentIds: ['b2'], assignment: { status: 'done' } })],
+ ...over,
+ })
+ // Lead idle, its worker in a turn
+ expect(leadsOf(withWorkers(), 'm1', inTurn('h-b1')).leads.map(l => [l.project, l.state])).toEqual([['web', 'work'], ['mobile', 'done']])
+ // every assignment done, a worker still in a turn (one known only through its group, as the app's roster finds it)
+ const noProjectId = withWorkers({ agents: [agent('a1'), agent('a2'), agent('b2')] })
+ expect(Object.fromEntries(leadsOf(noProjectId, 'm1', inTurn('h-b2')).leads.map(l => [l.project, l.state]))).toEqual({ web: 'done', mobile: 'work' })
+ // the clock is the project's earliest turn here: the worker's when only it works, else whichever began first
+ const since = (map: Record<string, number>) => (h: string) => h in map ? { inTurn: true, since: map[h] } : { inTurn: false }
+ expect(leadsOf(withWorkers(), 'm1', since({ 'h-b1': 40 })).leads[0]).toMatchObject({ project: 'web', state: 'work', since: 40 })
+ expect(leadsOf(withWorkers(), 'm1', since({ 'h-a1': 5, 'h-b1': 40 })).leads[0]).toMatchObject({ project: 'web', state: 'work', since: 40 })
+ expect(leadsOf(withWorkers(), 'm1', since({ 'h-a1': 90, 'h-b1': 40 })).leads[0]).toMatchObject({ project: 'web', state: 'work', since: 90 })
+ // nobody in a turn and nothing open: done
+ expect(leadsOf(withWorkers(), 'm1', idle).leads.map(l => l.state)).toEqual(['done', 'done'])
+ // a worker on another machine has no turn here: its project goes by its assignment
+ const remoteWorker = withWorkers({ agents: [agent('a1'), agent('a2'), agent('b1', { projectId: 'web', machineId: 'm2' })] })
+ expect(leadsOf(remoteWorker, 'm1', inTurn('h-b1')).leads[0].state).toBe('done')
+ // a Lead on another machine: its local worker's turn counts, otherwise its assignments
+ const remoteLead = withWorkers({ agents: [agent('a1', { machineId: 'm2', machineOwnerId: 'sam' }), agent('a2'), agent('b1', { projectId: 'web' })] })
+ expect(leadsOf(remoteLead, 'm1', inTurn('h-b1')).leads[0]).toMatchObject({ id: 'a1', state: 'work', local: '' })
+ expect(leadsOf(remoteLead, 'm1', idle).leads[0].state).toBe('done')
+ // ask and stuck still come first
+ const asks = withWorkers({ conversations: [...withWorkers().conversations as unknown[], work('web', 'needs_human')] })
+ expect(leadsOf(asks, 'm1', inTurn('h-b1')).leads[0].state).toBe('ask')
+ })
+
it('calls a harness local only on this machine and live here; names an owner only when it is not the signed-in person', () => {
const remote = swarm({ agents: [agent('a1', { machineId: 'm2', machineOwnerId: 'sam' }), agent('a2', { machineOwnerId: 'sam' })] })
const byId = Object.fromEntries(leadsOf(remote, 'm1', idle, 'me').leads.map(l => [l.id, l]))
@@ -233,6 +266,34 @@ describe('SwarmCards.tick', () => {
expect(t.seen[1][0].leads[0].state).toBe('done')
})
+ it('re-sends when the clock\'s turn changes (the Lead\'s ends, a worker\'s goes on), not while the same turn runs', async () => {
+ const state = swarm({ agents: [agent('a1'), agent('a2'), agent('b1', { projectId: 'web' })] })
+ const t = setup({ t1: { revision: 1, state } }, { activity: { 'h-a1': 'working' }, elapsed: 90 })
+ await t.cards.tick()
+ expect(t.seen[0][0].leads[0]).toMatchObject({ project: 'web', state: 'work', since: 90 })
+ // the worker starts too: the Lead's earlier turn is still the clock, nothing to send
+ vi.mocked(t.core.agents.activity).mockResolvedValue({ 'h-a1': 'working', 'h-b1': 'working' })
+ vi.mocked(t.core.agents.activitySnapshot!).mockResolvedValue({ text: '', elapsedSeconds: 10 })
+ t.advance(5000)
+ await t.cards.tick()
+ expect(t.seen).toHaveLength(1)
+ // the Lead's turn ends, the worker's goes on: same state, another start, so the Pro is told
+ vi.mocked(t.core.agents.activity).mockResolvedValue({ 'h-b1': 'working' })
+ t.advance(5000)
+ await t.cards.tick()
+ expect(t.seen).toHaveLength(2)
+ expect(t.seen[1][0].leads[0]).toMatchObject({ project: 'web', state: 'work', since: 15 })
+ t.advance(5000)
+ await t.cards.tick()
+ expect(t.seen).toHaveLength(2)
+ })
+
+ it('sends a turn that just began as 1 s in, never 0 (the Pro shows no clock for 0)', async () => {
+ const t = setup({ t1: { revision: 1, state: swarm() } }, { activity: { 'h-a1': 'working' }, elapsed: 0 })
+ await t.cards.tick()
+ expect(t.seen[0][0].leads[0]).toMatchObject({ id: 'a1', state: 'work', since: 1 })
+ })
+
it('names a remote Lead\'s owner using the signed-in account', async () => {
const t = setup({ t1: { revision: 1, state: swarm({ agents: [agent('a1', { machineId: 'm2', machineOwnerId: 'sam' }), agent('a2')] }) } })
await t.cards.tick()
diff --git a/cli/src/superTabs/cards.ts b/cli/src/superTabs/cards.ts
index 757549d7d..79d43be04 100644
--- a/cli/src/superTabs/cards.ts
+++ b/cli/src/superTabs/cards.ts
@@ -5,7 +5,9 @@
* only when its `revision` moved. The service hands the result to the core whole (`onCards`); the core owns the wire.
*
* Status of a project's Lead, most pressing first: `ask` (an assignment of the project needs a person, `needs_human`),
- * `stuck` (`blocked`), `work` (the Lead runs here and is in a turn, or an assignment works or is in review), else `done`.
+ * `stuck` (`blocked`), `work` (an agent of the project, the Lead or a worker, runs here and is in a turn, as the app marks each
+ * agent working by its own live turn, `since` from the earliest of those turns; or an assignment works or is in review, all there is for agents on
+ * other machines), else `done`.
* A paused Swarm keeps its card and every Lead reads `done`.
*/
import { randomUUID } from 'node:crypto'
@@ -49,6 +51,10 @@ export function leadsOf(state: Json, machineId: string, live: (harnessId: string
// An old tab has no `projects`: its one project is the tab itself, `lead`, led by the conversation `lead`.
const projects = Array.isArray(state.projects) ? list(state.projects) : [{ id: 'lead', name: state.name, leadConversationId: 'lead' }]
const paused = state.paused === true
+ // An agent's project as the app's roster reads it: its own, else the first group that has it or that it leads.
+ const projectOf = (a: Json) => typeof a.projectId === 'string' ? a.projectId
+ : conversations.find(c => (Array.isArray(c.agentIds) && c.agentIds.includes(a.id)) || c.leadId === a.id)?.projectId ?? 'lead'
+ const turnHere = (a: Json) => a.machineId === machineId && typeof a.harnessId === 'string' && a.harnessId !== '' ? live(a.harnessId) : null
const leads: SwarmLead[] = []
for (const [order, project] of projects.entries()) {
const lead = conversations.find(c => c.id === project.leadConversationId)
@@ -63,8 +69,15 @@ export function leadsOf(state: Json, machineId: string, live: (harnessId: string
if (!paused) {
if (waits.has('needs_human')) state = 'ask'
else if (waits.has('blocked')) state = 'stuck'
- else if (here?.inTurn) { state = 'work'; since = here.since }
- else if (waits.has('working') || waits.has('review')) state = 'work'
+ else {
+ // The project's clock is its earliest turn here (the most seconds in), the Lead's or a worker's.
+ const turns = [here, ...agents.filter(a => a !== agent && projectOf(a) === (project.id ?? 'lead')).map(turnHere)].filter(t => t?.inTurn)
+ if (turns.length) {
+ state = 'work'
+ const secs = turns.map(t => t!.since).filter((v): v is number => typeof v === 'number')
+ if (secs.length) since = Math.max(...secs)
+ } else if (waits.has('working') || waits.has('review')) state = 'work'
+ }
}
const ownerId = agent.machineOwnerId
const owner = me && typeof ownerId === 'string' && ownerId !== me ? people.find(p => p.id === ownerId) : undefined
@@ -115,6 +128,8 @@ export class SwarmCards {
/** When each local Lead's current turn began, so `since` counts on between polls. */
private turns = new Map<string, number>()
private last: string | null = null
+ /** When each shown Lead's clock started (ms, `${card}/${lead}`), as the list last sent said. */
+ private lastStarts = new Map<string, number>()
private me: string | undefined
private include: string[] = []
private opened = new Map<string, Opened>()
@@ -213,8 +228,13 @@ export class SwarmCards {
cards.push({ id: row.id as string, name: cut(String(tab.state.name ?? row.name ?? ''), NAME_BYTES), count, leads })
}
// `since` moves every poll while a turn runs and the Pro counts on by itself, so it alone never re-sends the list.
+ // Nor does a clock that keeps its turn; one whose turn changed (the Lead's ended, a worker's goes on) does. The start is
+ // compared within 2 s: `since` is whole seconds, read at a poll's own moment.
const signature = JSON.stringify(cards, (key, value) => key === 'since' ? value !== undefined : value)
- if (signature !== this.last) { this.last = signature; this.onCards?.(cards) }
+ const now = this.now(), starts = new Map<string, number>()
+ for (const card of cards) for (const lead of card.leads) if (lead.since !== undefined) starts.set(`${card.id}/${lead.id}`, now - lead.since * 1000)
+ const moved = [...starts].some(([key, at]) => Math.abs(at - (this.lastStarts.get(key) ?? at)) > 2000)
+ if (signature !== this.last || moved) { this.last = signature; this.lastStarts = starts; this.onCards?.(cards) }
this.prune()
await this.pushOpen()
}
@@ -234,7 +254,8 @@ export class SwarmCards {
const elapsed = (await this.core.agents.activitySnapshot?.(id).catch(() => null))?.elapsedSeconds
this.turns.set(id, now - (typeof elapsed === 'number' && elapsed > 0 ? elapsed * 1000 : 0))
}
- out.set(id, { inTurn: true, since: Math.max(0, Math.floor((now - this.turns.get(id)!) / 1000)) })
+ // At least 1: the Pro reads 0 as no turn start and shows no clock.
+ out.set(id, { inTurn: true, since: Math.max(1, Math.floor((now - this.turns.get(id)!) / 1000)) })
}
for (const id of [...this.turns.keys()]) if (!ids.has(id)) this.turns.delete(id)
return out
diff --git a/devices/harness-pro/docs/cable.md b/devices/harness-pro/docs/cable.md
index 1032c498c..b83fea077 100644
--- a/devices/harness-pro/docs/cable.md
+++ b/devices/harness-pro/docs/cable.md
@@ -208,8 +208,9 @@ Daemon to Pro:
- `tab` links a Swarm to the desk tab of the same Swarm (empty: the desktop has none open); a linked desk tab shows the Swarm's card, an unlinked Swarm is one more Home page after the tabs.
- `leads` come most urgent first (`ask`, `stuck`, `work`, `done`), ties in project order, and only the 12 most urgent are sent. `order` (optional) is the project's
0-based place in the Swarm as the app lists it (an old Swarm without projects is 0), so the round dial can show the Leads in the app's order; values may skip
- where a project has no Lead or was cut. The Pro ignores it and keeps its own order.
-- `state`: `ask` (needs you), `stuck`, `work`, `done`. `since` is the seconds into the turn of a local Lead at work (the Pro counts on from it); a remote Lead at work has none and shows "working".
+ where a project has no Lead or was cut. The Pro puts the Leads in `order` (ties, and a Lead without one, keep their place as sent): the card, its pages and
+ the Lead view's swipe all follow it, whatever each Lead's state. The capsule still counts stuck, needs you and working.
+- `state`: `ask` (needs you), `stuck`, `work`, `done`. `since` is the seconds into the project's earliest turn on the daemon's machine (the Lead's or a worker's; at least 1, and the Pro counts on from it). A Lead at work without one (remote, or working only from open assignments) shows "working" with no clock; a `supertab` is re-sent when that turn's start moves.
- `local` is the harness id of a Lead that runs on this account's machine, else empty. A Lead with `local` offers the usual talk control in its view; a remote one (`owner` names the
person whose machine) has none.
- `supertab.recap` with `none:true` (or no text) is "No message yet". A recap for a Swarm or Lead the Pro does not hold is dropped.
diff --git a/devices/harness-pro/firmware/main/app/pod_glue.c b/devices/harness-pro/firmware/main/app/pod_glue.c
index 12b69d194..b92252aa1 100644
--- a/devices/harness-pro/firmware/main/app/pod_glue.c
+++ b/devices/harness-pro/firmware/main/app/pod_glue.c
@@ -360,6 +360,25 @@ static bool sup_push(pod_ui_t *u, const char *t, const char *tab, const char *le
return true;
}
+// A Notices row whose harness is a Swarm's local Lead: read the entry and open that Lead's view the way supertab.focus does (over Home, on the Swarm's card), the
+// desktop told to select it. Not the plain agent: agent.open would make the desktop open the Lead's harness in a new tab. False when no Swarm leads from it.
+static bool notice_lead(pod_ui_t *u, const char *agent_id)
+{
+ pod_model_t *m = &u->model;
+ for (int i = 0; i < m->swarm_n; i++)
+ for (int j = 0; j < m->swarms[i].lead_n; j++) {
+ const pod_lead_t *l = &m->swarms[i].leads[j];
+ if (!l->local[0] || strcmp(l->local, agent_id)) continue;
+ pod_model_unread_read(m, agent_id);
+ if (pod_nav_follow_lead(&u->nav, m, m->swarms[i].id, l->id)) {
+ sup_push(u, "supertab.select", m->swarms[i].id, l->id);
+ u->scroll_px = 0;
+ }
+ return true;
+ }
+ return false;
+}
+
// PREV / NEXT on the Lead view; when it landed on another Lead the daemon is told to select it.
static void lead_step(pod_ui_t *u, int dir, uint32_t now_ms)
{
@@ -579,6 +598,7 @@ pod_out_t pod_ui_touch(pod_ui_t *u, bool down, int x, int y, uint32_t now_ms, bo
}
}
if (arg == -1 && u->hit.id[0]) { *changed = true; return none; } // what it named is gone: redraw, open nothing
+ if (u->hit.action == POD_A_OPEN_NOTIF && arg >= 0 && arg < u->model.unread_count && notice_lead(u, u->model.unread[arg].agent)) { *changed = true; return none; }
if (u->hit.action == POD_A_TALK && u->nav.depth) { // an agent of an offline machine cannot be talked to: say why
const pod_agent_t *ag = pod_model_find(&u->model, top(u)->agent);
if (ag && ag->state == POD_OFFLINE) {
diff --git a/devices/harness-pro/firmware/main/cable/pro_cable.c b/devices/harness-pro/firmware/main/cable/pro_cable.c
index 25dde8af7..956d9be58 100644
--- a/devices/harness-pro/firmware/main/cable/pro_cable.c
+++ b/devices/harness-pro/firmware/main/cable/pro_cable.c
@@ -554,8 +554,10 @@ static pod_lead_state_t lead_state(const char *s)
return POD_LEAD_DONE;
}
+// The Leads in the Swarm's order (each Lead's `order`, the project's index in the app), whatever their urgency; a Lead without one keeps its place as it came.
static void read_leads(const cJSON *it, pod_swarm_t *sw)
{
+ double order[SWARM_LEADS_MAX];
const cJSON *l = NULL;
cJSON_ArrayForEach(l, cJSON_GetObjectItemCaseSensitive(it, "leads")) {
if (sw->lead_n >= SWARM_LEADS_MAX) break;
@@ -564,7 +566,15 @@ static void read_leads(const cJSON *it, pod_swarm_t *sw)
bool duplicate = false;
for (int i = 0; i < sw->lead_n; i++) if (!strcmp(sw->leads[i].id, id)) duplicate = true;
if (duplicate) continue;
- pod_lead_t *ld = &sw->leads[sw->lead_n++];
+ const cJSON *o = cJSON_GetObjectItemCaseSensitive(l, "order");
+ const double key = cJSON_IsNumber(o) ? o->valuedouble : sw->lead_n;
+ int at = sw->lead_n;
+ while (at > 0 && order[at - 1] > key) at--; // after every equal one: ties keep their arrival order
+ memmove(&sw->leads[at + 1], &sw->leads[at], (size_t)(sw->lead_n - at) * sizeof sw->leads[0]);
+ memmove(&order[at + 1], &order[at], (size_t)(sw->lead_n - at) * sizeof order[0]);
+ order[at] = key;
+ sw->lead_n++;
+ pod_lead_t *ld = &sw->leads[at];
memset(ld, 0, sizeof *ld);
snprintf(ld->id, sizeof ld->id, "%s", id);
const char *pid = str_of(l, "projectId");
diff --git a/devices/harness-pro/firmware/main/pod/home/ph_lead.c b/devices/harness-pro/firmware/main/pod/home/ph_lead.c
index 0019ab4da..c8266ff19 100644
--- a/devices/harness-pro/firmware/main/pod/home/ph_lead.c
+++ b/devices/harness-pro/firmware/main/pod/home/ph_lead.c
@@ -192,7 +192,7 @@ uint32_t ph_lead_next_ms(const pod_nav_t *nav, const pod_model_t *m, uint32_t no
if (!l) return POD_PET_STEP_MS;
uint32_t ms = pod_pet_next_beat_ms(l->engine, l->recap == POD_RECAP_EMPTY ? POD_SCENE_REST : ph_lead_scene(l->state), now_ms, 0);
if (ms < POD_PH_ANIM_MS) ms = POD_PH_ANIM_MS - now_ms % POD_PH_ANIM_MS; // a pet redraws a lot: no faster than the Pets beat
- if (l->state == POD_LEAD_WORK && (l->local[0] || l->since_s)) { // the status line's clock: when its seconds next change
+ if (l->state == POD_LEAD_WORK && l->since_s) { // the status line's clock: when its seconds next change
const uint32_t into = (int32_t)(now_ms - l->since_at_ms) > 0 ? now_ms - l->since_at_ms : 0, t = 1000 - into % 1000;
if (ms > t) ms = t;
}
diff --git a/devices/harness-pro/firmware/main/pod/home/ph_overview.c b/devices/harness-pro/firmware/main/pod/home/ph_overview.c
index dc8240fc0..1d74fe032 100644
--- a/devices/harness-pro/firmware/main/pod/home/ph_overview.c
+++ b/devices/harness-pro/firmware/main/pod/home/ph_overview.c
@@ -73,7 +73,7 @@ unsigned ph_lead_status(const pod_lead_t *l, uint32_t now_ms, char *line, size_t
if (l->state == POD_LEAD_ASK) { snprintf(line, n, "needs you"); return PH_LEAD_ASK; }
if (l->state == POD_LEAD_STUCK) { snprintf(line, n, "stuck"); return PH_LEAD_STUCK; }
if (l->state == POD_LEAD_DONE) { snprintf(line, n, "done"); return dim; }
- if (l->local[0] || l->since_s) { // working: a local Lead's turn runs on (a remote one has no clock)
+ if (l->since_s) { // working with a turn's start (the daemon's since): the clock runs on; without one (a remote Lead, or only open assignments) none
char t[24];
const uint32_t into = (int32_t)(now_ms - l->since_at_ms) > 0 ? (now_ms - l->since_at_ms) / 1000 : 0;
pod_fmt_elapsed(t, sizeof t, (int64_t)l->since_s + into);
@@ -504,15 +504,17 @@ static void centred(ht_scene_t *s, int cx, int y, const ht_pro_font_t *f, unsign
{
ht_pro_text(s, cx - ht_pro_width(f, t) / 2, y, ht_pro_width(f, t) + 2, f, C(rgb), t);
}
-// The order the card shows the Leads in: ord[] = indices into sw->leads, stuck, needs you, working, done, the Swarm's order inside each; cnt[0..3] = how many of each.
+// The order the card shows the Leads in: ord[] = indices into sw->leads, the Swarm's order (the app's, as the cable put them) whatever their state, so a Lead
+// keeps its place as it changes; cnt[0..3] = how many are stuck, need you, working, done.
static int lead_order(const pod_swarm_t *sw, int *ord, int *cnt)
{
static const pod_lead_state_t rank[4] = {POD_LEAD_STUCK, POD_LEAD_ASK, POD_LEAD_WORK, POD_LEAD_DONE};
int n = 0;
cnt[0] = cnt[1] = cnt[2] = cnt[3] = 0;
- for (int r = 0; r < 4; r++)
- for (int j = 0; j < sw->lead_n && j < SWARM_LEADS_MAX; j++)
- if (sw->leads[j].state == rank[r]) { ord[n++] = j; cnt[r]++; }
+ for (int j = 0; j < sw->lead_n && j < SWARM_LEADS_MAX; j++) {
+ ord[n++] = j;
+ for (int r = 0; r < 4; r++) if (sw->leads[j].state == rank[r]) cnt[r]++;
+ }
return n;
}
// A Lead's status line on this card: "needs you", "stuck", "done", a working Lead's clock alone (ph_lead_status's line less its "working · "). Returns its colour.
diff --git a/devices/harness-pro/firmware/test/golden-liberation.txt b/devices/harness-pro/firmware/test/golden-liberation.txt
index a25004031..841d5259e 100644
--- a/devices/harness-pro/firmware/test/golden-liberation.txt
+++ b/devices/harness-pro/firmware/test/golden-liberation.txt
@@ -1,11 +1,11 @@
000f6304ad48675b64e6ebf526afe23fb4226d3c68c045bd67cac3edb57345fd talk:cur@5000
01535e909a381104ef05c14c3256b08e1ee0f64b8ad03b82467e1cde2c0a9386 recap:desk:short@0
+02189dc3e875a29df7de3e0eb6f16f924e63cef450da37c0fa759566716e5e48 home:swarm:stuck@1234
0530ece601530070f933b4e44323095b2220de6c1ea770e4781b9753c5015f0e home:swarm:p1@5000
-05d20b7895a8de4cd708b0c4f5f52a43912ca47e91ecaecb54993503a5dd705b home:swarm:remote@0
069886efabcda8daf892b54a130cb6246545c2b498991b1a87d98d3141284a2b agent:cli:banner@0
069886efabcda8daf892b54a130cb6246545c2b498991b1a87d98d3141284a2b agent:cli@0
+07147d6cae375442998f503bd23b1153ac9930de2adbc648e7169ba925bef80b home:swarm:many@5000
074b239676cdd60e628712bc94a200b5560c844fd6680dccec74b48653edc10c tabs:none@0
-0806d1232e55e27baab640675d59e91bb273e43f078fa6f3107527772be6954b home:swarm:stuck@0
0a4957aade389b7bf80949d8f804d1fc08ec566cebdc4926773f926baa102c38 home:swarm:p2@1234
0af8281888248c31cd8db0bdbc1c33f4e74fe323f374ca3eee3c43b53e69495b recap:docs:long@1234
0cd4cf539f2f3f8dcc17f28478d50ea641f5a0f6f1a3aa27674ba268e2705e0b agent:desk@5000
@@ -15,7 +15,6 @@
0cd4cf539f2f3f8dcc17f28478d50ea641f5a0f6f1a3aa27674ba268e2705e0b recap:desk:unread@5000
0cd4cf539f2f3f8dcc17f28478d50ea641f5a0f6f1a3aa27674ba268e2705e0b recap:desk@5000
0e6c6e8c472798f787049711849aecaa717179bad00135fa1d0f84d8db09308e lead:loaded@600
-0ed64bb1f39cf5b4fbfbd32a7f7e8de6f95682c0660cf62406325b25772b676f home:swarm:remote@600
102064b2c387ab5cd1e0f274a8beaef812acc0db7e93ddaef06ed8d06811398f recap:desk:short@2500
11ce48c998ea730350c5fa0430d78275a62dff6d2f19e32343040e9ec47ba28f agent:be:offline@2500
12c8abf13002e19438133eef0d2947372670cd4657bb519a5cea3c9deb58fd54 lead:remote@600
@@ -25,7 +24,6 @@
1467a0558ff261ee1580e2ab811f1d59ed1418cf0566b084ba6697eb487a9618 tabs:bell@5000
1467a0558ff261ee1580e2ab811f1d59ed1418cf0566b084ba6697eb487a9618 tabs:linkdown@5000
1467a0558ff261ee1580e2ab811f1d59ed1418cf0566b084ba6697eb487a9618 tabs@5000
-1619edc536cd1214a73522ffc46ad4459cd6ae6f34e73084419acd3e945a30a7 home:swarm:remote@1234
205286ce60f1fdf5c5b6cefee707eaf71a3384cda456415cdac103fc574c4ebf agent:fw:banner@1234
205286ce60f1fdf5c5b6cefee707eaf71a3384cda456415cdac103fc574c4ebf agent:fw:unread@1234
205286ce60f1fdf5c5b6cefee707eaf71a3384cda456415cdac103fc574c4ebf agent:fw@1234
@@ -33,12 +31,14 @@
22083bf5827695add306905a71f6e07a70ec12872d2d4ed3cc043e47de7205cd talk:fw:quiet@600
22083bf5827695add306905a71f6e07a70ec12872d2d4ed3cc043e47de7205cd talk:fw@600
24e4b487e56cee7639400ebd1ed0d473a12cf553c31c0f3029edf019e1f36bc0 tabs:5@5000
+262c9840a592d18fb40f708dd67525bfdb25339f5034f2bef446bc6a3293c84f home:swarm:remote@0
26a207f8ff8046c6711fdb779b28735365e90b65907cc41f6222b30541d9e5dd tabs:working@0
26c92313e4fe996b71d5314cca0869cb0cb41f33ae73795a7e5279e7f4ca95f9 home:swarm:p2@0
27df000c5f60d8eb8663a8fe6959384eace8ac0e418f05c3ac719ef84feacf4b agent:cli:banner@5000
27df000c5f60d8eb8663a8fe6959384eace8ac0e418f05c3ac719ef84feacf4b agent:cli@5000
2871cd9a6077527eec0e37e0ea6dac9fc07218063c319054184c0f2fecc9cfe2 talk:fw:quiet@1234
2871cd9a6077527eec0e37e0ea6dac9fc07218063c319054184c0f2fecc9cfe2 talk:fw@1234
+28b7ec872ba459bb53739fc25fabeb0344e4de9113f0244cb9173730c3d65faf home:swarm:remote@1234
2b58a3fbaae6798538256d06e3d7366fdeeb0fb8edc661cdee2dd2ce521769a0 talk:cur@600
2d9d5c7353bd2d8870657970c411ca4b0a275f2ebb6272cd196429a9b6753642 agent:desk@600
2d9d5c7353bd2d8870657970c411ca4b0a275f2ebb6272cd196429a9b6753642 recap:desk:banner@600
@@ -88,6 +88,7 @@
3b05ad1f890158c96ebbe21b862f4121d90eaadcafe77f91cdb72e64e60f4068 home:swarm:p1@1234
3b562265abe088aada195ff5b8a88dba3e06d62809a2d582cefb34adf20bf329 lead:ask@2500
3baf2cd488eeeb310783ef08303bbb235772ade7303feedc65e2adaa7b565565 recap:desk:short@1234
+3bcdfa6e218c2e1999bce65a891884f93737cd2aa62534e0f42538422db352d3 home:swarm:stuck@0
3c50228ed125d5138821ae678ebc8267734a5e79c8878b4e4813ebbcb80b3164 agent:fw:long@1234
3d43bb7cb2ab0102944745f80af971677a75bec05d5dbc01baaf9003fa4111f9 tabs:5@1234
44c082278989b9844c91c372d51a9f2b29430bf083fcb2794698e189fe8f2e3d tabs:none@600
@@ -100,8 +101,9 @@
480d9b19c0aef0f2dcaa1dfb1aba46db93108f3912d6e2c1aed86cd420846d3f tabs:5@0
48d13463b2d93a8b84012dba5dbc3346c10fea89fb2f5d7e107252e8cd17c199 recap:docs:unreadfail@2500
49df1c4eafa42a0e150e8b9c77cbdfca70a9f8ba1e16d863435a24091c935336 tabs:none@1234
-4bef0fefb9bd809745db2afcb7d0b32c476d27da0725d52cf316e5433c4d87c8 home:swarm:many@5000
+4b798d9a8d9cd51399c2c1b992ddc49feb856e48d49fe2c116270482b09a3637 home:swarm:many@1234
4c575da9f9c644d41a714b210cb66c11e141a9e945d9771097a05ace169de6c7 tabs:long@600
+4c8a296f6b98079851622cf9bbfdd436814be30b4f75ba819c41b3b7a699552b home:swarm:stuck@2500
4e1055e7920922bf2c1ba0212b5860b7cdcc162784a16e1d9abd6c586d38cec0 recap:docs:toast@4900@0
4e1055e7920922bf2c1ba0212b5860b7cdcc162784a16e1d9abd6c586d38cec0 recap:docs:toast@4900@1234
4e1055e7920922bf2c1ba0212b5860b7cdcc162784a16e1d9abd6c586d38cec0 recap:docs:toast@4900@2500
@@ -111,6 +113,7 @@
50515880623dbb0b9854175e41174c31d6396b40c576932cad2dcc5e36cff96e tabs:seven@1234
50e26b3c495b054fb16aaf4e792d49234f9d636fa88c4b3520512e75cdf1dc9d recap:desk:long@5000
555f603431f0bf42d41c4d306f98e099d3b22296d9fdf75c78282914f957bb3e home:swarm:p1@0
+563511c0d14d64810e80ffec87a44aa96ebd49b0d22af294aa6580ad3c715d10 home:swarm:many@0
5647a2a762bd817469bff3189b4e1162fb3b11acbbc72ad9aee9139e0446a010 recap:docs:long@0
5647a2a762bd817469bff3189b4e1162fb3b11acbbc72ad9aee9139e0446a010 recap:docs:long@2500
5acb2d70fc0480116a86cbbf66fcc15390559f258a7cdacf1c2044615cd7135a lead:remote@1234
@@ -126,7 +129,6 @@
6b6f4d5ec0fca4a424bbf414120c01447324f801eee022d81472bb400f0b0c5f agent:be:offline@0
6b6f4d5ec0fca4a424bbf414120c01447324f801eee022d81472bb400f0b0c5f agent:be:offline@5000
6c3389eb1064d6b347bc85f3bda88ead51eb6a0884b92db0d27afb43547e9fe4 recap:docs@600
-6ceba1401424c99ae045190a875f0e6760e28ddc720413aae8e65f8f3ac770ea home:swarm:many@1234
6e8bcfa83ea6eaa08d60fd95be555efbbc0c7e6b5c82c93996f8d1a18d51dc99 home:swarm:p1@2500
71ab48d28570b32591d93f305e3a1c95d00b3ca6026359dd630b3f5da6c78ac1 lead:loaded@1234
72ba008ee35e9d149fd6952d48cf85ea5898d0875786251d4199b69d53ab2d49 agent:fw:toast@4900@0
@@ -141,6 +143,7 @@
7593d8806d372da0c991d91edb4cd8236a21aebb65e3df5748be49bba89fdf55 recap:desk:toast@2500@2500
7593d8806d372da0c991d91edb4cd8236a21aebb65e3df5748be49bba89fdf55 recap:desk:toast@2500@5000
7593d8806d372da0c991d91edb4cd8236a21aebb65e3df5748be49bba89fdf55 recap:desk:toast@2500@600
+760584f2674e5a964bb132d5f51b485fb61d72239fb4863d0479e19a551e7d8c home:swarm:remote@2500
762ed969bd1df9df725878715196d6a826105caf612fb7fa881b67e4b070b7e0 talk:be@2500
795544341ad4c32f7547c77449838fb9ffa4ebf03c336d43012a309838a35b51 agent:fw:long@2500
79e8882fc2d840ab167064322c9ca2620467320e9cd10d826930e733c89c0cac agent:fw:toast@200@0
@@ -155,11 +158,11 @@
79f3f79188af491ef39c661e619e1e641864dc3b33a325f60b3c7712b7c7726b talk:be:send@600
7ccddd2c39c5bec4ebcf4fa0e5bfb3421e0d200aeb091e014636296e2e8ec850 talk:fw:quiet@2500
7ccddd2c39c5bec4ebcf4fa0e5bfb3421e0d200aeb091e014636296e2e8ec850 talk:fw@2500
-7cf248aedbdca79cb79f4aadbac5b847e63fb5bf1e74c820521b40bed0217818 home:swarm:stuck@2500
7dfd56f51d9b85c6cf8396f7f4169ffcabe7c2bb436a8096a2c0275dc339e617 agent:cli:long@600
7e560682e42982215f0b39450ac55bb2059d9b70065772979fcdb7b3c3cf9fe9 lead:none@0
7e560682e42982215f0b39450ac55bb2059d9b70065772979fcdb7b3c3cf9fe9 lead:none@5000
7effffc339beb6a37a3cbcc5cb51fe7c836ef949dcb216825da4bfe0129722dd lead:loaded@5000
+7fa039f5ebda47a61985054e836d0373bffba85f07667ef3decc52685b752e01 home:swarm:remote@5000
81312fbd4dee9803a32e5d3aa5fb3b317eafb965fa337f4fadaec149959bc0fc tabs:seven@0
81cb592818416fb5bbdc363d609b1f9993a87cf61f00e50b60b83d47821b389a lead:loading@1234
84ee291923ce9c24df7ca48fc9b93db7af552d3f47114aa5613729433fd23c58 tabs:working@5000
@@ -230,13 +233,12 @@ a6712f0052fbad9b33cf4511c4fbf0e4731c42df8c5533fa33b21a3439caddf2 recap:desk:ext
a6712f0052fbad9b33cf4511c4fbf0e4731c42df8c5533fa33b21a3439caddf2 recap:desk:testfail@2500
a6712f0052fbad9b33cf4511c4fbf0e4731c42df8c5533fa33b21a3439caddf2 recap:desk:unread@2500
a6712f0052fbad9b33cf4511c4fbf0e4731c42df8c5533fa33b21a3439caddf2 recap:desk@2500
-a85a688cdbb6e6586043edd8cd9b62093b5230d0f81df330f6c39c8924960142 home:swarm:stuck@1234
aa7d385e2f538e370781e40d71d58313259312909691e844e8ef8e0758f38b6d ota:100@0
aa7d385e2f538e370781e40d71d58313259312909691e844e8ef8e0758f38b6d ota:100@1234
aa7d385e2f538e370781e40d71d58313259312909691e844e8ef8e0758f38b6d ota:100@2500
aa7d385e2f538e370781e40d71d58313259312909691e844e8ef8e0758f38b6d ota:100@5000
aa7d385e2f538e370781e40d71d58313259312909691e844e8ef8e0758f38b6d ota:100@600
-ac01b5d61c511685b5fa6bc072839cf59375a67adbd472ac708ea9194fb9b7cc home:swarm:many@2500
+aaebdaf7d0702af2b27e9042c7ac089ba59d891ab94d54028d59f66a2d14c7c8 home:swarm:stuck@600
ac53464a1d840500d54ddfceb2360ebe43552e456b85807c997b22a9aa2f622b tabs:mock@600
ad007cd4fdc4676271ee900e07647d470675012997b1e9d6c1cfb625ee25df2b recap:docs@0
ad007cd4fdc4676271ee900e07647d470675012997b1e9d6c1cfb625ee25df2b recap:docs@2500
@@ -244,7 +246,6 @@ adcb50470a8227a85b07078ba541f2078628ba8f30fe657d90c699ac28bd36c4 home:swarm:p2@
ae9a89417055592a7468dfc3a7ea64b58cd85df877f197f8948e2b47a9124eb3 tabs:long@1234
aed7a76df17848d6d044e7343c0cf44f63cf71ed10c0cb9252a8d43e963003d0 home:swarm:done@5000
b13776fc7d712241ba716efb51747a1cd43cd0d009b8f2a20fbf1c8e36153be7 talk:be@5000
-b16e195a3539d87adba11e418b5aee24f17738ff858d64df39e48732e63f3b71 home:swarm:many@600
b2987fbea14e51cc7b4ddfcc7bc767ee6e7d4a09857ddabb9d0a5a680be6a714 recap:docs@5000
b31f451d884e5af7e9120f0456f994e049d8fafda4b014a76af3cf751cd96705 recap:docs:unreadfail@600
b65873f886da7017decf982177999e06d675cc158414f76acce2839cbd05646b lead:loading@0
@@ -295,7 +296,6 @@ d0d1825a2e3100dc03362657abb086bc64a9d5bde8b8f66a17f60d7cce000d39 ota:62@1234
d0d1825a2e3100dc03362657abb086bc64a9d5bde8b8f66a17f60d7cce000d39 ota:62@2500
d0d1825a2e3100dc03362657abb086bc64a9d5bde8b8f66a17f60d7cce000d39 ota:62@5000
d0d1825a2e3100dc03362657abb086bc64a9d5bde8b8f66a17f60d7cce000d39 ota:62@600
-d17f666b68cd138ef141f02e0162dbae58bf62edce6b3ae2dd9eed278221cb94 home:swarm:remote@2500
d2b83012c7ff21064242af7e49c377b19f8314f6cb2458b37904cdcbc9b41eae talk:be@600
d46cf19e2e6fac11b823004de27d2351d01870f5cfecb1486187161754f59d45 tabs:0+2@600
d46cf19e2e6fac11b823004de27d2351d01870f5cfecb1486187161754f59d45 tabs:9@600
@@ -319,6 +319,7 @@ d98e5146f84246d2e794ca51cc07961c82d1d5c7368c958638c0fdc21b9b4ff0 agent:fw:toast
d98e5146f84246d2e794ca51cc07961c82d1d5c7368c958638c0fdc21b9b4ff0 agent:fw:toast:decision@2500@600
de2e36bd169d9460b5d02fc90a0f37b6bf762f5dbbe7ccfeefc337cddb8af282 home:swarm:done@1234
de7fccfd4d9ed624772a2c8d137e182ca0697f72b421dc21d1bb4ce4bc8bf594 tabs:none@2500
+de80eec32ea888835bfe488f9b25dc6f80157dd1a405f1845c4a073b330d6184 home:swarm:many@2500
e01801d7676609320823ae0c55a805defab02449150ee721b8b774f8e85a7294 recap:desk:medium@0
e16e322edb920b4cff7d04ca1cb2c8202987f3734183bea64c59a7086b6ba830 agent:cli:long@5000
e1788054013a3e7d0de30c89a433ced3cb54ecca26683ffbff6693e33ab5df09 tabs:notices@0
@@ -327,9 +328,9 @@ e1788054013a3e7d0de30c89a433ced3cb54ecca26683ffbff6693e33ab5df09 tabs:notices@2
e1788054013a3e7d0de30c89a433ced3cb54ecca26683ffbff6693e33ab5df09 tabs:notices@5000
e1788054013a3e7d0de30c89a433ced3cb54ecca26683ffbff6693e33ab5df09 tabs:notices@600
e1ff6c4a58d744e05300c2a57be4e08d5f29cc531a741a83c649a892ab7de29a recap:desk:long@1234
-e256df40767ebaacd4aa9798959e2fcc731327ef53d5b74dab2c9aede429bfd8 home:swarm:many@0
e55b4e490d71c454af6cd36f6778798a187eacfcce2b18ca7579fffc5b386bb0 agent:cli:banner@600
e55b4e490d71c454af6cd36f6778798a187eacfcce2b18ca7579fffc5b386bb0 agent:cli@600
+e613555b96ab955404f55d39984791e73f9cce4acd1ebaf9b0e735b0c2be7f8e home:swarm:many@600
e652d520e88b1d12b1fe7409e957a1065d69f7683ce6d1e8cd2caaca93c725ad tabs:2+2@0
e652d520e88b1d12b1fe7409e957a1065d69f7683ce6d1e8cd2caaca93c725ad tabs:2+2@1234
e652d520e88b1d12b1fe7409e957a1065d69f7683ce6d1e8cd2caaca93c725ad tabs:2+2@2500
@@ -337,13 +338,14 @@ e652d520e88b1d12b1fe7409e957a1065d69f7683ce6d1e8cd2caaca93c725ad tabs:2+2@5000
e652d520e88b1d12b1fe7409e957a1065d69f7683ce6d1e8cd2caaca93c725ad tabs:2+2@600
e6a3ea32881c13627d6043a18efae1b4578e2c62467b1989129c0a8da1b57032 lead:none@1234
e6a7fa14ee6c9191350176f8dfcf0661da526268a3d14d912f6337e048b39cbf tabs:1@1234
+e863aabe59e0ae473cf778a960aa06a49b819ccc2af11dd203351c7e5981c94f home:swarm:stuck@5000
e8f82832b80bcf61502a843b8ebc9523b41386be13fdafcc1cf2d5f5e00922ad inbox:quiet@0
e8f82832b80bcf61502a843b8ebc9523b41386be13fdafcc1cf2d5f5e00922ad inbox:quiet@1234
e8f82832b80bcf61502a843b8ebc9523b41386be13fdafcc1cf2d5f5e00922ad inbox:quiet@2500
e8f82832b80bcf61502a843b8ebc9523b41386be13fdafcc1cf2d5f5e00922ad inbox:quiet@5000
e8f82832b80bcf61502a843b8ebc9523b41386be13fdafcc1cf2d5f5e00922ad inbox:quiet@600
+ea1f33f352cd41ff374d1e787975d9a99f49bb05532036addfa2986dae78b049 home:swarm:remote@600
eaddfb7fa9e32238e63ccfb4e474bfa87eb7336fb6b7d044050fc8ed4560aeb1 recap:desk:long@0
-eba5c1c248aeeafebee678c3b035e6576766b4430e3cb0f06319439ae4aec077 home:swarm:stuck@600
ec35e5383f8ca65a2fd44da47c5c0c7b750d323a87d2be81bede059ba5136a00 tabs:0+2@2500
ec35e5383f8ca65a2fd44da47c5c0c7b750d323a87d2be81bede059ba5136a00 tabs:9@2500
ec35e5383f8ca65a2fd44da47c5c0c7b750d323a87d2be81bede059ba5136a00 tabs:banner@2500
@@ -376,8 +378,6 @@ f5336aa91a6c4989c444f12a3b9ec5e050f8496501eda04f4c52b23e9ae55d08 tabs:5@600
f6144683873654c1812667702bbed73c7cb8c8bdbab53bb9c49d13fc5ccbf180 recap:docs:long@600
f8a9d033bd6f6db33f4168d086f3aafae4dff0880e7f4301762ca35caf0c5f20 talk:cur@0
f8a9d033bd6f6db33f4168d086f3aafae4dff0880e7f4301762ca35caf0c5f20 talk:cur@1234
-f95249e7b76bf98ad4c4deb352f99dd2526fe821b16fcd356f680409351a381b home:swarm:stuck@5000
-f9b5e0622641b9fba51b7d4f8a925f38eb4d8fb283da472b8806eea59a622ce6 home:swarm:remote@5000
fbc885b17d01eadab52928be9eb2c3abf60bc351a280ac69a15b2c99b1664e8b tabs:seven@600
fc3bf40809cb606d7b0f777017dc1c9de85edebe1f3623ca13919b1495b73ff9 tabs:1@5000
ffa3bcedf2d77ad95edfe7f925134134bbb8451a7973b39e94ba5a7f7fd2f232 agent:fw:banner@2500
diff --git a/devices/harness-pro/firmware/test/golden.txt b/devices/harness-pro/firmware/test/golden.txt
index a25004031..841d5259e 100644
--- a/devices/harness-pro/firmware/test/golden.txt
+++ b/devices/harness-pro/firmware/test/golden.txt
@@ -1,11 +1,11 @@
000f6304ad48675b64e6ebf526afe23fb4226d3c68c045bd67cac3edb57345fd talk:cur@5000
01535e909a381104ef05c14c3256b08e1ee0f64b8ad03b82467e1cde2c0a9386 recap:desk:short@0
+02189dc3e875a29df7de3e0eb6f16f924e63cef450da37c0fa759566716e5e48 home:swarm:stuck@1234
0530ece601530070f933b4e44323095b2220de6c1ea770e4781b9753c5015f0e home:swarm:p1@5000
-05d20b7895a8de4cd708b0c4f5f52a43912ca47e91ecaecb54993503a5dd705b home:swarm:remote@0
069886efabcda8daf892b54a130cb6246545c2b498991b1a87d98d3141284a2b agent:cli:banner@0
069886efabcda8daf892b54a130cb6246545c2b498991b1a87d98d3141284a2b agent:cli@0
+07147d6cae375442998f503bd23b1153ac9930de2adbc648e7169ba925bef80b home:swarm:many@5000
074b239676cdd60e628712bc94a200b5560c844fd6680dccec74b48653edc10c tabs:none@0
-0806d1232e55e27baab640675d59e91bb273e43f078fa6f3107527772be6954b home:swarm:stuck@0
0a4957aade389b7bf80949d8f804d1fc08ec566cebdc4926773f926baa102c38 home:swarm:p2@1234
0af8281888248c31cd8db0bdbc1c33f4e74fe323f374ca3eee3c43b53e69495b recap:docs:long@1234
0cd4cf539f2f3f8dcc17f28478d50ea641f5a0f6f1a3aa27674ba268e2705e0b agent:desk@5000
@@ -15,7 +15,6 @@
0cd4cf539f2f3f8dcc17f28478d50ea641f5a0f6f1a3aa27674ba268e2705e0b recap:desk:unread@5000
0cd4cf539f2f3f8dcc17f28478d50ea641f5a0f6f1a3aa27674ba268e2705e0b recap:desk@5000
0e6c6e8c472798f787049711849aecaa717179bad00135fa1d0f84d8db09308e lead:loaded@600
-0ed64bb1f39cf5b4fbfbd32a7f7e8de6f95682c0660cf62406325b25772b676f home:swarm:remote@600
102064b2c387ab5cd1e0f274a8beaef812acc0db7e93ddaef06ed8d06811398f recap:desk:short@2500
11ce48c998ea730350c5fa0430d78275a62dff6d2f19e32343040e9ec47ba28f agent:be:offline@2500
12c8abf13002e19438133eef0d2947372670cd4657bb519a5cea3c9deb58fd54 lead:remote@600
@@ -25,7 +24,6 @@
1467a0558ff261ee1580e2ab811f1d59ed1418cf0566b084ba6697eb487a9618 tabs:bell@5000
1467a0558ff261ee1580e2ab811f1d59ed1418cf0566b084ba6697eb487a9618 tabs:linkdown@5000
1467a0558ff261ee1580e2ab811f1d59ed1418cf0566b084ba6697eb487a9618 tabs@5000
-1619edc536cd1214a73522ffc46ad4459cd6ae6f34e73084419acd3e945a30a7 home:swarm:remote@1234
205286ce60f1fdf5c5b6cefee707eaf71a3384cda456415cdac103fc574c4ebf agent:fw:banner@1234
205286ce60f1fdf5c5b6cefee707eaf71a3384cda456415cdac103fc574c4ebf agent:fw:unread@1234
205286ce60f1fdf5c5b6cefee707eaf71a3384cda456415cdac103fc574c4ebf agent:fw@1234
@@ -33,12 +31,14 @@
22083bf5827695add306905a71f6e07a70ec12872d2d4ed3cc043e47de7205cd talk:fw:quiet@600
22083bf5827695add306905a71f6e07a70ec12872d2d4ed3cc043e47de7205cd talk:fw@600
24e4b487e56cee7639400ebd1ed0d473a12cf553c31c0f3029edf019e1f36bc0 tabs:5@5000
+262c9840a592d18fb40f708dd67525bfdb25339f5034f2bef446bc6a3293c84f home:swarm:remote@0
26a207f8ff8046c6711fdb779b28735365e90b65907cc41f6222b30541d9e5dd tabs:working@0
26c92313e4fe996b71d5314cca0869cb0cb41f33ae73795a7e5279e7f4ca95f9 home:swarm:p2@0
27df000c5f60d8eb8663a8fe6959384eace8ac0e418f05c3ac719ef84feacf4b agent:cli:banner@5000
27df000c5f60d8eb8663a8fe6959384eace8ac0e418f05c3ac719ef84feacf4b agent:cli@5000
2871cd9a6077527eec0e37e0ea6dac9fc07218063c319054184c0f2fecc9cfe2 talk:fw:quiet@1234
2871cd9a6077527eec0e37e0ea6dac9fc07218063c319054184c0f2fecc9cfe2 talk:fw@1234
+28b7ec872ba459bb53739fc25fabeb0344e4de9113f0244cb9173730c3d65faf home:swarm:remote@1234
2b58a3fbaae6798538256d06e3d7366fdeeb0fb8edc661cdee2dd2ce521769a0 talk:cur@600
2d9d5c7353bd2d8870657970c411ca4b0a275f2ebb6272cd196429a9b6753642 agent:desk@600
2d9d5c7353bd2d8870657970c411ca4b0a275f2ebb6272cd196429a9b6753642 recap:desk:banner@600
@@ -88,6 +88,7 @@
3b05ad1f890158c96ebbe21b862f4121d90eaadcafe77f91cdb72e64e60f4068 home:swarm:p1@1234
3b562265abe088aada195ff5b8a88dba3e06d62809a2d582cefb34adf20bf329 lead:ask@2500
3baf2cd488eeeb310783ef08303bbb235772ade7303feedc65e2adaa7b565565 recap:desk:short@1234
+3bcdfa6e218c2e1999bce65a891884f93737cd2aa62534e0f42538422db352d3 home:swarm:stuck@0
3c50228ed125d5138821ae678ebc8267734a5e79c8878b4e4813ebbcb80b3164 agent:fw:long@1234
3d43bb7cb2ab0102944745f80af971677a75bec05d5dbc01baaf9003fa4111f9 tabs:5@1234
44c082278989b9844c91c372d51a9f2b29430bf083fcb2794698e189fe8f2e3d tabs:none@600
@@ -100,8 +101,9 @@
480d9b19c0aef0f2dcaa1dfb1aba46db93108f3912d6e2c1aed86cd420846d3f tabs:5@0
48d13463b2d93a8b84012dba5dbc3346c10fea89fb2f5d7e107252e8cd17c199 recap:docs:unreadfail@2500
49df1c4eafa42a0e150e8b9c77cbdfca70a9f8ba1e16d863435a24091c935336 tabs:none@1234
-4bef0fefb9bd809745db2afcb7d0b32c476d27da0725d52cf316e5433c4d87c8 home:swarm:many@5000
+4b798d9a8d9cd51399c2c1b992ddc49feb856e48d49fe2c116270482b09a3637 home:swarm:many@1234
4c575da9f9c644d41a714b210cb66c11e141a9e945d9771097a05ace169de6c7 tabs:long@600
+4c8a296f6b98079851622cf9bbfdd436814be30b4f75ba819c41b3b7a699552b home:swarm:stuck@2500
4e1055e7920922bf2c1ba0212b5860b7cdcc162784a16e1d9abd6c586d38cec0 recap:docs:toast@4900@0
4e1055e7920922bf2c1ba0212b5860b7cdcc162784a16e1d9abd6c586d38cec0 recap:docs:toast@4900@1234
4e1055e7920922bf2c1ba0212b5860b7cdcc162784a16e1d9abd6c586d38cec0 recap:docs:toast@4900@2500
@@ -111,6 +113,7 @@
50515880623dbb0b9854175e41174c31d6396b40c576932cad2dcc5e36cff96e tabs:seven@1234
50e26b3c495b054fb16aaf4e792d49234f9d636fa88c4b3520512e75cdf1dc9d recap:desk:long@5000
555f603431f0bf42d41c4d306f98e099d3b22296d9fdf75c78282914f957bb3e home:swarm:p1@0
+563511c0d14d64810e80ffec87a44aa96ebd49b0d22af294aa6580ad3c715d10 home:swarm:many@0
5647a2a762bd817469bff3189b4e1162fb3b11acbbc72ad9aee9139e0446a010 recap:docs:long@0
5647a2a762bd817469bff3189b4e1162fb3b11acbbc72ad9aee9139e0446a010 recap:docs:long@2500
5acb2d70fc0480116a86cbbf66fcc15390559f258a7cdacf1c2044615cd7135a lead:remote@1234
@@ -126,7 +129,6 @@
6b6f4d5ec0fca4a424bbf414120c01447324f801eee022d81472bb400f0b0c5f agent:be:offline@0
6b6f4d5ec0fca4a424bbf414120c01447324f801eee022d81472bb400f0b0c5f agent:be:offline@5000
6c3389eb1064d6b347bc85f3bda88ead51eb6a0884b92db0d27afb43547e9fe4 recap:docs@600
-6ceba1401424c99ae045190a875f0e6760e28ddc720413aae8e65f8f3ac770ea home:swarm:many@1234
6e8bcfa83ea6eaa08d60fd95be555efbbc0c7e6b5c82c93996f8d1a18d51dc99 home:swarm:p1@2500
71ab48d28570b32591d93f305e3a1c95d00b3ca6026359dd630b3f5da6c78ac1 lead:loaded@1234
72ba008ee35e9d149fd6952d48cf85ea5898d0875786251d4199b69d53ab2d49 agent:fw:toast@4900@0
@@ -141,6 +143,7 @@
7593d8806d372da0c991d91edb4cd8236a21aebb65e3df5748be49bba89fdf55 recap:desk:toast@2500@2500
7593d8806d372da0c991d91edb4cd8236a21aebb65e3df5748be49bba89fdf55 recap:desk:toast@2500@5000
7593d8806d372da0c991d91edb4cd8236a21aebb65e3df5748be49bba89fdf55 recap:desk:toast@2500@600
+760584f2674e5a964bb132d5f51b485fb61d72239fb4863d0479e19a551e7d8c home:swarm:remote@2500
762ed969bd1df9df725878715196d6a826105caf612fb7fa881b67e4b070b7e0 talk:be@2500
795544341ad4c32f7547c77449838fb9ffa4ebf03c336d43012a309838a35b51 agent:fw:long@2500
79e8882fc2d840ab167064322c9ca2620467320e9cd10d826930e733c89c0cac agent:fw:toast@200@0
@@ -155,11 +158,11 @@
79f3f79188af491ef39c661e619e1e641864dc3b33a325f60b3c7712b7c7726b talk:be:send@600
7ccddd2c39c5bec4ebcf4fa0e5bfb3421e0d200aeb091e014636296e2e8ec850 talk:fw:quiet@2500
7ccddd2c39c5bec4ebcf4fa0e5bfb3421e0d200aeb091e014636296e2e8ec850 talk:fw@2500
-7cf248aedbdca79cb79f4aadbac5b847e63fb5bf1e74c820521b40bed0217818 home:swarm:stuck@2500
7dfd56f51d9b85c6cf8396f7f4169ffcabe7c2bb436a8096a2c0275dc339e617 agent:cli:long@600
7e560682e42982215f0b39450ac55bb2059d9b70065772979fcdb7b3c3cf9fe9 lead:none@0
7e560682e42982215f0b39450ac55bb2059d9b70065772979fcdb7b3c3cf9fe9 lead:none@5000
7effffc339beb6a37a3cbcc5cb51fe7c836ef949dcb216825da4bfe0129722dd lead:loaded@5000
+7fa039f5ebda47a61985054e836d0373bffba85f07667ef3decc52685b752e01 home:swarm:remote@5000
81312fbd4dee9803a32e5d3aa5fb3b317eafb965fa337f4fadaec149959bc0fc tabs:seven@0
81cb592818416fb5bbdc363d609b1f9993a87cf61f00e50b60b83d47821b389a lead:loading@1234
84ee291923ce9c24df7ca48fc9b93db7af552d3f47114aa5613729433fd23c58 tabs:working@5000
@@ -230,13 +233,12 @@ a6712f0052fbad9b33cf4511c4fbf0e4731c42df8c5533fa33b21a3439caddf2 recap:desk:ext
a6712f0052fbad9b33cf4511c4fbf0e4731c42df8c5533fa33b21a3439caddf2 recap:desk:testfail@2500
a6712f0052fbad9b33cf4511c4fbf0e4731c42df8c5533fa33b21a3439caddf2 recap:desk:unread@2500
a6712f0052fbad9b33cf4511c4fbf0e4731c42df8c5533fa33b21a3439caddf2 recap:desk@2500
-a85a688cdbb6e6586043edd8cd9b62093b5230d0f81df330f6c39c8924960142 home:swarm:stuck@1234
aa7d385e2f538e370781e40d71d58313259312909691e844e8ef8e0758f38b6d ota:100@0
aa7d385e2f538e370781e40d71d58313259312909691e844e8ef8e0758f38b6d ota:100@1234
aa7d385e2f538e370781e40d71d58313259312909691e844e8ef8e0758f38b6d ota:100@2500
aa7d385e2f538e370781e40d71d58313259312909691e844e8ef8e0758f38b6d ota:100@5000
aa7d385e2f538e370781e40d71d58313259312909691e844e8ef8e0758f38b6d ota:100@600
-ac01b5d61c511685b5fa6bc072839cf59375a67adbd472ac708ea9194fb9b7cc home:swarm:many@2500
+aaebdaf7d0702af2b27e9042c7ac089ba59d891ab94d54028d59f66a2d14c7c8 home:swarm:stuck@600
ac53464a1d840500d54ddfceb2360ebe43552e456b85807c997b22a9aa2f622b tabs:mock@600
ad007cd4fdc4676271ee900e07647d470675012997b1e9d6c1cfb625ee25df2b recap:docs@0
ad007cd4fdc4676271ee900e07647d470675012997b1e9d6c1cfb625ee25df2b recap:docs@2500
@@ -244,7 +246,6 @@ adcb50470a8227a85b07078ba541f2078628ba8f30fe657d90c699ac28bd36c4 home:swarm:p2@
ae9a89417055592a7468dfc3a7ea64b58cd85df877f197f8948e2b47a9124eb3 tabs:long@1234
aed7a76df17848d6d044e7343c0cf44f63cf71ed10c0cb9252a8d43e963003d0 home:swarm:done@5000
b13776fc7d712241ba716efb51747a1cd43cd0d009b8f2a20fbf1c8e36153be7 talk:be@5000
-b16e195a3539d87adba11e418b5aee24f17738ff858d64df39e48732e63f3b71 home:swarm:many@600
b2987fbea14e51cc7b4ddfcc7bc767ee6e7d4a09857ddabb9d0a5a680be6a714 recap:docs@5000
b31f451d884e5af7e9120f0456f994e049d8fafda4b014a76af3cf751cd96705 recap:docs:unreadfail@600
b65873f886da7017decf982177999e06d675cc158414f76acce2839cbd05646b lead:loading@0
@@ -295,7 +296,6 @@ d0d1825a2e3100dc03362657abb086bc64a9d5bde8b8f66a17f60d7cce000d39 ota:62@1234
d0d1825a2e3100dc03362657abb086bc64a9d5bde8b8f66a17f60d7cce000d39 ota:62@2500
d0d1825a2e3100dc03362657abb086bc64a9d5bde8b8f66a17f60d7cce000d39 ota:62@5000
d0d1825a2e3100dc03362657abb086bc64a9d5bde8b8f66a17f60d7cce000d39 ota:62@600
-d17f666b68cd138ef141f02e0162dbae58bf62edce6b3ae2dd9eed278221cb94 home:swarm:remote@2500
d2b83012c7ff21064242af7e49c377b19f8314f6cb2458b37904cdcbc9b41eae talk:be@600
d46cf19e2e6fac11b823004de27d2351d01870f5cfecb1486187161754f59d45 tabs:0+2@600
d46cf19e2e6fac11b823004de27d2351d01870f5cfecb1486187161754f59d45 tabs:9@600
@@ -319,6 +319,7 @@ d98e5146f84246d2e794ca51cc07961c82d1d5c7368c958638c0fdc21b9b4ff0 agent:fw:toast
d98e5146f84246d2e794ca51cc07961c82d1d5c7368c958638c0fdc21b9b4ff0 agent:fw:toast:decision@2500@600
de2e36bd169d9460b5d02fc90a0f37b6bf762f5dbbe7ccfeefc337cddb8af282 home:swarm:done@1234
de7fccfd4d9ed624772a2c8d137e182ca0697f72b421dc21d1bb4ce4bc8bf594 tabs:none@2500
+de80eec32ea888835bfe488f9b25dc6f80157dd1a405f1845c4a073b330d6184 home:swarm:many@2500
e01801d7676609320823ae0c55a805defab02449150ee721b8b774f8e85a7294 recap:desk:medium@0
e16e322edb920b4cff7d04ca1cb2c8202987f3734183bea64c59a7086b6ba830 agent:cli:long@5000
e1788054013a3e7d0de30c89a433ced3cb54ecca26683ffbff6693e33ab5df09 tabs:notices@0
@@ -327,9 +328,9 @@ e1788054013a3e7d0de30c89a433ced3cb54ecca26683ffbff6693e33ab5df09 tabs:notices@2
e1788054013a3e7d0de30c89a433ced3cb54ecca26683ffbff6693e33ab5df09 tabs:notices@5000
e1788054013a3e7d0de30c89a433ced3cb54ecca26683ffbff6693e33ab5df09 tabs:notices@600
e1ff6c4a58d744e05300c2a57be4e08d5f29cc531a741a83c649a892ab7de29a recap:desk:long@1234
-e256df40767ebaacd4aa9798959e2fcc731327ef53d5b74dab2c9aede429bfd8 home:swarm:many@0
e55b4e490d71c454af6cd36f6778798a187eacfcce2b18ca7579fffc5b386bb0 agent:cli:banner@600
e55b4e490d71c454af6cd36f6778798a187eacfcce2b18ca7579fffc5b386bb0 agent:cli@600
+e613555b96ab955404f55d39984791e73f9cce4acd1ebaf9b0e735b0c2be7f8e home:swarm:many@600
e652d520e88b1d12b1fe7409e957a1065d69f7683ce6d1e8cd2caaca93c725ad tabs:2+2@0
e652d520e88b1d12b1fe7409e957a1065d69f7683ce6d1e8cd2caaca93c725ad tabs:2+2@1234
e652d520e88b1d12b1fe7409e957a1065d69f7683ce6d1e8cd2caaca93c725ad tabs:2+2@2500
@@ -337,13 +338,14 @@ e652d520e88b1d12b1fe7409e957a1065d69f7683ce6d1e8cd2caaca93c725ad tabs:2+2@5000
e652d520e88b1d12b1fe7409e957a1065d69f7683ce6d1e8cd2caaca93c725ad tabs:2+2@600
e6a3ea32881c13627d6043a18efae1b4578e2c62467b1989129c0a8da1b57032 lead:none@1234
e6a7fa14ee6c9191350176f8dfcf0661da526268a3d14d912f6337e048b39cbf tabs:1@1234
+e863aabe59e0ae473cf778a960aa06a49b819ccc2af11dd203351c7e5981c94f home:swarm:stuck@5000
e8f82832b80bcf61502a843b8ebc9523b41386be13fdafcc1cf2d5f5e00922ad inbox:quiet@0
e8f82832b80bcf61502a843b8ebc9523b41386be13fdafcc1cf2d5f5e00922ad inbox:quiet@1234
e8f82832b80bcf61502a843b8ebc9523b41386be13fdafcc1cf2d5f5e00922ad inbox:quiet@2500
e8f82832b80bcf61502a843b8ebc9523b41386be13fdafcc1cf2d5f5e00922ad inbox:quiet@5000
e8f82832b80bcf61502a843b8ebc9523b41386be13fdafcc1cf2d5f5e00922ad inbox:quiet@600
+ea1f33f352cd41ff374d1e787975d9a99f49bb05532036addfa2986dae78b049 home:swarm:remote@600
eaddfb7fa9e32238e63ccfb4e474bfa87eb7336fb6b7d044050fc8ed4560aeb1 recap:desk:long@0
-eba5c1c248aeeafebee678c3b035e6576766b4430e3cb0f06319439ae4aec077 home:swarm:stuck@600
ec35e5383f8ca65a2fd44da47c5c0c7b750d323a87d2be81bede059ba5136a00 tabs:0+2@2500
ec35e5383f8ca65a2fd44da47c5c0c7b750d323a87d2be81bede059ba5136a00 tabs:9@2500
ec35e5383f8ca65a2fd44da47c5c0c7b750d323a87d2be81bede059ba5136a00 tabs:banner@2500
@@ -376,8 +378,6 @@ f5336aa91a6c4989c444f12a3b9ec5e050f8496501eda04f4c52b23e9ae55d08 tabs:5@600
f6144683873654c1812667702bbed73c7cb8c8bdbab53bb9c49d13fc5ccbf180 recap:docs:long@600
f8a9d033bd6f6db33f4168d086f3aafae4dff0880e7f4301762ca35caf0c5f20 talk:cur@0
f8a9d033bd6f6db33f4168d086f3aafae4dff0880e7f4301762ca35caf0c5f20 talk:cur@1234
-f95249e7b76bf98ad4c4deb352f99dd2526fe821b16fcd356f680409351a381b home:swarm:stuck@5000
-f9b5e0622641b9fba51b7d4f8a925f38eb4d8fb283da472b8806eea59a622ce6 home:swarm:remote@5000
fbc885b17d01eadab52928be9eb2c3abf60bc351a280ac69a15b2c99b1664e8b tabs:seven@600
fc3bf40809cb606d7b0f777017dc1c9de85edebe1f3623ca13919b1495b73ff9 tabs:1@5000
ffa3bcedf2d77ad95edfe7f925134134bbb8451a7973b39e94ba5a7f7fd2f232 agent:fw:banner@2500
diff --git a/devices/harness-pro/firmware/test/test_ph_glue.c b/devices/harness-pro/firmware/test/test_ph_glue.c
index 4b8dc7e4f..5d7130dc5 100644
--- a/devices/harness-pro/firmware/test/test_ph_glue.c
+++ b/devices/harness-pro/firmware/test/test_ph_glue.c
@@ -1737,6 +1737,32 @@ static void swarm_card_tap(void) {
CHECK(tap_(h->x + h->w / 2, h->y + h->h / 2, 5000).fx == POD_FX_NONE && top()->view == POD_V_LEAD && top()->lead == 3 && U.nav.swarm_page == 1);
}
+// A notice of a harness that is a Swarm's Lead: its row opens that Lead's view in the Swarm (and picks it on the desktop), not the agent as a plain one
+// (which sent agent.open, and the desktop opened the agent in a new tab). The entry is read. A notice of any other agent still opens the agent.
+static void notice_opens_lead(void) {
+ swarm_home(4);
+ snprintf(U.model.swarms[0].leads[2].local, ID_MAX, "a3");
+ pod_model_unread_add(&U.model, "a3", "Gamma", "Merged.", 20, 2100);
+ act(POD_A_INBOX, 0);
+ render(2500);
+ const pod_hit_t *h = find(POD_A_OPEN_NOTIF);
+ CHECK(h && !strcmp(h->id, "a3"));
+ take();
+ pod_out_t o = tap_(h->x + h->w / 2, h->y + h->h / 2, 3000);
+ CHECK(o.fx == POD_FX_NONE && top()->view == POD_V_LEAD && !strcmp(top()->swarm, "sw1") && !strcmp(top()->lead_id, "l2"));
+ CHECK(U.nav.depth == 2 && U.nav.stack[0].view == POD_V_TABS && !pod_model_unread_find(&U.model, "a3")); // Back lands on the Swarm's card
+ CHECK(take() >= 1 && is_q(0, "supertab.select", "sw1", "l2"));
+ // not a Lead: the agent opens as before
+ swarm_home(4);
+ pod_model_unread_add(&U.model, "a2", "Beta", "Done.", 20, 2100);
+ act(POD_A_INBOX, 0);
+ render(2500);
+ h = find(POD_A_OPEN_NOTIF);
+ CHECK(h && !strcmp(h->id, "a2"));
+ o = tap_(h->x + h->w / 2, h->y + h->h / 2, 3000);
+ CHECK(o.fx == POD_FX_AGENT_OPEN && !strcmp(o.agent, "a2") && top()->view != POD_V_LEAD);
+}
+
// ---- the Lead view ----
static void lead_tap_sends(void) {
swarm_home(4);
@@ -2043,6 +2069,7 @@ int main(void) {
swarm_card_pages();
swarm_card_few_leads();
swarm_card_tap();
+ notice_opens_lead();
lead_tap_sends();
lead_retry();
lead_swipe_steps();
diff --git a/devices/harness-pro/firmware/test/test_ph_views.c b/devices/harness-pro/firmware/test/test_ph_views.c
index 1abdcadd3..ed708c1e2 100644
--- a/devices/harness-pro/firmware/test/test_ph_views.c
+++ b/devices/harness-pro/firmware/test/test_ph_views.c
@@ -1479,9 +1479,20 @@ int main(void) {
CHECK(text_run("Linh Tran")->y > text_run("working")->y);
N.stack[0].scroll = 0; fresh(); ph_view_home(&F, &N, &M, 1000); // the next page peeks at the right: its gradient and title only
CHECK(text_run("Solo swarm") && !text_run("ops") && hits_of(POD_A_LEAD) == 3);
+ { // the working line's clock needs a turn's start: a local Lead working only from open assignments (no since) says "working", with no 0:00 counting on
+ pod_lead_t l;
+ memset(&l, 0, sizeof l);
+ char line[64];
+ snprintf(l.local, ID_MAX, "h1"); l.state = POD_LEAD_WORK;
+ ph_lead_status(&l, 5000, line, sizeof line, 0);
+ CHECK(!strcmp(line, "working"));
+ l.since_s = 134; l.since_at_ms = 1000;
+ ph_lead_status(&l, 3500, line, sizeof line, 0);
+ CHECK(!strcmp(line, "working \xc2\xb7 2:16"));
+ }
// Leads: the pet's scene is work (WORK), ask (ASK, STUCK) or rest (DONE)
CHECK(ph_lead_scene(POD_LEAD_WORK) == POD_SCENE_WORK && ph_lead_scene(POD_LEAD_ASK) == POD_SCENE_ASK && ph_lead_scene(POD_LEAD_STUCK) == POD_SCENE_ASK && ph_lead_scene(POD_LEAD_DONE) == POD_SCENE_REST);
- { // v3: the capsule's counts in the fixed order, the Leads stuck / needs you / working / done (the Swarm's order inside each), "All done", the long forms
+ { // the capsule's counts in the fixed order; the Leads in the Swarm's order whatever their state (the daemon's `order`); "All done", the long forms
static const pod_lead_state_t st[6] = {POD_LEAD_DONE, POD_LEAD_WORK, POD_LEAD_ASK, POD_LEAD_STUCK, POD_LEAD_WORK, POD_LEAD_ASK};
snprintf(S1.name, sizeof S1.name, "Order");
S1.count = S1.lead_n = 6;
@@ -1494,12 +1505,12 @@ int main(void) {
pod_model_supertab(&M, &S1, 1000);
N.stack[0].scroll = 1; N.swarm_page = 0; fresh(); ph_view_home(&F, &N, &M, 1000);
CHECK(text_run("6") && text_run("1 stuck \xc2\xb7 2 need you") && text_run("1 stuck \xc2\xb7 2 need you")->fg == ht_rgb(0xFFB0B0) && text_run("2") && !text_run("2 working") && !text_prefix("1 done")); // too wide with "working": the bars and the number
- CHECK(hits_of(POD_A_LEAD) == 3 && nth_hit(POD_A_LEAD, 0)->arg == 3 && nth_hit(POD_A_LEAD, 1)->arg == 2 && nth_hit(POD_A_LEAD, 2)->arg == 5); // stuck, then the two that need you
- CHECK(text_run("p3") && text_run("p2") && text_run("p5") && text_run("stuck") && text_run("needs you") && !text_run("p1"));
- CHECK(text_run("p3")->x < text_run("p2")->x && text_run("p2")->x < text_run("p5")->x);
+ CHECK(hits_of(POD_A_LEAD) == 3 && nth_hit(POD_A_LEAD, 0)->arg == 0 && nth_hit(POD_A_LEAD, 1)->arg == 1 && nth_hit(POD_A_LEAD, 2)->arg == 2); // done, working, needs you: as listed
+ CHECK(text_run("p0") && text_run("p1") && text_run("p2") && text_run("done") && text_run("needs you") && !text_run("p3"));
+ CHECK(text_run("p0")->x < text_run("p1")->x && text_run("p1")->x < text_run("p2")->x);
N.swarm_page = 1; fresh(); ph_view_home(&F, &N, &M, 1000);
- CHECK(hits_of(POD_A_LEAD) == 3 && nth_hit(POD_A_LEAD, 0)->arg == 1 && nth_hit(POD_A_LEAD, 1)->arg == 4 && nth_hit(POD_A_LEAD, 2)->arg == 0); // working, then done
- CHECK(text_run("0:20") && text_run("0:50") && text_run("done") && !text_run("needs you") && text_run("1 stuck \xc2\xb7 2 need you")); // the capsule counts the whole Swarm
+ CHECK(hits_of(POD_A_LEAD) == 3 && nth_hit(POD_A_LEAD, 0)->arg == 3 && nth_hit(POD_A_LEAD, 1)->arg == 4 && nth_hit(POD_A_LEAD, 2)->arg == 5); // stuck, working, needs you
+ CHECK(text_run("stuck") && text_run("0:50") && text_run("needs you") && !text_run("done") && text_run("1 stuck \xc2\xb7 2 need you")); // the capsule counts the whole Swarm
for (int i = 0; i < 6; i++) S1.leads[i].state = POD_LEAD_DONE;
pod_model_supertab(&M, &S1, 1000);
N.swarm_page = 0; fresh(); ph_view_home(&F, &N, &M, 1000);
diff --git a/devices/harness-pro/firmware/test/test_pro_cable.c b/devices/harness-pro/firmware/test/test_pro_cable.c
index 24b7ad89f..1433070aa 100644
--- a/devices/harness-pro/firmware/test/test_pro_cable.c
+++ b/devices/harness-pro/firmware/test/test_pro_cable.c
@@ -1126,24 +1126,29 @@ static void test_swarm_cards(void)
CHECK(rec_card.leads[1].state == POD_LEAD_STUCK && !strcmp(rec_card.leads[1].owner, "Mai") && rec_card.leads[1].projectId[0] == 0 &&
rec_card.leads[2].state == POD_LEAD_WORK && rec_card.leads[2].since_s == 9);
- // a daemon from the round dial's Swarm tab on adds `order` to each Lead: the Pro reads past it to the same model
+ // `order` (the project's index in the Swarm, the app's order) puts the Leads in that order whatever their urgency; without it they stay as they came
static const char *plain_leads = "{\"id\":\"L1\",\"projectId\":\"P1\",\"project\":\"mobile\",\"engine\":\"claude\",\"owner\":\"\",\"local\":\"H1\",\"state\":\"ask\",\"since\":134},"
"{\"id\":\"L2\",\"project\":\"web\",\"engine\":\"codex\",\"owner\":\"Mai\",\"local\":\"\",\"state\":\"done\"}";
static const char *order_leads = "{\"id\":\"L1\",\"projectId\":\"P1\",\"project\":\"mobile\",\"engine\":\"claude\",\"owner\":\"\",\"local\":\"H1\",\"state\":\"ask\",\"order\":2,\"since\":134},"
- "{\"order\":0,\"id\":\"L2\",\"project\":\"web\",\"engine\":\"codex\",\"owner\":\"Mai\",\"local\":\"\",\"state\":\"done\"}";
+ "{\"order\":0,\"id\":\"L2\",\"project\":\"web\",\"engine\":\"codex\",\"owner\":\"Mai\",\"local\":\"\",\"state\":\"done\"},"
+ "{\"id\":\"L3\",\"project\":\"api\",\"engine\":\"codex\",\"state\":\"work\",\"order\":1}";
reset();
feedf("{\"t\":\"supertab\",\"id\":\"S1\",\"tab\":\"T1\",\"name\":\"openharness\",\"count\":2,\"leads\":[%s]}", plain_leads);
+ CHECK(nev == 1 && rec_card.lead_n == 2 && !strcmp(rec_card.leads[0].id, "L1") && !strcmp(rec_card.leads[1].id, "L2"));
pod_swarm_t plain = rec_card;
reset();
- feedf("{\"t\":\"supertab\",\"id\":\"S1\",\"tab\":\"T1\",\"name\":\"openharness\",\"count\":2,\"leads\":[%s]}", order_leads);
- CHECK(nev == 1 && evs[0].kind == EV_SUPERTAB && rec_card.lead_n == 2 && plain.lead_n == 2);
- CHECK(!strcmp(rec_card.id, plain.id) && !strcmp(rec_card.tab, plain.tab) && !strcmp(rec_card.name, plain.name) && rec_card.count == plain.count);
- for (int i = 0; i < 2; i++) {
- const pod_lead_t *a = &plain.leads[i], *b = &rec_card.leads[i];
+ feedf("{\"t\":\"supertab\",\"id\":\"S1\",\"tab\":\"T1\",\"name\":\"openharness\",\"count\":3,\"leads\":[%s]}", order_leads);
+ CHECK(nev == 1 && evs[0].kind == EV_SUPERTAB && rec_card.lead_n == 3);
+ CHECK(!strcmp(rec_card.leads[0].id, "L2") && !strcmp(rec_card.leads[1].id, "L3") && !strcmp(rec_card.leads[2].id, "L1"));
+ for (int i = 0; i < 2; i++) { // each Lead moved whole
+ const pod_lead_t *a = &plain.leads[i], *b = &rec_card.leads[i ? 0 : 2];
CHECK(!strcmp(a->id, b->id) && !strcmp(a->projectId, b->projectId) && !strcmp(a->project, b->project) && !strcmp(a->engine, b->engine) &&
!strcmp(a->owner, b->owner) && !strcmp(a->local, b->local) && a->state == b->state && a->since_s == b->since_s &&
a->recap == b->recap && a->text == b->text && a->text_at == b->text_at);
}
+ reset(); // equal orders keep their arrival order
+ feed("{\"t\":\"supertab\",\"id\":\"S1\",\"leads\":[{\"id\":\"a\",\"order\":1},{\"id\":\"b\",\"order\":0},{\"id\":\"c\",\"order\":1}]}");
+ CHECK(rec_card.lead_n == 3 && !strcmp(rec_card.leads[0].id, "b") && !strcmp(rec_card.leads[1].id, "a") && !strcmp(rec_card.leads[2].id, "c"));
// 15 Leads -> 12; count absent -> the Leads listed
reset();