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

A dev world's group sites open in a browser, at their addresses

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

just dev names its groups under groups.localtest.me, so a group's address, where its site is, opens in a browser at https://riders.groups.localtest.me, sandboxed as it is when deployed. A group with no site now sends / to its page in the console wherever the console is, not to the host's own URL.

Claude Opus 5.5

What changes

The dev world. harness/world.mjs's start takes handleDomain, .groups.test unless given, for HANDLE_DOMAIN and Riders' handle. harness/dev.mjs gives it .groups.localtest.me and registers a portless alias, groups, to the host's port. portless's wildcard sends every <label>.groups.localtest.me to the host with its certificate, as a deployment's wildcard name and proxy do. Hikers is hikers.groups.localtest.me. Both aliases are taken back on ctrl-c, and when seeding fails. What just dev prints names the groups so, and where a published site is. just look, the e2e flows and the shots use the world as before, under .groups.test.

The host. A group's address with no site redirects / to CONSOLE_URL's /g/<handle>, not PUBLIC_URL's. They are the same when the console is served beside the host, as deployed, so nothing changes there. In just dev the host is at http://localhost:<port>, which serves no console, so the redirect led nowhere.

Words. opensocial --help says site publish publishes at the group's address, which the last pull left saying "handle". docs/development.md says how dev groups are named and where their sites open.

Why

To work on sites against the host, a site has to open in a browser. Under .groups.test, the address resolves nowhere, and seeing a site meant a hand-made proxy rewriting Host. That was the spike behind at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzlk7gxpmi3j's next steps. portless already serves the console under localtest.me, and its wildcard routes the group names with no new parts.

How it was checked

  • a_site_without_its_pages_answers_plainly now starts the host with CONSOLE_URL apart from PUBLIC_URL, and expects the console's. It failed before the change with https://host.test/g/riders.groups.test.
  • just dev, by hand, in Chromium:
    • before publishing, https://riders.groups.localtest.me/ answered 302 to https://group-host.localtest.me/g/riders.groups.localtest.me, and its /.well-known/atproto-did answered Riders' DID.
    • opensocial site publish to it, then the page served with the sandbox CSP.
    • https://hikers.groups.localtest.me/ landed on Hikers' signed-out page in the console.
    • signing in as alice through her PDS, Riders' page drew as before.
  • Locally, just t -p group-host --test sites passes, and just fmt. The rest is left to CI.

Shortcomings

  • putSite's url takes PUBLIC_URL's scheme, so in just dev it prints http://riders.groups.localtest.me/, where the site is served over https. Deployed, both are https.
  • Two just devs at once, in two worktrees, take each other's groups alias, as they already do the console's.
Approved

The pull makes a group with no site redirect / to CONSOLE_URL's /g/<handle>. It also makes the dev world name its groups under groups.localtest.me, registered as a portless alias that is removed on ctrl-c or when seeding fails. I read every changed file.

The host change is correct. console_url defaults to public_url (config.rs:142), so a deployment behaves as before. The test sets CONSOLE_URL apart from PUBLIC_URL and checks the redirect goes to the console's.

The handleDomain default of .groups.test leaves the e2e flows, just look and the shots unchanged. The Riders handle is built from it consistently. The docs and the CLI help text are updated.

I did not run just dev or the checks. The putSite url scheme mismatch in dev is already named in the pull's shortcomings and doesn't block it.

Merged as 01e024d