feat(mobile): create "No project" sessions from the composer and Home
Merged
SA
2mo ago+161+161+012345678901234567890123456789-138-138-012345678901234567890123456789
Links
- Screenshots (sim, against production): https://app.superset.sh/page/mobile-no-project-29hsxp
Summary
- The mobile composer's project picker offers "No project" first, like desktop's picker. Sending creates a project-less session through the host's
workspaces.createSession, the backend desktop already uses. - Home's "No project" section gets a "+" that preselects it and focuses the composer.
- That section now ranks by activity like any project and actually collapses. The creating screen skips worktree steps for a session.
Why / Context
Desktop has had project-less sessions since #6274 (host 1.19.0, below the 1.21.0 floor), but mobile could only create into a project. On a host with no projects the composer had nothing to create into at all.
How It Works
NewChatTarget.projectIdbecomesstring | null. Null means "No project", matching desktop'sprojectId === nullconvention.targetKeyFor(null, machineId)keys it asnone:<machineId>, so the last pick persists like any other.useNewChatTargetsadds the "No project" target per online host, sorted first, only once that host'sproject.listhas answered. Otherwise it's briefly the only target, becomes the default, and a quick send starts a session where the last-used project was meant.useCreateTerminalWorkspacecallscreateSessionwhenprojectIdis null, andcreateEnqueued(with the legacycreatefallback) otherwise. The optimistic flow is unchanged: mint the id, push the workspace screen, poll until the row and terminal appear, retry from the failed state. After a synchronous create both paths refetch the host's workspace and terminal lists (refetchCreated), so the screen doesn't wait for the next poll.NewChatWidget: no branch query or branch chip for a session, and no letter avatar on the chip.HomeScreen: "No project" is built as one of the sections instead of a separate block appended at the bottom. So it ranks by activity and uses the collapse store, which its caret already wrote to but the list never read.WorkspaceCreatingState: a session showsPreparing → Starting <agent>with~10s typical, instead of fetch/worktree steps that never happen.
Manual QA Checklist
iPhone 17 Pro Max sim (iOS 26), production API, host satyas-mbp 1.29.0. Screenshots of each are on the linked page.
- Home shows "No project" (2 existing sessions) with the box icon and "+", ranked among projects by activity
- "+" on "No project" focuses the composer with "No project" preselected, with no branch chip or avatar
- Picker lists "No project" first and checked. Picking Boid Home restores its avatar and
mainchip; picking "No project" again removes them - Send → "Creating workspace · No project", Preparing → Starting Claude. Agent running ~8s after send
- Host lists the result as
type: sessionat~/.superset/sessions/sedate-teacher, with an AI title. Claude replied to the prompt - Back on Home the new session leads "No project" (count 3)
- "No project" caret collapses and re-expands the section
- Test session deleted with
superset ws delete --local; folder removed - Not exercised: relay 30s timeout on a session create (see Known Limitations), host offline, attachments on a session create
Testing
bunx turbo run typecheck --filter=@superset/mobile: no errors in touched files. The only failures are the known local-onlyunreferrors inpackages/port-scannerandpackages/workspace-fsbunx biome check apps/mobile packages/i18nbun testinapps/mobile: 94 passbun run check:i18n: 0 missing in every locale. No new strings; the catalog diff drops mobile's~{TYPICAL_SECONDS}s typicalduplicate because it now reuses desktop's~{totalSeconds}s typical
Design Decisions
- "No project" in copy, not "session": in mobile's UI "session" already means a terminal tab ("New session", "Manage sessions"), so the new UI never says "session". Code still uses
isSession, matching the backend. - No enqueued variant for sessions:
createSessionis synchronous on the host, and desktop calls it synchronously too. It has no worktree work, so it's well under the relay cap in practice.
Known Limitations
- A session create is one request, so the relay's 30s cap applies as it does to creates on older hosts. If it times out, the screen shows the "unknown" failure and keeps polling, which heals it when the row lands.
createSessionis idempotent on the optimistic id.
Summary by cubic
Lets the mobile composer and Home create "No project" sessions, matching desktop's project-less workspaces. Previously mobile could only create into a project, so on a host with no projects the composer had nothing to create into.
- The composer's project picker lists "No project" first, and the Home section of the same name gets a "+" that preselects it and focuses the composer.
- "No project" joins the target list only after the host's project list resolves, so it can't briefly become the default and intercept a quick send.
- Sending calls the host's
workspaces.createSession; the optimistic create flow is unchanged, and both create paths refetch the host's workspace and terminal lists after a synchronous create. - The Home "No project" section ranks by activity like any project and honors its collapse state, which it previously stored but never applied.
- Session creates skip the fetch and worktree steps in the creating screen and show a shorter
Preparing → Starting <agent>flow. NewChatTarget.projectIdis nowstring | null, where null means "No project"; the last pick persists via anone:<machineId>key, and the composer shows no branch chip or avatar for sessions.
Known Limitations
- A session create is a single request, so the relay's 30-second cap applies; if it times out, the screen shows the unknown failure, retries on the same id, and keeps polling, which heals it when the row lands.
Summary by CodeRabbit
-
New Features
- Added a “No project” option for creating standalone sessions.
- No-project sessions now appear alongside regular project sections and can be created directly.
- Added distinct icons and navigation behavior for standalone sessions.
-
Bug Fixes
- Improved session creation progress states with session-specific preparation messaging and timing.
- Updated localized duration estimates to use the correct value consistently.