fix(ui): register chat action plugins under vite preview, not just dev - #7295
Conversation
`chatGovernorActionsPlugin` and `chatDiscoverAttemptActionsPlugin` only implemented `configureServer`, so their `registerGovernorChatActions` / `registerDiscoverAttemptChatActions` calls never ran under `vite preview` — the exact mode the miner-ui README's "persistent service" path and systemd/loopover-miner-ui.service.example use (`npm run build` + `npm run preview`, which fires only `configurePreviewServer`). Every other local vite-*-api plugin already registers on both hooks; these two were the outliers, so a preview-mode operator's chat pause/resume/release/requeue/ discover/attempt commands dispatched against an empty registry and surfaced as "action is not registered". Register on both `configureServer` and `configurePreviewServer`, calling the same (already-idempotent) registration function from each — matching the shape chatApiPlugin and the other plugins use. Closes JSONbored#7228
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-19 13:14:52 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
chatGovernorActionsPlugin(vite-chat-governor-actions.ts) andchatDiscoverAttemptActionsPlugin(vite-chat-discover-attempt-actions.ts) implemented onlyconfigureServer, so theirregisterGovernorChatActions/registerDiscoverAttemptChatActionscalls never ran undervite preview— the exact deployment mode the miner-ui README's "persistent service" section documents andsystemd/loopover-miner-ui.service.exampleruns (npm run build+npm run preview, which fires onlyconfigurePreviewServer).The result: under preview, the shared chat-action registry stayed empty, so an operator's chat-issued
pause/resume/release/requeue/discover/attempt commands dispatched against nothing and surfaced as "action is not registered" — a confusing gap, since the same command works undernpm run dev.Every other local
vite-*-apiplugin already registers on both hooks. This makes these two match: each now registers on bothconfigureServerandconfigurePreviewServer, calling the same (already-idempotent) registration function from each — the exact shapechatApiPluginuses.Scope
configureServerbehavior change, no change to thesrc/lib/registration modules or any other plugin/api/*route added — the existing plugin hook is registered, as the issue requiresValidation
@loopover/ui-minertypecheck, lint, test, and build all green (afterui:kit:build)registerGovernorChatActionsandregisterDiscoverAttemptChatActionsare invoked when onlyconfigurePreviewServeris exercised (not justconfigureServer), mirroring the app's existing plugin-test conventionui:version-auditclean; rebased onto latestmainSafety
Closes #7228