Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix: harden web desktop previews and server pipes

6 months ago

4a8aa43
Authored
Max Weinbach4/19/2026, 3:13:04 PM
Address the remaining PR #83 review threads in the web desktop path. The file-open route now forces active-content previews like HTML and SVG to download instead of executing on the Cowork origin, and the workspace-server readiness monitor now keeps stdout and stderr drained for the full child lifetime after startup.

Constraint: Preserve normal inline previews for non-active files while blocking same-origin execution from repo-controlled HTML and SVG.
Rejected: Force every file through attachment download | that would unnecessarily regress the existing inline preview experience for plain text and other safe files.
Rejected: Close the workspace-server readers after readiness | that leaves long-lived child processes vulnerable to pipe backpressure hangs.
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep active-content previews off the privileged Cowork origin and keep workspace child pipes drained after readiness.
Tested: bun test test/webDesktopRoutes.test.ts test/start_web_dev.test.ts; bun run typecheck
Not-tested: bun test (repo-wide lane still has unrelated failures on this machine, including test/server.test.ts EPERM against AppData state.json and other pre-existing red tests)

Parent102502f

3 files changed
  • src/server/webDesktopRoutes.ts+40−2
  • src/server/webDesktopService.ts+143−51
  • test/webDesktopRoutes.test.ts+71−0