Skip to content

docs(docs/coder-agents): document embedded previews - #31287

Draft
DanielleMaywood wants to merge 1 commit into
feat/agents-open-preview-uifrom
feat/agents-open-preview-docs
Draft

DanielleMaywood wants to merge 1 commit into
feat/agents-open-preview-uifrom
feat/agents-open-preview-docs

Conversation

@DanielleMaywood

@DanielleMaywood DanielleMaywood commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Documents open_preview and the Preview tab in the Coder Agents docs: the port and path modes, what a file or directory publication exposes, the wildcard access URL requirement, which files a directory publishes, who can view previews and what preview pages are restricted from doing (requests stay on the preview's origin, the dashboard stops self-navigation, but a preview opened by its URL can navigate to any URL), the --host-prefix-cookie recommendation, the publication limit and proxy and hostname limitations, and that previews do not survive agent restarts.

It also narrows two existing statements, "No additional ports or network paths are introduced" in architecture.md and "No additional ports or services are required" in the workspace tools section of index.md, to inbound ports, because previews reach the workspace from the browser through the app proxy.

Stack (proof of concept for the embedded previews RFC, review bottom-up):

  1. feat: serve published file previews from the workspace agent over tailnet #31282 Agent file previews over tailnet
  2. feat: route preview app hostnames to agent previews #31283 Preview app hostname routing
  3. feat(coderd): add open_preview chat tool #31284 open_preview chat tool
  4. feat: add chat previews endpoint #31285 Chat previews endpoint
  5. feat(site): add a Preview tab for open_preview #31286 Preview tab UI
  6. docs(docs/coder-agents): document embedded previews #31287 Docs ← this PR
  7. feat: open coder_app tabs from open_preview #31484 Open coder_app tabs

🤖 This PR was written by Coder Agents on behalf of @DanielleMaywood.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

@ibetitsmike ibetitsmike left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Adversarial security review — #31287 (docs)

Part of the stack review; the stack-level roll-up (findings S1/S2, method, verified negatives) is on #31282. Every literal claim in the new docs text checked out against the implementation (root-only / not plan mode, port range, .html/.htm/index.html, Linux/macOS only with Windows failing closed, file-only vs directory, no listings, no unpublish, lifetime = agent lifetime, refresh-on-recall). The issues are omissions, plus overstatements that live in the PR bodies / code comments rather than the user docs.

Unverified (single reviewer) — P3

  • Who can view a preview is not stated. "Owner-only" (#31283 body, request.go:327, preview.go:133, ARCHITECTURE.md:1014) is overstated: the gate is application_connect on the workspace (db.go:370) — site owners (unless --disable-owner-workspace-access), workspace-ACL use/admin users, and custom org roles granting workspace.application_connect all pass (validated). Org admins do not.
  • port previews are plain port-forward URLs and inherit port-share levels (request.go:357-400); a public share makes the "preview" unauthenticated. "Port shares do not apply" is true only for path mode. Users should be told that the Preview tab is not a sharing boundary.
  • "Eligible files" is undefined. Actual rule: every regular, non-dot-component file at any depth, any type (config.json, *.pem, …), symlinks never followed, hardlinks served, no re-validation, / or $HOME publishable if they contain index.html. The only guard is the LLM-facing hint in the tool description.
  • Previews are model-authored content rendered automatically in the dashboard on the wildcard app domain, sharing the app session cookie with every other app of the user (S1). Admins should know the prompt-injection implications and that cors_behavior=passthru templates bypass the preview-origin CORS rule.
  • No way to disable open_preview: unconditionally appended (turn_environment.go:2427); MCP allow/deny lists don't cover built-ins; no experiment flag; the port-5 listener is always on; a missing wildcard hostname only hides the UI — publication still occurs. This contradicts the docs' "tool configuration from the control plane" promise; either document the limitation or add a switch.

nit

  • 16-publication cap, no unpublish, and stable path-derived IDs (republish after agent restart keeps the URL) are undocumented in both the docs and the tool description.
  • "workspace agent" vs the docs' established "workspace daemon"; "only the agent can publish them again" is ambiguous (the model republishes via the tool).
  • coderd/x/chatd/ARCHITECTURE.md:1014 <!-- TODO --> left by #31284 is not resolved here and repeats "owner-only".
  • #31283's known limitations (older wsproxies don't route previews; 63-char DNS label ⇒ agent/workspace/user names ≤ ~32 chars for the 5-segment hostname; http-only port previews) are absent from user docs.

@DanielleMaywood
DanielleMaywood force-pushed the feat/agents-open-preview-docs branch 2 times, most recently from 24f1ddd to 6a6bc51 Compare October 28, 2026 12:00
@DanielleMaywood
DanielleMaywood force-pushed the feat/agents-open-preview-docs branch 2 times, most recently from ea75919 to 37a2a8a Compare October 28, 2026 13:20
@DanielleMaywood
DanielleMaywood force-pushed the feat/agents-open-preview-docs branch from 37a2a8a to 539f020 Compare October 28, 2026 14:22
@DanielleMaywood
DanielleMaywood force-pushed the feat/agents-open-preview-docs branch from 539f020 to 29ca139 Compare October 28, 2026 16:42
@DanielleMaywood
DanielleMaywood force-pushed the feat/agents-open-preview-docs branch from 29ca139 to 229d4d3 Compare October 28, 2026 16:43
@DanielleMaywood
DanielleMaywood force-pushed the feat/agents-open-preview-docs branch from 229d4d3 to 2c52e96 Compare October 29, 2026 09:57

@ibetitsmike ibetitsmike left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Follow-up (re-checked at 2c52e96): one isolation claim is now demonstrably false, one risk is missing — P2 (docs)

The rewrite fixed most of the earlier omissions (who can view, port shares, which files are served, hard links, secrets warning, prompt-injection mention). Two remaining issues, both verified against the code on #31283:

  1. docs/ai-coder/agents/index.md:295 — "Coder rejects cross-origin requests from a preview page to other workspace apps, such as form posts and fetch calls." This is not what is enforced. Validated end-to-end: the rejection applies only to subdomain apps and only when the browser sends a well-formed preview Origin. Requests with no Origin (every no-cors GET: images, scripts, frames), Origin: null (nested sandboxed frame, no-referrer form posts), and any request to a path-based app (/@user/ws/apps/..., which carries the full session cookie) are delivered. An operator reading the current sentence would reasonably treat untrusted preview content as unable to send authenticated traffic to their dev apps. Suggested wording until the implementation is tightened:

    Preview pages use separate app hostnames and run in a sandbox that prevents them from navigating the dashboard or opening pop-ups. Coder refuses subdomain app requests whose Origin header identifies a preview page, which blocks ordinary fetch calls and form posts from reading or reaching other subdomain apps. This does not block every request: requests without an Origin header, with Origin: null, or to path-based apps can still reach those apps with your app session. Treat preview content as untrusted.

  2. Missing: preview HTML/JS executes in the viewer's browser, not in the workspace. The sandbox sets no connect-src/default-src, so a malicious preview can send anything it can read (published content, data typed into it) to external hosts and can probe services reachable from the viewer's network — workspace egress rules do not apply, and it can register a service worker on the preview origin that outlives the publication (#31283). Given the surrounding text emphasises prompt-injection risk and workspace isolation, this distinction should be explicit.

(Both points were also raised by a second independent review of the rebased stack; the path-app case was found while reconciling the two.)

@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

@codex review

🤖 Posted by Coder Agents on behalf of @DanielleMaywood.

@DanielleMaywood
DanielleMaywood force-pushed the feat/agents-open-preview-docs branch from 0c3cbf9 to b9eef0c Compare November 2, 2026 14:25
@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

@codex review

🤖 Posted by Coder Agents on behalf of @DanielleMaywood.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: b9eef0c7e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@DanielleMaywood
DanielleMaywood force-pushed the feat/agents-open-preview-docs branch from b9eef0c to 01dca33 Compare November 3, 2026 09:37
@DanielleMaywood
DanielleMaywood force-pushed the feat/agents-open-preview-docs branch 2 times, most recently from 291bcef to 67692a6 Compare November 3, 2026 14:07
@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

/coder-agents-review

@coder-agents-review

coder-agents-review Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Chat: Review posted | View chat
Requested: 2026-11-06 15:57 UTC by @DanielleMaywood
Spend: $56.91 / $100.00

Review history
  • R1 (2026-11-04): 10 reviewers, 6 Nit, 1 P2, 9 P3, 5 P4, COMMENT. Review
  • R2 (2026-11-05): 11 reviewers, 6 Nit, 1 P2, 10 P3, 6 P4, COMMENT. Review
  • R3 (2026-11-05): 7 reviewers, 6 Nit, 1 P2, 10 P3, 7 P4, COMMENT. Review
  • R4 (2026-11-06): 4 reviewers, 6 Nit, 1 P2, 10 P3, 7 P4, APPROVE. Review
  • R5 (2026-11-06): 4 reviewers, 6 Nit, 1 P2, 10 P3, 7 P4, APPROVE. Review
  • R6 (2026-11-06): 5 reviewers, 6 Nit, 1 P2, 10 P3, 8 P4, COMMENT. Review
  • R7 (2026-11-06): 4 reviewers, 6 Nit, 1 P2, 10 P3, 9 P4, COMMENT. Review
  • R8 (2026-11-06): 4 reviewers, 6 Nit, 1 P2, 10 P3, 9 P4, APPROVE. Review

deep-review v0.13.0 | Round 8 | 8674bea..b1c52ae

Last posted: Round 8, 26 findings (1 P2, 10 P3, 9 P4, 6 Nit), APPROVE. Review

Finding inventory

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 Nit Author fixed (394dec6) index.md:246 HTML and CSS not expanded on first use (Vale AbbreviationFirstUse) R1 Netero Yes
CRF-2 Nit Author contested; panel closed R2 (1/1 accept) index.md:313 "workspace agent" vs "workspace daemon" used elsewhere for the same process R1 Netero Yes
CRF-3 Nit Author contested; panel closed R2 (1/1 accept) architecture.md:133 Root-only/non-plan-mode restriction restated in two places R1 Netero Yes
CRF-4 Note Dropped by orchestrator (merged into CRF-8, same bullet list and same fix) index.md:303 Images and other GET requests can reach any host, not only other apps R1 Netero No
CRF-5 Note Note (body) index.md:272 Explore-mode root chats also lack open_preview; unverified whether users can create one R1 Netero No
CRF-6 P2 Author fixed (394dec6) index.md:311 Refresh shows 404 after a build deletes and recreates the published directory R1 Hisoka P2, Mafuuu P3, Razor P3, Mafu-san P3 Yes
CRF-7 P3 Author fixed (394dec6) index.md:289 Hard-link rule also rejects file previews and a hard-linked index.html R1 Leorio P3, Hisoka P3, Mafuuu P4, Razor P4, Mafu-san P4 Yes
CRF-8 P3 Author fixed (394dec6) index.md:304 Preview can navigate to any URL incl. external hosts; iframe sandbox persists in tab, lost in new tab R1 Kurapika P3, Knov P3, Razor P4, Mafu-san P4, Netero Note Yes
CRF-9 P3 Author fixed (394dec6, rename case left out) index.md:292 Directory preview serves files added later and follows a renamed directory R1 Kurapika Yes
CRF-10 P3 Author contested; panel closed R2 (1/1 accept) index.md:292 Secrets warning addresses the reader, who does not publish, and gives no remedy R1 Pen Botter Yes
CRF-11 P3 Author contested; panel closed R2 (1/1 accept) index.md:302 Port previews break apps that call other origins; no pointer to the ports submenu R1 Pen Botter Yes
CRF-12 P3 Author fixed (394dec6) index.md:285 DNS label limit sentence gives no name-length limit or symptom R1 Leorio P3, Pen Botter P4 Yes
CRF-13 P3 Author fixed (0a5736f) index.md:284 "older Coder version" names no version, no selected-proxy context, no action R1 Leorio P3, Gon P3, Pen Botter P4 Yes
CRF-14 P3 Author contested; panel closed R2 (1/1 accept) architecture.md:45 Architecture page omits browser path to daemon HTTP API through app proxy R1 Pariston Yes
CRF-15 P3 Author fixed (394dec6) index.md:289 Subdirectory URL without trailing slash returns 404 R1 Hisoka Yes
CRF-16 P4 Author contested; panel closed R2 (1/1 accept) index.md:297 Chat sharing does not give access to previews; not stated R1 Pen Botter Yes
CRF-17 P4 Author fixed (394dec6) index.md:307 Menu entries from before an agent restart can open nothing or another path R1 Mafuuu Yes
CRF-18 P4 Author contested; panel closed R2 (1/1 accept) index.md:314 64-path limit is shared by every chat on the agent R1 Leorio Yes
CRF-19 P4 Author fixed (394dec6) index.md:299 "Port shares" is not the docs' term; port stays shared at its regular URL R1 Gon Nit, Kurapika Note Yes
CRF-20 P4 Author fixed (394dec6) architecture.md:45 PR description does not mention the two rewritten network claims R1 Leorio P4, Mafu-san Note Yes
CRF-21 Nit Author fixed (0a5736f) index.md:310 "active chats" means not archived; docs use "archived" R1 Leorio, Gon Yes
CRF-22 Nit Author contested; panel closed R2 (1/1 accept) index.md:313 "Published files" vs "published paths" on the next line R1 Gon Yes
CRF-23 Nit Author contested; panel closed R2 (1/1 accept) index.md:293 "eligible" introduces an undefined term R1 Gon Yes
CRF-24 Note Note (body) index.md:274 Section mixes developer usage and admin security detail (DOC10) R1 Pen Botter No
CRF-25 Note Note (body) index.md CI shows 20 failed jobs; logs unreadable from review env (gh 401) R1 Mafu-san No
CRF-26 OOS Out of scope (body) coderd/x/chatd/ARCHITECTURE.md:1177 open_preview architecture TODO unwritten R1 Netero No
CRF-27 OOS Out of scope (body); resolved in stack R2 (AgentChatPageView.tsx:346) AgentChatPageView.tsx:418 Preview tab offered without wildcard URL, shows "No previews yet." forever R1 Pen Botter, Mafuuu No
CRF-28 OOS Out of scope (body) agent/agentpreview/preview.go:110 Preview IDs restart per agent process and are shared across chats; paths share one origin R1 Pen Botter, Knov No
CRF-29 OOS Out of scope (body); resolved in stack R2 (preview.go:100) agent/agentpreview/preview.go:91 Link/regular-file rejection reported as "does not exist or cannot be read" R1 Mafuuu, Leorio, Razor, Knov No
CRF-30 OOS Out of scope (body) coderd/x/chatd/chattool/openpreview.go:56 Port range and 64 limit duplicated as literals across packages R1 Gon No
CRF-31 OOS Out of scope (body) docs/admin/networking/wildcard-access-url.md:22 Wildcard feature list omits embedded previews R1 Mafu-san No
CRF-32 OOS Out of scope (body) coderd/workspaceapps/proxy.go:66 Restrictions cover only preview hostnames; agent code on other ports runs unrestricted R1 Pariston No
CRF-33 OOS Out of scope (body) agent/agentpreview/preview.go:82 os.Root handle serves deleted directory after rebuild (root cause of CRF-6) R1 Hisoka No
CRF-34 OOS Out of scope (body) agent/agentpreview/preview.go:174 No redirect to trailing-slash form for subdirectories (root cause of CRF-15) R1 Hisoka No
CRF-35 OOS Out of scope (body) coderd/x/chatd/chattool/openpreview.go:98 path.IsAbs rejects native Windows paths R1 Knov No
CRF-36 OOS Out of scope (body) coderd/coderd.go:948 open_preview can be disabled only by removing the wildcard access URL R1 Knov No
CRF-37 P3 Author fixed (0a5736f) index.md:296 Restrictions list omits that preview pages cannot register service workers R2 Razor Yes
CRF-38 P4 Author fixed (0a5736f) index.md:312 Preview tab hidden when the selected proxy has no wildcard hostname R2 Mafuuu Yes
CRF-39 OOS Out of scope (body); accepted as known gap by @DanielleMaywood R5 (IC comment, no ticket) coderd/workspaceapps/proxy.go:65 previewPolicy does not limit WebRTC; unverified exfiltration path R2 Pariston No
CRF-40 P4 Author fixed (f318f98) index.md:285 Proxy-selection remedy points to a picker the Agents page does not render R3 Pen Botter Yes
CRF-41 P4 Author fixed (5d5a70a) index.md:319 "a message appears" names the toast with the page's word for chat messages R6 Leorio, Gon Yes
CRF-42 OOS Out of scope (body); tool description fixed in #31284 (1a15f58), "Opened <title>" header at Tool.tsx:1180 unchanged coderd/x/chatd/chattool/openpreview.go:76 Tool description and "Opened" header still say the preview opens and is selected; it now only shows a toast R6 Razor No
CRF-43 P4 Author contested; panel closed R8 (1/1 accept) index.md:319 "the agent opens a preview" while the user opens it on the next line; stack now offers/shares R7 Gon Yes

Contested and acknowledged

CRF-2 (Nit, index.md:313) - "workspace agent" vs "workspace daemon"

  • Finding: Reviewer asked to use "workspace daemon" at lines 313 and 314 because architecture.md and the tool description use it and "the agent" means the AI agent on this page.
  • Author defense: The tool description, the agent's error message, and most docs/coder-agents pages say "workspace agent". Only architecture.md says "workspace daemon".
  • Panel closure (R2, 1/1): Netero (original R1 agent): tool description and agent error say "workspace agent" (openpreview.go:78,81,82; preview.go:115); 6 coder-agents pages use it vs 3 for "workspace daemon". Defense holds.

CRF-3 (Nit, architecture.md:133) - Root-only/non-plan-mode restriction restated

  • Finding: Reviewer asked to drop the restated restriction at architecture.md:133 and keep only the link, so index.md owns the fact.
  • Author defense: architecture.md already repeats the root-only and plan-mode restrictions for other tools, so this matches the page.
  • Panel closure (R2, 1/1): Netero (original R1 agent): architecture.md:147,160,163 already repeat restrictions index.md states, so line 133 follows the page pattern. Defense holds.

CRF-10 (P3, index.md:292) - Secrets warning addresses the reader and gives no remedy

  • Finding: Reviewer asked to rewrite the warning as actions the reader can take: ask the agent to publish a build output directory, and restart the workspace agent to remove a mistaken publication.
  • Author defense: The page already says a preview lasts until the workspace agent restarts, which is the way to remove one, and the tool description tells the model to publish a dedicated output directory without secrets.
  • Panel closure (R2, 1/1): Pen Botter (original R1 agent): lines 298 and 318 state who can read and how long; openpreview.go:80 tells the model to publish a dedicated output directory without secrets. Defense holds.

CRF-11 (P3, index.md:302) - Port previews break apps that call other origins; no pointer to ports submenu

  • Finding: Reviewer asked to say that apps calling other origins don't work as port previews and to point to the add menu's ports list, which uses ordinary port forwarding.
  • Author defense: With the CSP at default-src 'self', the page already says preview pages can't call external APIs or load from other origins.
  • Panel closure (R2, 1/1): Pen Botter (original R1 agent): previewPolicy is now default-src 'self' (proxy.go:65) and line 303 says pages can't load from a CDN or call external APIs. Defense holds.

CRF-14 (P3, architecture.md:45) - Architecture page omits browser path to daemon HTTP API through app proxy

  • Finding: Reviewer asked to add a step or sentence to the tunnel description saying file previews are served by the daemon HTTP API (port 4) through the workspace app proxy, limited to published preview paths.
  • Author defense: Nothing on the architecture page says the daemon API is reachable only from the control plane. The page links to Embedded previews, which says who can view previews, and the app proxy opens the agent API port only for preview-- paths.
  • Panel closure (R2, 1/1): Pariston (original R1 agent): no statement on the page restricts the daemon API to the control plane; preview traffic also traverses coderd's Tailnet connection, so line 44 stays true. Defense holds.

CRF-16 (P4, index.md:297) - Chat sharing does not share previews

  • Finding: Reviewer asked to add "Sharing a chat doesn't share its previews."
  • Author defense: The bullet already limits previews to users who can connect to the workspace's apps, and that covers chat viewers.
  • Panel closure (R2, 1/1): Pen Botter (original R1 agent): line 298 states the app-connect rule, and chat sharing grants only chat read access. Defense holds.

CRF-18 (P4, index.md:314) - 64-path limit shared by every chat on the agent

  • Finding: Reviewer asked to say the limit applies across all chats on the workspace and that republishing a path does not count.
  • Author defense: The sentence already says the workspace agent holds the 64 paths, which is the right scope when a workspace has several agents.
  • Panel closure (R2, 1/1): Leorio (original R1 agent): the agent error names the cause and remedy (preview.go:115), and "across all chats on the workspace" would be wrong with several agents. Defense holds.

CRF-21 (Nit, index.md:310) - "active chats" means not archived

  • Finding: Reviewers asked to write "Unless the chat is archived, ...".
  • Author defense: Other pages already use "active" for chats that aren't archived (platform-controls/chat-auto-archive.md).
  • Panel re-raised (R2, 1/2 accept): Leorio (original agent) accepted: chat-auto-archive.md:10 uses "active" for non-archived. Gon (original agent) re-raised: the same page (lines 5, 39, 44, 50) calls chats with no recent messages "inactive" while they remain unarchived, so "active" has two meanings there.

CRF-22 (Nit, index.md:313) - "Published files" vs "published paths"

  • Finding: Reviewer asked to use "Published paths" at 313.
  • Author defense: The files a directory preview serves are published files, and the next sentence counts paths, which is the unit there.
  • Panel closure (R2, 1/1): Gon (original R1 agent): files a directory preview serves are published files; line 319 counts paths. Defense holds.

CRF-23 (Nit, index.md:293) - "eligible" undefined term

  • Finding: Reviewer asked to write "every such file".
  • Author defense: Inside the callout, "such" would point back past the callout's start, and dropping the qualifier would overstate the set, since dot files are excluded.
  • Panel closure (R2, 1/1): Gon (original R1 agent): "such" has no antecedent inside the callout and dropping the qualifier would claim dot files are served. Defense holds.

CRF-43 (P4, index.md:319) - "the agent opens a preview" vs the user opening it

  • Finding: Line 319 says "When the agent opens a preview" and line 320 tells the user to select Open preview to show it, so "open" names two actors' actions on adjacent lines; reviewer proposed "shares".
  • Author defense: By the owner's decision, nothing here is sharing, so the docs keep "opens". The stack's toast now reads "Opened a preview" (b1c52ae), matching that verb.
  • Panel closure (R8, 1/1): Gon (original agent) accepted: the page uses "open" for the agent's call, matching the tool name open_preview, the Opened ${title} header (Tool.tsx:1180), and the toast Opened a preview (PreviewPanelContext.tsx:173), and "show" for the user's action; line 320 corrects any expectation from line 319. "shares" would collide with workspace sharing and chat sharing.

Round log

Round 1

Full panel (round 1). Netero first pass: 3 Nit, 2 Note, no P0, so the panel ran. Panel: Pen Botter (docs specialist), Kurapika (security claims), Pariston, Mafuuu (core), Leorio, Gon (floor), Razor, Mafu-san, Hisoka (pool), Knov (wildcard). Multi-domain target 9-12 because the docs make security-boundary claims. Law not run (51 effective additions). Result: 1 P2, 9 P3, 5 P4, 6 Nit, 3 Note (body), 11 out of scope. CRF-4 merged into CRF-8. Reviewer verification-only notes (Razor, Mafu-san, Gon, Leorio line 295) are not findings and have no rows. Reviewed against 1780acb..af1e9ca.

Round 2

Churn guard PROCEED: 11 author fixed, 10 contested, 0 silent. Restructure round: files moved to docs/coder-agents/ and the stacked implementation changed (CSP, preview IDs, popout frame, cookie handling bullet added).
Full panel. Contested personas on their original agents: Netero, Pen Botter, Pariston, Leorio, Gon. Others new: Kurapika, Mafuuu, Razor, Mafu-san, Hisoka, Knov; wildcard Kite. Size target reclassified to focused (6-8, one language, docs only) for the non-contested set; 6 plus wildcard. Results: 9 contested closed (1/1), CRF-21 re-raised (Gon), CRF-13 fix incomplete (Gon P3, Leorio P4, Pen Botter P4, Mafu-san P4; kept at original P3). New: CRF-37 P3, CRF-38 P4, CRF-39 OOS. All other author fixes verified by the raising reviewers. CRF-27 and CRF-29 resolved in the stack. Reviewed against e1eaef6..394dec6.

Round 3

Churn guard PROCEED: CRF-13, CRF-21, CRF-37, CRF-38 author fixed in 0a5736f, 0 silent. Fix round (only fixes, +4 effective lines, no files moved).
Panel (fix round): Leorio, Gon, Pen Botter (CRF-13 raisers, docs specialist), Razor (CRF-37), Mafuuu (CRF-38), Mafu-san (CRF-13), wildcard Knov. Netero: no findings. CRF-13, CRF-21, CRF-37, CRF-38 fixes verified by their raisers. New: CRF-40 P4 (orchestrator confirmed /agents is outside DashboardLayout in router.tsx and AgentsPage has no ProxyMenu or setProxy). Reviewed against d7f11e8..0a5736f.

Round 4

Churn guard PROCEED: CRF-40 author fixed in f318f98, 0 silent. Fix round: the only other change is a new sentence at the port bullet saying Coder connects over HTTP, not HTTPS.
Panel (fix round): Pen Botter (CRF-40 raiser), Leorio, Gon (docs touched), wildcard Razor; all on prior agents. Netero: no findings. CRF-40 fix and the new HTTP-only sentence verified (request.go:321). No new findings. All findings resolved. Reviewed against fd5c0c5..f318f98.

Round 5

Churn guard PROCEED: 0 open findings. Rebase only: the PR diff is identical to R4 (f318f98). The base moved fd5c0c5 to 8cac206; stack changes are a comment edit in exp_chats_previews.go, a comment in openpreview.go, preview cache invalidation in useChatStore.ts, subagent tool status in Tool.tsx/utils.ts, and computer_use provider wording in index.md:264 and architecture.md:174, none touching a documented preview claim. CRF-39 accepted by the author as a known gap without a ticket.
Panel (fix round, rebase only): Mafuuu, Pariston, Razor on prior agents; wildcard Chopper new. Netero: no findings. All documented claims rechecked at c646ac3. No new findings. Reviewed against 8cac206..c646ac3.

Round 6

Churn guard PROCEED: 0 open findings. Base moved 8cac206 to 36356bf: the stack replaced auto-open of new previews with a toast (PreviewPanelContext.tsx useNewPreviews, toast.info "The agent shared a preview." with an Open preview action), removed the narrow-window and other-user-read-only suppression, and refactored clearCachedWorkspaceState in turn_environment.go. The PR rewrote two lines in index.md to match. Fix round (two changed lines).
Panel (fix round): Leorio, Gon, Mafuuu, Pen Botter on prior agents; wildcard Razor. Netero: no findings. New: CRF-41 P4 (convergent Leorio, Gon; Leorio's "bottom right" placement unverified, left out of the posted fix), CRF-42 OOS. Reviewed against 36356bf..6ebfbc3.

Round 7

Churn guard PROCEED: CRF-41 author fixed in 5d5a70a (quotes the toast text; author avoided "notification", which the Agents docs use for push and Coder notifications). Base moved 36356bf to 6c17e4e: openpreview.go description now "Offer an embedded preview to the user, who opens it from the chat"; toast ID now includes the workspace ID. Fix round.
Panel (fix round): Leorio, Gon (CRF-41 raisers), Pen Botter on prior agents; wildcard Knov. CRF-41 fix verified by both raisers; both accepted avoiding "notification". New: CRF-43 P4 (Gon). Pen Botter's note that line 277 reads correctly with 319-320 covers 277 only, not the adjacent-line conflict at 319, so CRF-43 stays at P4 anchored at 319. Reviewed against 6c17e4e..5d5a70a.

Round 8

Churn guard PROCEED: CRF-43 contested. Base moved 6c17e4e to 8674bea: the toast text changed to "Opened a preview" (PreviewPanelContext.tsx:173). The PR changed only the quoted toast text at index.md:319. Fix round.
Panel (fix round): Gon (dispute check-in, original agent), Leorio, Pen Botter on prior agents; wildcard Chopper (R5 agent). Netero: no findings. CRF-43 closed 1/1. No new findings; all findings resolved. Reviewed against 8674bea..b1c52ae.

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR documents open_preview and the Preview tab in the Coder Agents docs and narrows two existing network claims. Findings: 1 P2, 9 P3, 5 P4, 6 Nit. Most documented values match the stacked implementation (port range, file filters, 64-path cap, wildcard gate, viewer set, CSP). The P2 and several P3s are cases where the text promises behavior the code does not deliver.

Out of scope (needs a ticket or explicit acceptance by a human):

  • coderd/x/chatd/ARCHITECTURE.md:1177: the open_preview section is still a <!-- TODO -->, so the chatd architecture doc does not describe the preview subsystem.
  • site/src/pages/AgentsPage/AgentChatPage/AgentChatPageView.tsx:418: the add menu offers Preview whenever the chat has a workspace, but without a wildcard access URL open_preview is never registered, so the tab shows "No previews yet." forever.
  • agent/agentpreview/preview.go:110: preview IDs restart at 00000001 per agent process and are shared by every chat on the agent, so after a restart one chat's menu entry can serve another chat's files; all path previews also share one browser origin, so they share localStorage and cookies.
  • agent/agentpreview/preview.go:91: a symlinked, hard-linked, or non-regular file is reported as "does not exist or cannot be read", so the model cannot correct the request.
  • coderd/x/chatd/chattool/openpreview.go:56: the 1000 to 65535 range and the 64-path limit are literals repeated across openpreview.go, appurl.go, and preview.go, so changing either value leaves stale copies in the tool description.
  • docs/admin/networking/wildcard-access-url.md:22: the list of features that need a wildcard access URL omits embedded previews.
  • coderd/workspaceapps/proxy.go:66: the CSP and isFromOtherPreview check apply only to preview hostnames; the agent can serve the same code on another port, where neither applies.
  • agent/agentpreview/preview.go:82: the os.Root handle keeps serving the original directory inode, so a delete-and-recreate rebuild returns 404 until open_preview runs again.
  • agent/agentpreview/preview.go:174: a subdirectory request without a trailing slash returns 404 instead of redirecting to the slash form.
  • coderd/x/chatd/chattool/openpreview.go:98: path.IsAbs rejects native Windows paths such as C:\out\index.html, although the agent's preview code builds for Windows.
  • coderd/coderd.go:948: an administrator can disable open_preview only by removing the wildcard access URL, which also disables every subdomain app.

Notes:

  • docs/ai-coder/agents/index.md:272: root chats in explore mode also lack open_preview (turn_environment_internal_test.go case ExploreRoot); "root chats outside plan mode" is accurate only if users cannot create explore-mode root chats, which was not verified.
  • docs/ai-coder/agents/index.md:274: the section mixes developer usage (lines 307 to 316) with administrator security detail (lines 295 to 305) on the overview page, which DOC10 (one audience per page) discourages.
  • CI reports 20 failed jobs, including changes, gen, and lint-docs. The job logs could not be read from the review environment. Locally, markdownlint-cli2 and markdown-table-formatter --check pass on both files.

🤖 This review was automatically generated with Coder Agents.

Comment thread docs/coder-agents/index.md Resolved
Comment thread docs/coder-agents/index.md Resolved
Comment thread docs/ai-coder/agents/index.md Resolved
Comment thread docs/coder-agents/index.md Resolved
Comment thread docs/coder-agents/index.md Resolved
Comment thread docs/coder-agents/index.md Resolved
Comment thread docs/coder-agents/index.md Resolved
Comment thread docs/coder-agents/index.md Resolved
Comment thread docs/coder-agents/index.md Resolved
Comment thread docs/coder-agents/architecture.md Resolved
@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This round reviews the rebased docs at docs/coder-agents/ against the updated stack. Findings: 1 new P3, 1 new P4, plus 2 re-raised (1 P3, 1 Nit).

The fixes for the refresh-after-rebuild, hard-link, navigation, files-added-later, name-length, trailing-slash, menu-after-restart, sharing-level, HTML/CSS expansion and PR-description findings were checked against the code and are correct. The reviewers who raised them accepted the defenses for the workspace agent term, the restated restriction, the secrets warning, port previews calling other origins, the architecture page, chat sharing, the 64-path scope, "Published files" and "eligible". The proxy-version sentence and "active chats" are re-raised on their threads.

Out of scope (needs a ticket or explicit acceptance by a human):

  • coderd/workspaceapps/proxy.go:65: previewPolicy has no directive that limits WebRTC, so a prompt-injected preview may be able to send published file contents to an external STUN or TURN host with RTCPeerConnection. Unverified; a browser test that opens a data channel from a preview page would settle it.

🤖 This review was automatically generated with Coder Agents.

Comment thread docs/coder-agents/index.md Resolved
Comment thread docs/coder-agents/index.md Resolved
@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

Not changing: @DanielleMaywood accepted the possible WebRTC exfiltration from previews (previewPolicy in coderd/workspaceapps/proxy.go has no directive that limits RTCPeerConnection) as a known gap, with no ticket for now.

🤖 Posted by Coder Agents on behalf of @DanielleMaywood.

@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This round checks the fixes in 0a5736f3c1. The proxy-version, "active chats", service-worker and selected-proxy-wildcard findings are fixed and match the code, and the new popout-header and narrow-window sentences also match it. One new P4 remains, on the proxy remedy sentence.

🤖 This review was automatically generated with Coder Agents.

Comment thread docs/coder-agents/index.md Resolved
@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This round checks f318f98a39. The proxy remedy now sends the user to another dashboard page to choose a proxy, and the new sentence saying port previews connect over plain HTTP matches coderd/workspaceapps/request.go:321. No new findings, and every finding from earlier rounds is fixed or was closed after review of the author's reply. CI was still pending when this round started.

🤖 This review was automatically generated with Coder Agents.

@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This head is a rebase: the PR's added and removed lines match the previous head f318f98a39. The stack changes underneath since then are a comment in exp_chats_previews.go, the outdated-agent comment in openpreview.go, preview list invalidation in useChatStore.ts, subagent tool status handling, and the base's computer_use provider wording. The preview claims on the page were rechecked against this head and still hold. No new findings and no open findings. CI was still pending when this round started.

🤖 This review was automatically generated with Coder Agents.

@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This round checks the rewrite of the Preview tab paragraph for the stack's switch from auto-opening new previews to a toast. The new lines match PreviewPanelContext.tsx and Tool.tsx: the toast and the tool result's button appear together, both open the Preview tab with the preview selected, and both are absent in archived chats and for previews of an earlier workspace. One P4 on wording.

Out of scope (needs a ticket or explicit acceptance by a human):

  • coderd/x/chatd/chattool/openpreview.go:76: the tool description still tells the model it will "Open and select an embedded preview for the user", and the tool result header says "Opened <title>" (Tool.tsx:1180), but the stack now only shows a toast, so the model can tell the user a preview is open in the Preview tab when nothing changed on screen.

🤖 This review was automatically generated with Coder Agents.

Comment thread docs/coder-agents/index.md Resolved
@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

Out-of-scope item on the tool description: fixed in #31284 (1a15f58). The description now says the tool offers an embedded preview to the user, who opens it from the chat, and #31484 extends that to workspace apps.

🤖 Posted by Coder Agents on behalf of @DanielleMaywood.

@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This round checks the fix for the toast wording in 5d5a70af76. Quoting The agent shared a preview. matches PreviewPanelContext.tsx:173 and follows the style guide's code-font rule for product text, and the reason for avoiding "notification" holds, since getting-started.md:142-148 uses it for push notifications. #31284 fixed the tool description from the previous round's out-of-scope item; the Opened <title> tool result header (Tool.tsx:1180) is unchanged. One new P4 on wording.

🤖 This review was automatically generated with Coder Agents.

Comment thread docs/coder-agents/index.md Resolved
@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This round checks b1c52aea82. The quoted toast text Opened a preview matches PreviewPanelContext.tsx:173. The "opens" wording at line 319 stays: the page uses "open" for the agent's call, matching the tool name, the Opened <title> tool result header, and the toast, and "shares" would collide with workspace sharing and chat sharing. No new findings and no open findings. CI was still pending when this round started.

🤖 This review was automatically generated with Coder Agents.

This branch has not been deployed

No deployments
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.

2 participants