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
The dial holds every tile on the tab, shells included
0xdiego25ff58ef5a9c1c
diff --git a/cli/src/cable/cableHost.spec.ts b/cli/src/cable/cableHost.spec.tsindex c34476071..1133a8785 100644--- a/cli/src/cable/cableHost.spec.ts+++ b/cli/src/cable/cableHost.spec.ts@@ -48,7 +48,7 @@ const REMOTE: FleetMachine = { machineId: 'other', name: 'office-imac', state: '/** The window, open on one tab that holds these panes in this order. */function onTab(host: DaemonCableHost, agentIds: string[], id = 't1'): void {- host.setSwarms({ active: id, swarms: [{ id, name: 'Tab', agentIds }] })+ host.setSwarms({ active: id, swarms: [{ id, name: 'Tab', agentIds, panes: agentIds.length }] })host.setDesk(agentIds)}@@ -246,12 +246,22 @@ describe('DaemonCableHost.listAgentsFlat across machines, and the tab the dial gexpect(agents.map((a) => a.machineId)).toEqual(['mine', 'other', 'third'])})- it('never lists a terminal — a shell with nobody in it is not something the dial can drive', async () => {+ it('lists a terminal beside the agents, and says it is one', async () => {+ // It used to be left out, on the reading that the dial drives agents and a shell has no turn to+ // drive. But the window draws a shell as a tile like any other, so leaving it out gave the dial+ // a desk with a hole in it — a pane the carousel could not walk to and could not explain. It is+ // listed now, and `engine` is how the tile knows to wear a prompt instead of a product mark and+ // to offer no Voice; the same row is reported as `claude` the moment one is typed into it.AGENTS.length = 0AGENTS.push({ agentId: 'term-1', registeredAt: 1, active: true, terminalAvailable: true, engine: 'terminal' })AGENTS.push({ agentId: 'local-1', registeredAt: 2, active: true, terminalAvailable: true, engine: 'claude' })const host = new DaemonCableHost(wiring(), crossFleet({}, []))- expect((await settled(host)).map((a) => a.id)).toEqual(['local-1'])+ const agents = await settled(host)+ expect(agents.map((a) => a.id)).toEqual(['term-1', 'local-1'])+ expect(agents.map((a) => a.engine)).toEqual(['terminal', 'claude'])+ // …and the overview's number is not the list's length. The carousel carries the shell because it+ // is a tile; "N agents · all idle" counts work in flight, which a shell has none of.+ expect(host.agentTotal()).toBe(1)})it('keeps a machine\'s agents when the backend cannot be asked', async () => {@@ -602,3 +612,36 @@ describe('DaemonCableHost.listAgentsFlat across machines, and the tab the dial gexpect(fleet.listAgents).not.toHaveBeenCalled()})})++describe('DaemonCableHost.listSwarms', () => {+ // The bug this pair exists for: a tab holding only a shell drives no agent, so it named none, and+ // the dial's switcher — which had nothing else to go on — dropped it. You could see that tab while+ // standing on it and never reach it again once you left (openharness#160).+ it('reports a tab that holds only a terminal as having a tile, not as empty', () => {+ const host = new DaemonCableHost(wiring(), fleetOf([]))+ host.setSwarms({+ active: 'work',+ swarms: [+ { id: 'work', name: 'harness-1', agentIds: ['a1'], panes: 1 },+ { id: 'shell', name: 'harness-2', agentIds: [], panes: 1 },+ { id: 'fresh', name: 'New Harness', agentIds: [], panes: 0 },+ ],+ })+ expect(host.listSwarms()).toEqual({+ selected: 'work',+ swarms: [+ { id: 'work', name: 'harness-1', agents: 1, panes: 1 },+ // No agents and still a place to go: this is the row that used to disappear.+ { id: 'shell', name: 'harness-2', agents: 0, panes: 1 },+ // Nothing on it at all — still nothing the dial can offer, which was always the intent.+ { id: 'fresh', name: 'New Harness', agents: 0, panes: 0 },+ ],+ })+ })++ it('says nothing at all while no window is connected', () => {+ const host = new DaemonCableHost(wiring(), fleetOf([]))+ host.setSwarms(null)+ expect(host.listSwarms()).toEqual({ selected: '', swarms: [] })+ })+})diff --git a/cli/src/cable/cableHost.ts b/cli/src/cable/cableHost.tsindex 5d8cf7f2f..110e0ab1d 100644--- a/cli/src/cable/cableHost.ts+++ b/cli/src/cable/cableHost.ts@@ -12,7 +12,6 @@ import { join } from 'node:path'import { AuthSessionManager, readAuthSession } from '../lib/authSession.js'import { registry, projectDisplayName, type RegisteredSession } from '../lib/registry.js'-import { isTerminalEngine } from '../engines/types.js'import { fetchRelease, loadImage, shouldOffer } from './fwPush.js'import { routeVoiceTask, type RouterAgent, type RouterContinuity } from '../lib/voiceRouter.js'import { env } from '../config/env.js'@@ -285,10 +284,17 @@ export class DaemonCableHost implements CableHost {// `advertised()`, not `list()` — the SAME set `agents_list` answers the web and the desktop app with. They// read one registry and must not disagree about what is on it: a dead agent holding a tile on the dial// and nowhere else is a tile that cannot be driven and cannot be explained.- // Minus the terminals: the dial drives agents, and a shell with nobody in it has no turn to- // watch or model to switch (`deviceAgentRow` keeps `agents_list` to the same set for the- // device). A terminal that has adopted an engine is that engine here, as everywhere.- const sessions = registry.advertised().filter((s) => !isTerminalEngine(s.engine))+ // Terminals INCLUDED. A shell has no turn to watch and no model to switch, and the dial does not+ // pretend otherwise — it draws the tile and offers no Voice on it. What it does offer is the+ // thing that was missing: the tile can be reached. The window draws a shell as a tile like any+ // other, so a dial that skipped it disagreed with the app about what was on the desk, and a pane+ // the carousel cannot walk to is a pane the dial cannot explain either. A terminal that has+ // adopted an engine is that engine here, as everywhere.+ //+ // ⚠️ NOT the same question as `deviceAgentRow` in backendSocket.ts, which keeps shells out of the+ // `agents_list` RPC a CLOUD device asks over the backend. This is the cable's own list, pulled by+ // `listAgents()` on the session's tick; the two surfaces answer separately and always did.+ const sessions = registry.advertised()// Oldest → newest, and TOTAL: the id breaks a tie so the order cannot fall through to array position,// which is Map insertion order and differs between daemon runs. Both producers sort identically, so// the dial and the app cannot drift apart while reading the same registry.@@ -367,7 +373,7 @@ export class DaemonCableHost implements CableHost {if (!app) return { selected: '', swarms: [] }return {selected: app.active,- swarms: app.swarms.map((s) => ({ id: s.id, name: s.name, agents: s.agentIds.length })),+ swarms: app.swarms.map((s) => ({ id: s.id, name: s.name, agents: s.agentIds.length, panes: s.panes })),}}@@ -415,7 +421,8 @@ export class DaemonCableHost implements CableHost {}/** How many agents the account has across every machine — the overview's number, sent beside the- * tab's list rather than as 70 rows the dial would hold for a digit. Read from the last flat list. */+ * tab's list rather than as 70 rows the dial would hold for a digit. Read from the last flat list,+ * minus the terminals in it: the list is every TILE, this is every AGENT. */agentTotal(): number {return this.flatCount}@@ -508,7 +515,11 @@ export class DaemonCableHost implements CableHost {}for (const id of [...this.deskHeld]) if (!missing.includes(id)) this.deskHeld.delete(id)- this.flatCount = out.length+ // The overview's number is AGENTS, and a shell is not one. The carousel carries shell tiles now —+ // they are panes the window has and the dial can reach — but "12 agents · all idle" is read as how+ // much work is in flight, and counting empty terminals in it would answer a question nobody asked.+ // Two different numbers about the same desk, each honest about what it counts.+ this.flatCount = out.filter((a) => a.engine !== 'terminal').lengthreturn out}diff --git a/cli/src/cable/cableSession.spec.ts b/cli/src/cable/cableSession.spec.tsindex 525f3954d..f4259dfc6 100644--- a/cli/src/cable/cableSession.spec.ts+++ b/cli/src/cable/cableSession.spec.ts@@ -195,13 +195,13 @@ describe('cable session', () => {})it('names the swarms once and again only when they change, and relays a pick', async () => {- let swarms = { selected: 's1', swarms: [{ id: 's1', name: 'Workshop', agents: 2 }, { id: 's2', name: 'Launch', agents: 0 }] }+ let swarms = { selected: 's1', swarms: [{ id: 's1', name: 'Workshop', agents: 2, panes: 2 }, { id: 's2', name: 'Launch', agents: 0, panes: 0 }] }const host = makeHost({ listSwarms: () => swarms })const { session, port } = await connect(host)port.say({ t: 'hello', product: 'harness', mac: 'aa:bb' })await vi.waitFor(() => expect(port.types()).toContain('agents.end'))expect(port.sent.filter((m) => m.t === 'swarms')).toEqual([- { t: 'swarms', selected: 's1', items: [{ id: 's1', name: 'Workshop', agents: 2 }, { id: 's2', name: 'Launch', agents: 0 }] },+ { t: 'swarms', selected: 's1', items: [{ id: 's1', name: 'Workshop', agents: 2, panes: 2 }, { id: 's2', name: 'Launch', agents: 0, panes: 0 }] },])// Ticks with nothing new say nothing new — the same rule as the wheel.@@ -219,6 +219,24 @@ describe('cable session', () => {await session.stop()})+ it('pushes again when a tab gains a tile but no agent', async () => {+ // The change this field exists for: a terminal opened on a tab that holds no agent moves the+ // TILE count and nothing else. A diff watching only `agents` swallowed that push and left the+ // dial showing a row it still believed was empty — the row it would then refuse to list.+ let swarms = { selected: 's1', swarms: [{ id: 's1', name: 'Shell', agents: 0, panes: 0 }] }+ const host = makeHost({ listSwarms: () => swarms })+ const { session, port } = await connect(host)+ port.say({ t: 'hello', product: 'harness', mac: 'aa:bb' })+ await vi.waitFor(() => expect(port.sent.filter((m) => m.t === 'swarms')).toHaveLength(1))++ swarms = { selected: 's1', swarms: [{ id: 's1', name: 'Shell', agents: 0, panes: 1 }] }+ await vi.waitFor(() => expect(port.sent.filter((m) => m.t === 'swarms')).toHaveLength(2))+ expect(port.sent.filter((m) => m.t === 'swarms')[1]).toMatchObject({+ items: [{ id: 's1', agents: 0, panes: 1 }],+ })+ await session.stop()+ })+it('delivers a turn through the host, not through the protocol', async () => {const host = makeHost()const { session, port } = await connect(host)diff --git a/cli/src/cable/cableSession.ts b/cli/src/cable/cableSession.tsindex a09db9a2c..2cf629381 100644--- a/cli/src/cable/cableSession.ts+++ b/cli/src/cable/cableSession.ts@@ -165,12 +165,22 @@ export interface CableSwarm {name: string/** How many agents it holds — the dial draws the count, never the members. */agents: number+ /**+ * How many TILES it holds, of any kind — agents, shells, viewers.+ *+ * Separate from `agents` because the two answer different questions, and the dial needs the second+ * one: a tab holding only a terminal drives no agent, so `agents` is 0 for it exactly as it is for+ * an untouched New Harness tab. Filtering the switcher on `agents` therefore hid a tab that had+ * real content in it, with no way back to it from the dial. Nothing here ever becomes a roster+ * entry — a shell is still never named to the dial.+ */+ panes: number}/** The window's swarms as it last described them, or null while no window is connected. */export interface AppSwarms {active: string- swarms: Array<{ id: string; name: string; agentIds: string[] }>+ swarms: Array<{ id: string; name: string; agentIds: string[]; panes: number }>}/** Why the list is as short as it is. The dial renders this, instead of drawing an empty wheel. */@@ -1258,13 +1268,16 @@ export class CableSession {private async syncSwarmsNow(force: boolean): Promise<void> {const { selected, swarms } = this.host.listSwarms()- const key = `${selected}|${swarms.map((s) => `${s.id}:${s.name}:${s.agents}`).join('|')}`+ // `panes` belongs in the key as much as `agents` does. Opening a terminal on a tab that holds no+ // agent moves only the tile count, and a key blind to it would swallow that push and leave the+ // dial showing a tab it still believes is empty — the very row this field exists to keep.+ const key = `${selected}|${swarms.map((s) => `${s.id}:${s.name}:${s.agents}:${s.panes}`).join('|')}`if (!force && key === this.lastSwarmsKey) returnthis.lastSwarmsKey = keythis.log(`cable: swarms → ${swarms.length}${selected ? ` (on ${selected})` : ''}${force ? ' [push]' : ''}`)// ONE frame, not a begin/row/end stream: two dozen rows of an id, a name and a count fit in a// kilobyte, and the dial replaces the whole list on arrival either way.- await this.send({ t: 'swarms', selected, items: swarms.map((s) => ({ id: s.id, name: s.name, agents: s.agents })) })+ await this.send({ t: 'swarms', selected, items: swarms.map((s) => ({ id: s.id, name: s.name, agents: s.agents, panes: s.panes })) })}// ── machines ──────────────────────────────────────────────────────────────────────────────────────diff --git a/cli/src/localWsServer.spec.ts b/cli/src/localWsServer.spec.tsindex 27ac51932..b6fd89d35 100644--- a/cli/src/localWsServer.spec.ts+++ b/cli/src/localWsServer.spec.ts@@ -157,7 +157,7 @@ describe('local CLI WebSocket', () => {ws.send(JSON.stringify({ type: 'app_swarms', payload: {active: 's2',swarms: [- { id: 's1', name: 'Workshop', agentIds: ['a1', '', 7, 'a2'] },+ { id: 's1', name: 'Workshop', agentIds: ['a1', '', 7, 'a2'], panes: 3 },{ id: '', name: 'no id' },'junk',{ id: 's2', name: 'Launch' },@@ -165,8 +165,12 @@ describe('local CLI WebSocket', () => {} }))await new Promise((resolve) => setTimeout(resolve, 20))expect(seen).toEqual([{ active: 's2', swarms: [- { id: 's1', name: 'Workshop', agentIds: ['a1', 'a2'] },- { id: 's2', name: 'Launch', agentIds: [] },+ // Three tiles, two of them agents: the third is a shell or a viewer, and saying so is the+ // point — see the terminal-only tab below.+ { id: 's1', name: 'Workshop', agentIds: ['a1', 'a2'], panes: 3 },+ // No count at all, from a window too old to send one: as many tiles as agents, which is what+ // this row meant before the field existed.+ { id: 's2', name: 'Launch', agentIds: [], panes: 0 },] }])// Like app_panes: a fact about this desk, so the machine never sees it.expect(backend.frames.map((frame) => frame.type)).toEqual([])diff --git a/cli/src/localWsServer.ts b/cli/src/localWsServer.tsindex 4b3159872..1437c8e1b 100644--- a/cli/src/localWsServer.ts+++ b/cli/src/localWsServer.ts@@ -177,7 +177,13 @@ function appSwarmsFrom(payload: unknown): AppSwarms | null {const agentIds = Array.isArray(r.agentIds)? r.agentIds.filter((id): id is string => typeof id === 'string' && id !== ''): []- swarms.push({ id: r.id, name: r.name.slice(0, 80), agentIds })+ // A window that predates this field says nothing about its tiles, and the honest reading of that+ // silence is the old one: as many tiles as agents. That keeps an older app behaving exactly as it+ // does today rather than having its tabs vanish from the dial for the opposite reason.+ const panes = typeof r.panes === 'number' && Number.isFinite(r.panes) && r.panes >= 0+ ? Math.min(Math.floor(r.panes), 999)+ : agentIds.length+ swarms.push({ id: r.id, name: r.name.slice(0, 80), agentIds, panes })if (swarms.length === 24) break // the window's own ceiling}if (swarms.length === 0) return nulldiff --git a/desktop/lib/state/app_state.dart b/desktop/lib/state/app_state.dartindex ce61e4991..bf915f192 100644--- a/desktop/lib/state/app_state.dart+++ b/desktop/lib/state/app_state.dart@@ -1900,18 +1900,20 @@ class AppNotifier extends ChangeNotifier {void _announceOpenPanesToDial() {final pool = _pool;if (pool == null) return;- // A terminal tile is not the dial's: the dial drives agents, and the daemon- // never lists a shell to it. Naming one here would make the daemon "hold"- // an id it has nothing for. The same tile IS named once an engine has been- // typed into it — `_upsertAgent` re-announces on the engine change.- bool onDial(TerminalPane pane) {- final agentId = pane.agentId;- if (agentId == null) return false;- final agent = machineStates[pane.machineId]?.agents- .where((agent) => agent.id == agentId)- .firstOrNull;- return !isTerminalEngine(agent?.engine);- }+ // Every tile that HAS an agent id, shells included. A terminal used to be+ // left out here — the dial drives agents, and a shell has no turn to watch+ // — but leaving it out is what made the dial disagree with its own promise+ // ("the dial follows the app. It shows what the app shows"): the window+ // drew a tile the dial had no row for, so it could neither be reached nor+ // explained. It is a real registry row on the daemon, with an id, and the+ // dial now draws it as what it is and stops short of driving it. The same+ // row becomes an ordinary agent the moment an engine is typed into it+ // (`registry.adoptEngine`), which `_upsertAgent` re-announces.+ //+ // A viewer tile still names nothing: it belongs to its agent through+ // `ownerAgentId` and carries no `agentId` of its own, so it is counted in+ // `panes` below and named nowhere.+ bool onDial(TerminalPane pane) => pane.agentId != null;final agentIds = <String>[for (final pane in panes)@@ -1929,6 +1931,16 @@ class AppNotifier extends ChangeNotifier {for (final pane in swarm.panes)if (onDial(pane)) pane.agentId!,],+ // NOT the length of `agentIds`, and the difference is the whole point+ // of sending it. A tab holding nothing but a shell — or nothing but a+ // viewer — names no agent the dial can drive, so its `agentIds` is+ // empty exactly as an untouched New Harness tab's is. The dial read+ // that emptiness as "nothing here" and left such a tab out of its+ // switcher, so a tab you could see while standing on it became+ // unreachable the moment you left it. This answers what the switcher+ // is actually asking — is there anything on this tab — and this side+ // is the only one that knows.+ 'panes': swarm.panes.length,},];for (final machineId in machineStates.keys) {diff --git a/devices/harness-device/firmware/main/cable_client.c b/devices/harness-device/firmware/main/cable_client.cindex 8fadcafaa..decac3059 100644--- a/devices/harness-device/firmware/main/cable_client.c+++ b/devices/harness-device/firmware/main/cable_client.c@@ -415,6 +415,10 @@ static void handle_swarms(const cJSON *p)snprintf(rows[n].name, sizeof(rows[n].name), "%s", cJSON_IsString(name) ? name->valuestring : "");const cJSON *agents = cJSON_GetObjectItemCaseSensitive(it, "agents");rows[n].agents = cJSON_IsNumber(agents) ? (int)agents->valuedouble : 0;+ // Absent from an older daemon: fall back to the agent count, which is what this row meant+ // before tiles were counted separately.+ const cJSON *panes = cJSON_GetObjectItemCaseSensitive(it, "panes");+ rows[n].panes = cJSON_IsNumber(panes) ? (int)panes->valuedouble : rows[n].agents;n++;}ui_swarms_replace(rows, n, str_of(p, "selected"));diff --git a/devices/harness-device/firmware/main/cable_client.h b/devices/harness-device/firmware/main/cable_client.hindex 0d9c117ab..150d0c6a1 100644--- a/devices/harness-device/firmware/main/cable_client.h+++ b/devices/harness-device/firmware/main/cable_client.h@@ -149,6 +149,11 @@ typedef struct {char id[SWARM_ID_MAX];char name[NAME_MAX];int agents; // how many agents it holds — drawn as a count, never as members+ // How many TILES it holds, of any kind: agents, shells, viewers. A tab with a terminal and no+ // agent has agents=0 and panes=1, and the difference is what keeps it in the switcher — see+ // swarm_picker_rebuild(). A daemon too old to send it reports panes==agents, which is the old+ // behaviour exactly.+ int panes;} cable_swarm_t;// The user tapped a swarm. Not answered — see above.diff --git a/devices/harness-device/firmware/main/ui/ui_screens.c b/devices/harness-device/firmware/main/ui/ui_screens.cindex 7c2dca95e..def879c88 100644--- a/devices/harness-device/firmware/main/ui/ui_screens.c+++ b/devices/harness-device/firmware/main/ui/ui_screens.c@@ -559,6 +559,22 @@ static proj_t *s_proj; // MAX_PROJECTS array, allocated in PSRAM at ui_init (ostatic int s_proj_count;static int s_active_idx; // currently-visible agent index (updated on swipe; defaults to 0)+// A shell, rather than an engine. The daemon sends the same `terminal` word the registry keeps, and+// three things on a tile turn on it: the mark beside the name, the Voice button, and what the body+// says while nothing is happening.+static bool is_terminal_tile(const proj_t *p)+{+ return p && strcmp(p->engine, "terminal") == 0;+}++// What the body says with no events behind it. "No activity yet" promises a stream that is coming;+// for a shell none ever is, and saying so of a pane the person is typing in reads as a fault.+static const char *tile_resting_text(const proj_t *p)+{+ return is_terminal_tile(p) ? "Terminal" : "No activity yet";+}++// --- Carousel scroll helpers ---// `tileview` is now a plain horizontally-scrollable lv_obj (NOT lv_tileview): paging is done with// LV_SCROLL_SNAP_CENTER + LV_OBJ_FLAG_SCROLL_ONE (exactly what lv_tileview uses internally, so the feel@@ -2981,6 +2997,10 @@ static void agent_actions_apply(void)bool on = lv_screen_active() == scr_projects && !s_overview_active && !s_settings_active&& !s_machines_active && !s_notif_open && !display_is_asleep()&& s_active_idx >= 0 && s_active_idx < s_proj_count;+ // …and never on a SHELL. Voice sends words to whatever is in the pane, and in a terminal that is+ // a command line: a misheard word would not be a bad prompt, it would be a command that already+ // ran. A shell tile is reachable and scrollable, and that is deliberately all it is.+ if (on && is_terminal_tile(&s_proj[s_active_idx])) on = false;set_hidden(s_agent_acts, !on);}@@ -4656,6 +4676,16 @@ static void apply_engine_label(proj_t *p)bool recolor = false;const lv_image_dsc_t *src = engine_mark(p->engine, &recolor);if (p->engine_text_lbl) lv_obj_add_flag(p->engine_text_lbl, LV_OBJ_FLAG_HIDDEN); // product-mark path only+ // A shell has no product mark to wear, and inventing one would put a brand on a thing that has+ // none. It gets the prompt every terminal in the world draws instead, in the muted grey the app+ // gives the Terminal engine, through the text path that was already here for exactly this.+ if (is_terminal_tile(p) && p->engine_text_lbl) {+ lv_obj_add_flag(p->engine_lbl, LV_OBJ_FLAG_HIDDEN);+ lv_label_set_text(p->engine_text_lbl, ">_");+ lv_obj_clear_flag(p->engine_text_lbl, LV_OBJ_FLAG_HIDDEN);+ shell_name_fit(p);+ return;+ }if (src) {lv_image_set_src(p->engine_lbl, src);// Box = exactly one pill, artwork CENTRED inside it. Sizing the box to the zoomed bitmap instead@@ -4703,7 +4733,13 @@ static void build_shell(proj_t *p)lv_obj_set_style_pad_column(p->header, SHELL_MARK_GAP, 0);p->engine_lbl = lv_image_create(p->header); // engine product mark, sized by apply_engine_label- p->engine_text_lbl = NULL; // the text fallback went with the chip row+ // The text mark, for the one "engine" that is not a product: a terminal (see apply_engine_label).+ // Built hidden and shown only there, so a tile that wears an image never also carries a glyph.+ p->engine_text_lbl = lv_label_create(p->header);+ lv_label_set_text(p->engine_text_lbl, ">_");+ lv_obj_set_style_text_color(p->engine_text_lbl, COL_MUTED, 0);+ lv_obj_set_style_text_font(p->engine_text_lbl, &geist_med_28, 0);+ lv_obj_add_flag(p->engine_text_lbl, LV_OBJ_FLAG_HIDDEN);p->name_lbl = lv_label_create(p->header);lv_obj_set_style_text_color(p->name_lbl, COL_FG, 0);lv_obj_set_style_text_font(p->name_lbl, &geist_med_38, 0); // agent name — Medium for emphasis@@ -4794,7 +4830,7 @@ static void materialize_content(int i)lv_obj_clear_flag(p->list, LV_OBJ_FLAG_SCROLLABLE);if (p->m_preview) render_recap_block(p);- else p->empty = make_label(p->list, "No activity yet", lv_color_hex(0x585863), &geist_reg_38);+ else p->empty = make_label(p->list, tile_resting_text(p), lv_color_hex(0x585863), &geist_reg_38);if (p->busy_model) { // a turn is processing → show the Working… row, hide cardlv_obj_add_flag(p->list, LV_OBJ_FLAG_HIDDEN);@@ -5967,7 +6003,13 @@ static void swarm_picker_rebuild(void)// An untouched welcome tab — the window's default name and nothing in it — is not a place the// dial can go, so it is not a row (owner, 2026-09-14: "không có New swarm"). The one on screen// is still listed, whatever it is called.- if (!here && w->agents == 0) continue; // an empty tab has no pane the dial could walk to (the app calls it "New Harness" now)+ //+ // The test is TILES, not agents. Those two used to be the same number here, and the day a tab+ // could hold something the dial does not drive — a terminal, a viewer — they stopped being:+ // such a tab reported no agents, read as empty, and dropped out of this list the moment you+ // switched away from it, with no way back (openharness#160). A tab with a tile in it is a+ // place the dial can send the window, whatever is on that tile.+ if (!here && w->panes == 0) continue;shown++;lv_obj_t *row = lv_button_create(s_swarm_list);lv_obj_set_width(row, lv_pct(100));@@ -5999,7 +6041,10 @@ static void swarm_picker_rebuild(void)lv_obj_set_style_text_color(sub, COL_MUTED, 0);lv_obj_set_width(sub, lv_pct(100));lv_obj_set_style_text_align(sub, LV_TEXT_ALIGN_CENTER, 0);- lv_label_set_text_fmt(sub, "%d agent%s", w->agents, w->agents == 1 ? "" : "s");+ // Say what is actually there. A tab whose tiles are all shells or viewers would otherwise read+ // "0 agents", which is true and useless — it is the line that made such a tab look empty.+ if (w->agents > 0) lv_label_set_text_fmt(sub, "%d agent%s", w->agents, w->agents == 1 ? "" : "s");+ else lv_label_set_text_fmt(sub, "%d pane%s", w->panes, w->panes == 1 ? "" : "s");}if (shown == 0) make_label(s_swarm_list, "No tabs — open the app", COL_MUTED, &geist_med_28);}@@ -6819,7 +6864,7 @@ void ui_project_clear_event(const char *project_id)p->card = NULL; // it lived in the list just emptied — ui_tap reads thisif (!p->busy_model) {lv_obj_clear_flag(p->list, LV_OBJ_FLAG_HIDDEN);- p->empty = make_label(p->list, "No activity yet", lv_color_hex(0x585863), &geist_reg_38);+ p->empty = make_label(p->list, tile_resting_text(p), lv_color_hex(0x585863), &geist_reg_38);}tile_layout_apply(p);}