-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Feature]: Clickable file links in chat with file viewer sidebar; workspace navigator previews any in-root file #100615
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PRMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PRMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
Summary
Auto-link file paths mentioned in Control UI chat messages and open them in a file viewer sidebar with syntax highlighting; let the workspace rail (file navigator) preview any file inside the session workspace, not just transcript-touched ones.
Problem to solve
Chat replies constantly reference workspace files — inline code like
ui/src/lib/sessions/navigation.ts, plain paths, and Claude-style markdown links such as[foo.ts](src/utils/foo.ts:42). Today the Control UI renders all of these as dead text:ui/src/components/markdown.ts,HOST_LOCAL_FILE_HREF_RE), so agent-emitted file links lose their target.canPreviewinui/src/pages/chat/components/chat-session-workspace.ts), and the gateway'ssessions.files.getrejects untouched in-root paths, so browsing the workspace is read-only in name only.To look at a referenced file, users have to leave the app and open an editor.
Proposed solution
path:linereferences, inline code spans, and markdown links whose href is a relative or host-local file path) and render them as clickable file links.path:linereferences. Markdown files keep the rendered-markdown preview.sessions.files.getserves any path that resolves inside the session workspace root. Existing security posture unchanged: root containment, symlink/hardlink rejection, and the 256 KB preview cap stay as-is. No protocol schema change.Alternatives considered
sessions.files.getalready has the right shape, scope (operator.read), and limits.Impact
Evidence/examples
sessions.files.getcurrently rejects in-root files that the transcript did not touch:src/gateway/server-methods/sessions-files.ts(findSessionFilereturns not-found when there is nosessionKind).ui/src/pages/chat/components/chat-session-workspace.ts(canPreview = entry.kind === "file" && Boolean(entry.sessionKind)).ui/src/components/markdown.ts(isHostLocalFileHref->node.removeAttribute("href")).Additional information
The browser listing already exposes names/sizes of all in-root files (
sessions.files.list), so serving their contents at the same scope does not widen the trust boundary. Files above the preview cap keep returning the existingsession_file_too_largeerror.