Skip to content

feat(lan-webui): add trusted tool approvals and chat attachments - #2651

Merged
vastsa merged 4 commits into
mainfrom
feat/lan-webui-tool-approvals
Nov 29, 2026
Merged

vastsa merged 4 commits into
mainfrom
feat/lan-webui-tool-approvals

Conversation

@vastsa

@vastsa vastsa commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Let a device explicitly authorized from Desktop allow once or deny a live Bash, Write, or Edit request in its own WebUI turn. Preserve the ask ceiling and keep Plan/Goal approvals on Desktop.
  • Let paired browsers send or queue files and images with a chat message. Reuse Desktop's attachment pipeline, keep uploads out of projects, and preserve drafts on failure.
  • Retain both feature commits. The integration commit combines signed-in upload limits and scoped approvals with request-body replay checks for JSON and multipart, and tests approval of a turn started with an attachment.
  • Preserve typed rejection responses for bounded multipart bodies and keep over-limit or unbounded requests subject to connection close. A deterministic regression covers a client still sending its body (Linux CI surfaced this as EPIPE).

Validation

  • Task candidate: c145522be45596d98942a8e4ccdcf9e9f74d8ea7; base: 16b863e7776b00102f80936514259c97664bbebb.
  • macOS with isolated profiles and deterministic fixtures: pnpm test:e2e:lan-webui (9 passed); pnpm test:e2e (23 passed; 2 live-provider checks skipped without credentials).
  • 56 LAN and Desktop attachment regressions, 68 Agent Host tests, 60 Rust permission-related tests; Desktop build, typecheck, style checks, docs build/checks and PR-base check.
  • Scenarios E2E-272 and E2E-277. Physical phone verification is not included in this automated run.

Keep device files in the draft until the user sends them.
Validate and snapshot bounded uploads in the owning session, then
reuse Desktop turn admission and attachment handling without
exposing host paths or changing tool permissions.
Let users resolve individual tool requests on the browser that
started the work, without granting a broader permission mode.
Keep the authority in Desktop and bind each decision to the
verified device, live turn, and Host-owned request.
Keep both the signed-in attachment flow and the per-device approval
gate over the same LAN listener. Preserve payload-aware replay checks
for JSON and multipart, and exercise an attached turn through approval.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying pi-desktop with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3b7136f
Status: ✅  Deploy successful!
Preview URL: https://39114572.pi-desktop.pages.dev
Branch Preview URL: https://feat-lan-webui-tool-approval.pi-desktop.pages.dev

View logs

Allow the HTTP layer to discard a bounded unread body after an
early rejection. Closing the connection immediately can hide
authentication errors behind EPIPE while a client is still writing.
Continue closing unbounded or over-limit requests.
@vastsa
vastsa merged commit 3251677 into main Nov 29, 2026
6 checks passed
@vastsa
vastsa deleted the feat/lan-webui-tool-approvals branch November 29, 2026 17:41
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