~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

just dev redraws the console as its source changes

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:dev/live

What changes

just dev redraws the console as you change it. It now runs the console's dev server behind portless, rather than its build: a change to a page or a style shows at once in the page you have open. A change to the host still means starting just dev again, which builds the host first. The e2e flows keep serving the built console.

The dev server answers the proxied name, takes a form's post from it, and has the page find its updates through it. vite.config.ts reads all three from ORIGIN, which the built console already reads: server.allowedHosts, SvelteKit's csrf.trustedOrigins, and the HMR client's port. With ORIGIN unset, as for npm run dev on its own, nothing changes.

The sign-in dialog loses its line about the server sending you back.

Why

You asked for hot reload in just dev. Behind the https proxy, the dev server refused the proxied hostname, and SvelteKit's origin check refused form posts from it, so just dev had served the build instead.

How it was checked

  • In just dev: signing in through the dialog and uploading two pictures (form posts through the proxy) work. With a page open, I changed --bg in tokens.css; the page redrew in the new colour with no reload, and I put the token back.
  • All 24 e2e flows pass on the built console, and svelte-check passes.

Review

This builds on at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.pull/3mzizs4jaoswn (the console's look); its commits show here until it merges.

🤖 Generated with Claude Code

Approved

This makes just dev serve the console through vite dev behind portless. vite.config.ts derives server.allowedHosts, csrf.trustedOrigins and the HMR clientPort from ORIGIN. With ORIGIN unset, all three come out empty or undefined, so a bare npm run dev is unchanged. The e2e world still serves the build, because world.mjs picks the dev server only when live is set, and only dev.mjs sets it. The docs in development.md and the comments in dev.mjs and world.mjs were updated to match.

I read vite.config.ts, harness/dev.mjs, harness/world.mjs, the Justfile recipe and the docs mentions of just dev, and found nothing that must change. I did not read the whole diff. I skipped the commits that belong to the base pull (the console's look and the image work), and I did not read the sign-in dialog change.

One thing to know: BODY_SIZE_LIMIT is passed to the dev server but only the Node adapter reads it. Vite dev has no such limit, so that env var does nothing here, which is harmless. The description says uploads through the proxy worked.

Approved

My earlier approval stands. It had no requested changes, so there is nothing to check off. The head moved from c8d9b27 to 839ae58 only by merging the base pull's newest commit. That commit changes the focus ring and the --faint and --mute colours, which is styling and unrelated to the dev-server change. The ORIGIN-driven vite.config.ts, the harness and the docs are unchanged since my last read. I did not re-read the new colour commit line by line, because it belongs to the base pull.

Approved

My earlier approvals stand, and neither asked for changes. The head moved from 839ae58 to 6b8b632 by one commit, a merge of main whose only conflict was in SignInDialog.svelte. I read that file at the new head. The conflict is resolved cleanly: the dialog is intact, the sentence about the server sending you back is gone as the description says, and the form still posts to /console/login with back. The ORIGIN-driven vite.config.ts, the harness and the docs are unchanged since my last read. I did not re-read the rest of what main brought in.

Merged as 5d3a417