From 57197bb906ee2d720b76371d3ae5233412d36108 Mon Sep 17 00:00:00 2001 From: Michael Neale Date: Wed, 5 Aug 2026 14:27:38 +1000 Subject: [PATCH] fix(mesh): restore the status dot, and settle on one name Two regressions from the previous commit. The dot is the row's reason to exist -- hollow when nothing is known, slate when there is capacity to join, green sharing, blue consuming -- and the last change swapped it for a Share2 glyph in the cold state. That threw the signal away in the one state that still had something to say, and made the row read as a network widget rather than a status line. The dot is now unconditional in every state, and Share2 sits beside the invitation it labels. The same change also invented two names, "MeshLLM" cold and "Buzz MeshLLM" otherwise, then failed to apply the second to the popover -- so the card kept saying "Buzz MeshLLM" after the row had dropped it. There is now one constant, "MeshLLM" (the "Buzz" qualifier adds nothing inside Buzz), and a test asserts the label is identical across every state so it cannot drift again. Signed-off-by: Michael Neale --- .../mesh-compute/meshRowModel.test.mjs | 22 ++++---- .../src/features/mesh-compute/meshRowModel.ts | 13 ++--- .../mesh-compute/ui/MeshComputePopover.tsx | 2 +- .../mesh-compute/ui/SidebarMeshComputeRow.tsx | 50 +++++++++---------- 4 files changed, 41 insertions(+), 46 deletions(-) diff --git a/desktop/src/features/mesh-compute/meshRowModel.test.mjs b/desktop/src/features/mesh-compute/meshRowModel.test.mjs index caa1fec6f8..3ae26897bd 100644 --- a/desktop/src/features/mesh-compute/meshRowModel.test.mjs +++ b/desktop/src/features/mesh-compute/meshRowModel.test.mjs @@ -223,16 +223,18 @@ test("an empty mesh offers the action instead of sitting inert", () => { assert.match(model.tooltip, /share this computer to start the mesh/); }); -test("the cold state drops the Buzz qualifier to make room", () => { - // "Buzz MeshLLM" plus "Share your compute" does not fit 256px. The name is - // the part that can afford to lose a word. - assert.equal(derive({ snapshot: snapshot() }).label, "MeshLLM"); - assert.equal( - derive({ - snapshot: snapshot({ sharingDeviceCount: 1, sharedCapacityGb: 36 }), - }).label, - "Buzz MeshLLM", - ); +test("the label is the same in every state", () => { + // Two name variants was the source of drift: one surface kept saying "Buzz + // MeshLLM" after the other had dropped it. + for (const input of [ + { snapshot: null }, + { snapshot: snapshot() }, + { snapshot: snapshot({ sharingDeviceCount: 1, sharedCapacityGb: 36 }) }, + { toggle: SHARING, view: view() }, + { toggle: CONSUMING }, + ]) { + assert.equal(derive(input).label, "MeshLLM"); + } }); test("only the cold state invites; every other state reports", () => { diff --git a/desktop/src/features/mesh-compute/meshRowModel.ts b/desktop/src/features/mesh-compute/meshRowModel.ts index a587e4d45a..99e9bb5028 100644 --- a/desktop/src/features/mesh-compute/meshRowModel.ts +++ b/desktop/src/features/mesh-compute/meshRowModel.ts @@ -64,10 +64,7 @@ export type MeshRowPulse = "none" | "activity" | "invite"; export type MeshRowModel = { tone: MeshRowTone; - /** - * Row label. Drops the "Buzz" qualifier in the cold state, where a call to - * action shares the same 256px and every character costs. - */ + /** Row label. */ label: string; /** Accessible state sentence, used as the row tooltip. */ tooltip: string; @@ -99,8 +96,9 @@ export type MeshRowModel = { pulse: MeshRowPulse; }; -/** Full name. Used everywhere except the cold state, which needs the room. */ -const LABEL = "Buzz MeshLLM"; +/** One name in every state. Two variants was the source of drift, and "Buzz" + * adds nothing inside Buzz. */ +const LABEL = "MeshLLM"; /** Live pool capacity: this machine plus every peer that reports a figure. */ function liveCapacityGb(view: MeshLiveView | null): number { @@ -234,8 +232,7 @@ export function deriveMeshRowModel({ // annoyance. The invite throb stays reserved for capacity that exists. return { tone: "unknown", - // "Buzz" is dropped here so the invitation fits beside it. - label: "MeshLLM", + label: LABEL, tooltip: "No shared compute yet — share this computer to start the mesh", badge: null, callToAction: "Share your compute", diff --git a/desktop/src/features/mesh-compute/ui/MeshComputePopover.tsx b/desktop/src/features/mesh-compute/ui/MeshComputePopover.tsx index c78a75d1e2..28a471417b 100644 --- a/desktop/src/features/mesh-compute/ui/MeshComputePopover.tsx +++ b/desktop/src/features/mesh-compute/ui/MeshComputePopover.tsx @@ -83,7 +83,7 @@ export function MeshComputePopover({

- {model.capacityLabel ?? "Buzz MeshLLM"} + {model.capacityLabel ?? "MeshLLM"}

{/* - In the cold state a status dot has nothing to say — there is no - capacity to report and nothing running — so the slot carries a - Share2 glyph, which names the action instead. Every other state has - a real status, and the dot is the more honest signal there. + The dot is in every state, without exception. It is the row's + reason to exist: hollow when nothing is known, slate when there is + capacity to join, green while sharing, blue while consuming. An + earlier revision swapped it for a Share2 glyph in the cold state, + which threw away the signal and made the row read as a network + widget rather than a status line. */} - {row.callToAction ? ( - - ) : ( - - {row.pulse === "none" ? null : ( - - )} + + {row.pulse === "none" ? null : ( - - )} + )} + + {row.label} @@ -134,9 +129,10 @@ export function SidebarMeshComputeRow({ */} {row.callToAction ? ( + {row.callToAction} ) : row.badge ? (