Skip to content

feat(sidebar): mark sessions waiting for user input - #461

Merged
andrebrait merged 2 commits into
ompweb-dev:mainfrom
andrebrait:feat/sidebar-input-indicator
Nov 12, 2026
Merged

andrebrait merged 2 commits into
ompweb-dev:mainfrom
andrebrait:feat/sidebar-input-indicator

Conversation

@andrebrait

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 70d9ba92-44ec-482f-930a-5adb224ff9d6
Commits

Reviewing files that changed from the base of the PR and between 699c6e9 and 1010a9c.

Files selected for processing: 11

  • CHANGELOG.md
  • components/SessionSidebar-helpers.ts
  • components/SessionSidebar-rows.tsx
  • components/SessionSidebar.tsx
  • lib/i18n/locales/en.json
  • lib/i18n/locales/ja.json
  • lib/i18n/locales/zh-CN.json
  • lib/i18n/locales/zh-TW.json
  • lib/rpc-manager.test.mjs
  • lib/rpc-manager.ts
  • lib/session-routes.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Comment thread lib/rpc-manager.ts
/** Forget a pending dialog and its expiry timer. */
private forgetPendingUiRequest(id: string): void {
this.pendingUiRequests.delete(id);
// An answered or expired dialog no longer waits on the user: the sidebar follows.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: You added notifyRunningChange() when a dialog is removed (line 1472), but the code that adds dialogs (trackExtensionUiRequest, unchanged in this PR) doesn't notify. Result: the sidebar learns when the user answers a dialog, but never learns when a new dialog appears. The awaiting-input icon stays hidden until something else triggers a refresh.

🩹 The Fix: In trackExtensionUiRequest (around line 1538), after this.pendingUiRequests.set(id, event);, return true so the caller notifies. Or call notifyRunningChange() directly there.

📏 Severity: critical

Comment thread lib/rpc-manager.test.mjs

emitLine(JSON.stringify({ type: "extension_ui_request", id: "q", method: "confirm", title: "Continue?", message: "" }));
assert.equal(awaiting(), true);
assert.equal(pushed.at(-1), true, "the sidebar is told the session waits on the user");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: This test asserts pushed.at(-1) === true after emitting the dialog event, but pushed only gets values when notifyRunningChange() fires. Since the bug above prevents that notification, this test passes only because awaiting() calls getRunningRpcSessions() directly (bypassing the notification system). The subscription callback never actually runs — the test doesn't verify the real code path the sidebar uses.

🩹 The Fix: Fix the notification bug in trackExtensionUiRequest first, then verify pushed actually receives the update. Consider awaiting a microtask or using a test helper that waits for the subscription callback.

📏 Severity: warning

@kilo-code-bot

kilo-code-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Code Review Summary

This review did not finish. The model reached its output limit before it
could write the review — a reasoning model can spend the whole budget thinking.
Re-run the review, or lower the model's thinking effort, and it should get
further. Any inline comments below are from an earlier review.

Previous Review Summary (commit 1b23223)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 1b23223)

Verdict: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
🚨 critical 1
⚠️ warning 1
💡 suggestion 0
🤏 nitpick 0
Issue Details (click to expand)
File Line Roast
lib/rpc-manager.ts 1472 Added notification on dialog removal but not on addition — the sidebar learns when you answer, not when a dialog appears
lib/rpc-manager.test.mjs 3035 Test passes for the wrong reason (direct API call bypasses the broken notification path)

🏆 Best part: The feature itself is clean — the awaitingInput plumbing through LivePlace, SSE, React memo, and i18n is well done. The question-bubble icon next to the draft pencil is a nice touch. I almost want to merge it just to see it in action.

💀 Worst part: The notification asymmetry in rpc-manager.ts. You wired up the "dialog answered" path but left the "dialog opened" path disconnected. It's like installing a doorbell that only rings when someone leaves.

📊 Overall: A solid feature with a critical notification bug that makes it invisible in practice. Fix the trackExtensionUiRequest return value and the test will actually test what it thinks it's testing.

Files Reviewed (9 files)
  • CHANGELOG.md - 0 issues
  • components/SessionSidebar-helpers.ts - 0 issues
  • components/SessionSidebar-rows.tsx - 0 issues
  • components/SessionSidebar.tsx - 0 issues
  • lib/i18n/locales/en.json - 0 issues
  • lib/i18n/locales/ja.json - 0 issues
  • lib/i18n/locales/zh-CN.json - 0 issues
  • lib/rpc-manager.test.mjs - 1 issue
  • lib/rpc-manager.ts - 1 issue

Fix these issues in Kilo Cloud

@andrebrait
andrebrait force-pushed the feat/sidebar-input-indicator branch from 1b23223 to 1010a9c Compare November 12, 2026 14:35
@andrebrait
andrebrait merged commit bd3bcb7 into ompweb-dev:main Nov 12, 2026
4 of 5 checks passed
andrebrait added a commit that referenced this pull request Nov 13, 2026
…473)

* wip: scaffold runner package pinned to @oh-my-pi/pi-coding-agent 18.19.0

Start of a custom omp entry that would host ompweb sessions over a local
socket. Paused: omp collab already covers most of the design, and the
direction (collab guest, custom build or hybrid) is pending.

* wip: ompweb omp runner — collab view plane plus control socket

runner/ is ompweb's own omp build on pinned @oh-my-pi/pi-coding-agent 18.19.0.
src/cli.ts stands in for upstream cli.ts as the process entry and swaps the
launch command for one whose session factory (src/session.ts) shares every
session through the host's loopback collab relay (runtime overrides only)
and attaches the NDJSON control socket (src/control.ts: get_state, set_model).
src/relay.ts is the loopback relay; scripts/ holds the guest and host probes.

Verified: --smoke-test ok; stock and runner TUIs joined by the guest probe;
a guest prompt raised an ask that the guest answered; set_model over the
control socket switched the TUI model and reached the guest as entry+state.

* wip: runner speaks its own channel instead of collab

Drop the collab relay, overrides and guest probe. The session factory now
connects src/channel.ts: hello with the session file, every AgentSession
event, commands (get_state, set_model, prompt, abort) against the same
AgentSession the TUI drives, and dialogs raced between the TUI and the host
by wrapping the tool UI context (first answer wins, the other side closes).

Verified: --smoke-test ok; a host-sent prompt opened an ask whose whole HTML
form (checked state included) reached the host as formDialog; the host
answer closed the TUI form; a TUI answer sent ui_end to the host.

* wip: split runner commands into per-group handler tables

src/commands/ holds one CommandTable and FrameTable per group (prompting,
model, session, tools, agents) behind a shared CommandContext; the channel
dispatches cmd frames by op and other host frames by t.

* wip: snapshot of parallel agent work at session interruption

Agents were cut off mid-task; this preserves their partial edits
(runner headless/events/correlation, ompweb process/daemon/manager/auth,
TUI attach socket, release/smoke), plus the spec and DESIGN/AGENTS updates.
Not verified as a whole.

* wip: drop skill diagnostics, exclude runner from root tsc

Skill diagnostics came from an unmerged omp PR that the pinned runner
lacks; the feature, its setting toggle and docs are removed. Root tsconfig
excludes runner/, which has its own. E2E (server+daemon+compiled runner):
prompt, whole ask form with pre-checked default, set_model+edit_message and
TUI attach all passed.

* wip: port host test fixtures to the runner channel; ask form Other + layout

Fake omp children in host tests speak hello/cmd/res/event instead of RPC;
RemoteRpcTransport tags link samples from hello/session frames. The web ask
form adds the automatic Other choice per radio/checkbox group, as omp does.

* test: port remaining fake omp children to the runner channel

Fake hosts and workers in agent-tools, api-contract, message-outbox-review,
outbox-handoff, session-resume and session-routes speak hello/cmd/res/event;
the rename-during-edit test holds a native edit_message command. The late
second RPC response case is gone: the channel reports it as prompt_error.

* test: fix lint in ported login test and multi-server fixture

* fix(runner): register set_event_filter and get_client_message_status

Both handlers existed but were missing from the command table, so the
daemon's event filter and the outbox status probe got unknown-command errors.

* ci: test runner/ in its own job; drop removed keys from zh-TW

The root suite ignores runner/** (its deps live in runner/node_modules);
runner gets a typecheck and bun test job on PRs that touch it. zh-TW, added
on main, still carried the removed skill-diagnostics keys.

* ci: build the omp runner before the smoke tests; scope npm test to app dirs

npm test lists the app directories instead of ignoring runner/** (the
ignore glob missed Windows paths). Smoke needs a real runner: CI builds it
first, and packed-install smokes pass it with --omp until the per-platform
runner packages are published.

* ci(smoke): retry the temp-dir removal while Windows releases the runner's files

* ci(smoke): stop the runner's detached brokers on Windows before removing HOME

omp's daemon broker, LSP mux and embedding server detach and outlive the
session by design; on Windows they keep the throwaway HOME locked.

* test(hosts): wait for the fake omp to record the answer before counting it

The server closes the peer dialog without waiting for omp, so the child's
answer record can land after the cancel frame (seen on Windows CI).

* fix(hosts): give the runner version probe 30 s

A freshly copied runner binary's first start on Windows waits on the
antivirus scan; the 10 s probe reported omp as missing for the whole
daemon session. Smoke waits up to 60 s for the link.

* fix(sessions): read the runner's client-message-entry journal

The runner cannot add clientMessageId to omp's entries, so it journals
{clientMessageId, entryId} in a custom entry. The session reader now takes
the id from either source, on the active branch only, for outbox
reconciliation, full context and history pages.

* feat: drop the last omp RPC dependencies

Runner: headless mode boots through runRootCommand's runSessionHost hook
(upstream PR pending; carried as a Bun patch of the exact diff) instead of
swapping omp's rpc-ui mode with a build plugin, and no runner module imports
omp's RPC helpers any more (prompt results, goals, session events and
settle, message paging, host tools/URIs, btw, dictation, live, subagents are
ported onto omp's non-RPC modules).

ompweb: the server passes the runner's ui_request/ui_end/ui frames through
unchanged and the browser renders each omp dialog method from its own
arguments, answering ui_response with the exact omp return value; the
extension_ui_* translation is gone.

* chore(lint): let the runner drop fields through rest-sibling destructuring

* test: port tests from main's cluster work to channel dialog frames

* fix: address the #460 review round

Daemon: unowned res frames are dropped and startup configure is
fire-and-forget (a slow extension startup no longer resolves the web's
commands with stray replies); a TUI runner cannot attach to a session that
already has a live channel ({t:"refused"}); the host link moves to protocol
v10 (MIN = VERSION), deleting spawnLegacy, legacy channels and every older
version gate; a restarted server sees each event once and in order
(continuous rejoin); the host socket is created under umask 0177; numeric
string dialog ids are normalised; dead capability and lifecycle plumbing
removed.

Runner: only interactive TUIs dial the host, redialling stops after a
refusal, no dialling on Windows yet, open dialogs are re-sent after a
redial and ui_end follows a failed local dialog; tests now kill the
reviewer's mutants and cover edit_message.

Browser: agent forms with controls named like HTMLFormElement members
still submit. Docs: spec, README, AGENTS.md and DESIGN.md describe the
runner and its channel.

* test: move host fixtures to link protocol v10

Fake daemons serve v10 open instead of the removed spawn op, hellos and
welcomes use LINK_PROTOCOL_VERSION, and the removed ready capability is
gone from expectations. Tests of below-v10 join blocks are deleted (such a
host is refused at link time); session-resume asserts that v10 hosts own
their runs. clusterJoinBlock drops its dead protocol parameter.

* test(hosts): hold acks until a full window is resent in the 20,000-line redial test

On a slow socket (Windows' small loopback buffers) the resend outlasted the
test's ack hold: the released acks cover the lines main got before the drop,
so the daemon rightly skipped the rest of the resend and the test waited for
lines that would never come again. Hold acks until a full window is resent.

* ci: install the runner's dependencies before the test suite

* test(hosts): a fake runner the host hangs up on ignores EPIPE

* fix(hosts): port cluster configuration to link protocol v10 and the runner channel

* fix(hosts): the host socket no longer narrows the daemon's umask while it listens

omp children spawned during the pending listen() (restored sessions at startup) inherited umask 0177, so every file and directory their tools created was 0600.

* feat(hosts): preflight the session omp before an upgrade switches

ompweb preflight starts the session omp as a new host session would (same resolver and spawn, --no-session, scratch cwd) and waits up to 30 s for its hello. The host updater and the web self-update worker run the candidate's preflight in the live environment before stopping anything and abort on failure. An npm ompweb host now resolves the runner from its own package.

* fix(hosts): narrow the host socket directory to 0700 and close the server if the socket chmod fails

* fix(hosts): preflight requires the channel protocol, shuts omp down gently and is found by a marker only it embeds

* fix(update): web preflight checks the candidate's own omp and a failed update disarms the launcher

* docs: preflight and protocol-10 cluster upgrade notes

* test(rpc): speak the runner channel in the awaiting-input test from #461

* feat(runner): compile ompweb-omp against the fork's omp packages

runner/scripts/use-omp-build.ts fetches the omp-packages zip of the
andrebrait/oh-my-pi release runner/omp-build.json pins into runner/vendor/,
or re-pins to a given tag (file: deps and overrides for every @oh-my-pi
package and native leaf, bun install, fails if any resolves from npm).
Every runner install fetches first.

The pin itself (omp-build.json, package.json, bun.lock, dropping
runner/patches/) needs the first fork release with the zip:
  bun runner/scripts/use-omp-build.ts <tag> && git rm -r runner/patches

* ci(release): ship the newest omp integration build with every release

* build(runner): pin omp to the fork build v18.20.0-int.202611130808.gfd57e86

* feat(hosts): omp updates with ompweb

Each ompweb release ships its omp runner, and `omp update` on that
runner would replace it with upstream's binary. The omp row now shows
the host's omp version with "Updated with ompweb" and no button:
HostUpdateTarget is "ompweb", HostUpdateInfo.omp is { currentVersion }
(from `omp --version`), hosts refuse an omp target, /api/omp-update
keeps only restart, and the omp update check, cached check, worker
branch and self-update kind are gone. The hub reduces an older
daemon's omp row to its version; recorded omp operations stay readable.

* test(hosts): drop the omp runtime update tests; cover the host update flow and the read-only omp row

* docs: design and plan for building omp in the fork and shipping it with ompweb

* fix(hosts): host binary updates fit a release with its omp runner

A release now carries ompweb (~112 MB) plus ompweb-omp (~284 MB on
linux-x64), which the 256 MiB member and 200 MiB archive limits
refused. The limits are now 512 MiB per member and per archive and
1 GiB expanded, exported as HOST_RELEASE_MAX_*. The download streams to
a file while it is hashed (no Buffer.concat), a .tar.gz is gunzipped to
a scratch tar on disk, and each member is copied out of it in 8 MiB
pieces, so a ~400 MB release peaks at ~145 MB RSS instead of holding
the archive plus its gunzip output. The download (and the npm install)
get 15 min instead of 120 s; the host update lease grows to 30 min to
cover it.

scripts/check-host-release-archive.ts unpacks a built archive through
the same checks and limits; verify-pr's binary job and
build-release-binaries.sh run it on every archive they build.

* ci(release): pin and install the runner before npm test

The tests import the runner (lib/hosts/omp-socket.test.mjs imports
runner/src/channel.ts), whose dependencies only the re-pin installs, so
every tag failed at npm test. Re-pinning first also runs the tests
against the omp build the release ships rather than the committed pin.

* feat(hosts)!: link protocol 11 and refuse every daemon below it

Published prerelease daemons already said v10 while their channels
still carried omp RPC frames; this server sends them runner frames that
they drop silently, so a session never becomes ready and nothing says
which side to update. 11 is the same wire as 10, renumbered, and the
minimum: a v10 daemon gets close 4426 ("needs upgrade"), and a v11
daemon told the server speaks 10 logs "update ompweb on the server".

* refactor(hosts): drop link compat for daemons below the minimum protocol

With every daemon at 11 or later, a v4 peer (whole lines, no ack
window) and a pre-v8 pool member can no longer link: LinkSender loses
its `parts` flag, the hub its v4 window exemption, pool selection its
linkProtocol >= 8 check, and their tests go with them.

* test(hosts): cover what the update mutations slipped past; drop a vacuous test

- a recorded `omp` update operation reads through the route (no 502),
  and a missing or non-string omp version is a 502;
- the daemon refuses an `omp` update target and starts nothing;
- preflight names an omp without the execute bit "not executable";
- a running update makes an available compatible release not
  installable.

"a spawned omp loads the session-edit extension" asserted nothing since
the extension went away (it checked that the bun binary exists).

* fix(omp): one "Reinstall ompweb" message for a missing omp

Seven callers still said "Install oh-my-pi or set OMP_WEB_OMP_BIN",
which cannot help: a stock omp does not speak the runner channel. They
now share omp-cli's OMP_NOT_FOUND (rpc-process's wording), and the two
callers that map it to `omp_not_found` match on that constant. The
errors.omp_not_found string follows in all four locales.

* fix(service): never pin the services to a stock omp found on PATH

The systemd and launchd installers wrote OMP_WEB_OMP_BIN=$(which omp)
into the service environment. That override wins over ompweb's own
ompweb-omp, and a stock omp cannot run ompweb's sessions, so every
session on such a machine failed. Only an explicit OMP_WEB_OMP_BIN is
written now; the install test puts a stock omp on PATH and checks
neither the env file nor the unit names it.

* build(runner): re-pin without breaking vendor/ on a bad release

use-omp-build.ts unpacks into vendor.new/ and swaps it in only once
index.json holds every required package, so a missing leaf or a failed
download leaves vendor/ matching bun.lock. Overrides are replaced, not
merged, so a package the new release dropped keeps no override, and the
download is retried once.

* fix(update): give the candidate preflight room for its own timeouts

ompweb preflight can take 30 s for the hello, about 7 s to stop omp and
30 s for the version probe, over the 60 s both updaters allowed it; a
slow first start failed an update the check would have passed. Both
now allow 120 s.

* docs(code): drop comments that still describe omp RPC mode

* test(host): expect the current link protocol from the CLI daemon status

* feat(omp): every install fetches its omp runner from its own release

No more runner npm packages. A release attaches ompweb-omp-<platform>
and ompweb-omp.sha256; lib/omp/runner-fetch.ts downloads this
version's asset, checks it against that listing, and renames it into
place executable: beside a compiled ompweb, else into a per-version
cache under the agent dir (omp-web/omp/<version>/), which resolveOmpBin
now probes instead of @kahme247/ompweb-omp-<platform>. OMP_WEB_OMP_BIN
still wins, and a source checkout still uses its own runner build.

- `ompweb fetch-omp` fetches it when missing. The host updater and the
  web self-update run the candidate's fetch-omp (15 min) before its
  preflight, so the candidate is checked with the runner it will run.
- The web server and `ompweb host` fetch it at start, in the
  background, when it is missing.
- A failed fetch names the asset URL and OMP_WEB_OMP_BIN.

The release repository is read from package.json's `repository` only
(lib/release-repo.ts): the runner download, the host binary download
(passed to the self-contained worker in its descriptor), the candidate
protocol lookup and the binary update link.

* ci(release): attach the omp runners to the release, not to npm or the archives

publish.yml builds the archives --no-runner, attaches the five runners
and their ompweb-omp.sha256 to the release, and publishes the GitHub
release before the npm package, whose installs fetch their runner from
it. The per-platform runner npm packages and the optionalDependencies
pinning are gone. The binary smoke gets the runner with --omp, since a
draft release serves no assets. Prereleases keep the runner in their
archives: their binaries carry the version of a release that is not
theirs.

* docs: bring README, AGENTS, DESIGN, CHANGELOG and the specs in line with the runner that ships

* docs: every install fetches its omp runner from its release; hosts need one manual update

* chore: the omp fork is ompweb-dev/oh-my-pi

* fix(ask): hide the composer while a form ask is open, as the TUI does

omp's ask tool calls ui.formDialog whenever the UI provides it, so the
runner's ask arrives as formDialog. The composer stayed visible for it,
and a steer sent from there interrupted the ask ("Ask interrupted by
message").

* fix(ask): hold steers while an ask is open

omp's ask tool aborts when a user steer arrives. A steer already in the
outbox now waits until the ask is answered, and send_to_session refuses a
steer into a session waiting on an ask.

* fix(ask): send a held steer as soon as the ask closes

The wrapper now reports when a session's last open ask closes (answered,
cancelled, expired or its child gone), and the outbox delivers a steer it
held for that ask at once, instead of on its retry timer.

* fix(agent-tools): send a steer into an open ask as a follow-up

A steer would interrupt the target's open ask. send_to_session now
delivers it as a follow-up and reports that delivery in its result,
instead of refusing it.

* docs(rpc-manager): note that the rpc naming is a leftover

* build(runner): pin omp to the fork build v18.20.0-int.202611131515.g11d9dc7

* fix(runner): re-pinning rehashes tarballs whose name did not change between omp builds

* fix(runner): send a relocation's notice before the moved session's identity

A non-owning session's first-write relocation sent the new session frame
before the persistence notice, so the daemon dropped the original id's
aliases and a later open by that id started a second child.

* fix(hosts): give the other servers a shared prompt's outcome for notifications

A prompt's prompt_result/prompt_error went only to the submitting server,
so the elected notifier saw session_settled without the failure and
reported a false Completed. Peers now get peer_prompt_outcome (no command
id), which only feeds their notification detector.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant