Skip to content

Default to agent mode and retain composer mode per channel #59

Closed

Description

@iamnbutler

New channels should be ready to ask the agent, and changing channels should not undo a deliberate composer-mode choice.

  • Default a new channel's composer to agent mode, including channels without a selected model or initial draft.
  • Keep the selected agent/message mode per channel across sends and navigating away and back; another channel's choice must not overwrite it.
  • Preserve the shortcut that landed in ../ace-old: Esc leaves agent mode for message mode; double Esc within 350 ms enters agent mode from message mode. Keep draft text intact and preserve Escape's existing edit/menu dismissal behavior.
  • Verify the default, persistence, and keyboard transitions in the desktop composer, including sending after each transition.

Current behavior: apps/app/src/composer.tsx:49 derives mode from draft || channel.model; mode is component state, and apps/app/src/app.tsx:431 remounts the channel on navigation. Sending already preserves mode in the shared composer. The Escape handler already exists at packages/ui/src/components/composer/chat-composer.tsx:995; verify its integration rather than adding a Tab binding.

Legacy reference: ace-old commit 8d875cb43aa20a2353c4d5fe7914e21af0f0d109, clients/app/src/context/sessions/core.tsx:644 (per-channel in-memory mode) and packages/ace.ui/src/components/composer/chat-composer.tsx:1015 (Escape behavior). The agent-first default is the requested behavior; that legacy snapshot itself defaults to message mode.

Tracked by #5 (dogfooding core/QOL); also part of old-Ace restoration in #6.

Activity

  1. iamnbutler commented on Oct 6, 2026

    @iamnbutler
    ContributorAuthor

    Follow-up to consider, not a blocker. Found during the real headless-browser smoke for #165 (#77, dogfooding #5).

    Just opening a channel in the default Ace mode inserts the @ace mode mention. That edit is saved as a draft for /channels/<id>, with the mention's avatar data URI, about 6 KB per channel visited. The old bundle already did this, writing the same @ace-only draft to sessionStorage. With #165 it now persists in localStorage across restarts.

    No user text is lost. Reopening a channel just restores the @ace chip, and sends and discards still clear drafts. #165 intentionally leaves the editor document and mode behavior unchanged. This belongs with the composer mode and default-mention insertion work here. One option is to not save a mode-mention-only document as a draft, or to keep the avatar out of the stored mention.

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