-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Feature]: Chat session management: pin, archive, rename, and search across gateway and mobile apps #100712
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PRMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PRMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
Summary
Give chat sessions real management across the gateway and the mobile apps: pin, archive (with a reachable archived list), rename, and search.
Problem to solve
The iOS and Android apps show chat sessions as a flat, recency-ordered list with create/switch/reset only. There is no way from the apps to pin an important session, rename one to something meaningful, archive old ones (or see archived sessions at all), or search across sessions. On gateways with many sessions this makes the session list hard to use.
The gateway session store already persists the needed metadata (
label,pinnedAt,archivedAt) andsessions.listalready supportssearchandarchivedfilters with pinned-first ordering, but the only mutation surface (sessions.patch) requires theoperator.adminscope. The Android app intentionally connects as a bounded operator without admin scope, so it cannot pin, rename, or archive sessions even though the store supports it.Proposed solution
operator.writeclients to mutate the user-level chat-organization fields only (label,pinned,archived) via the existingsessions.patchmethod, using a params-aware scope check (same mechanism asplugins.sessionAction). Patches touching any other field keep requiringoperator.admin(fail closed). Keep existing guards: no archiving sessions with active runs, no archiving an agent's main session, webchat mutations stay rejected. Make session list ordering fully deterministic (stable tiebreaker for equal timestamps). Add RPC test coverage for pin/rename/archive/search flows.sessions.listsearch with local filtering fallback for cached lists.ChatController+ the sessions screen, with the same server search and cached-list fallback.No protocol schema changes are needed:
sessions.patchparams already includelabel/pinned/archived,sessions.listalready acceptssearch/archived, and session rows already project those fields.Alternatives considered
sessions.update) carrying only the safe fields: rejected because it duplicates the existing mutation path for the same fields and adds protocol/codegen surface for no behavioral gain.operator.admin: rejected; the Android operator session is deliberately least-privilege, and rename/pin/archive do not justify admin.Impact
Evidence/examples
src/config/sessions/types.ts(pinnedAt,archivedAt,label)src/gateway/server-methods/sessions.ts(sessions.patchhandler)src/gateway/session-utils.ts(filterSessionEntries,compareSessionEntryPairs)src/gateway/method-scopes.ts,src/gateway/methods/core-descriptors.tsapps/android/app/src/main/java/ai/openclaw/app/node/ConnectionManager.kt(nativeClientOperatorScopes)apps/ios/Sources/Design/CommandCenterTab.swift(CommandSessionsScreen)Additional information
Planned landing order: gateway PR first, then iOS and Android client PRs stacked on it.