Skip to content

Make xmd repl operable from its visible terminal interface #870

Description

@taras

Story

As a person opening xmd repl for the first time, I want the terminal to show
what I can do, what I am currently reading, and why an action is unavailable,
so I can run entries, follow Agent work, answer interactions, inspect history,
and return to the live execution without memorizing an undocumented key map.

Common path

Run xmd repl in an ordinary terminal. Starting from the empty screen, use only
what the screen itself communicates to:

  1. type and submit Entry 1;
  2. recognize whether it is running, waiting, failed, cancelled, or complete;
  3. move between Entries and Sessions and return to the same selected entry;
  4. open and complete an Elicit, Plan review, or Agent permission when one is
    waiting;
  5. inspect an earlier History position and return to [live]; and
  6. submit Entry 2 after Entry 1 has completely settled.

The same path remains understandable and operable in a normal wide terminal and
at the supported 72x20 minimum. A mouse may make an action faster, but the
keyboard path is complete.

Current gap

The delivered REPL has the execution, reconstruction, Entries, Sessions,
History, forms, permissions, focus, scrolling, and responsive-layout machinery
needed for this journey. Its evidence generally drives known control keys or
preselected actions, however. No production Story owns the first-use contract:
that an unfamiliar person can discover the interaction model from the rendered
terminal and finish the common path without reading the specification or test
helpers first.

That distinction matters because a control can be mounted, targetable, and
correct once activated while the product remains unusable to someone who cannot
tell how to reach it, what it will do, which state is selected, or why pressing
Enter changed nothing.

Contract

The screen teaches the interaction

  • The visible interface communicates the keyboard operations needed for the
    common path: edit, move focus forward and backward, activate, dismiss, and
    leave the REPL safely.
  • A person does not need a hidden shortcut to reach or activate any essential
    control. Pointer activation remains equivalent to activating the same visible
    control from the keyboard.
  • Guidance stays concise enough to leave the transcript, contextual drawer, and
    fixed History footer usable at 72x20. If guidance has a detailed form, the
    way to open and close it is itself visible.
  • Instructions describe the action available in the current context. They do
    not advertise a control that is absent, disabled, historical, or outside the
    mounted surface.

The screen explains its state

  • The active surface, selected entry, focused control, live-versus-historical
    position, and entry outcome are distinguishable in the rendered frame rather
    than only in the URL or application model.
  • When Run is unavailable because an entry is active, teardown is unfinished,
    or History is being inspected, the refusal remains visible and the draft
    remains byte-for-byte intact.
  • Waiting questions and permissions are discoverable without opening
    themselves or stealing focus. After activation, the drawer identifies what
    it belongs to, exposes every required field or choice, and communicates how
    to submit or dismiss it.
  • Windowed Entries, Sessions, forms, permissions, and History make both the
    existence and direction of additional content apparent. Every essential row
    remains reachable after resize, and the first scroll action moves the visible
    window.
  • Returning from Sessions, a drawer, or History restores a meaningful visible
    locus instead of leaving focus on an absent control.

Existing truth and ownership remain unchanged

  • The Journal and canonical location remain the only durable execution and view
    state. Help text, visual emphasis, and other presentation state do not become
    durable records or change replay.
  • Background Agent activity, permission arrival, entry completion, and terminal
    resize may repaint status but do not select themselves, change the Sessions
    filter, open a drawer, move the History position, or steal focus.
  • Narrow composition still mounts only the routed outlet. Making navigation
    discoverable does not restore hidden panes or make clipped controls
    targetable.
  • One command owns one terminal reader and at most one live entry task. This
    Story changes how the existing state is understood and operated, not its
    execution or persistence semantics.

Acceptance

  • A fresh real-terminal journey, given only the command to run, completes the
    common path using instructions and controls visible in the terminal.
  • The journey proves forward and backward focus traversal, Enter activation,
    Escape dismissal, and pointer activation against the exact rendered frame.
  • At both a normal wide size and 72x20, the frame exposes a route between
    Entries and Sessions, access to History and [live], access to every waiting
    interaction, and a way to leave the REPL without obscuring the selected
    transcript or draft.
  • A multi-entry Plan journey distinguishes queued, streaming, waiting,
    terminal, recorded, failed, and completed states where they occur. Selecting
    an earlier entry hides the live transcript overlay but never removes the
    execution-wide Sessions chronology.
  • Refused Run, invalid form submission, unavailable historical action, and a
    too-small terminal each explain the problem without dropping the draft,
    mutating retained history, or leaving an invisible actionable control.
  • A cold reopen renders the same selected state and usable controls without
    contacting a provider. Presentation-only additions do not change the Journal
    bytes.
  • Removing the visible interaction guidance or selected/live-state indication
    makes the first-use journey fail even though the underlying actions still
    exist. Mounting an essential control outside the placed frame likewise fails
    its rendered-frame evidence.

Evidence

Drive the production command boundary, terminal input decoder, mounted Freedom
tree, layout, renderer, real packaged Plan, Agent stream, contextual drawers,
Journal, and canonical location. Assert what the terminal actually renders and
what a pointer can target; reducer descriptions or action keys alone are not
sufficient evidence for discoverability.

Keep asynchronous waits bounded by real-time deadlines and report the rendered
screen on timeout. Preserve the existing wide, medium, narrow, cold-reopen, and
terminal-teardown evidence while adding the first-use journey.

Relationships

Out of scope

  • Forking from a historical position or defining the durable semantics of a
    fork.
  • Renaming, deleting, importing, or otherwise managing Agent sessions.
  • Provider-native terminal handoff, provider-TUI mirroring, or xmd tail.
  • A new Journal record family, snapshot, sidecar state, public terminal UI
    package, or replacement renderer.
  • Adding the interactive REPL to Workflow.

Reference resources

Activity

  1. added
    enhancementNew feature or request
    UXUser-facing usability and interaction improvements
    on Oct 2, 2026
  2. added 7 commits that reference this issue on Oct 2, 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

    UXUser-facing usability and interaction improvementsenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions