feat(web): open called skills in file viewer - #6553
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
Effect service conventions review of the new skill file-read path. Three error-modeling issues in the changed scope; everything else (namespace imports, contract schemas, RPC wiring, projection changes) looks consistent with repo conventions.
Posted via Macroscope — Effect Service Conventions
9e43366 to
38bb1e1
Compare
38bb1e1 to
b5aff1f
Compare
Legacy chips in archived threads could not find a provider because the fallback used an active-only shell query. Skill file reads now follow WorkspaceFileSystem instead of O_NOFOLLOW and inode checks. Co-authored-by: Cursor <cursoragent@cursor.com>
The includeArchived shell path still used an active-only latest-turn query, so archived threads always came back with latestTurn null. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
UI consistency review found layout and focus-state issues in the new skill preview surfaces. Details inline.
Posted via Macroscope — UI Consistency
ApprovabilityVerdict: Needs human review This PR adds a new feature enabling skill file viewing in the file preview panel, including a database migration, new RPC endpoint, and UI components. The scope and cross-cutting nature of new features like this warrant human review. You can customize Macroscope's approvability policy. Learn more. |
Skill preview headers used a removed global class and overflowed the shared 40px row. Clickable chips also lacked a focus ring. Frozen resolvedSkills lists were still falling through to live provider lookup. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Three consistency findings in the new skill file-preview surfaces (apps/web/src/components/files/FilePreviewPanel.tsx). The earlier subheader and focus-ring findings look resolved on this head.
Posted via Macroscope — UI Consistency
Persist the markdown source toggle, open workspace files (or toast) when a skill markdown link points outside the skill folder, and show the same image load-failure state as workspace previews. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Reviewed the web UI changes (skill chips, skill file preview surfaces, right-panel store/tabs, ChatMarkdown renderers). The prior findings (focus ring on the clickable chip, persisted markdown source/rendered preference, image load-failure state, single-line subheader) are all resolved. Two remaining issues below.
Posted via Macroscope — UI Consistency
../ markdown links were matching the skill root by string prefix, so they never fell through to the workspace. Skill tabs without a project also stayed in the strip with a blank panel, and clickable chips were stripped from rich copy. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9eb22af. Configure here.
Windows drive roots lost their slash after collapse, so containment became case-sensitive. Skill previews without a project also passed a worktree cwd they could not open, which swallowed the click. Co-authored-by: Cursor <cursoragent@cursor.com>
Trailing-slash stripping turned `/` into an empty string, so markdown links could not be classified as workspace files when cwd was the filesystem root. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Reviewed the web UI changes for shared-primitive, Tailwind-ownership, and surface-consistency issues. The earlier findings (chip focus ring, persisted markdown toggle, image onError handling, rich-copy of the chip, skill tabs rendering without a project) look addressed at this head. Two remaining consistency gaps around the new skill file surface are noted inline.
Posted via Macroscope — UI Consistency
Skill source now uses the same highlighted File viewer (including word wrap), and Copy path on skill tabs copies the skill directory plus relative path instead of just SKILL.md. Co-authored-by: Cursor <cursoragent@cursor.com>

Problem
Resolved skill invocations in submitted chat messages look like chips, but users cannot open them to inspect the instructions the agent used.
Solution
User impact
Users can inspect an invoked skill directly from the conversation without leaving T3 Code. Linked documents remain within the same read-only file-viewer experience.
Supported surfaces
Mobile is intentionally out of scope for this change.
Verification
Screenshots
Before/after screenshots still need to be added before this draft is marked ready for review.
Implemented with GPT-5.6 in the Codex harness.
Note
Open called skills in the file viewer from chat message skill chips
skills.readFileWebSocket RPC that reads files from resolved skill directories with size limits, symlink/traversal protection, and structuredSkillReadFileErrorresponses.resolvedSkillson thread messages at dispatch time by matching skill tokens in message text against the active provider's skill list; persisted via a newresolved_skills_jsoncolumn (migration 041).openSkillFileto the right panel store, opening durable skill-file tabs (namespacedskill-file:IDs) that persist when the workspace becomes unavailable.SkillTextFilePreviewPanelinFilePreviewPanelfor read-only skill file preview, including markdown rendering, local image resolution via scoped asset URLs (skill-file-exacttoken kind), and relative link navigation within the skill directory.SKILL.mdin the right panel viewer.collectSubmittedSkillNamesto extract skill references from submitted Markdown while correctly ignoring code blocks and inline code spans.Cache-Control: no-store, which differs from the defaultprivate, max-age=3600used for other assets.Macroscope summarized c9a0429.
Note
Medium Risk
Touches filesystem reads, signed asset tokens, and message persistence with a DB migration; path containment and frozen resolution are tested but the surface area spans auth, RPC, and client state migration.
Overview
Invoked
$skillchips in user messages are now clickable and open that skill’sSKILL.md(and linked files/images) in the existing right-panel file viewer, read-only.On turn dispatch, the server derives
resolvedSkillsfrom submitted message text (Markdown-aware, ignoring code) and the active provider’s enabled skills—clients cannot inject paths. Those references are stored on messages (resolved_skills_jsonmigration), projected through orchestration, and legacy messages without the field still resolve against the current provider. New messages with an empty list stay non-clickable even if a skill is enabled later.Backend access adds
skills.readFile(path containment, symlink checks) andskill-filesigned asset URLs withno-storecaching for images. Web UI adds skill-backed file tabs (skill-file:IDs, persisted state v12), timeline chips wired to frozenresolvedSkills, and skill markdown preview with local image/link handling.Reviewed by Cursor Bugbot for commit c9a0429. Bugbot is set up for automated code reviews on this repo. Configure here.