Skip to content

feat(mobile): rename, delete, and create session groups on iOS and Android - #101234

Merged
steipete merged 2 commits into
mainfrom
claude/mobile-session-groups
Jul 7, 2026
Merged

steipete merged 2 commits into
mainfrom
claude/mobile-session-groups

Conversation

@steipete

@steipete steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Closes #101231
Related: #101117

What Problem This Solves

iOS and Android gained session grouping in #100814, but groups there are write-once: no rename, no delete, and a group only exists while a session carries its category. The web sidebar got full group management in #101117; mobile users were left re-assigning member sessions one by one to reorganize.

Why This Change Was Made

Both platforms mirror the web semantics. Category section headers gain group actions — a context menu on the iOS Command Center sessions screen ("Rename Group…", "New Group…", "Delete Group…") and a long-press menu on the Android sessions screen. Rename and delete enumerate every member with two sessions.list calls (active + archived) using an explicit high limit (the gateway caps an absent limit at 100 rows — the same cap the web implementation had to page past), then patch category per member best-effort so one failure cannot strand the rest; archived members are included so restores land in the renamed group. Delete keeps sessions and moves them back to Ungrouped. Known custom group names persist client-side (iOS UserDefaults key openclaw:sessions:custom-groups, matching the web localStorage key; Android SharedPreferences sessions.customGroups), so header-created empty groups render as sections and stay usable as move targets. iOS bulk-op enumeration/merge lives in pure CommandSessionGrouping.members; Android's lives in ChatController, keeping the controller gateway-only.

Non-goals: no group-by on/off toggle on mobile (the mobile screens keep their existing filter/sort controls), and no gateway/protocol changes.

User Impact

Mobile session groups become maintainable in place: rename a group once instead of per session, delete a group without losing its sessions, and create an empty group before filling it. Group names created or renamed on any platform are the same server-side category values, so web and mobile stay consistent.

Evidence

  • Android: pnpm android:test (:app:testPlayDebugUnitTest) green locally including new tests — known-groups empty-section merge and ChatController bulk-op tests asserting per-member patch payloads (archived-only member included), category:null on delete, best-effort continuation past a failing patch, and the explicit limit:10000 enumeration. pnpm android:lint (ktlint) green.
  • iOS: pnpm ios:build green (full app typecheck). Focused simulator tests green for CommandSessionGroupingTests (known-groups sections, member merge/dedupe) and SessionGroupStoreTests (normalize/rename/remove/UserDefaults round-trip). The unrelated OpenClawTypographyTests failure reproduces on current main (offenders introduced by feat(ios): record and send voice notes from the chat composer #100946/feat(ios): tap-to-expand link previews in chat transcript #101198 in apps/shared chat files this PR does not touch) and is tracked separately.
  • pnpm native:i18n:check clean after inventory sync (strings follow the existing plain-literal style of these surfaces).
  • Autoreview (Codex, gpt-5.5) on the feature commit: clean — no findings, "patch is correct" (confidence 0.82).

…S and Android

Group section headers on the iOS Command Center sessions screen and the
Android sessions screen gain Rename/New/Delete group actions. Bulk ops
enumerate every member (active + archived, explicit high list limit since
the gateway caps an absent limit at 100 rows) and patch category per
session; delete keeps sessions and moves them to Ungrouped. Known custom
groups persist client-side (iOS UserDefaults, Android SharedPreferences)
so empty groups stay visible as move targets.
@openclaw-barnacle openclaw-barnacle Bot added app: android App: android app: ios App: ios size: L maintainer Maintainer-authored PR labels Jul 6, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aec7555275

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1023 to +1024
if let firstError {
throw firstError

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep refreshing after partial group patch failures

When a rename/delete reaches at least one member but any single patchSession call fails, this throw makes performMutation skip refreshSessions() and instead set loadErrorText, so the sessions screen can stay stale (or show the error row) even though the earlier member patches already changed server state. Since this bulk path is explicitly best-effort, refresh the list before surfacing the first member error so the UI reflects the successful patches.

Useful? React with 👍 / 👎.

@clawsweeper

clawsweeper Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 6, 2026, 8:08 PM ET / 00:08 UTC.

Summary
The PR adds iOS and Android session group header actions for renaming, creating empty groups, and deleting groups while persisting custom group names locally and bulk-patching member session categories.

PR surface: Other +796. Total +796 across 13 files.

Reproducibility: yes. source-reproducible for the review finding: on the PR head, iOS throws after a partial member-patch failure, while performMutation refreshes only on success. I did not run a simulator/device reproduction in this read-only review.

Review metrics: 1 noteworthy metric.

  • Persisted mobile group stores: 2 added: iOS UserDefaults and Android SharedPreferences. The PR adds client-side state that keeps empty groups visible, so reviewers should verify upgrade and empty-section behavior before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #101231
Summary: This PR is the open implementation candidate for the canonical mobile session group-management issue; the merged web PR is an adjacent reference, not a replacement.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Fix the iOS partial-failure refresh path so successful member patches are reflected before an error is shown.
  • [P1] Add redacted simulator or device proof for iOS and Android rename, delete, and create-empty group flows.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body provides tests/build/lint/i18n evidence, but no redacted simulator/device screenshots, recording, live output, or logs proving the changed iOS and Android group-management flow after the fix; update the PR body with that proof for a fresh ClawSweeper review.

Risk before merge

  • [P1] iOS can leave the sessions screen stale after partial group rename/delete failures because successful member patches happen before the thrown first error skips refresh.
  • [P1] The PR only provides tests/build/i18n evidence; the visible mobile menu and dialog flow still needs redacted simulator or device proof before merge.
  • [P1] The PR adds local custom group-name persistence on both mobile clients, so maintainers should confirm that this is the intended mobile parity state surface.

Maintainer options:

  1. Fix and prove the mobile fan-out path (recommended)
    Refresh iOS sessions after any completed member patch before surfacing the first error, then add redacted simulator or device proof for rename/delete/create flows.
  2. Accept the current best-effort error behavior
    Maintainers can intentionally accept stale iOS UI after partial fan-out failures, but that would leave users seeing an error state that does not reflect server changes already applied.
  3. Pause until product direction is confirmed
    If mobile group management is not confirmed for first-party apps, pause or close this PR rather than landing new persisted mobile state.

Next step before merge

  • [P1] The protected feature PR needs maintainer handling, a contributor-supplied real behavior proof update, and a fix for the iOS partial-refresh finding before merge.

Maintainer decision needed

  • Question: Should first-party iOS and Android ship web-parity session group management now, after the iOS partial-refresh bug and real-behavior proof gap are fixed?
  • Rationale: This is a protected maintainer-labeled feature PR that adds mobile UX and persistent client-side group state; automation can point out defects but should not decide the product scope.
  • Likely owner: steipete — He owns the recent mobile baseline, web reference, and current parity implementation history.
  • Options:
    • Ship mobile parity after fixes (recommended): Fix the iOS partial-failure refresh path, add real mobile proof, and then continue normal maintainer review toward landing.
    • Narrow the mobile scope: Ask the PR to reduce scope to one platform or fewer group actions while keeping the linked issue as the parity tracker.
    • Keep management web-only for now: Close or defer this PR and the linked issue with a clear product decision that mobile grouping stays write-once for now.

Security
Cleared: The diff only touches native app session UI/runtime code, tests, and native i18n inventory; I found no dependency, workflow, secret, package, or supply-chain change.

Review findings

  • [P2] Refresh after partial group patch failures — apps/ios/Sources/Design/CommandCenterTab.swift:1024
Review details

Best possible solution:

Land mobile parity only after iOS refreshes following partial fan-out failures and the contributor adds redacted simulator or device proof of the group menu/dialog flow; keep the no-new-gateway-RPC shape if maintainers accept the web-parity direction.

Do we have a high-confidence way to reproduce the issue?

Yes, source-reproducible for the review finding: on the PR head, iOS throws after a partial member-patch failure, while performMutation refreshes only on success. I did not run a simulator/device reproduction in this read-only review.

Is this the best way to solve the issue?

No, not as submitted: the owner boundary is reasonable and mirrors the merged web implementation without a gateway protocol change, but iOS needs to refresh after partial best-effort failures and the PR needs real mobile behavior proof.

Full review comments:

  • [P2] Refresh after partial group patch failures — apps/ios/Sources/Design/CommandCenterTab.swift:1024
    When one member patch succeeds and a later patch fails, this throw makes performMutation take the catch path and skip refreshSessions(). Since the operation is explicitly best-effort, the iOS screen can keep showing stale group membership even though earlier server patches already changed categories; refresh before surfacing the first error, matching the Android/web sibling behavior.
    Confidence: 0.88

Overall correctness: patch is incorrect
Overall confidence: 0.86

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2b3a985b116e.

Label changes

Label changes:

  • add P2: This is a normal-priority mobile UX parity feature with a concrete P2 correctness bug and a workaround through per-session moves or web management.
  • add merge-risk: 🚨 session-state: The PR bulk-mutates session category metadata across active and archived sessions, and the current iOS path can leave the visible session state stale after partial failures.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body provides tests/build/lint/i18n evidence, but no redacted simulator/device screenshots, recording, live output, or logs proving the changed iOS and Android group-management flow after the fix; update the PR body with that proof for a fresh ClawSweeper review.

Label justifications:

  • P2: This is a normal-priority mobile UX parity feature with a concrete P2 correctness bug and a workaround through per-session moves or web management.
  • merge-risk: 🚨 session-state: The PR bulk-mutates session category metadata across active and archived sessions, and the current iOS path can leave the visible session state stale after partial failures.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body provides tests/build/lint/i18n evidence, but no redacted simulator/device screenshots, recording, live output, or logs proving the changed iOS and Android group-management flow after the fix; update the PR body with that proof for a fresh ClawSweeper review.
Evidence reviewed

PR surface:

Other +796. Total +796 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 13 874 78 +796
Total 13 874 78 +796

What I checked:

Likely related people:

  • steipete: Authored the baseline mobile session management PR, the merged web group-management reference, and the current mobile parity branch touching the same iOS/Android session surfaces. (role: feature-history owner and recent area contributor; confidence: high; commits: 88f1ec38d4a5, 5157446a2c35, aec75552750b; files: apps/ios/Sources/Design/CommandCenterTab.swift, apps/ios/Sources/Design/CommandSessionGrouping.swift, apps/android/app/src/main/java/ai/openclaw/app/ui/SessionsScreen.kt)
  • xingzhou: Current-main blame/log shows recent broad mobile file history on the affected iOS and Android files, though the session-group feature history points more directly to steipete. (role: recent adjacent contributor; confidence: low; commits: e80e8a2b6730; files: apps/ios/Sources/Design/CommandCenterTab.swift, apps/android/app/src/main/java/ai/openclaw/app/ui/SessionsScreen.kt, apps/android/app/src/main/java/ai/openclaw/app/chat/ChatController.kt)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 4c97aa1 into main Jul 7, 2026
78 checks passed
@steipete
steipete deleted the claude/mobile-session-groups branch July 7, 2026 00:09
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Jul 7, 2026
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 7, 2026
…droid (openclaw#101234)

* feat(mobile): rename, delete, and create sidebar session groups on iOS and Android

Group section headers on the iOS Command Center sessions screen and the
Android sessions screen gain Rename/New/Delete group actions. Bulk ops
enumerate every member (active + archived, explicit high list limit since
the gateway caps an absent limit at 100 rows) and patch category per
session; delete keeps sessions and moves them to Ungrouped. Known custom
groups persist client-side (iOS UserDefaults, Android SharedPreferences)
so empty groups stay visible as move targets.

* chore(i18n): refresh native string inventory after rebase onto main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: ios App: ios maintainer Maintainer-authored PR merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS and Android session groups cannot be renamed, deleted, or created empty

1 participant