Repository navigation
chore(ui): serve the Control UI mock as a production bundle - #199821
vyctorbrzezowski wants to merge 3 commits into
Conversation
`pnpm dev:ui:mock -- --prod` builds the mock with its fixture plugins and serves it through `vite preview`, so a remote browser loads about 55 compressed requests instead of one per source module. Each change under ui/src triggers a full rebuild into a staging directory that replaces the served bundle, so the page keeps working mid-build. The preview skips source maps and precompression (new `precompressAssets` option), cutting a rebuild from about 20 s to about 10 s. There is no HMR, and the board fixture page stays dev-server only.
The mock loads the bundled Knowledge plugin's real Control UI page and lists Knowledge as an installed bundled plugin. The mock answers none of its data calls, so the page shows its load error.
The mock's config enables the experimental Templates flag, so Customize lists Templates.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesAdds a rebuilding production-bundle mode to the standalone Control UI mock and enables its Knowledge and Templates previews. Example: A developer runs pnpm dev:ui:mock -- --prod --port 19321.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this maintainer-authored draft open: the preview improvement is useful, but production mode breaks the attachment and avatar theme controls. Priority: P3 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe standalone mock combines synthetic Gateway responses, fixture assets, browser isolation, and the Control UI build configuration to serve a developer preview without an operator Gateway. flowchart LR
A[Mock CLI options] --> B[Fixture scenario]
B --> C[Vite configuration]
C --> D[Development server]
C --> E[Production build]
E --> F[Preview server]
D --> G[Browser]
F --> G
Technical reviewBest possible solution: Keep the existing Vite and fixture owners, but inject the theme module before HTML module processing so production previews retain the fixture controls. Do we have a high-confidence way to reproduce the issue? Source inspection establishes that --prod with --fixture attachments or --fixture avatars leaves a source TypeScript import in served HTML; no target code was executed. Is this the best way to solve the issue? Reusing Vite build and preview is a focused solution, but the existing HTML injection must participate in bundling to preserve fixture behavior. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e693b3323e90. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +6, Docs +8, Other +108. Total +122 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 15, 2026, 6:03 PM ET / 23:03 UTC. |
|
Closing: the Control UI mock stays local and is not part of the side rail series. The series now starts at #199822 on main. |
What Problem This Solves
Iterating on the Control UI mock from another device is slow with the dev server, and the mock has Knowledge and Templates off, so their pages cannot be previewed.
User Impact
Developers can run the mock as a production bundle (
--prod, rebuilt on change) and see Knowledge and Templates in it. No product change.Why This Change Was Made
Adds a production-bundle mode to the mock script, documents it, and turns on the Knowledge plugin and the Templates Labs flag in the mock config. The rest of the side rail series builds on this mock.
Evidence
Draft, work in progress. Not yet validated: screenshots, end-to-end tests, type checks and CI come before this is marked ready for review.
Side rail series, part 1 of 13. Base of the stack.