Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,9 @@ during the wait.

### Running state + reconciliation
- The sidebar subscribes to the `running` channel, backed by `subscribeRunningSessions()` in `lib/rpc-manager.ts`, so running badges update without polling.
- An open chat subscribes to `running` too: when its session shows up there while the chat has no `session` stream (the run started after the chat loaded: another tab or device, or a send from a chat instance the user switched away from), it reads `GET /api/agent/[id]` and attaches exactly as on load (`attachLiveRun`). Without it the chat stayed idle beside a running badge until a reload.
- The lookup waits for the chat's own work: its mount load while in flight (a stream attached before that load lands would make its `agent_start` drop the load), a stream of its own still connecting (its readiness wait can still fail and close it), and a local send, `!` command, Edit or manual compaction until it settles. The frame is kept meanwhile, and the operation's release rechecks it (`runningRecheckRef`). A local operation that starts during the lookup makes its answer stale (one generation per operation kind). A failed lookup is retried after 1, 2 and 4 s.
- Compaction state has one owner at a time. A manual compaction this tab sends holds it until its command settles (`localCompactionsRef`): omp may not have the command yet, so an idle snapshot cannot release it; when it settles during an auto-compaction (`autoCompactingRef`), the control stays with the auto-compaction. Native snapshots (state polls, catch-up, attach, mount) apply only if no compaction started or ended since they were requested (`compactionGenRef`); `setCompacting` keeps `isCompactingRef` and the rendered state together.
- `useAgentSession` still treats its `session` channel as primary for chat events, but while a run is active it periodically calls `GET /api/agent/[id]` and also reconciles on `visibilitychange`/`online`. This fixes missed `agent_end` events from background tabs or half-open connections.
- Prompt runs use a monotonic run id; late SSE or slow reconciliation responses from an old run must be ignored so they cannot resurrect stale streaming bubbles.

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ All notable changes to **omp-web** (`@kahme247/ompweb`) are documented in this f
- **A `!` shell command sent during a run now runs, as in omp's terminal.** It was queued as a plain message for the model instead. It now runs right away beside the turn, and its output shows below the conversation until omp adds it to the history, which omp does when a later prompt starts. A steer sent while such a command runs still steers the turn, and Stop stops the turn first, as Esc does in the terminal. Python (`$`) commands still run only in omp's terminal: omp's RPC mode has no command for them yet.
- **A message sent just before switching chats is no longer held back.** When the session had to start omp first (it had been idle long enough for its process to stop), switching to another chat during that startup cancelled the send and put the text back in the composer. The message is now sent, as it already was for a new chat.
- **Sending a command detects a silently broken browser connection sooner.** Queued messages and steers initially reconnect after 5–6 seconds without delivery-acknowledgement progress, rather than waiting for the 30-second silence check. This also detects a dead uplink while replies still stream down. Recovery uses the existing ordered replay and deduplication; slow command results do not trigger retries. Repeated delivery stalls increase the deadline up to 30 seconds for slow links. Server restarts and expired replay windows retain the existing explicit "may have run" error rather than risking duplicate actions.
- **An open chat now picks up a run that started after it loaded.** When a run started from another tab or device, or from the same chat opened again while its message was still starting omp, the sidebar showed the session running but the chat stayed idle until a reload. The chat now attaches to the run as soon as the sidebar shows it.
Running updates received during a state check are retained, and compaction controls immediately reflect the attached run. Compaction started in another tab also releases its controls when it finishes while you are reading a historical branch, without replacing that branch. A late state check cannot take over a command this chat has started or bring back a shell command that has finished or been stopped. The chat waits for its first load before attaching, so the branch navigator never comes up empty, and it attaches once its own send, `!` command, Edit or compaction is done if a run started meanwhile; a failed check is retried. A compaction you start keeps its Stop control until it ends, even when the session's omp is still starting.
- **The dictation waveform no longer stays flat while you speak.** The meter's audio context was created only after the microphone opened; when that took longer than the click's activation window, the browser kept the context suspended and the bars showed silence even though the recording and transcription were fine. The context now starts inside the click.
- **Streaming replies use about a sixth of the bandwidth.** ompweb now asks omp (18.13.2 or later) for only what changed in a streaming reply instead of the whole reply several times a second, and the browser rebuilds the reply itself. In one measured reply the live stream fell from 232 KB to 91 KB, and the reply updates themselves from 178 KB to 30 KB, so replies keep up on slow mobile links. A tab opened mid-reply, a reconnect and a restarted server still show the whole reply. An older omp keeps sending whole replies and works as before.
- **The host link is now one WebSocket**, with fewer requests and large results sent in the same connection. A reverse proxy in front of ompweb must forward WebSocket upgrades on `/api/hosts/link` (see the README's hosts section). Update ompweb on the server first, then on its hosts: a host linked with an earlier build of this release shows **needs upgrade** until it is updated.
Expand Down
2 changes: 1 addition & 1 deletion graphify-out/graph.json

Large diffs are not rendered by default.

Loading
Loading