Skip to content

OPE-58 Add Commands sheet client slash actions - #74

Merged
ivanfenenko merged 6 commits into
mainfrom
feature/ope-58-slash-actions
Jul 24, 2026
Merged

ivanfenenko merged 6 commits into
mainfrom
feature/ope-58-slash-actions

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Jul 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add composer Commands / button and bottom sheet for curated client slash actions (new, fork, undo, redo, compact) on iOS and Android
  • Keep typed / as server-command-only; client actions never call POST …/command
  • Map session revert for redo/undo visibility and record the intentional iOS push-vs-replace navigation gap

Docs

  • docs/features/slash-and-at-commands/ope-58-plan.md
  • docs/features/slash-and-at-commands/progress.md
  • docs/features/slash-and-at-commands/parity-gaps.md

Test plan

  • Open Session Chat Commands sheet from / after Attach; confirm allowlist hide rules
  • Confirm typed / suggestions remain server commands only
  • Exercise new, fork (name → Open/Stay), undo, redo, compact on both platforms
  • Confirm failures surface errors and never hit command send
  • Android: ./gradlew :app:testDebugUnitTest --tests 'dev.opencode.mobile.domain.command.ClientSlashActionCatalogTest' --tests 'dev.opencode.mobile.ui.sessionchat.SessionChatViewModelTest'
  • iOS: run ClientSlashActionCatalogTests + SessionChatViewModelTests

Linear

  • OPE-58

Risks / Follow-ups

  • iOS navigates to new/forked sessions via push (child-session destination), not a true backstack replace; documented in parity-gaps.md
  • OPE-81 still owns overflow / message “Fork from here” entry points
  • OPE-80 still owns richer compact UX

Made with Cursor


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

Ship the composer Commands entry and curated new/fork/undo/redo/compact
behaviors on iOS and Android so session lifecycle actions stay separate
from typed server-command suggestions.

Co-authored-by: Cursor <[email protected]>
@linear-code

linear-code Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
OPE-58 Slash actions

Parent

OPE-56 — Slash & @ Commands

What to build

Add a composer Commands entry: IconCircle with / immediately after Attach ([+] [/] … [send]). It opens an OpenCodeBottomSheet titled Commands with curated client slash actions. Selecting a row runs local session behavior and dismisses the sheet. It does not call POST /session/.../command.

Typed / stays OPE-57 server commands only (including skills/MCP). Client actions do not appear in the typed / overlay.

Allowlist

One-line rows: [command] description. Hide inapplicable rows (new always shown).

Command Copy Visible when
new [new] Start a new session Always
fork [fork] Fork this session ≥1 visible user message
undo [undo] Undo last message Undoable user message
redo [redo] Redo undone message Active session revert
compact [compact] Compact session context ≥1 user message + selected composer model

Out of this ticket: share / unshare; desktop-only builtins; model / agent rows.

Behavior

  • Tap → dismiss sheet → run immediately; do not clear the composer draft (except undo/redo composer restore).
  • Opening Commands dismisses any open / or @ suggestion overlay; draft text stays.
  • new: create in current Session Chat worktree, seed model preference like home, replace-navigate to the new session.
  • fork: implement the OPE-81 whole-session path (name dialog → fork → Open / Stay). OPE-58 owns that flow; OPE-81 later wires overflow + message “Fork from here”.
  • undo / redo: web session semantics (abort if busy → revert/unrevert; restore composer on undo). Do not rename message-sheet “Revert message” here.
  • compact: thin POST …/summarize with selected composer model + toast; richer compact UX stays OPE-80.

Acceptance criteria

  • Composer Commands / button after Attach (design-system + gallery) on iOS and Android
  • Commands sheet shows the allowlist with hide rules and [command] description copy
  • Selecting a client action runs local behavior and never submits as a server command
  • Typed / overlay remains server-command-only
  • new / fork / undo / redo / compact behaviors match the plan
  • Unit coverage for visibility gates and client-action vs server-command routing
  • Allowlist and intentional omissions recorded in feature decisions/parity docs

Out of scope

  • Client actions in typed / suggestions
  • Share / unshare
  • Full compact progress/timeline UX (OPE-80)
  • Overflow / message fork entry points (OPE-81 follow-through)
  • Renaming message “Revert message”

Docs

  • Plan: docs/features/slash-and-at-commands/ope-58-plan.md
  • Feature: docs/features/slash-and-at-commands/
  • Research: docs/research/slash-and-at-commands.md

Related

  • OPE-80 — richer compact UX
  • OPE-81 — overflow/message fork entry points after OPE-58 owns the shared fork dialog flow

Branch

feature/ope-58-slash-actions

Review in Linear

ivanfenenko and others added 5 commits July 23, 2026 23:09
Transient errors and client-action notices auto-dismiss via a shared snackbar instead of permanent timeline chrome.

Co-authored-by: Cursor <[email protected]>
Include bottom safe-area inset and the system drag indicator in measured compact detents so short action lists like Commands fit all rows.

Co-authored-by: Cursor <[email protected]>
Keep the intrinsic content height when compact re-layout reports a clipped size, wrap entries in a fixed-size VStack, and raise the compact max so Commands-length lists fit.

Co-authored-by: Cursor <[email protected]>
Start Commands-style sheets on a content detent without a selection binding, and use tight bottom padding so the home-indicator band does not read as a tall empty gap.

Co-authored-by: Cursor <[email protected]>
Use path-based NavigationStack for session open so live home updates do not
pop chat, stabilize bottom-sheet host layout to avoid present crashes, and
tighten action-list bottom padding for the Show all sessions sheet.
@ivanfenenko
ivanfenenko merged commit d8949cf into main Jul 24, 2026
2 checks passed
@ivanfenenko
ivanfenenko deleted the feature/ope-58-slash-actions branch July 24, 2026 10:12
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