Skip to content

feat(mobile): compose bot mentions and replies with in-app alerts - #390

Merged
nixuuu merged 1 commit into
feat/mobile-parity-3-2from
feat/mobile-parity-3-3
Nov 9, 2026
Merged

nixuuu merged 1 commit into
feat/mobile-parity-3-2from
feat/mobile-parity-3-3

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Mobile bot chats now compose structured bot/connected-account mentions, reply with removable quotes and comments, send quote-only messages, and show stored quotes/mention badges. Long press opens Reply/Copy. Delivery retries keep the same request ID only for the same text, mentions and quotes; editing is blocked during an in-flight send. Bot text beginning with ! stays ordinary text.

The stack is rebased onto 6312d97d with the image and complete-output viewers retained. Threads and bots share quote-draft state, QuoteTray and Markdown-to-text conversion; bot comments remain editable inline. Reply/Copy uses the shared text-action menu and clipboard handler. Copy now announces success for accessibility and uses the same retry alert as viewer copy buttons. Bot code/diff previews disable native selection for long-press actions; full viewers and thread text remain selectable.

Foreground bot alerts now cover fresh owner-facing messages, questions and approvals and follow the existing device In-app notifications preference. Web and mobile share event detection. The initial list and reconnections establish silent baselines; archived bots, read messages and the open chat stay quiet. This is JS only, with no system alerts, sound, push registration or background delivery. Bot mention targets stay on the same home; connected accounts come from the gateway's bot-scoped grant filter, matching web's local account catalog.

Validation:

  • On the final top branch rebased onto 6312d97d, bun install, bun run gen:check, bun run typecheck, bun run lint, bun run format:check, foreground bun run check:tmp and apps/web's bun run build passed. Full suite: 1871 passed, 161 skipped, zero failures, 21711 assertions across 331 files; no test temp entries left. The web build reports a chunk-size warning. Production fingerprints were regenerated on every layer for both platforms and match the values below.
  • Focused gateway coverage for skills, bot messages, thread quotes, routines and computer moves: 41 passed, zero failures, no test temp entries left. An initial full run hit the unchanged linked-read timing assertion in linked-timeouts.test.ts; its isolated rerun (7 passed) and the final full run both passed without a code change.
  • Mobile TypeScript, repository lint and formatting passed during implementation. Existing tests/integration/bots.test.ts covers durable structured mentions, quote-only messages, validation, owner scoping and idempotency; no UI tests added.
  • No dependencies, native configuration or native builds changed. Shared Markdown selection remains enabled by default; bot bubbles use their own long-press actions.

Production runtime fingerprints, before → after this layer:

Platform Before After
iOS 2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3 2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3
Android c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d

Generated with bunx [email protected] fingerprint:generate --platform <ios|android> --build-profile production --json --non-interactive.

Rebase copy audit (docs/copy.md §8): “Could not copy this message. Try Copy message again.” → the shared “Could not copy” / “Try copying the text again.” alert. This retains a clear failure and recovery action. Copy success now announces “Copied” for accessibility. Reply/Copy labels and quote comment controls remain unchanged; no new glossary terms or humour. Visual QA remains unverified.

Copy audit (docs/copy.md §8): “Show alerts from other threads while Canopy has focus.” → “Show alerts from other threads and bot chats while Canopy has focus.” This names the expanded scope. Plain-text input → labelled Message to your bot, Bots/Connectors suggestions, Reply, Copy message, Remove quote and Comment. Delivery failure → “Could not confirm delivery. Retry this message unchanged to send it only once.” “Message” includes the structured metadata required for safe retry. Error recovery, sentence case, glossary and accessible labels reviewed; no humour or new terms. Visual text-length audit remains manual and unverified.

Manual QA still required; installed simulator clients cannot execute this checkout. Use an existing compatible client after the JS changes are available. Repeat light/dark on phone (~390 dp) and Fold (~720 dp), with short, typical and long names/text:

  1. Type @, pick another bot and a granted connected account; edit/remove a badge and send. Verify same-home/archive/grant filtering, stored badges and that suggestions leave the composer height unchanged. Send text beginning with !.
  2. Long press bot prose, code and your own message; Reply, add/edit/remove comments, send text-plus-quote and quote-only. Expand stored quotes. Verify multiline/code text, the 20-quote limit, long quote guidance and Copy message.
  3. Interrupt delivery confirmation, retry unchanged, and verify one stored message. Change text/mention/quote and verify a new request. Confirm drafts cannot change during sending and switching chats does not carry a draft across bots.
  4. From another screen, receive a bot message, question and approval. Open the alert. Check no alert for the current chat, archived/read bot, initial load, wake or reconnection. Toggle Settings → General → In-app notifications off/on.
  5. Check VoiceOver/TalkBack labels including quote-only messages, compact suggestion scrolling, keyboard space, long comments and short/long names. Verify normal thread Markdown selection still works. No system notification should appear.

This PR and the entire stack are ready for review. Do not merge individual layers.

@nixuuu
nixuuu added this pull request to stack #391 November 9, 2026 09:41
@nixuuu
nixuuu marked this pull request as ready for review November 9, 2026 09:45
@nixuuu
nixuuu deleted the branch feat/mobile-parity-3-2 November 9, 2026 09:56
@nixuuu nixuuu closed this Nov 9, 2026
@nixuuu
nixuuu deleted the feat/mobile-parity-3-3 branch November 9, 2026 09:56
@nixuuu
nixuuu restored the feat/mobile-parity-3-3 branch November 9, 2026 09:56
@nixuuu nixuuu reopened this Nov 9, 2026
@nixuuu
nixuuu force-pushed the feat/mobile-parity-3-3 branch from 0172b6b to 383324b Compare November 9, 2026 10:39
@nixuuu
nixuuu merged commit 8fb894e into dev Nov 9, 2026
14 of 21 checks passed
@nixuuu
nixuuu deleted the feat/mobile-parity-3-3 branch November 9, 2026 12:50
nixuuu added a commit that referenced this pull request Nov 9, 2026
Mobile now answers thread secret requests and revokes saved grants. The
write-only sheet masks input, disables autofill and suggestions, clears
its native field and JS reference on send/close/background, and displays
only grant metadata and expiry.

Linked threads route the existing answer/revoke RPCs directly to their
home. Secret values stay excluded from relays and mirrors. No new RPC,
proto, native module, dependency or configuration change.

Validation:
- Paired-device secret integration: 2 passing tests, including owner
isolation, revoked devices, expiry metadata, decline, revoke, and
absence of values in responses/streams/tool results.
- Linked-thread integration passes, including routing qualified request
IDs home without putting values in mirrors.
- Full gate passes on the rebased top branch: install, gen:check,
typecheck, lint, format:check, check:tmp and web build. The full run
finished with 1,890 pass, 161 skip, zero failures and clean temp
cleanup. No UI tests or native builds.
- Production fingerprints before/after, EAS CLI 27.4.1: iOS
`2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3`; Android
`c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d`. Both unchanged.

Copy audit — docs/copy.md §8:
- Before: secret requests had no mobile action. After: “Provide secret”,
“Save securely”, “Decline”, “Revoke”, and an explicit 24-hour
explanation. Each action names its result; saved values have no display
control.
- Errors say what failed and how to retry, without transport details or
secret content. Existing glossary and sentence case retained; no
decorative copy or colour-only state.
- Static review covered short/typical/long labels and wrapping. The
device matrix below remains manual; native visuals were not verified in
this checkout.

Manual checks after a compatible OTA is available:
1. At 360/390 dp phone and 600/768 dp Fold widths, light/dark and
reduced motion, use 1/30/160-character labels. Check wrapping, compact
sheet scrolling, keyboard avoidance and fixed button alignment.
2. In a test gateway, save a non-sensitive test value, decline another
request, and revoke a saved grant. Confirm the field remains masked,
clears after sending, and saved values never appear; grant expiry is
readable.
3. Close/reopen the sheet, background the phone, and disconnect the
thread's home while typing. Confirm the field is cleared and unavailable
actions are disabled.
4. Repeat against a linked computer and a revoked paired device; the
automated owner-scoping tests cover rejection independently.

This is layer 1 of the independent normal-thread parity stack. The
latest rebase targets dev at `8fb894e4`, including #388–#390, #393, #398
and #399. Existing bases and ready-for-review states are preserved.
nixuuu added a commit that referenced this pull request Nov 9, 2026
Normal thread work is available from mobile: one shared action sheet
opens from the header or sidebar long press, queued messages can move or
steer immediately, and thread details expose usage, paths, grants,
schedules, worktrees and background tasks.

The action sheet respects confirmation preferences and uses the existing
lifecycle RPCs. Thread and queued-message deletion provide an 8-second
Undo; deleting an open thread or its parent navigates away and Undo can
reopen it. Queue ordering preserves platform turns and leaves the
default steer/queue preference unchanged.

Details show own-turn token/cost totals, label partial totals as “loaded
turns”, show the latest reported context window, and copy
directory/worktree paths with expo-clipboard. Schedule links filter the
existing editor to this thread. The worktree link opens the current
worktree without bulk cleanup controls. Paged snapshots retain
background task items outside the loaded turn window, so the list
survives reopening.

Validation:
- Gateway history integration: 7 passing tests, including background
task retention outside the tail page, reopening and page deduplication.
- Full gate passes on the rebased top branch: install, gen:check,
typecheck, lint, format:check, check:tmp and web build. The full run
finished with 1,890 pass, 161 skip, zero failures and clean temp
cleanup. No UI tests or native builds.
- Production fingerprints before/after, EAS CLI 27.4.1: iOS
`2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3`; Android
`c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d`. Both unchanged; no
dependencies or native configuration changed.

Copy audit — docs/copy.md §8:
- Before: queue edit/delete and “Steer now”. After: “Move up”, “Move
down”, “Move to top”, “Move to bottom” and “Undo” name the added
actions. Existing “Steer now” and “Move to a computer” wording is
preserved.
- “Delete thread?” repeats its verb in “Delete thread”; its description
explains side threads, stopped work, cancelled schedules and Undo.
“Usage · loaded turns” avoids claiming complete totals.
- Empty states and errors are short, actionable and use existing terms.
Long text wraps or truncates with full paths selectable; state also has
words. Static copy review completed; the visual matrix remains manual.

Manual checks after a compatible OTA is available:
1. Check 360/390 dp phone and 600/768 dp Fold widths, light/dark,
reduced motion, 1/30/160-character titles and 240-character paths. Check
overlays, scrolling, clipping and reserved control space.
2. Open actions from both entry points. Pin/unpin, regenerate, rename,
read/unread, archive/unarchive and delete; vary all three confirmation
preferences. Delete an open child through its parent and Undo. Confirm
the active goal has no duplicate menu control. Open “Move to a computer”
for a local thread and verify the existing preview/placement flow.
3. Queue four own messages with an intervening platform message. Move
each direction and to both ends; steer text and a message with files
during a running turn. Delete/Undo and edit a queued message, then
verify the delivery default still matches Settings. Send files with both
delivery choices and check the delivery note from a home that cannot
steer attachments. Open the landed image/text attachment previews.
4. Copy both paths and open schedules/current worktree. Check thread
scoping, add/edit/pause/resume/cancel a schedule, and verify worktree
status/removal still requires the existing safety confirmation.
5. Start background work, finish its foreground turn and reopen a long
thread. Stop the task from details and use “Show full output”; the
shared full-screen viewer reads inline or blob output and offers
Copy/Quote. Close it to return to details. Compare usage before/after
loading earlier turns.

The final rebase includes #377–#378 and #385. Background tasks now reuse
the landed TextViewer; there is no timeline-link fallback or separate
output viewer. Existing quote and send behavior is preserved.

Layer 2 of 3. Rebased onto dev at `8fb894e4`: preserves #393 attachment
steering, #398 previews and #388–#390 bot/settings parity, including the
local thread move action. Existing bases and ready-for-review states are
preserved.
nixuuu added a commit that referenced this pull request Nov 9, 2026
The phone update row now checks, downloads and explicitly applies
compatible OTA updates through the installed expo-updates APIs. Settings
and the update center share state, progress, errors and next-launch
deferral; the sidebar update indicator includes this phone.

Apply checks every mounted composer synchronously, including composers
under Settings, uploads, quote-only drafts, queued-message edits and
secret entry. Unsent work defers the update and explains how to proceed.
No automatic reload is introduced. “Apply next launch” keeps the current
session running.

Release notes use the same public GitHub release bodies as the desktop
changelog. The selected OTA manifest supplies the exact JS version;
missing metadata or rollback never substitutes a newer channel release.
Notes include retry and a GitHub link. No dependencies, native modules
or configuration changes.

Validation:
- Full gate passes on the rebased top branch: install, gen:check,
typecheck, lint, format:check, check:tmp and web build. The full run
finished with 1,890 pass, 161 skip, zero failures and clean temp
cleanup. No UI tests, native builds, EAS builds or APKs.
- Production fingerprints before/after, EAS CLI 27.4.1: iOS
`2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3`; Android
`c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d`. Both unchanged.
- Final stack fetched/rebased onto origin/dev at `8fb894e4`, including
#388–#390, #393, #398 and #399, before the full gate. Runtime behavior
and visuals require the manual checks below because installed simulator
clients cannot run this checkout.

Copy audit — docs/copy.md §8:
- Before: “Updates apply after you close and reopen Canopy.” After:
distinct “Check this phone for updates”, “Download update”, “Apply
update” and “Apply next launch” actions; the row distinguishes Not
checked / Available / Downloading / Ready / Next launch.
- Deferral explains the unsent draft/files and the next action. Errors
explain failure and retry; release notes identify the actual target and
handle unavailable notes explicitly. No new glossary term, decorative
copy or colour-only state.
- Static review covered short/long channel and version strings and
multiline messages. Native short/typical/long text and theme/width
checks remain manual.

Manual checks on a compatible production-runtime test client:
1. At 360/390 dp phone and 600/768 dp Fold widths, light/dark and
reduced motion, open both About and Updates. Check wrapping with long
versions, progress, fixed action columns and compact overlay scrolling.
2. Check with no update, offline, and with a compatible update.
Download, inspect the exact version's GitHub notes, defer, and confirm
the current session keeps running. Retry notes while offline and after
reconnecting.
3. With unsent text, a quote-only draft, a picked/uploading file, and a
draft in a composer underneath Settings, press Apply. It must defer
without reloading or losing work. Include a bot composer and a
queued-message edit where reachable.
4. Send or discard the unsent work, then Apply. Confirm one restart and
the expected JS version. Repeat by choosing next launch and fully
closing/reopening the app.
5. Check development builds show no OTA action; for rollback/missing
version metadata, confirm notes say unavailable and offer GitHub rather
than presenting an unrelated release.

Layer 3 of 3. Rebased onto dev at `8fb894e4`, including #388–#390, #393,
#398 and #399. Quote editing guards and quote-only OTA blockers coexist.
Existing bases and ready-for-review states are preserved; no OTA was
published manually.
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