Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
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. |
Production bundleExplore the comparison online → Client JS 1.72 MiB
All client assets
Largest module increases
Initial page load counts the entry script, |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Written by an AI agent on behalf of @HugoRCD. @HugoRCD has not reviewed it yet.
Template previews currently serve a production build, so editing their source cannot update the page. This adds an owner-bound editing API that starts a development server alongside the preview, applies exact edits or file replacements, deletes files, installs modules, and checks rendered routes.
Stack (merge left to right): Backend API #2608 → Nuxi tools #2609 → Editor UI #2611. This PR targets
main; the controls and assistant integration come in the following layers. Admin rechecks (#2619) and ZIP downloads (#2627) follow the editor UI.Evidence
During restoration, a temporary Vercel Sandbox running the official Nuxt v4 starter received an
app/app.vueedit and anuxt.config.tstitle change. Its open browser showed the new text after editing and kept working after the configuration restart. This is a direct tool demonstration with sanitised data, not a full Nuxi conversation or a production comparison.The final saved page-check response was:
{ "status": 200, "text": "Nuxi edited template Template editor verification Hello from Nuxi" }For example, an authenticated internal caller submits this body to
POST /api/internal/templates/preview:{ "action": "edit", "principalId": "visitor-principal", "sandboxId": "owned-preview", "path": "app/app.vue", "edits": [{ "find": "Before editing", "replace": "Hello from Nuxi" }] }Page-check limits
Rendered pages are capped at 1 MiB by curl and again during the SDK streamed read, before full buffering. Text extraction uses a non-executing SAX parser in server code, preserves the 1,500-character excerpt and omits scripts, styles and nested templates. Log excerpts are capped at 32 KiB. Parsing stops when the excerpt is full.
The same
checkAppPageharness, with mocked sandbox I/O, gives this raw output for a response one byte over the limit:Before:
After:
Server bundle packaging
nitro.externals.inlineincludesparse5-sax-parser,parse5andentitiesso Nitro can bundle this server dependency chain and remove unused exports instead of copying the external packages into the deployment. The wrapper uses parse5’s tokenizer and HTML namespace handling, which use the entities decoder; leaving those dependencies external would prevent that pruning. The compiled page-check chunk retains the SAX tokenizer/decoder and omits the full DOM parser and serializer. It does not execute HTML or add the parser to browser JavaScript.Two local production analyses used the same resolved stack, Node server preset and analysis setup, before and after this packaging change and the excerpt early stop:
Both analyses exited successfully and
/templates/minimalreturned HTTP 200. These measure the optimization within the stack, not the complete feature delta againstmainor the Vercel deployment size. Fresh per-PR CI bundle comparisons are still pending.Validation
The current full stack passes 51 focused tests across four suites, plus lint and type checking. Backend cases cover path validation, exact-edit rejection, startup progress before readiness, restart failures, bounded reads and extracted text. Mocked preview lookups verify caller forwarding and missing/stopped handling; they do not independently test the real ownership lookup.
Checks against the compiled production handler pass for visible text, entities, split UTF-8 input, hidden script/style/template content, the 1,500-character excerpt and rejection above 1 MiB.
Earlier real temporary Vercel Sandbox runs verified normal HTML and rejection of a chunked response over 1 MiB. Deployment-wide concurrency was not measured.
Earlier runs of the reusable template verifier passed Minimal, Nuxt UI Dashboard and Docus, including file operations, rendered-page checks and configuration restarts. Minimal also passed installing
@nuxt/image. These real-template runs were not repeated after the latest sync withmain; each temporary sandbox was stopped afterward.A full AI conversation and every gallery template were not exercised. Preview deployments need their own check snapshots; feat(templates): let admins recheck individual templates #2619 adds the admin action to create them.
ELI5: This gives each temporary template app a workshop where its files can change while it runs. The API checks that the person making a change owns that preview and reports whether the updated page works.