Skip to content

fix(navigation): enlarge sidebar thread and bot rows - #478

Merged
nixuuu merged 1 commit into
devfrom
fix/sidebar-row-scale
Nov 10, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/sidebar-row-scale

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 10, 2026

Copy link
Copy Markdown
Member

Sidebar thread and bot rows became too small and cramped. Increase every row title, caption and age by 1 px, with larger line heights, 8 px vertical padding and 2 px between lines. Tabs, search and project choices use the matching sidebar scale. All web dimensions remain relative to Interface size.

Project/activity marks and bot avatars grow with the rows. Thread status slots stay fixed at 96 px; bot time and unread slots reserve their space. Search always reserves its clear button, and the connection label truncates within the narrow footer. Archived skeletons match the new rows. The web list measures rows dynamically; neither it nor the native FlatList has a fixed row-height estimate to update.

Row (100% Interface size, fine pointer) Desktop before → after Phone viewport before → after
Main thread 66 → 78 px 70 → 82 px
Bot / group chat 52 → 60 px 52 → 60 px
Side thread / previous agent 32 → 36 px 36 → 40 px
Archived thread / skeleton 32 → 36 px 36 → 40 px

Coarse-pointer side and archived rows retain their 48 px minimum. At an 18 px root, a desktop main row measures 87.75 px and its status slot 108 px, confirming proportional scaling. Document the new values in docs/ui-scale.md.

Native sidebar rows also used the reduced chrome scale: titles now use 16 dp instead of 15, metadata 14 instead of 13, and bot age/count 13 instead of 12. They retain the device font and Interface size, 48 dp touch minimums, fixed thread-status and unread slots. Native search, tabs and project pickers already use the larger scale and remain unchanged. Changes are JS only; iOS and Android fingerprints are byte-for-byte unchanged.

Validation:

  • bun install, bun run typecheck, bun run lint, bun run format:check, and bun run --cwd apps/web build pass.
  • bun test packages/domain/src/sidebar-threads.test.ts: 6 pass, 0 fail. No UI tests added or run; the full suite remains a CI gate.
  • Real-browser review on an isolated development port with production components and seeded in-memory data: short/typical/long project, thread and bot names; working, needs-input, unread/result states; linked online/offline; light/dark; desktop, narrow and phone viewports; 240/320 px sidebars. Checked truncation, fixed status slots, search clear-button geometry and the project-filter overlay. Native device rendering and live gateway integration were not exercised.
  • Before/after PNGs are retained locally under /var/tmp/canopy-sidebar-scale/: before-{desktop,narrow,phone}-{240,320}-{light,dark}.png and after-{desktop,narrow,phone}-{240,320}-{light,dark}.png. Additional row/state screenshots use after-rows-* and after-phone-working.png. No verification artifacts are committed.

Copy audit: no copy changes.

Related: #453

@nixuuu
nixuuu merged commit 53d5a66 into dev Nov 10, 2026
15 of 17 checks passed
@nixuuu
nixuuu deleted the fix/sidebar-row-scale branch November 10, 2026 09:30
nixuuu added a commit that referenced this pull request Nov 10, 2026
…#482)

Cleanup previews could reuse Git output cached for one second by the
process governor, showing a dirty checkout immediately after external
changes were removed, or a clean checkout immediately after files were
added. `ScanWorktrees` now uses the existing `freshGit` boundary while
preserving process admission, background priority and removal safety
checks. The automation test warms the scan, changes files outside
Canopy, and asserts immediate dirty → clean → dirty → clean results
before cleanup. The worktree documentation describes this freshness
guarantee.

The worktree fixture also waited only for `thread.status === idle`.
`threadReady` can set that before the automation turn or its command has
settled. It now waits for the worktree's actual busy state before
deleting or archiving; preview assertions immediately after
delete/settings changes remain direct assertions, without retries. A
controlled delayed-ack run reproduced the original refusal with clean
Git state, a cancelled turn and a pending `startTurn`. The original CI
log reports only `wouldRemove`, so it cannot distinguish that refusal
from stale scan state.

The desktop/phone CI failure in run 42786085102, attempt 1, rejected a
valid transient `syncing` update after both clients' items and turns
already matched. The test now waits for completion of the specific reply
turn and convergence after recovery, with 100 ms revision probes
exercising resubscriptions. Local baseline runs exposed another fixture
race: after the parent interruption, its queued question turn could
start while `holdTurns` was still enabled and block the final reply
forever. Releasing the hold before ending the parent, then observing the
question turn complete, removes that race. A controlled run reproduced
the stuck interaction turn and queued final message. No production
subscription behavior changes.

Validation:

| Separate sequential file runs | Before | After |
| --- | --- | --- |
| `worktree-automation.test.ts` | 28 passed / 2 failed | 30 passed / 0
failed |
| `thread-multiclient.test.ts` | 29 passed / 1 failed | 30 passed / 0
failed |

Each file ran 30 times before and after, one file at a time. All 30
final phone runs exercised revision resubscription. The local baseline
phone failure was the held-question timeout, distinct from CI's invalid
no-syncing assertion. An intermediate readiness-only revision failed 8/8
worktree runs and exposed the cached Git result; those failures are
excluded from the final counts.

`bun install`, `bun run typecheck`, `bun run lint`, `bun run
format:check`, and `git diff --check` passed. Verification was scoped to
the requested integration files and static checks under the supplied
execution limits; the full suite, generation check and web build were
not run. Scratch logs and fault-injection diagnostics remain outside the
repository and are not committed. No schema, proto, UI copy or UI test
changes; copy audit is not applicable.

Fixes: #124
Related: #473, #478
nixuuu added a commit that referenced this pull request Nov 12, 2026
Share working labels, rounded ages, checkout placement and row marks across clients. Animate the native ring on the UI thread and keep clock updates inside status text.

Local verification is deferred until the maintainer opens the host measurement window.

Related: #526

Related: #478
nixuuu added a commit that referenced this pull request Nov 12, 2026
Share working labels, rounded ages, checkout placement and row marks across clients. Animate the native ring on the UI thread and keep clock updates inside status text.

Local verification is deferred until the maintainer opens the host measurement window.

Related: #526

Related: #478
nixuuu added a commit that referenced this pull request Nov 12, 2026
## Change

Mobile thread rows now share web's working ring, elapsed label, semantic
colours and branch labels. Working titles and metadata retain normal
contrast over the subtle working background on both clients.

- Reuse domain `formatAge` and `workingLabel`: rounded
minutes/hours/days, then weeks from 14 rounded days. `Working` becomes
`Working 1m` once the age is no longer `now`.
- Reuse `threadPlace`: scratch → worktree HEAD (branch or detached
commit) → directory fallback, including Windows paths. A worktree
directory no longer replaces its branch on mobile.
- Share project identity, spinner geometry and working/provider colours.
Preserve existing chromatic pastel project fills; correct the mobile
neutral dark badge and align provider opacity. Keep the documented
native density and reserved status slot.
- Rotate the ring through the installed Reanimated runtime on the UI
thread, only for starting/running rows. The live OS Reduce Motion
setting leaves it static; backgrounding stops rotation. No dependencies
or native configuration changed.

The gateway fix for working worktree rows losing their project is merged
in #565 and included through the rebase onto `f7ad51cc`. It prevents the
linked stream from rewriting shared Hub messages in place. This PR owns
the shared branch-over-directory label.

## Performance

`SidebarThreadStatus` selects its formatted string from one shared
foreground clock. An unchanged string does not trigger a React render.
The list and full rows do not subscribe to ticks; the tree comparator no
longer compares obsolete age strings. Animation has no JS frame loop.

Measured actual React component render counters before (`f7ad51cc`) and
after (`5e0fba8d7`), excluding mounts, with 12 mounted main rows: one
working and 11 idle. Used the real list, tree comparator, row, status
and clock; native hosts and unrelated leaf controls were adapted in an
external diagnostic harness.

| Scenario | Before | After |
| --- | --- | --- |
| 61 seconds working without data updates: full rows | 0 renders, 0/s |
0 renders, 0/s |
| Same interval: elapsed status text | No elapsed label | 1 render,
about 0.016/s |
| 200 immutable updates to the working thread at 20 Hz | 200 working-row
renders in 10.166 s (19.67/s) | 200 in 10.202 s (19.60/s) |
| Untouched rows during those updates | 0 renders | 0 renders |

This establishes JS render isolation, not native scrolling, Hermes
timing or animation frame performance. Native animation and scrolling
still require the device checks below.

## Verification

- Rebased onto `origin/dev` at `f7ad51cc`, including #565, and pushed.
CI is green on `5e0fba8d7`: Static checks, all four test shards, Web and
Linux binaries, aggregate Typecheck/tests/builds, and commitlint.
- Local `bun install`, `bun run gen:check`, root `bun run lint`, `bun
run format:check`, and mobile typecheck passed. Focused domain checks
passed (20 tests, 85 assertions);
`tests/integration/sidebar-lifecycle.test.ts` passed (6 tests, 60
assertions). The full `check:tmp` was intentionally not repeated, as
requested by the maintainer.
- Expo ESLint passes all 11 changed mobile source files. The full mobile
Expo lint command reports existing errors in untouched files (57 errors,
8 warnings, including AttachmentViewer, ImageCanvas, Skeleton and
useOverlaySwipe); these are outside this PR. CI's required static checks
pass.
- EAS CLI 27.4.1 production fingerprints match before/after: iOS
`6ddec9ef559ee0095ac33e94ff9418a942053b17`; Android
`5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. Fingerprint baseline was dev
`34dedaace`; its only mobile change beyond the requested rebase base is
JS in ThreadSyncProgress, with no changed native inputs.
- Real Chromium review passed in light/dark at 1280×800 and 390×844,
with short, typical and long titles/project/branch labels. Checked
working ring and elapsed text, normal title/meta contrast, subtle
background, pastel project badges, provider colours,
branch-over-directory output, truncation and absence of horizontal
overflow. Reduced-motion emulation yields `animation: none`; no browser
runtime errors. Screenshots and diagnostic artifacts remain outside the
repository. No web UI tests were added.

Native visual verification was unavailable: this Linux host has no iOS
runtime or Android SDK, and the linked device host twice returned
“Device list failed: Could not communicate with device support. Try
refreshing devices.” No native build or publication was started.

Maintainer device checks: scroll a list with one and several working
threads; verify smooth rotation and scrolling, normal contrast in both
themes, `Working 1m` without row movement, and Pinpoint plus its
checkout branch throughout working updates. Toggle OS Reduce Motion
while open, then background/resume: rotation should stop appropriately
and elapsed time should catch up. Native frame/scroll performance
remains unmeasured here.

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

- `Working` → `Working 1m`: existing web wording with elapsed context;
sentence case, one idea, no new term. `Working` remains for an age of
`now`.
- Day-only ages → shared rounded day/week labels (for example, 13.5 days
→ `2w`); document the compact formatter contract in the copy guide.
- Worktree directory → branch/`Detached at <commit>`: existing domain
terminology and identical client fallback order. Scratch remains
`scratch folder`.
- Parent-routed mobile questions use web's existing `Asking agent`.
Starting, attention/result labels and action text retain established
wording.
- Audit items 1–8 and 10 passed static review: no new actions, errors,
empty states, humour, repeated explanatory text or icon/colour-only
status; live values use tabular digits in a reserved single-line slot.
Item 9 passed web review with short/typical/long labels at desktop and
phone widths; native visual checks remain explicitly assigned above.

Related: #526
Related: #478
Related: #565
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