Skip to content

fix(bots): drop the computer badge from bot rows - #475

Merged
nixuuu merged 1 commit into
devfrom
fix/bot-row-computer-pill
Nov 10, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/bot-row-computer-pill

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 10, 2026

Copy link
Copy Markdown
Member

Linked bots had a computer pill above their name, making their sidebar rows taller than local bots. Remove it from the shared conversation row, following #453: local and linked rows are 52 px tall, unavailable rows stay dimmed, and Read-only. {reason} remains available to screen readers. Keep the timestamp and 28 px unread slot unchanged. Anchor the hidden text within the row so long bot names cannot introduce horizontal overflow.

Related: #453

Surface audit

Surface Decision and reason
Web/desktop sidebar: active, archived, search, direct/group/watched rows Remove the duplicate pill in ConversationRow; all these lists share it.
Bot home and development gallery The /bots landing page has no computer pill; the gallery's sidebar uses the corrected shared row. Pinned tiles already omit it.
Mention and forward pickers Bot mentions already omit the pill and select bots from the current computer. No separate bot forward picker exists in this tree; no additional duplicate pill was found.
Mobile BotListItem.tsx Already omits the pill and exposes the read-only reason accessibly; leave its existing 48 dp touch target, timestamp and unread layout unchanged.
Conversation header, bot details/settings, and Move to… Keep location information: the header identifies where the conversation lives, details/settings explain where routines and reminders run, and the move dialog must identify the destination computer.

Update the bot UI documentation and remove stale sidebar badge instructions from the linked-computers documentation. No standalone JS/TS files, contracts, fingerprints or lint suppressions changed.

Validation

  • bun install --frozen-lockfile, bun run typecheck, bun run lint, bun run format:check, bun run --cwd apps/web build, and git diff --check pass. The build reports a chunk-size warning and completes successfully.
  • Manually inspected the real BotsNav/ConversationRow components in a browser using temporary in-memory linked-computer fixtures on an isolated local port. Covered local, connected, unreachable and sleeping computers; short, typical and long names; unread 0, 2 and 99+; light/dark; 1280×800 desktop and 390×844 phone widths; 240/320 px sidebars. All rows measure 52 px, unread slots measure 28 px, and offline/sleeping rows have opacity 0.6. Phone document width equals viewport width. Hover hides the timestamp without changing row height or unread geometry.
  • Screenshots saved outside the repository: desktop-light.png, desktop-dark.png, phone-light.png, phone-dark.png. Temporary fixtures and layout changes were removed before checks. This verifies the shared web rendering; it does not exercise live linked gateways or the native mobile/Electron runtime. No UI tests or E2E suites added or run. CI remains the merge gate.

Copy audit (docs/copy.md §8)

  • Before → after: visible computer pill in list rows → no pill; unavailable row → screen-reader text Read-only. {existing reason}. Removes repeated location information while keeping the existing explanation accessible, following fix(navigation): drop the computer badge and tighten sidebar rows #453.
  • Checked §8.1–8: existing English terminology, sentence case and punctuation retained; no new actions, errors, empty states, jargon, glossary terms or humorous text. Existing location explanations remain in the header/details/settings where they help the user act.
  • Checked §8.9–10: short, typical and long bot names at desktop and phone widths, including 240/320 px sidebars. Read-only status includes words and its full reason for screen readers, rather than relying on dimming alone.

@nixuuu
nixuuu merged commit 9649b22 into dev Nov 10, 2026
9 checks passed
@nixuuu
nixuuu deleted the fix/bot-row-computer-pill branch November 10, 2026 09:02
nixuuu added a commit that referenced this pull request Nov 10, 2026
Linked bots can stay missing in web/desktop even when both computers
show connected. `ListBots` served only the in-memory peer-read cache
while a home was online, so a cold/evicted cache or an A gateway restart
returned no remote bots despite a committed bot mirror. The background
read eventually completed, but the web bot store ignored
`linkedReadCompleted("ListBots")`. Since #458 disabled polling when the
gateway advertises pushed bots, that incomplete list could persist until
another bot change or client reload.

Use the committed mirror while the online read cache is loading or
stale, and continue refreshing the authoritative home list in the
background. Bot mirror commits also mark the home's list cache due and
announce a list invalidation. The web bot store now handles that
invalidation. Mobile already handles it through `OverviewInvalidation`
in its shared query bus, so its implementation remains unchanged.
Existing dimmed/read-only rows and gateway rejection of offline writes
remain in place. Updating A restarts its gateway and client
subscription, restores the persisted mirror immediately and refreshes
from B automatically; no manual resync, database repair or re-pairing is
required.

The original cold-cache behavior comes from #348; #458 turned a
transient incomplete web list into persistent missing rows. History does
not implicate #502 (worker command delivery), #507 (connection
recovery), #500 (workspace/config sharing) or #475 (row badge
rendering). A plain warm-cache B restart did not fail in the baseline.
The cold-cache and A-restart cases reproduce a failure path matching the
report; the maintainer's live stack and databases were not inspected or
changed.

Extract the unchanged feed-negotiation helper from `routed-overview.ts`
to keep the file and watch function within the repository's size limits.
Update the Polish bot and linked-computer documentation.

## Verification

- RED, before the production fix: `TMPDIR=/var/tmp bun run check:tmp
tests/integration/linked-bots-resync.test.ts` — 2 failed, 2 passed. The
cold online-cache read and first list after A restarted omitted B's bots
despite their persisted mirror. Temp cleanup passed.
- GREEN: **30/30 sequential complete-file runs passed**, one test
process at a time using the same `check:tmp` command. Each final-file
run passed all five integration scenarios (150 scenario passes in total)
and left nothing in its private temp directory.
- Coverage: two real gateways, separate PostgreSQL databases and an
actual mTLS link; active and archived bots with last-message previews;
same-version B restart and restart with advertised app version changing
from nightly.119 to nightly.121; A's one ongoing overview watch and
fresh API reads; read-only/offline write rejection; A gateway restart
with its database retained; deletion, archive/unarchive and message
changes made while B was away, then convergence after a fresh B runtime.
Version coverage changes the handshake version on the current
implementation; it does not run historical release binaries. The client
is exercised at the public API/feed boundary; no UI test suite was
added.
- Related suites, run sequentially one file at a time through
`check:tmp`: `linked-reads` (4 passed), `linked-list-retention` (1
passed), `linked-agents` (16 passed). All three temp cleanup checks
passed.
- `bun install`, `bun run typecheck`, `bun run lint`, `bun run
format:check`: passed. Implementation and regression coverage received a
self-review. Full unfiltered tests, `gen:check`, a web build and
browser/device checks were not run locally under the workspace
verification limits; CI covers the broader automated checks.

Copy audit (`docs/copy.md` §8): no UI text added or changed.

Fixes: #458
Related: #348
nixuuu added a commit that referenced this pull request Nov 10, 2026
Linked-computer pills consumed breadcrumb space and reduced the project
name to a few characters. Remove the repeated location from thread,
new-side-thread and bot chat headers. Keep the existing location details
and away notices, and associate `Read-only. {reason}` with the
breadcrumb or bot heading using `aria-describedby`.

Related: #453, #475

## Surface audit

| Surface | Decision and reason |
| --- | --- |
| Thread page `threads/[threadId]/+page.svelte` | Remove `MachineBadge`.
The details panel and composer already identify the computer. Preserve
the existing `ComputerAwayBar`, dimmed/disabled controls and full
accessible read-only reason. |
| `NewSideThread.svelte` | Remove the breadcrumb badge.
`SideThreadContext` already explains the inherited computer/directory.
Preserve the full away reason in the breadcrumb's accessible
description. |
| `ConversationHeader.svelte` | Remove the repeated badge for direct,
group and watched conversations. Keep the model subtitle and existing
away notice; associate the full read-only reason with the chat heading.
|
| `BotHome.svelte` | Keep it in bot details/settings: these surfaces
explain where routines, reminders and connections run. This is the only
remaining `MachineBadge` consumer. |
| Mobile `ThreadHeader.tsx` / `BotChatHeader` in `BotChatScreen.tsx` |
Already omit computer pills. Keep the existing read-only notices and
disabled actions. No mobile source, native configuration, dependency or
asset changes; no fingerprint inputs changed, so fingerprint generation
was not needed. |

Update the existing bot, linked-computer and UI documentation to remove
stale instructions to retain header pills.

## Verification

- Passed `bun install`, `bun run gen:check`, `bun run typecheck`, `bun
run lint`, `bun run format:check`, `bun run --cwd apps/web build` and
`git diff --check` on the latest `dev` base. The build completes with
its existing chunk-size warning.
- Manually inspected the actual application in a real browser against
two disposable linked desktop gateways with scripted workers on isolated
ports. Covered a linked thread online and away, a local thread, a linked
bot chat online and away, and new-side-thread creation; light/dark;
1440×900, 900×900 and 390×900; short, typical and long project/title
text.
- No horizontal document overflow. Header height stays 48 px. At phone
width the long title has 152 px after removal versus 64 px before. Going
online→away keeps project/title geometry identical while making the
composer non-editable and exposing `Read-only. {reason}` through
`aria-describedby`.
- Before/after screenshots remain outside git in
`/var/tmp/canopy-header-badge/`:
`before-{linked,away,local,bot}-{desktop,narrow,phone}-{light,dark}.png`,
matching `after-*` images, plus `after-side-*`, `after-short-*`,
`after-typical-*`, `after-away-final-*` and `after-bot-away-*`.
- No UI tests or automated E2E suites added or run. Full `check:tmp`
remains for CI under the task's verification restrictions. Browser
verification covers shared web/desktop rendering; native Electron and
mobile runtimes were not launched.

## Copy audit — docs/copy.md §8

| Before → after | Reason |
| --- | --- |
| Linked-computer pill in thread / side-thread / bot chat headers →
removed | Avoid repeated location information and leave room for the
project/title. |
| Read-only information attached to the pill → `Read-only. {existing
reason}` associated with the breadcrumb or chat heading | Preserve the
complete explanation without taking layout space. Existing visible away
notices remain. |
| Bot details/settings location explanation → unchanged | Location is
the subject of these surfaces and helps explain where actions run. |

Checked §8.1–8: existing English terminology, sentence case and
punctuation retained; no new glossary terms, actions, errors, empty
states or humour. Checked §8.9–10: short, typical and long text at
desktop, narrow and phone widths in light/dark. Availability has a full
text explanation and does not depend on colour or icon shape.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant