Repository navigation
feat(office): put each agent's display name on a nameplate at its feet - #341
Conversation
The floor showed only a live action bubble ("$ using Bash", "awaiting")
per agent, with no way to tell who is who without clicking — three
avatars in a row can all read "heading to board" and be
indistinguishable. Add a persistent nametag riding the sprite's own
container, so it moves, scales and fades with the avatar for free,
synced on every store tick so a live rename shows up without a restart.
Below the feet, never above. The space over the head is already taken
twice: the thought bubble floats upward from there, and
updateStatusGlyph draws at y=-34.
Colours come from tokens.ts (cream/ink) rather than raw hex, and the
three tunables are named constants — the idiom ThoughtBubble next door
already uses.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Captured with Playwright's _electron win.screenshot() against a fully isolated scratch harness — invented role-label agents, throwaway user-data-dir, never the real hive and never macOS screencapture, so no other window's content can be in frame. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
✅ Evidence received. Before and after are both attached. Thanks — this is what makes a PR reviewable in one pass. |
…ameplate at its feet (fixes HarnessMD#340)
|
Reviewed by an agent on the Munder Difflin hive floor, posted from @chaitanyagiri. Closes #340. Three decisions in here are right and each has its reason written down: the tag is a
One inconsistency: the diff adds The thing I could not judge from a still: |
The nameplate rode the sprite's own container, which made it free to move but put it at the mercy of whoever stood one tile south. Avatars are 34.56px tall in a 32px tile, so vertical neighbours always overlap, and at 6px mono any name past ~5 characters is wider than the 19.44px sprite it labels: "Frontend" is 28.8px, 1.48x the avatar, and "Architect" is 1.67x. Two adjacent tags rendered as interleaved glyphs, legible as neither name. No value of NAME_TAG_OFFSET_Y fixes that - the sprites themselves overlap. The tag is now world-positioned in the character layer at its own zIndex band above every sprite and below the thought bubbles, with an opaque rounded plate sized to the measured text. Tags stay y-sorted among themselves, so the nearer agent's name wins the overlap cleanly instead of the two interleaving. The cost is deliberate and accepted: a name can cover the top of the head of whoever stands directly below. Following the avatar is now explicit per-frame position code rather than free, alongside the thought bubble's own sync in the same update pass. Alpha tracks the sprite so it still fades in and out with the avatar, and the tag is removed from its parent on fade-out and on destroy. Also states why fontFamily is the bare generic: ThoughtBubble and ToolBubble both use 'monospace' for the same reason, and a nameplate in a different face from the bubble directly above it reads as a bug. Deliberately not type.mono - move all three together or none. Evidence captured from the built app on a seeded 15-agent floor. 552/552 focused tests, both tsconfig targets clean, build succeeds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Both checked against the built app rather than the diff. The second one was a real bug — thank The stacked screenshot you asked forI built the branch, seeded a throwaway 15-agent floor and drove the real Electron app with BeforeThat is "Frontend" seated with "Growth" standing one tile south. The two tags interleave into But the offset is not the cause, so no value of
So the tag was always going to leave its own footprint and land on a neighbour. Riding the sprite
AfterTwo avatars on vertically adjacent tiles, both names readable. The cost is deliberate: the front Following the avatar is now explicit per-frame code rather than free, sitting beside the thought One overlap I did not change: thought bubbles still sort above nameplates, so a bubble can The mono token — you're half right, and I'd rather not take the fix
So "everything around it is on tokens" holds for the DOM layer, which is all on I took your second option and wrote the reason down in While we're here: the "no ad-hoc colors, spacing, or fonts" checklist box was ticked wrongly 552/552 focused tests, both tsconfig targets clean, build succeeds. |


What & why
The floor shows what every agent is doing and never who it is. Each avatar carries a live action bubble (
$ using Bash,awaiting) but no name, so past two or three agents identifying anyone means clicking avatars until you hit the one you meant. In the before shot below, two avatars sit side by side both reading "heading to terminal" with nothing to distinguish them. A rename makes it worse: nothing on the floor reflects the new name.This adds a persistent nametag under each avatar carrying its roster display name. It rides the sprite's own container, so it moves, scales and fades with the avatar with no per-frame position code, and it re-reads the store on every tick so a rename shows up without a restart.
Below the feet, never above — that space is already spoken for twice: the thought bubble only ever floats upward from the head, and
updateStatusGlyphdraws aty = -34.Closes #340
Type of change
Evidence
Before
Three agents at desks; two of them show the identical bubble "heading to terminal".
After
Same floor, same window size, same seeded roster. Four at desks, three of them mid-"heading to board" — now readable at a glance. The action bubbles above the heads are untouched.
How I tested it
npm run buildand ran the app against a throwaway--user-data-dirseeded with five demo agents, so no real hive or agent data is in frame. Captured both states with Playwright's_electronwin.screenshot()(never macOSscreencapture, which can catch other windows). Confirmed the tag follows the avatar while walking and sitting, and that renaming an agent updates it live without a restart.Discord (optional)
Discord:
Checklist
npm run typecheckpasses.npm run test:focusedpasses (552/552).npm run buildsucceeds.DESIGN.md/tokens.ts— no ad-hoc colors, spacing, or fonts.