The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
fix(swarm): a message waiting for an agent is never announced (#1793)
0xken15dc996559e5cb
diff --git a/backend/integration/superTabs.test.ts b/backend/integration/superTabs.test.tsindex 996ba33af..5971cd6d7 100644--- a/backend/integration/superTabs.test.ts+++ b/backend/integration/superTabs.test.ts@@ -996,9 +996,8 @@ describe('Super Tabs on a real Mongo replica set', () => {expect(await db.superTabConfiguration.count({ where: { tabId: tab } })).toBe(3)})- it('tells the group once, in plain words, that a claimed delivery is waiting, and only for the claim holder', async () => {+ it('records a claimed delivery hold for the claim holder only and posts nothing in the conversation', async () => {const { tab, lead } = await fixture()- const displayName = (await store.read(owner, tab)).state.agents.find(a => a.id === lead)!.displayName!await run(tab, message('Please start.'))const delivery = (await store.deliveries(host, tab, lead))[0]!await expect(store.delivery(host, tab, lead, delivery.id, { type: 'hold', claimId: 'claim', reason: 'team_waiting_draft' }))@@ -1006,48 +1005,11 @@ describe('Super Tabs on a real Mongo replica set', () => {await store.delivery(host, tab, lead, delivery.id, { type: 'claim', claimId: 'claim' })await expect(store.delivery(host, tab, lead, delivery.id, { type: 'hold', claimId: 'another', reason: 'team_waiting_draft' })).rejects.toMatchObject({ code: 'CLAIM_CONFLICT' })- expect(await store.delivery(host, tab, lead, delivery.id, { type: 'hold', claimId: 'claim', reason: 'team_waiting_draft' })).toEqual({ noticed: true })- expect(await store.delivery(host, tab, lead, delivery.id, { type: 'hold', claimId: 'claim', reason: 'team_waiting_idle' })).toEqual({ noticed: false })- const rows = (await store.messages(owner, tab, 'lead', {})).messages- expect(rows).toHaveLength(2)- expect(rows[1]).toMatchObject({ author: { kind: 'agent', id: lead, displayName }, recipientIds: [], deliveries: [],- text: expect.stringContaining(`A message for ${displayName} is waiting. There is unsent text in ${displayName}'s input box.`) })+ expect(await store.delivery(host, tab, lead, delivery.id, { type: 'hold', claimId: 'claim', reason: 'team_waiting_user' })).toEqual({ held: true })+ expect(await db.superTabDelivery.findUnique({ where: { id: delivery.id } })).toMatchObject({ holdReason: 'team_waiting_user' })+ expect((await store.messages(owner, tab, 'lead', {})).messages.map(m => m.text)).toEqual(['Please start.'])await store.delivery(host, tab, lead, delivery.id, { type: 'ack', claimId: 'claim', receipt: 'done', uncertain: false })- expect(await store.delivery(host, tab, lead, delivery.id, { type: 'hold', claimId: 'claim', reason: 'team_waiting_idle' })).toEqual({ noticed: false })- // A Lead leaves only with its project; its stored rows keep its name.- await run(tab, { type: 'project.delete', projectId: 'lead' })- expect((await db.superTabMessage.findUnique({ where: { id: rows[1]!.id } }))!.author).toMatchObject({ displayName })- })-- it('names the machine and its owner for a question on screen and sends the notice to the Lead, once', async () => {- const { tab, lead } = await fixture()- await db.user.update({ where: { id: host.sub }, data: { name: 'Huy' } })- await db.machine.update({ where: { machineId: 'test-host' }, data: { name: 'MacBookPro2021' } })- const worker = (await run(tab, { type: 'agent.add', conversationId: 'lead', machineId: 'test-host', harnessId: randomUUID(), name: 'Release builder',- configuration: config, lead: false })).result.agentId as string- const displayName = (await store.read(owner, tab)).state.agents.find(a => a.id === worker)!.displayName!- await run(tab, { type: 'message.send', conversationId: 'lead', text: 'Please start.', replyTo: null, recipientIds: [worker] })- const delivery = (await store.deliveries(host, tab, worker))[0]!- await store.delivery(host, tab, worker, delivery.id, { type: 'claim', claimId: 'claim' })- expect(await store.delivery(host, tab, worker, delivery.id, { type: 'hold', claimId: 'claim', reason: 'team_waiting_user' })).toEqual({ noticed: true })- expect(await store.delivery(host, tab, worker, delivery.id, { type: 'hold', claimId: 'claim', reason: 'team_waiting_user' })).toEqual({ noticed: false })- const notices = (await store.messages(owner, tab, 'lead', {})).messages.filter(m => m.source?.kind === 'delivery-hold')- expect(notices).toHaveLength(1)- expect(notices[0]).toMatchObject({ author: { id: worker }, recipientIds: [lead],- text: expect.stringContaining(`${displayName} is on MacBookPro2021. Only Huy (owner of that machine) can answer it.`) })- expect(notices[0]!.text).not.toContain(owner.email)- // An owner with no name is left out, never replaced by an email address.- await db.user.update({ where: { id: host.sub }, data: { name: null } })- const second = await fixture()- const quiet = (await run(second.tab, { type: 'agent.add', conversationId: 'lead', machineId: 'test-host', harnessId: randomUUID(), name: 'Quiet builder',- configuration: config, lead: false })).result.agentId as string- await run(second.tab, { type: 'message.send', conversationId: 'lead', text: 'Please start.', replyTo: null, recipientIds: [quiet] })- const held = (await store.deliveries(host, second.tab, quiet))[0]!- await store.delivery(host, second.tab, quiet, held.id, { type: 'claim', claimId: 'claim' })- await store.delivery(host, second.tab, quiet, held.id, { type: 'hold', claimId: 'claim', reason: 'team_waiting_user' })- const text = (await store.messages(owner, second.tab, 'lead', {})).messages.find(m => m.source?.kind === 'delivery-hold')!.text- expect(text).toContain('is on MacBookPro2021.')- expect(text).not.toMatch(/Only|@/)+ expect(await store.delivery(host, tab, lead, delivery.id, { type: 'hold', claimId: 'claim', reason: 'team_waiting_idle' })).toEqual({ held: false })})it('delivers a Lead\'s agent-only notice to the Lead once and shows it to no person in the project chat', async () => {@@ -1069,7 +1031,7 @@ describe('Super Tabs on a real Mongo replica set', () => {// Typed through the normal claim; a hold while the input box is busy writes no row people would see.const claimed = await store.delivery(host, tab, lead, deliveries[0]!.id, { type: 'claim', claimId: 'claim' })expect(claimed.message).toMatchObject({ text: 'Harness updated your built-in swarm-lead skill.', source: { kind: 'agent-only' } })- expect(await store.delivery(host, tab, lead, deliveries[0]!.id, { type: 'hold', claimId: 'claim', reason: 'team_waiting_draft' })).toEqual({ noticed: false })+ expect(await store.delivery(host, tab, lead, deliveries[0]!.id, { type: 'hold', claimId: 'claim', reason: 'team_waiting_draft' })).toEqual({ held: false })expect((await store.messages(owner, tab, 'lead', {})).messages).toEqual([])})@@ -1141,7 +1103,7 @@ describe('Super Tabs on a real Mongo replica set', () => {expect((await store.messages(owner, tab, 'lead', {})).messages).toEqual([])})- it('stores the current delivery hold and its first time even after the compatibility notice exists', async () => {+ it('stores the current delivery hold and its first time without a conversation notice', async () => {const { tab, lead } = await fixture()let now = Date.now()const timed = new SuperTabStore(db, () => now)@@ -1153,10 +1115,8 @@ describe('Super Tabs on a real Mongo replica set', () => {await timed.delivery(host, tab, lead, delivery.id, { type: 'hold', claimId: 'claim', reason })expect(await db.superTabDelivery.findUnique({ where: { id: delivery.id } })).toMatchObject({ holdReason: reason, holdSince: since })const rows = (await timed.messages(owner, tab, 'lead', {})).messages- expect(rows).toHaveLength(2)+ expect(rows).toHaveLength(1)expect(rows[0]!.deliveries[0]).toMatchObject({ holdReason: reason, holdSince: since })- expect(rows[1]).toMatchObject({ source: { kind: 'delivery-hold', messageId: delivery.messageId, deliveryId: delivery.id, agentId: lead },- text: expect.stringContaining('It stays queued and goes in by itself') })now += 5000}})diff --git a/backend/src/routes/superTabs.ts b/backend/src/routes/superTabs.tsindex d484107fd..9756bd2a0 100644--- a/backend/src/routes/superTabs.ts+++ b/backend/src/routes/superTabs.ts@@ -13,7 +13,7 @@ import { routingPolicySchema } from '../superTabs/routingPolicy.js'import { nativeEventSchema, openNativeSchema } from '../superTabs/native.js'import { machineObservationSchema } from '../superTabs/machines.js'import { joinSwarmSchema, previewJoinSchema, saveSharingSchema } from '../superTabs/sharing.js'-import { holdReason } from '../superTabs/holdNotice.js'+import { holdReason } from '../superTabs/holdReason.js'import { GitHubAppError } from '../github/app.js'import { githubRepository } from '../github/repository.js'import { attribution } from '../github/attribution.js'diff --git a/backend/src/superTabs/holdNotice.test.ts b/backend/src/superTabs/holdNotice.test.tsdeleted file mode 100644index 12f3650bc..000000000--- a/backend/src/superTabs/holdNotice.test.ts+++ /dev/null@@ -1,29 +0,0 @@-import { describe, expect, it } from 'vitest'-import { holdNoticeText, holdReason } from './holdNotice.js'--describe('holdNoticeText', () => {- it('says in plain words why a delivery waits, for every reason a host can report', () => {- const lines = holdReason.options.map(reason => holdNoticeText('Lead', reason))- expect(new Set(lines).size).toBe(holdReason.options.length)- for (const line of lines) {- expect(line).toMatch(/^A message for Lead is waiting\. .*It stays queued and goes in by itself as soon as that clears\.$/)- expect(line).not.toMatch(/team_waiting|_/)- }- expect(holdNoticeText('Lead', 'team_waiting_draft')).toContain("There is unsent text in Lead's input box.")- })-- it('names the machine and its owner only for a question on screen, and only what is known', () => {- const host = { machine: 'MacBookPro2021', owner: 'Huy' }- expect(holdNoticeText('Release builder', 'team_waiting_user', host))- .toContain('Release builder is on MacBookPro2021. Only Huy (owner of that machine) can answer it. It stays queued')- expect(holdNoticeText('Release builder', 'team_waiting_user', { machine: null, owner: 'Huy' }))- .toContain('waiting. Release builder is showing a question or menu that needs a person to answer it. Only Huy (owner of the machine it runs on) can answer it.')- expect(holdNoticeText('Release builder', 'team_waiting_user', { machine: null, owner: null })).not.toContain('owner')- expect(holdNoticeText('Release builder', 'team_waiting_user')).not.toContain(' on ')- expect(holdNoticeText('Release builder', 'team_waiting_draft', host)).not.toContain('Huy')- })-- it('rejects a reason it has no words for', () => {- expect(holdReason.safeParse('team_waiting_busy').success).toBe(false)- })-})diff --git a/backend/src/superTabs/holdNotice.ts b/backend/src/superTabs/holdNotice.tsdeleted file mode 100644index ca7630cdd..000000000--- a/backend/src/superTabs/holdNotice.ts+++ /dev/null@@ -1,29 +0,0 @@-import { z } from 'zod'--/**- * Why a host reports that it cannot type a delivery into an agent's terminal yet. These are the reasons the- * harness core gives (cli/src/engines/kit/screen.ts); the host sends the code and the words live here, so- * every client and every language of the conversation reads the same sentence.- */-export const holdReason = z.enum(['team_waiting_unavailable', 'team_waiting_user', 'team_waiting_draft', 'team_waiting_idle', 'team_waiting_control'])-export type HoldReason = z.infer<typeof holdReason>--const WHY: Record<HoldReason, (name: string) => string> = {- team_waiting_unavailable: name => `${name}'s terminal cannot be read right now.`,- team_waiting_user: name => `${name} is showing a question or menu that needs a person to answer it.`,- team_waiting_draft: name => `There is unsent text in ${name}'s input box.`,- team_waiting_idle: name => `${name} is still busy, or its input box is not ready.`,- team_waiting_control: name => `Someone else is using ${name}'s terminal right now.`,-}--/** Where the waiting agent runs and who owns that machine: the only person who can reach the screen. Either may be unknown. */-export interface HoldHost { machine: string | null; owner: string | null }--/** The one notice a conversation gets about a delivery that has waited over 30 seconds (2026-10-21: minutes, unexplained). */-export const holdNoticeText = (agentName: string, reason: HoldReason, host?: HoldHost): string => {- // A question on screen is answered at that machine, so name it and its owner; never anyone who cannot reach it.- const where = reason === 'team_waiting_user' && host- ? `${host.machine ? ` ${agentName} is on ${host.machine}.` : ''}${host.owner ? ` Only ${host.owner} (owner of ${host.machine ? 'that' : 'the'} machine${host.machine ? '' : ' it runs on'}) can answer it.` : ''}`- : ''- return `A message for ${agentName} is waiting. ${WHY[reason](agentName)}${where} It stays queued and goes in by itself as soon as that clears.`-}diff --git a/backend/src/superTabs/holdReason.ts b/backend/src/superTabs/holdReason.tsnew file mode 100644index 000000000..278d40f20--- /dev/null+++ b/backend/src/superTabs/holdReason.ts@@ -0,0 +1,9 @@+import { z } from 'zod'++/**+ * Why a host reports that it cannot type a delivery into an agent's terminal yet. These are the reasons the+ * harness core gives (cli/src/engines/kit/screen.ts). Kept on the delivery for logs only; people are never shown a+ * queued message as waiting, the agent simply answers when it can.+ */+export const holdReason = z.enum(['team_waiting_unavailable', 'team_waiting_user', 'team_waiting_draft', 'team_waiting_idle', 'team_waiting_control'])+export type HoldReason = z.infer<typeof holdReason>diff --git a/backend/src/superTabs/store.ts b/backend/src/superTabs/store.tsindex 3c7396274..7ce4cfbef 100644--- a/backend/src/superTabs/store.ts+++ b/backend/src/superTabs/store.ts@@ -26,7 +26,7 @@ import {activeWork, actorKey, agent, agentOnly, appendPullRequestUrls, author, conversation, createSuperTab, fail, person, stableId, visibleState, finishWorker,SuperTabError, isLeads, parkLaterConversations, syncLeads, type Actor, type Agent, type Assignment, type Author, type MessageDraft, type SuperTabState,} from './model.js'-import { holdNoticeText, type HoldReason } from './holdNotice.js'+import type { HoldReason } from './holdReason.js'import { agentDisplayName } from './agentNames.js'import { endedHolds, HOLDING, type WorkHold } from '../github/holds.js'import { accrueLent } from './leaderboard/lent.js'@@ -1667,7 +1667,7 @@ export class SuperTabStore {}if (delivery.claimId && delivery.claimId !== action.claimId) fail('CLAIM_CONFLICT', 'Reconcile the existing delivery before claiming it again.')if (action.type !== 'claim' && !delivery.claimId) fail('NOT_CLAIMED', 'Claim this instruction before acknowledging it.')- if (action.type === 'hold') return this.holdNotice(tx, loaded, delivery, action.reason)+ if (action.type === 'hold') return this.hold(tx, delivery, action.reason)const status = action.type === 'claim' ? delivery.status === 'queued' ? 'claimed' : delivery.status : action.uncertain ? 'uncertain' : 'delivered'if (delivery.status === 'delivered' && action.type === 'ack' && (action.uncertain || delivery.receipt !== action.receipt)) {fail('RECEIPT_CONFLICT', 'A delivered instruction keeps its original host receipt.')@@ -1683,40 +1683,14 @@ export class SuperTabStore {})}- /** The host cannot type a claimed instruction yet. Say so once in the group, as the waiting agent; nobody is asked to act on it. */- private async holdNotice(tx: Transaction, loaded: Loaded, delivery: SuperTabDelivery, reason: HoldReason) {- const state = structuredClone(loaded.state)- const id = stableId('hold-notice', delivery.tabId, delivery.id)- if (delivery.status !== 'claimed') return { noticed: false }- // Nobody can see an agent-only notice, so nobody is told it waits; the host keeps holding it.- if (agentOnly((await tx.superTabMessage.findUnique({ where: { id: delivery.messageId }, select: { source: true } }))?.source)) return { noticed: false }- const notice = await tx.superTabMessage.findUnique({ where: { id } })- if (notice && delivery.holdReason === reason && delivery.holdSince) return { noticed: false }- // The notice is only sent once for older Desktops; the inline receipt keeps the current reason.- await tx.superTabDelivery.update({ where: { id: delivery.id }, data: {- holdReason: reason, holdSince: delivery.holdSince ?? new Date(this.now()),- } })- const group = conversation(state, delivery.conversationId), waiting = agent(state, delivery.agentId)- const sender = author(state, { kind: 'agent', agentId: waiting.id, machineOwnerId: waiting.machineOwnerId })- // The Lead gets it too, like a host-stop notice; a waiting Lead has no one above it to tell.- const lead = group.leadId && group.leadId !== waiting.id && group.agentIds.includes(group.leadId) ? group.leadId : null- const host = !notice && reason === 'team_waiting_user' ? await this.holdHost(tx, state, waiting) : undefined- const notices: MessageDraft[] = notice ? [] : [{ id, conversationId: group.id, replyTo: null, recipients: lead ? [lead] : [],- source: { kind: 'delivery-hold', messageId: delivery.messageId, deliveryId: delivery.id, agentId: delivery.agentId },- text: holdNoticeText(sender.displayName ?? sender.name, reason, host), author: sender }]- const sequences = numberMessages(state, notices, this.now())- await this.save(tx, loaded, state, clock.next(), deliveryTouches(delivery))- await this.writeMessages(tx, loaded.row.id, state, notices, sequences)- return { noticed: !notice }- }-- /** The machine's name and its owner's name for a hold notice; left out when unknown rather than guessed. */- private async holdHost(tx: Transaction, state: SuperTabState, waiting: Agent) {- const contributed = state.machines?.find(m => m.machineId === waiting.machineId)?.name- const machine = contributed ?? (await tx.machine.findFirst({ where: { machineId: waiting.machineId, userId: waiting.machineOwnerId },- select: { name: true, hostname: true } }).then(m => m?.name ?? m?.hostname ?? null))- const owner = await tx.user.findUnique({ where: { id: waiting.machineOwnerId }, select: { name: true } })- return { machine: machine?.trim() || null, owner: owner?.name?.trim() || null }+ /** The host cannot type a claimed instruction yet. Recorded on the delivery for logs; nothing is posted, nobody is told it waits. */+ private async hold(tx: Transaction, delivery: SuperTabDelivery, reason: HoldReason) {+ if (delivery.status !== 'claimed') return { held: false }+ if (agentOnly((await tx.superTabMessage.findUnique({ where: { id: delivery.messageId }, select: { source: true } }))?.source)) return { held: false }+ if (delivery.holdReason !== reason || !delivery.holdSince) {+ await tx.superTabDelivery.update({ where: { id: delivery.id }, data: { holdReason: reason, holdSince: delivery.holdSince ?? new Date(this.now()) } })+ }+ return { held: true }}/** Only the recorded execution host may attest that the actual session/attempt has stopped. */diff --git a/desktop/integration_test/super_tab_native_test.dart b/desktop/integration_test/super_tab_native_test.dartindex 2ace9c5d7..b8a058d04 100644--- a/desktop/integration_test/super_tab_native_test.dart+++ b/desktop/integration_test/super_tab_native_test.dart@@ -416,13 +416,9 @@ void main() {});await c.refresh();await tester.pump(const Duration(milliseconds: 100));- expect(find.textContaining('Atlas is busy · waiting'), findsOneWidget);- expect(- find.text(- "Atlas is finishing another task. Your message goes in by itself when it's done.",- ),- findsOneWidget,- );+ expect(find.text('Sent'), findsOneWidget);+ expect(find.textContaining('Atlas is busy'), findsNothing);+ expect(find.textContaining('by itself'), findsNothing);await shot('receipt-held');receipt['status'] = 'uncertain';await c.refresh();diff --git a/desktop/lib/super_tabs/message_receipt.dart b/desktop/lib/super_tabs/message_receipt.dartindex c5aa9540d..efbcc8d97 100644--- a/desktop/lib/super_tabs/message_receipt.dart+++ b/desktop/lib/super_tabs/message_receipt.dart@@ -145,7 +145,6 @@ class _SuperTabMessageReceiptState extends State<SuperTabMessageReceipt>delivery?.pending == true &&message.createdAt != null &&now.difference(message.createdAt!) < const Duration(seconds: 3);- final held = delivery?.pending == true && delivery?.holdReason != null;var color = DesktopChrome.muted;var icon = AppIcons.check;String title = 'Sent';@@ -214,33 +213,11 @@ class _SuperTabMessageReceiptState extends State<SuperTabMessageReceipt>note = readingAt == null? "$host is offline. Your message goes in when it's back online.": "$host was last seen ${superTabAgo(now.difference(readingAt))}. Your message goes in when it's back online.";- } else if (held) {- color = grid.AppPalette.warn;- detail = switch (delivery!.holdReason) {- 'team_waiting_idle' => '$name is busy',- 'team_waiting_user' => "someone is typing in $name's terminal",- 'team_waiting_draft' => "$name's terminal has unsent text",- _ => "$name can't take messages right now",- };- if (delivery.holdSince != null) {- detail +=- ' · waiting ${_clockText(now.difference(delivery.holdSince!))}';- }- note = switch (delivery.holdReason) {- 'team_waiting_idle' =>- "$name is finishing another task. Your message goes in by itself when it's done.",- 'team_waiting_user' =>- "Someone is typing in $name's terminal. Your message goes in by itself when that clears.",- 'team_waiting_draft' =>- "$name's terminal has unsent text. Your message goes in by itself when that clears.",- _ =>- "$name can't take messages right now. Your message goes in by itself when that clears.",- };} else if (fresh) {title = 'Sending…';sending = true;}- _clock(fresh || working || held || (delivery?.pending == true && offline));+ _clock(fresh || working || (delivery?.pending == true && offline));final style = DesktopChrome.metadata(color: color).copyWith(fontSize: 12,fontFeatures: const [FontFeature.tabularFigures()],diff --git a/desktop/lib/super_tabs/view.dart b/desktop/lib/super_tabs/view.dartindex a5ea121e6..48420328a 100644--- a/desktop/lib/super_tabs/view.dart+++ b/desktop/lib/super_tabs/view.dart@@ -1465,15 +1465,9 @@ class _SuperTabViewState extends State<SuperTabView>(m) => !m.fromAgent && !m.fromTerminal && m.authorId == c.accountId,).firstOrNull;- // Older Desktops still show this plain notice. The inline receipt owns the- // same explanation here, including after delivery settles, so it never resurfaces stale.+ // A message waiting for an agent is never announced; notices older backends stored stay hidden.final messages = allMessages- .where(- (m) =>- !(m.source['kind'] == 'delivery-hold' &&- m.source['messageId'] == latestOwn?.id &&- m.source['deliveryId'] == latestOwn?.receiptDelivery?.id),- )+ .where((m) => m.source['kind'] != 'delivery-hold').toList();final entries = superTabTranscriptEntries(messages);final byId = {for (final message in messages) message.id: message};diff --git a/desktop/test/super_tab_receipt_test.dart b/desktop/test/super_tab_receipt_test.dartindex f893b0116..27b0fa441 100644--- a/desktop/test/super_tab_receipt_test.dart+++ b/desktop/test/super_tab_receipt_test.dart@@ -182,7 +182,7 @@ void main() {('team_waiting_control', "Lead can't take messages right now"),('team_waiting_unavailable', "Lead can't take messages right now"),]) {- testWidgets('receipt: $reason explains the held message inline', (+ testWidgets('receipt: $reason held message reads only Sent', (tester,) async {final f = ReceiptFixture(tester);@@ -195,15 +195,9 @@ void main() {},);expect(find.text('Sent'), findsOneWidget);- expect(find.textContaining('$label · waiting 0:3'), findsOneWidget);- if (reason == 'team_waiting_idle') {- expect(- find.text(- "Lead is finishing another task. Your message goes in by itself when it's done.",- ),- findsOneWidget,- );- }+ expect(find.textContaining(label), findsNothing);+ expect(find.textContaining('waiting'), findsNothing);+ expect(find.textContaining('by itself'), findsNothing);await f.close();});}@@ -232,11 +226,11 @@ void main() {);for (final (direct, shown) in [- (true, "Lead is busy"),+ (true, 'Sent'),(false, "Lead's computer is offline"),]) {testWidgets(- 'receipt: a held message to a computer with no Swarm reading ${direct ? 'connected directly shows why' : 'read through the Swarm says offline'}',+ 'receipt: a held message to a computer with no Swarm reading ${direct ? 'connected directly reads Sent' : 'read through the Swarm says offline'}',(tester) async {final app = createApp(connected: true);addTearDown(app.dispose);@@ -251,6 +245,7 @@ void main() {},);expect(find.textContaining(shown), findsOneWidget);+ expect(find.textContaining('busy'), findsNothing);expect(find.textContaining('offline'),direct ? findsNothing : findsWidgets,@@ -363,7 +358,7 @@ void main() {);testWidgets(- 'receipt: matching compatibility notice is hidden while other agent messages stay',+ 'receipt: stored hold notices stay hidden while other agent messages stay',(tester) async {final f = ReceiptFixture(tester);await f.show(@@ -389,6 +384,8 @@ void main() {'id': 'lead-agent','name': 'Lead',};+ // A newer own message: the old notice is no longer about the latest one.+ f.server.append('My next question.');},);expect(@@ -396,7 +393,7 @@ void main() {findsNothing,);expect(find.text('A real update.'), findsOneWidget);- expect(find.textContaining('Lead is busy'), findsOneWidget);+ expect(find.textContaining('Lead is busy'), findsNothing);await f.close();},);