Skip to content

Mobile: apply a thread's permissions pick right away, not on the next message #72

Open

Description

@chrisohearn

Follow-up to #70, which fixed this on web and desktop.

Problem

On mobile, changing a thread's Permissions (runtime mode) only writes the composer draft. The real thread.runtime-mode.set is sent only when the next message is delivered:

  • apps/mobile/src/features/threads/ThreadSettingsSheet.tsx (onUpdateRuntimeMode)
  • apps/mobile/src/features/threads/ThreadRouteScreen.tsx (composer.runtimeMode ?? selectedThread.runtimeMode)
  • apps/mobile/src/state/threadOutboxDelivery.ts, which sets the mode before dispatching each queued message

This causes three problems:

  • An idle thread can't change mode without posting into it. For a thread like the Jarvis inbox, posting wakes another agent.
  • The UI shows a mode the server does not have.
  • A message queued during a run sends the mode change mid-run.

What #70 changed on the server

  • An owner's thread.runtime-mode.set to the thread's current mode is now a no-op: no event, and no session detach.
  • An owner's change is now refused while a run is active, if it would detach a live session (for example Claude). Mobile outbox delivery that sets a different mode mid-run on a Claude thread now gets this refusal, where before the run was ended.

Wanted (match web)

  • On an idle server thread, send thread.runtime-mode.set as soon as the user picks.
  • Hold the pick until the thread shell shows it, and don't save it in the draft.
  • On refusal, show the server's reason and reset the control.
  • While a run is active, refuse in the client.
  • Stop setting the mode at message delivery.

See apps/web/src/components/chat/useApplyThreadRuntimeMode.ts and useComposerSelection.ts in #70.

Activity

  1. chrisohearn commented on Nov 13, 2026

    @chrisohearn
    OwnerAuthor

    Status: still valid. PR #70 fixed web and desktop only; it touched nothing under apps/mobile. Ledger: ops/web-apply-runtime-mode-now (links this issue).

    Triage by the round-four GitHub hygiene pass (ledger key r4/w7-github), 2026-11-13. Left open.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions