Skip to content

Commit staged revert on OpenCode 2.x #751

Closed

Description

@ivanfenenko

Why

On v2, revert is two steps: stage, then commit. The app can stage and clear a revert, but never commits it. The web app and TUI commit the staged revert when the user sends the next message (packages/app/src/composer/submit.ts:500). Without it, a revert from the phone stays pending.

Current state

Upstream API (v2)

  • POST /api/session/{sessionID}/revert/commit (no body); emits session.revert.committed

App files

  • Android: data/remote/SessionsApi.kt, composer submit path
  • iOS: Data/Remote/SessionsAPIClient.swift, composer submit path

Acceptance criteria

  • Sending a prompt while a revert is staged commits it first (matches web/TUI)
  • v1 behaviour unchanged
  • Test: staged revert + send calls commit before prompt

Activity

  1. added a commit that references this issue on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions