Fix Android terminal text overflow and stale foldable viewport handling.
- Pin terminal WebView textZoom so Android system font scale cannot inflate xterm glyphs past measured cells.
- Refit mobile terminal viewport on window dimension changes for fold/unfold, rotation, and split-screen.
- Harden viewport refit fallback handling for stale async runs and updateViewport responses.
Fixes#4579
Adds a focused React Doctor oxlint gate for high-signal state/effect rules, disables the noisy js-combine-iterations React Doctor rule, and refactors the mobile new-worktree modal away from prop-change state reset effects.
Bounds the mobile terminal WebView pre-ready write backlog, avoids Array.shift() in the embedded xterm write drain, disposes old xterm observers, and clears successful fallback timers.
Removed duplicate 'openclaude' entry at index 3 of MOBILE_TUI_AGENT_AUTO_PICK_ORDER so mobile pickers no longer render two OpenClaude rows or emit duplicate-key warnings.
Co-authored-by: orca-bug-scan-bot <orca-bug-scan-bot@stably.ai>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
* Move mobile browser refs out of effects
* Use layout effect for mobile browser ref mirrors
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
* Move mobile tasks client ref sync out of effect
* Use layout effect for mobile tasks client ref
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
Auto-generated workspace names walked the marine-creature list in order
and deduped only within the active repo (the default when workspaces are
nested), so the first auto-named worktree in every repo landed on
"Nautilus". That guaranteed identical branch names across repos, which
appear flat and indistinguishable in the sidebar.
The in-order walk also produced "Nautilus-2", "Nautilus-3", ... within a
single repo: the suggester ignores branches left behind by deleted
worktrees, so it kept re-proposing "Nautilus", and the create-time retry
loop suffixed it to dodge the lingering branch. Random selection now
yields a fresh creature each time instead of marching the same name.
- Dedup against worktrees in every repo, not just the active one
- Pick randomly from the unused pool instead of the first list entry
- Lowercase the result to match branch-name convention (fix/seahorse)
- Expand the corpus 260 -> 552 (more marine species plus public-domain
mythological sea creatures) so random picks rarely repeat
getSuggestedCreatureName drops the now-unused repoId/nestWorkspaces
params; the RNG is injectable for deterministic tests.
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
* Add agent enablement controls
Implements the Enable/Disable Agents Dashboard behavior described in docs/enable-disable-agents-dashboard.md, including persisted agent enablement state, filtered launch surfaces, and settings UI affordances.
* Clarify agent availability controls
* Respect disabled agents across workspace and AI defaults
- Filter disabled TUI agents from mobile and quick workspace selection
- Avoid implicitly choosing disabled agents for commit/PR AI settings
- Broadcast settings changes to open windows for disabled-agent updates
* rm design doc
* fix: complete agent enablement propagation
Fix shortcut dispatch so app commands follow the produced logical key for the active keyboard layout, while preserving intentional physical-code fallbacks for terminal byte paths and unavailable logical keys.\n\nCloses #2858
Clear initializedHandlesRef on reconnect so the auto-resubscribed scrollback frame re-inits xterm instead of being dropped by the has(handle) guard.
Co-authored-by: orca-bug-scan-bot <orca-bug-scan-bot@stably.ai>
* Improve mobile terminal streaming performance
Co-authored-by: Orca <help@stably.ai>
* Add mobile clear terminal action
Co-authored-by: Orca <help@stably.ai>
* Fix terminal connection test mock
Co-authored-by: Orca <help@stably.ai>
* WIP: mobile markdown tabs before rebase
Co-authored-by: Orca <help@stably.ai>
* Add mobile markdown editing
Co-authored-by: Orca <help@stably.ai>
* Harden mobile tab and markdown sync
Co-authored-by: Orca <help@stably.ai>
* Fix mobile terminal reconnect loading race
Co-authored-by: Orca <help@stably.ai>
* Polish mobile terminal keyboard behavior
Co-authored-by: Orca <help@stably.ai>
* Simplify mobile markdown editor chrome
Co-authored-by: Orca <help@stably.ai>
* Move mobile markdown actions to top
Co-authored-by: Orca <help@stably.ai>
* Use app modals for markdown discard
Co-authored-by: Orca <help@stably.ai>
* Dismiss keyboard before markdown confirmations
Co-authored-by: Orca <help@stably.ai>
* Add mobile file explorer
Co-authored-by: Orca <help@stably.ai>
* Fix mobile file explorer type narrowing
Co-authored-by: Orca <help@stably.ai>
* Fix mobile files navigation param
Co-authored-by: Orca <help@stably.ai>
* Show mobile files connection wait state
Co-authored-by: Orca <help@stably.ai>
* Preview text files on mobile
Co-authored-by: Orca <help@stably.ai>
* Simplify mobile file previews
Co-authored-by: Orca <help@stably.ai>
* Clarify unavailable mobile file types
Co-authored-by: Orca <help@stably.ai>
* Fix mobile subscription and preview review issues
Co-authored-by: Orca <help@stably.ai>
* Keep fallback terminals visible on mobile
Co-authored-by: Orca <help@stably.ai>
* Keep mobile terminal tap active
Co-authored-by: Orca <help@stably.ai>
* Preserve mobile terminal fallback order
Co-authored-by: Orca <help@stably.ai>
* Fix mobile session tab authority
Co-authored-by: Orca <help@stably.ai>
* Run mobile tests in mobile CI lane
Co-authored-by: Orca <help@stably.ai>
* Bump mobile app version to 0.0.7
Co-authored-by: Orca <help@stably.ai>
* Allow main window IPC wiring size
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Orca <help@stably.ai>
Split session screen's clearTerminalCache cleanup into a mount-only effect; included client identity in home-screen wireUp dep key via a WeakMap-derived clientKey so forceReconnect re-attaches subs.
Findings addressed:
- mobile/app/h/[hostId]/session/[worktreeId].tsx:436 — clearTerminalCache fires on every client identity change
- mobile/app/index.tsx — useEffect deps array uses inline expression — runs every render
Rebased onto current main.
Co-authored-by: orca-bot <bot@stably.ai>
host-store: write AsyncStorage metadata before SecureStore token to avoid orphaned keychain tokens on crash. mobile IPC: coalesce repeated getPairingQR calls onto a single pending device token via new DeviceRegistry.getOrCreatePendingDevice.
Findings addressed:
- [high] mobile/src/transport/host-store.ts — saveHost orders Keychain write before AsyncStorage — orphaned tokens on crash
- [low] src/main/ipc/mobile.ts:84-95 — getPairingQR creates a device token on every call, leaking pre-paired entries
Rebased onto current main to resolve conflicts; preserved tokenCache.set added on main.
Co-authored-by: orca-bot <bot@stably.ai>
Added seq + ref guards after awaits in post-scrollback re-subscribe path; awaitReady's prior in-flight promise now resolves before re-arming so old waiters don't pin 3s timers.
Findings addressed:
- mobile/app/h/[hostId]/session/[worktreeId].tsx:280 — Post-scrollback re-subscribe path lacks a seq guard after awaits
- mobile/src/terminal/TerminalWebView.tsx:770 — awaitReady promise replaced without resolving the prior one
Rebased onto current main; conflict in worktreeId.tsx resolved by preserving main's existing 'why: scrollback null viewport' comment alongside the new seq-recheck comment.
Co-authored-by: orca-bot <bot@stably.ai>
Updated reconnect-backoff comments in rpc-client.ts and connection-health.ts to reflect the actual ~6m total (not ~2m). Made valueFromMs() snap non-preset ms to the closest finite preset so the picker's selected radio agrees with the row sublabel.
Rebased onto current main to resolve conflicts; only the 3 Fixer-summary files.
Co-authored-by: buf0-bot <buf0-bot@users.noreply.github.com>
The regex /\x1b\[20[01]~/g intentionally matches control characters —
that's the entire point of the sanitizer (stripping embedded \x1b[200~ /
\x1b[201~ markers from clipboard text). Suppress the lint warning with
the same convention used elsewhere in mobile/ (see scripts/repro-worktree-startup-stream.ts).
Comment-only change, zero runtime impact. Follows up #1576.
Co-authored-by: hermes <hermes@stably.ai>
Strip embedded \x1b[200~/\x1b[201~ sequences from clipboard text before bracketed-paste wrap; route accessory-key repeat through a ref so held-key repeats use the current handleAccessoryKey.
Co-authored-by: orca-bug-scan-bot <orca-bug-scan-bot@stably.ai>
Run pnpm update in root + mobile to pull patched versions of vite, hono,
@hono/node-server, dompurify, uuid, picomatch, lodash, brace-expansion,
path-to-regexp, postcss, @xmldom/xmldom, and other transitive packages
flagged by Dependabot.
Co-authored-by: Orca <help@stably.ai>
When pairing fails (e.g. broken Tailscale route, firewall blocking the
WS, expired token, etc.) the mobile app previously got stuck on
'Connecting…' forever with no signal about *where* it stalled.
Adds a structured connection-log stream from the rpc client and renders
it under the 'Connecting…' spinner on both pair-scan and pair-confirm.
Each phase emits a timestamped, color-coded entry: Opening WebSocket,
WebSocket open, Sent e2ee_hello, Received e2ee_ready, Authenticated,
WebSocket closed / Reconnect scheduled / Connect timeout / Handshake
timeout, etc. The log auto-scrolls and stays visible after a failure so
the user can see the last successful step.
Also fixes the silent infinite spinner: pairing now has a 25s overall
timeout — rpc-client retries forever by design (right behaviour for
live sessions), but for the *initial* pair we want a hard ceiling that
surfaces an actionable error with the log visible instead of spinning.
- Adds ConnectionLogEntry / ConnectionLogSink to transport/types.ts
- connect() now accepts { onStateChange, onLog } (legacy fn form kept)
- New ConnectionLog component (mono, level-coloured, +Xs elapsed)
- Pair flows track logs in a ref and render them in connecting/error
- 25s pairing-overall timeout that closes the client and surfaces a
'see log below for where it stalled' error
Co-authored-by: Orca <help@stably.ai>
Picks up the icon update from #1490. Apple requires monotonically
increasing build numbers — 7 was already uploaded to TestFlight.
Co-authored-by: Orca <help@stably.ai>