Skip to content

OPE-156: Skip All chip and new-session picker with one project #462

Closed

Description

@ivanfenenko

When home has fewer than two added projects, All is a no-op filter and New session still opens a project picker. Collapse that chrome so a single-project home goes straight to creating a session.

Why

Default tester path is one added project. Today the dock always prepends All, and New session always presents the project picker sheet — even when there is only one (or zero) choice.

With one project, All and the project chip show the same session list. The picker is a one-row sheet that only delays createSession(worktree).

Current behavior

Both platforms always build tabs as All + every added project, default selection all, and New session always sets showNewSessionProjectPicker = true.

  • iOS: ProjectListHomeView.sessionListFilterTabs + onNewSession in ProjectListHomeView.swift
  • Android: toSessionListFilterTabs + onRequestNewSessionProjectPicker in MainScreen.kt
  • Dock is already fine with an empty tab list (action row stays). Callers never omit All, so the chip row is never empty.
  • Zero projects: picker still opens with a disabled No projects row.
  • OPE-108 falls back to All after remove — that fallback is wrong once All is hidden.

Filter fallback today: if the stored id is missing from tabs, both platforms snap to all. If All is omitted, that lands on an id that is not in the row.

What to build

Rule: added-project count < 2.

  1. Hide All when there are 0 or 1 added projects.
    • 1 project: dock shows only that project chip (name, count, selected × for remove).
    • 0 projects: omit the chip row entirely; keep Add project / New session. Do not leave an empty scroll strip.
  2. Skip the New session sheet when there are 0 or 1 added projects.
    • 1 project: call createSession on that worktree immediately (same optimistic navigation as after picker select).
    • 0 projects: do not present the sheet and do not create a session. Add project remains the path. Leave the New session button enabled (no extra disable state).
  3. 2+ projects unchanged: All + per-project chips; New session still opens the picker.
  4. Selection fallback: when All is omitted, default/fallback to the sole project id — never all.
    • Remove down to 1: select the remaining project (update the OPE-108 All fallback).
    • Remove last: existing empty state.
    • Add a second project: All reappears; keep the previously selected project chip (do not jump to All).

Keep the single project chip. Hiding it would remove the only × target for remove.

Out of scope

  • Skipping the picker when 2+ projects are added and a project chip is already selected (possible follow-up).
  • Worktree chips / git worktree UX.
  • Disabling New session when there are zero projects.
  • Changing picker copy or layout for the 2+ case.

Implementation notes

Home owns the rule (tab construction + New session gate). Dock stays a dumb renderer of the tabs it is given.

  • Tab builders: iOS sessionListFilterTabs(sessionCount:), Android toSessionListFilterTabs.
  • New session: iOS onNewSession in homeProjectsList; Android onRequestNewSessionProjectPicker.
  • Collapse empty chip row in OpenCodeSessionListDock (both) if filterTabs is empty.
  • Docs: docs/design-system/components/session-list.md (All is not required when < 2 projects), session-list-dock.md (empty chip row collapsed).
  • Gallery: add a 1-project dock / Session List sample (All absent; New session does not need a sheet in gallery).

Analytics: single-project create should not fire home_open_new_session_project_picker / sheet present. Reuse the existing create-session path events.

Acceptance criteria

  • 0 added projects: no All chip, no empty chip strip; New session does not open the picker; no session is created
  • 1 added project: dock shows only that project chip; New session creates in that worktree with no sheet
  • 2+ added projects: All + project chips remain; New session still opens the picker
  • Single project chip stays selected so × remove still works (OPE-108)
  • Removing down to 1 selects the remaining project; removing the last still shows empty state
  • Adding a second project restores All without jumping the current project filter to All
  • Same behavior on iOS and Android
  • Design-system docs + gallery 1-project sample
  • Tests for tab construction (0 / 1 / 2+) and the skip-picker create path

Remaining: none. Pre-merge device smoke was accepted at merge.

Docs: docs/features/skip-all-chip-one-project/


Imported from Linear OPE-156. Linear status: Done. Priority: Medium. Created 2026-08-13. Completed 2026-08-16.
Related: OPE-108, OPE-160.

Activity

  1. self-assigned this
    on Oct 11, 2026
  2. added
    ios
    android
    shared
    improvement
    priority: medium
    on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

androidimprovementiospriority: mediumshared

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions