Skip to content

Tool group route closes when its group is older than the loaded window #1063

Open

Description

@ivanfenenko

Follow-up from #1051 (#1033) review: medium-severity findings that are real but out of scope for that PR.

Tool group route closes when its group is older than the loaded window (Android)

android/app/src/main/java/dev/opencode/mobile/ui/sessionchat/SessionToolGroupViewModel.kt (next, the live Messages / CacheSyncConfirmed branch)

Since #1051, the tool group route key carries member block ids only, and the route reads its members from the session's transcript in the message store. A live Messages or CacheSyncConfirmed update that holds none of the route's members is treated as Gone, and the route goes back.

After process death, the store holds only the cached timeline (the newest messages within its budget) plus the REST tail. If the open group sits in older history, the route closes even though the group still exists on the server. The user can scroll back and reopen it, so nothing is lost, but the restored screen is dismissed.

Possible approach: when the update has hasOlder and the route's members are missing, page older history until the route's owning message is loaded (or a bounded number of pages) before deciding Gone, and show a loading state meanwhile. The iOS route should be checked for the same behavior.

Acceptance

  • Restoring a tool group route whose group is older than the loaded tail shows the group, not a pop back.
  • A group that was really reverted or compacted away still closes the route.

Activity

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