Repository navigation
feat(mobile): match the web composer tray for subagents, tasks and queue - #466
Merged
Merged
Conversation
Mobile now shows the same stack above the composer as web. The tray attaches to the composer's top edge and, in web order, holds the goal, working subagents, the queue and pending requests. - Subagents: only working or waiting subagents, with the shared "N subagents working · N needs you" summary, provider icons and rows that open the thread. Finished subagents stay in thread details. - Queue: "N queued" panel, open by default. Rows have Steer, Delete (toast with Undo) and a sheet with "Runs with …", Edit, moves and Turn on/off queueing. Queued messages leave the timeline until the gateway starts them, as on web. - Goal: objective and status (with Starting/Pausing/Resuming) and Pause or Resume inline; a tap opens the goal sheet. The composer's Goal pill is gone. - Requests: the "Answer questions" / "Review request" row joins the tray nearest the input, with the expiry countdown. - Background tasks: an "N running in background" chip opens the running tasks with output and Stop. - Status notes (sending, delivery errors, computer offline) float with the tray outside the composer measurement. Their height joins the feed reserve only at the end of the feed, so reading history never moves. Shared rules moved to @canopy/domain (goals look, queue order, subagent summary, model names); web re-exports them unchanged. JS/TS only: both EAS fingerprints are unchanged.
nixuuu
marked this pull request as ready for review
November 10, 2026 06:36
nixuuu
added a commit
that referenced
this pull request
Nov 10, 2026
Expanding mobile subagents or queued messages changed the feed's bottom reserve, moving the conversation. Suggestion lists also occupied space above the input, and New thread inserted them into the form. These lists now open upwards in a bounded overlay; only collapsed tray headers retain their layout slots. Fixes: #466 - Add a portal in the existing native window, anchored and measured on the UI thread. Opening a panel changes neither the timeline reserve nor its mounted list. Subagent expansion is local state, without a device-preference update across the timeline. - Use the same opaque themed surface for subagents, queue, background tasks, and suggestions in thread/side-thread, new-thread and bot composers. Lists size to content, cap at the available space and 40% of the visible viewport, and scroll internally with a reserved indicator gutter. - Consume outside taps; support Close, downward swipe, accessibility escape and Android Back. Pickers retain their input and keyboard. Tray panels isolate screen-reader navigation and restore focus to the trigger. Motion grows from the bottom edge with shared tokens and is skipped for reduced motion. - Temporarily reduce the input to one row in short visible viewports, independently of overlay state. Keep controls mounted. Side-thread creation already uses a sheet without suggestions; the created conversation uses the shared thread composer. Validation: - `bun install`, `bun run typecheck`, `bun run lint`, `bun run format:check`, and `git diff --check`: pass. No UI tests added or run. Full integration tests, generation checks and builds were outside this task's permitted verification scope. - `bunx [email protected] fingerprint:generate --platform <ios|android> --build-profile production --json --non-interactive`: before/final outputs are byte-for-byte identical. iOS: `6ddec9ef559ee0095ac33e94ff9418a942053b17`; Android: `5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. No native dependencies or configuration changed. - Browser comparison used the production web `ComposerTop`, `SubagentsPanel` and `MentionSuggestions` in a scratch fixture, in light/dark at 320px and 1280px widths, with typical and long labels. The desktop suggestion popover kept focus in the textarea. Expanding the web tray preserved the measured timeline top (57px), height (800px), and scrollTop (300px). Scratch screenshots are outside the repository. - Native rendering, IME behavior, swipe gestures, accessibility focus, landscape and performance are **unverified on a device**. Expo web is unsupported by repository policy and was not added. Android's IME may consume Back before the JavaScript handler; the keyboard-hide event then also closes the overlay. Copy audit (`docs/copy.md` §8): reuse “Subagents”, “Background tasks”, “Suggestions” and “Queued messages” as compact panel headings; add “Close subagents”, “Close background tasks”, “Close suggestions” and “Close queued messages” as explicit screen-reader actions. Existing row labels, errors and empty states remain. Sentence case and glossary checked; no new terms or soul copy. Long titles truncate in code; the browser label check covers the web reference, not native rendering.
This was referenced Nov 13, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 16, 2026
## Change Remove the extra 8 dp of bottom padding from the mobile composer's shared tray. The last visible panel header now meets the composer border directly, including when only subagents or only the queue are visible. Update the mobile behavior documentation. Fixes: #466 ## Verification - Passed: lint and formatting for `apps/mobile/src/features/threads/tray/ComposerTray.tsx`. - Passed: mobile package typecheck and `git diff --check`. - Native visual verification remains incomplete: the Android emulator could not load the bundle because Metro hit the host's disk quota while writing its cache. - UI copy audit: not applicable; no user-facing text changed. - The full repository verification gate is left to CI.
nixuuu
added a commit
that referenced
this pull request
Nov 21, 2026
Pressing × on an achieved goal used to hide the row for the current visit only. Returning to the thread brought it back. Web, desktop, and mobile now save the goal ID in device view preferences. The dismissal survives navigation and a restart on that device. A later goal in the same thread still appears. An achieved goal waits for preferences to load before rendering. Fixes: #466 ## Verification - Chromium at desktop and phone widths, with light and dark appearance. Dismissed achieved goals stayed hidden on return and after reloading. A new active goal appeared in the same thread after setting it through the local gateway API. - Typechecks passed for web, mobile, and domain. Lint and formatting passed for the changed source. The existing goal tests passed, and a local persistence check confirmed that saved dismissals survive loading device preferences. - Native mobile applies the same dismissal behavior. The Android device reservation refused access because Canopy could not verify ownership of the emulator runtime. The remaining native check consists of tapping ×, reopening the thread, and restarting the app. - Required repository checks are left to CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stage 1 of 2 (stacked; stage 2 is the split Steer / Queue send button). Mobile now shows the same stack above the composer as web/desktop. Before this, mobile had a plain "Subagents · 1 finished ›" text row, the queue sat in the timeline, and there was no background-tasks chip or goal row.
What changes
features/threads/tray, web:ComposerTop): one stack on the composer's surface, rounded top corners only. It is inset 16 dp, the box's corner radius, so its sides meet the box's straight top edge and the box's top border closes it. Order is web's: goal, subagents, queue, then requests nearest the input. Each panel has a sharedTrayHeader(40 dp row, 48 dp target, 14 text, 16 icon, 12 chevron) and a hairline above it. A folded composer folds the panel bodies; the headers stay. A tall stack scrolls without closing the keyboard.SubagentsPanel): only working or waiting subagents (subagentsOf). The header shows the shared summary "2 subagents working · 1 needs you" and provider icons. Expanded, each row has a status dot, title, state label and the first line of the last message, and opens the thread. Finished subagents leave the tray; thread details keep the full lineage.subagentsExpandedstill remembers the open state.QueuePanel): "N queued", open by default, rows in run order. Each row has the text with chip names, a warning when a steer fell back, Steer (only while a turn runs), Delete (toast with Undo) and "…". The "…" sheet has "Runs with …", Edit message, the moves and Turn on/off queueing. Changes show at once (useQueue); a refusal restores the gateway's state and says why in a toast. Queued messages leave the timeline until the gateway starts them, as on web (buildTimeline).GoalBar, embedded): status icon and colour, objective, and a dot with the status or what it waits for (Starting… / Pausing… / Resuming…). Pause or Resume sits inline; a tap opens the goal sheet (full objective, latest check, Clear with confirmation, Replace). An achieved goal can be dismissed. The composer's "Goal" pill is gone; "Set a goal…" stays in the thread menu.Expires in m:sscountdown and the pending count. The sheet is unchanged.BackgroundTasksChip): an "N running in background" chip on the left above the tray. It opens the running tasks with status, "Show full output" and "Stop task"; the sheet closes with the last task.useFloatingComposer.measureAccessory). There the latest message moves up with them; while reading history nothing moves, and the reserve catches up on return.@canopy/domain(goalslook/actions/pending/showsGoal,queueorder/moves,subagentssubagentsOf/subagentSummary,model-name). Web re-exports them, so web behaviour is unchanged.Parity table (web → mobile)
ComposerTopstack tucked under the composerComposerTray, rounded top, inset to the box radius, closed by the box borderGoalBarembedded: icon, objective, status/pending, pause/resume, clear, details accordionGoalPanel: icon, objective, status/pending, pause/resume inline; details, clear, replace in the goal sheetSubagentsPanel: active-only summary, provider icons, rows to the threadSubagentsPanel, same rules and copyQueuePanel+QueueRow: Steer, Delete + Undo, "…" (Runs with, Edit, Move top/bottom, queueing toggle), drag to reorderQueuePanel: Steer, Delete + Undo, "…" sheet (Runs with, Edit, Move up/down/top/bottom, queueing toggle)visibleTurns)QuestionFormdocked inComposerTop; permission cards aboveBackgroundTasksChip(one → output, several → menu)BackgroundTasksChip→ sheet with each running task's output and Stopcompact→ bodies fold, headers stay)ThreadSyncStatusCopy audit (docs/copy.md §8)
Glossary: subagent, turn, queue, goal and background task, as in §3. No new terms. No soul sentences. Long titles, objectives and queue texts truncate on one line (checked in code; see manual checks).
Verification
bun install,bun run gen:check,bun run typecheck,bun run lint,bun run format:check, the web build,bun test packages/domain: clean. A full localcheck:tmpwas not run (shared machine); CI is the gate.bunx [email protected] fingerprint:generate --platform <ios|android> --build-profile production --json --non-interactivegives iOS6ddec9ef559ee0095ac33e94ff9418a942053b17and Android5f6eae3ab278f1cd543e9ed763f923a319b65ec9, the same as dev (fix(threads): let composer pills hug their labels #464). JS/TS only.GoalBar,SubagentsPanel,QueuePanel,BackgroundTasksChip,SteerSendButton) rendered with fixtures in Chromium at 390 px (dark/light, short/long texts, compact) and 1000 px. That page was scratch-only and is not committed. The mobile layout follows those measurements.Manual device checks (iPhone + Android phone, plus a Fold unfolded; light + dark)