Conversation
Add plugin host runtime and migrate codex composer
Fix skill autocomplete fallback
|
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 Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| return () => { | ||
| cancelled = true; | ||
| }; | ||
| }, [api, iframeSrc, navigate, search.sessionRevision, thread, thread?.worktreePath, threadId]); |
There was a problem hiding this comment.
Effect dependency on iframeSrc causes redundant API call
Medium Severity
The useEffect that calls api.difit.open() includes iframeSrc in its dependency array. When the open call succeeds, it calls setIframeSrc(result.proxyPath) which triggers a re-render. Since iframeSrc changed, the effect re-runs, making a second redundant difit.open() call (which spawns/reuses an external process). The second call is functionally harmless because the server reuses the active process, but it doubles API calls and introduces unnecessary latency on every difit open. The iframeSrc comparison inside the .then() callback captures a stale closure value anyway, so it doesn't need to be a dependency — a ref would avoid the re-trigger.
| next.push(value); | ||
| } | ||
| return next; | ||
| } |
There was a problem hiding this comment.
Duplicated dedupeBy utility across skills and prompts
Low Severity
The dedupeBy generic helper function is identically defined in both skills.ts and prompts.ts. Similarly, extractFrontmatterValue is duplicated across both files with the same implementation. These are general-purpose utilities that belong in a shared module to avoid inconsistent bug fixes if either copy is updated independently.


Summary
Alt+G,Escape, and a floating back button for entering and leaving fullscreen diff/restart-t3codeas a project prompt that rebuilds/restarts the PM2-managed appImplementation
apps/server/src/difitManager.tsandapps/server/src/difitProxy.tsfor process lifecycle and proxyingdifit.openinto server/web contracts and websocket/native API handlingapps/web/src/routes/difit.$threadId.tsxfor the fullscreen routedifit.togglekeybinding and browser/unit coverage for the shortcut flowCloses #1353
Note
High Risk
High risk because it introduces new process-spawning/proxying logic (
difit) and a dynamic plugin loading/runtime path (server file watchers + webimport()), both of which can affect stability, security boundaries, and request handling.Overview
Adds a new fullscreen diff viewer flow backed by a managed
difitsubprocess on the server and a same-origin proxy (/__difit/:sessionRevision/...), exposed via a newdifit.openwebsocket/native API and a new web route'/difit/$threadId'withAlt+G/Escapenavigation.Introduces a manifest-driven plugin host (new
t3-plugin.jsondiscovery, hot-reload, typed server procedures, and web bundle serving at/__plugins/:id/web.js) plus a web runtime (PluginHostProvider,PluginSlot, composer item providers) to let plugins contribute UI slots and composer commands/skills.Expands contracts to include
plugin,skill,prompt, anddifitschemas; wires newplugins.*,skills.list, andprompts.listwebsocket methods; updates composer/keybinding logic (including alt-keycodehandling) and adds tests/fixtures; and restores the/restart-t3codeproject prompt plus a repo-levelrebuild:restartscript entry.Written by Cursor Bugbot for commit 21bc4f3. This will update automatically on new commits. Configure here.
Note
Add fullscreen difit integration with plugin host, skills, and composer slash-command support
/difit/$threadIdthat opens a difit session via a newapi.difit.openWebSocket method, displays it in a sandboxed iframe, and supports closing via Escape or thedifit.togglekeybinding (Alt+G)./__difit/<sessionRevision>/...requests to a loopback difit server, with on-the-fly HTML/JS/CSS URL rewriting and a client-side fetch shim./__plugins/<pluginId>/web.js.PluginHostProvider(host.tsx) that dynamically imports enabled plugins and registers their composer providers and slot renderers into the app.$prefix trigger), prompts, and richer slash commands with icons, badges, actions, and a live preview panel.skills.listandprompts.listWebSocket APIs backed by new file-system discovery modules (skills.ts, prompts.ts) that scan.codex/skillsand.codex/promptsdirectories.import()calls; plugin errors are isolated viaPluginRenderErrorBoundarybut server-side plugin failures may affect procedure routing.Macroscope summarized 21bc4f3.