Skip to content

feat: a saved A2UI card outlives its chat #86

Description

@Lancetnik

Is your feature request related to a problem?

A rendered card is not stored anywhere. durable_surfaces_from_messages() rebuilds every
A2UISurface from the chat's own message log on replay (gateway/core.py), and the data-model
updates a server action produces (A2UISurfaceDataUpdated) are events on that one chat's stream.

So a card exists only inside the thread that produced it. Ask the assistant in a new chat to
update the tracker it drew yesterday and there is nothing to update; have a scheduled task
refresh a dashboard card and it has no handle on it; delete the chat and the card is gone.

Describe the solution you'd like

Every card the agent creates becomes a file under profiles/<id>/files/ at the moment it is
created, and the thread renders that. One class of object — no "saved" versus "unsaved" card, no
pin gesture to remember.

Consequences that are the point:

  • the card is visible in the Files tree like any other artifact, and reachable outside the chat
    it came from
  • the agent can update its data model in a later session, or from a task run, by addressing the
    file
  • a card can be read, diffed and copied between profiles

Storing them inside the agent's own file space (rather than a private sibling directory) is
deliberate: the agent reaches them with ordinary file tools, and so does the user.

Alternatives considered

  • Only explicitly saved cards get a file — rejected: it splits cards into two classes and
    adds a gesture to remember.
  • Snapshot-on-write archive, chat stays the source of truth — rejected: a dead copy solves
    reading, not updating, and updating is the ask.

Additional context

  • src/assistant/gateway/core.py_emit_a2ui_surfaces, durable_surfaces_from_messages
  • src/assistant/a2ui.pydurable_surfaces_from_messages, update_data_value
  • src/assistant/gateway/app.py — the server-action path that emits A2UISurfaceDataUpdated
  • src/assistant/events.pyA2UISurface, A2UISurfaceDataUpdated
  • ADR 0001 (single root directory), ADR 0012 (file references resolve by path)

Right now the way to reach a saved card outside a chat is the Files tree; a dedicated Live
Artifacts surface is tracked as a direction on the parent issue.

See also: #68 (tasks as editable files) — same instinct, a stored entity gets a file form.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions