Skip to content

fix(ui): keep interface chrome out of text selection - #496

Merged
nixuuu merged 1 commit into
devfrom
fix/ui-text-selection
Nov 10, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/ui-text-selection

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 10, 2026

Copy link
Copy Markdown
Member

App chrome currently participates in drag selection and page-wide select-all. This makes sidebar rows, panel labels and controls highlight alongside conversation text. Default the web/desktop shell to non-selectable text and opt reading surfaces and copyable values back in at shared boundaries.

Selection rules:

  • Messages, markdown, code, expanded tool bodies/thoughts, diffs, quotes, bot/chat card bodies, attachment text, terminal output and release notes remain selectable. Shared controls, badges, labels and empty states opt out inside those surfaces.
  • Worktree/directory paths, branch names and base refs remain selectable; their labels and branch picker controls do not. Computer versions, certificate fingerprints and addresses, update versions/reasons, errors and diagnostic bodies remain selectable. Existing URL/path/ID copy controls remain available; editable settings and URL fields retain native selection.
  • Inputs, textareas and contenteditable keep native selection. Quote-from-selection and native text drag/drop are preserved without intercepting pointer events.
  • Cmd+A/Ctrl+A while focus is in VirtualFeed selects its mounted rows, excluding the sidebar, side panel and composer. Virtualized/unmounted history and collapsed details are not included. Editable targets retain their own select-all; outside the feed, browser selection behavior applies to selectable surfaces.
  • React Native audit: remove selectable from keyboard shortcut labels; retain it for conversation content, paths, branches, URLs, fingerprints, pairing codes, versions, errors and diagnostics. No native configuration changes. Polish conventions added to docs/ui-scale.md.

Validation:

  • Passed bun install, bun run typecheck, bun run lint, bun run format:check, and bun run --filter @canopy/web build; required code checks rerun after rebasing onto current dev.
  • Production fingerprints generated before/after with bunx [email protected] fingerprint:generate --platform <ios|android> --build-profile production --json --non-interactive; full JSON unchanged, including after rebase. iOS: 6ddec9ef559ee0095ac33e94ff9418a942053b17; Android: 5f6eae3ab278f1cd543e9ed763f923a319b65ec9.
  • Real Chromium, isolated stack on ports 15437–15439: light/dark, 1440×900 desktop and 390×844 phone. Dragging sidebar/header/panel labels, settings, menus and popovers leaves no selection. Message/code selection shows Cite; Alt+Q and Save create a quote chip. Branch/path copy-paste, input/composer select-all, rename editing, text drop into composer and panel resizing work. Feed select-all stays within its feed. Expanded code/diff and bot card values also checked. No UI tests added.
  • Attachment, terminal and update/release-note boundaries audited in source. Native mobile and an actual Electron window were not run. Browser emulation confirmed Electron titlebar drag/no-drag regions retain non-selectable text; native drag behavior remains unverified. The existing updates gallery returns 500 from its partial desktop bridge mock, so release-note interaction was not verified there. Full integration suite and generated-contract gate left to CI.

Evidence stays outside the repository: /var/tmp/canopy-text-selection/screenshots.txt lists every PNG. Representative files: message-cite-light-desktop.png, code-cite-light-desktop.png, quote-saved-light-desktop.png, branch-light-desktop.png, text-drop-dark-desktop.png, settings-dark-desktop.png, thread-light-phone.png, thread-dark-phone.png, and panel-dark-phone.png in that directory. Disposable stack and browser were stopped.

Copy audit: none (no UI copy changes).

@nixuuu
nixuuu merged commit ca99429 into dev Nov 10, 2026
15 of 17 checks passed
@nixuuu
nixuuu deleted the fix/ui-text-selection branch November 10, 2026 13:08
nixuuu added a commit that referenced this pull request Nov 10, 2026
## Change

Stopping the gateway while a worker command ACK is being persisted could
produce an unhandled `All fibers interrupted without error` rejection.
Callers detach `coreDeliver()`, but its catch covered only sending the
command: bot dispatch checks, `commandDone()` and result reconciliation
could reject outside it when `ManagedRuntime.dispose()` interrupted
their SQL fibers. This is a product shutdown bug.

Observe the entire background delivery through the managed runtime's
`runPromiseExit()`. Pure interruption ends quietly; other failures
produce a bounded diagnostic without command contents. An ACK that did
not commit leaves the command in the outbox for reconnect. Add a
PostgreSQL row-lock regression that forces interruption during ACK
persistence, checks `unhandledRejection`, verifies the pending outbox
entry and restarts the gateway to confirm delivery recovers. Document
the shutdown behavior.

## Verification

Read attempt 1 of CI run
[42820024558](https://github.com/itsoltech/canopy/actions/runs/42820024558/attempts/1).
Its stack has no application frame identifying the original command. The
regression deterministically produces the same error on the original
code; the original three files did not reproduce the flake naturally.

Completed sequential runs, one file per process, using `bun run
check:tmp tests/integration/<file>.test.ts`:

| File | Before | After |
| --- | --- | --- |
| `command-shutdown` (forced ACK interruption) | 0/30 passed; 30/30
failed with the matching interruption | 30/30 passed |
| `bots-harness` | 30/30 passed | 30/30 passed |
| `branch-names` | 30/30 passed | 30/30 passed |
| `composer-choices` | 30/30 passed | 30/30 passed |

Every completed invocation passed the temp-directory cleanup check. One
baseline bot invocation ended with exit 143 and was rerun; the table
counts completed invocations only.

Also passed: `bun install`, `bun run typecheck`, `bun run lint`, `bun
run format:check`. The implementation and regression received a
self-review. Full unfiltered tests, `gen:check` and the web build were
not run locally under the workspace verification limits; CI covers those
gates.

No specific recent introducing PR was established; #496 is context only.

Related: #496
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