Skip to content

Mobile: Monos in a project's sessions, archive with Undo - #1288

Draft
Kaloyanes wants to merge 21 commits into
hardbeat920:mainfrom
Kaloyanes:pr/phone-sessions
Draft

Kaloyanes wants to merge 21 commits into
hardbeat920:mainfrom
Kaloyanes:pr/phone-sessions

Conversation

@Kaloyanes

@Kaloyanes Kaloyanes commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

What changed

The phone's Sessions page shows a project's Monos with its sessions, and archiving gets an Undo.

Phone

  • Monos group: each project's Sessions page pins its Monos above the session rows. Monos with no project show on the first project's page, and a Mono in several projects shows on each. The group folds from its header and can be hidden from the filter menu; both choices are remembered per desktop. The header has a + for a new Mono, which starts in that project (useCreateMono).
  • Started-by chip: a session a Mono launched shows that Mono's chip, and tapping it opens the Mono's chat.
  • Archive: swipe a row to archive it. A toast says what was archived. Undo is only offered when the desktop advertises sessionUnarchive; otherwise the phone asks first, since an archive can't be taken back.
  • Drawer: it now lists projects only. Its button's dot counts unread Monos and finished sessions.
  • Projects only: the picker chooses projects only. Monos come with their projects, and the app opens on the last project.
  • Polish: the composer's + menu and the Mono and filter menus use the shared GlassMenuButton. The project header drops its Settings cog. Field-like glass is interactive, and there's a back chevron icon.

Desktop host

  • monoId: catalog sessions a Mono launched carry monoId, and the workspace poll keeps them.
  • Unarchive: a new session.unarchive app method, plus sessionUnarchive: true in the catalog, so the phone's Undo can restore an archived session. Mono conversations refuse it, as they refuse archive.

Depends on

How it was tested

  • mobile: tsc --noEmit clean, npm run lint 0 errors (2 existing warnings in dictation.ts), and vitest 41 files / 293 tests passed.
  • Test changes: SessionsPage.test mocks Collapsible and the reanimated calls MonoGroup now uses. Before this, it failed to load anywhere (worklets import). ProjectScreen.test now expects no Settings button in the header.
  • cargo fmt --check: clean for the touched Rust files.
  • Not run: cargo clippy and cargo test for this branch's Rust changes (mobile/catalog.rs, mobile/host.rs, shell/mobile_host.rs; under 60 lines). The build machine ran out of disk. They still need a run.

Kaloyanes and others added 21 commits October 29, 2026 21:01
…nflict-pr-head

# Conflicts:
#	crates/monocode-gpui/src/inbox.rs
…tic marks, fixtures

Phone side of the shared inbox contract: protocol types and request
helpers, scope/group/mark/undo/stale logic, a store with persisted last
page, offline handling and polling at the catalog's cadence, a provider,
and a fixture client behind EXPO_PUBLIC_INBOX_FIXTURES.

Co-Authored-By: Claude <noreply@anthropic.com>
Persist per-item done and snooze state next to Seen, add the slim
camelCase response types and pure list/page/slim/diff functions for the
phone Inbox, share the provider patch parser, and document the protocol.
… them

The list only knew items by repository, so the Inbox had no reason to show
for GitHub. Add best-effort review-requested and mentions searches per
repository and set attention_reason on the matching rows.
Add the inbox.list/item/diff/checks/mark/start/media handlers in
mobile_host/inbox.rs. A list is the cached snapshot, answered at once, with a
background refresh through the desktop Inbox; provider reads run off the UI
thread; triage is saved with the desktop's read state; inbox.start reuses the
session.start path and its command-id dedupe; images and avatars resolve
through the allowlisted media adapters from an opaque key or index.
… the catalog

Items the NotificationTracker reports as newly appeared and that carry a
review request, mention, assignment or failed pipeline go out as category
`inbox` with data {kind, key}, unless the desktop Inbox is on screen. The
workspace catalog gains `inbox: true`.
The undo toast, its timer and the swipe-action buttons move to ui/ so the
Sessions list can use the same ones. Adds an archive icon.
…ld hide rows, pull to refresh, grouping menu and glass segments

The host serves the phone from the desktop Inbox's snapshot only while the
desktop's filters and projects would not narrow it; otherwise it keeps a
second snapshot fetched with default filters over the desktop's and the
Monos' projects. A watching phone refreshes it after 30 s. `inbox.list`
takes `refresh: true` for pull to refresh and answers when that fetch ends
(20 s at most). On the phone the scope switch becomes GlassSegments, the
grouping menu moves to GroupMenu (SwiftUI picker on iOS, ChoiceMenu on
Android) behind a shared GlassMenuButton, chip rows keep the page swipe out
of their drag (useKeepsSwipe), and LiquidView gains `interactive` for native
glass without an onPress. Also runs cargo fmt over the Inbox files.
…finished sessions

The drawer drops its Monos section and its Monos/Projects filter, and the
Unread filter that only applied to Monos. useCreateMono now starts a Mono in
the project it was asked from.
Each project's Sessions page pins a collapsible Monos group above its rows
(unassigned Monos on the first project's page), with a plus for a new Mono and
a Monos toggle in the filter menu, remembered per desktop. A session a Mono
started carries a quiet 'via <Mono>' chip that opens its chat; a deleted Mono
shows greyed as 'Mono removed'. Swiping a row left now also archives it, with
an Undo toast where the desktop can unarchive; holding a chip offers to
archive that Mono's finished sessions.
archiveActions says what an archive did in a toast and waits an Undo behind
its archive. The host has no session.unarchive today, so Undo stays off until
the catalog advertises sessionUnarchive; allMonos names every Mono for the
origin chip.
…on a project

A Mono shows whenever any of its projects is picked, one with no project
always, and a session shows only in a picked project, whoever started it.
The picker drops its Monos section but keeps monoIds in the stored shape. The
app never opens on a Mono: an old saved Mono place falls back to that Mono's
project, else the first.
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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