Skip to content

feat(mobile): manage thread actions queue and details - #395

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

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

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

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
nixuuu added this pull request to stack #397 November 9, 2026 10:14
@nixuuu
nixuuu marked this pull request as ready for review November 9, 2026 10:15
@nixuuu nixuuu closed this Nov 9, 2026
@nixuuu nixuuu reopened this Nov 9, 2026
@nixuuu
nixuuu force-pushed the feat/mobile-parity-2-2 branch from 6e4e7c5 to 94eba6d Compare November 9, 2026 13:12
@nixuuu
nixuuu merged commit 9031c0c into dev Nov 9, 2026
17 of 24 checks passed
@nixuuu
nixuuu deleted the feat/mobile-parity-2-2 branch November 9, 2026 13:26
nixuuu added a commit that referenced this pull request Nov 9, 2026
Thread details cut off both the working directory and current branch,
and repeated model, permission, status and usage information already
available elsewhere. The first commit removes that redundant block from
web/desktop and mobile; the feature commit gives placement its own
readable rows and a safe branch picker.

- Show the complete wrapping path, collapse the home directory to `~`,
emphasize the folder name and reserve space for copying. Show the full
current branch, its base on a separate line, and detached HEAD
explicitly.
- Track each checkout's HEAD with a debounced file watch and direct
reads after initial gitdir resolution. Share the watch between threads
and retain reconnect/turn-end recovery.
- Search local and known remote branches without fetching. The gateway
enforces ownership and rejects active/queued turns, pending
interactions, background work and open goals across the checkout,
including path aliases. The worker reserves the checkout, requires a
clean tree and lets git refuse branches already used elsewhere. There is
no stash or force.
- Route linked-thread operations to their home and gate both home and
worker support through additive capabilities. Record “Branch switched to
X by you” and deliver checkout context to the next agent input,
including resumed sessions and shell inputs. A shell failure preserves
the note for the next input.

Ahead/behind remains available in Manage worktree; the placement section
does not add periodic git scans. Contracts are additive,
`WORKER_LINK_PROTOCOL` remains 1 and there is no database migration.

### Verification

- Gateway↔worker coverage: live HEAD updates, local and remote
switching, expired commands, dirty trees, branches used in another
worktree, running/queued turns, shared checkout aliases, owner scoping
and older workers. Linked-computer coverage checks home routing, viewer
HEAD/notices and older-home refusal. Shell integration checks the actual
harness input and recovery after a failed shell command.
- Real browser on a private production server: light/dark, desktop
1280×800, narrow 880×900 and phone 390×844; short/typical/long directory
paths, short branches and
`feature/agent-email-channel-implementujesz-docelowa-architekture-agenta-ai`,
detached HEAD, searchable branch selection and successful switching from
desktop and phone overlays. No horizontal overflow or leftover section
seams. The reserved branch area measured 128 px before and after the
tested short/long switch.
- Mobile changes are JS/TS only. EAS CLI 27.4.1 production fingerprints
were generated for both platforms before/after: iOS
`2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3`, Android
`c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d`; both unchanged. Native
device visuals were not checked.
- Final repository checks pass: `bun install`, `bun run gen:check`, `bun
run typecheck`, `bun run lint`, `bun run format:check`, the web build
and `bun run check:tmp --timeout 30000` (1924 pass, 161 skip, 0 fail
across 343 files; nothing left in the test temp directory). The initial
5-second-default run timed out in two existing plugin/skill tests; both
passed in the complete run with a 30-second default.
- Additional mobile checks: Expo Doctor passes 20/20; both Hermes bundle
exports pass, and ESLint passes for the new picker/placement and the
edited panel, sheets and thread state. The full Expo ESLint command also
reports existing errors in other surfaces (including the unchanged ref
assignment in `ThreadScreen`). CNG prebuild fails in
`@expo/image-utils`/`jimp-compact` with `Could not find MIME for Buffer
<null>`; native config and source assets are unchanged. Generated native
folders were removed. This PR does not change native
dependencies/configuration to address that separate issue.

### Copy audit (§8)

- Duplicate model, permission, status and usage rows → removed. Each
fact keeps its existing primary surface; no replacement copy or empty
section.
- Truncated path/branch with an inline competing base →
“Worktree”/“Directory”, “Branch”, full values, a separate “from …” line
and “Detached at …”. Sentence case, existing glossary and explicit text
preserve meaning without relying on icons or colour.
- New actions use verbs: “Switch branch”, “Search branches”, “Copy
working directory”. The picker groups are “Local branches” and “Remote
branches”; no confirmation or destructive wording is introduced.
- New errors state the problem and next step: commit/discard changes,
choose another branch, wait for work, reconnect or update the relevant
computer. Empty/loading/search states are short and actionable. Raw git
diagnostics and private paths are not exposed as errors.
- No humour or “soul” copy. Checked with short, typical and long values
at desktop and phone widths; accessible labels name actions and errors
use alerts. The requested full-path tooltip supports inspecting the
complete path.

Related: #392, #395
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