feat(decentralize): interactive TUI + deploy-flow integration#211
Merged
Conversation
Before, `dot decentralize --site=example.com` picked a random `decent-ffe0ab72.dot`. The label was unrecognisable in the resulting `.dot.li` URL and gave the user no clue which site they were mirroring. After, the auto-name starts with a dumb transliteration of the URL's hostname (lowercase, dots → hyphens, sanitised to `[a-z0-9-]`, capped at 30 chars), followed by a 4-letter random tail + 2 digits. No TLD or `www.` stripping — that requires the Public Suffix List, which we don't want as a dep; users who want a clean name pass `--dot` explicitly. Falls back to the legacy `decent-` shape for unparseable inputs. example.com → example-com-uslj17.dot shawntabrizi.com → shawntabrizi-com-byhq57.dot shawntabrizi.github.io → shawntabrizi-github-io-<rand>NN.dot Also fixes a latent classifier bug. The previous hex-based suffix produced labels with >2 trailing digits ~62% of the time (whenever the random hex happened to end in a digit), classified as RESERVED and silently masked by the 20-attempt retry loop. The new generator uses lowercase letters only in the variable middle so the trailing- digit invariant holds for every call. New test file covers the invariants across 200 iterations: exactly 2 trailing digits, base length ≥9 (NoStatus), normalizeDomain regex compatibility, plus the hostname-incorporation cases.
Add an interactive flow to `dot decentralize` and wire it through deploy's existing publish machinery. - `dot decentralize` with no `--site` opens an Ink TUI: yellow advisory callout, site URL prompt, dev/phone signer picker, `.dot` name prompt with live availability check, publish-to-playground prompt, confirm, and a deploy-style step-row progress view (mirror / upload+dotns / publish) with a throttled latest-log line. - The headless `dot decentralize --site=...` contract is unchanged; add an opt-in `--playground` flag for registry publish parity. - Runner threads `(mode, userSigner)` through deploy's `resolveSignerSetup` and calls `publishToPlayground` so dev-mode-with-session records the user's H160 as owner; mirrored sites publish with `repositoryUrl: null` and `isModdable: false`. - Phone-mode signing surfaces the "check your phone" callout (and a headless equivalent) via deploy's signing-event proxy. - Fix unrenderable sites: `wget --no-host-directories` keeps URL path segments as subdirs, so `index.html` landed below the upload root and Bulletin's viewer reported "Archive missing index.html". `findIndexHtmlRoot` resolves the real document root before upload. - Auto-exit the done/error screens instead of waiting for a keypress. - Rename `createAliceSignerForDevPublish` to `createDevPublishSigner` and export it for reuse (the name is not Substrate's //Alice). Tests: stage machine, URL/domain validators, mirror helpers (findIndexHtmlRoot, WgetMissingError, empty-mirror), and the deploy-event formatter.
Contributor
|
Dev build ready — try this branch: |
Contributor
E2E Test Pass · ✅ PASSTag:
Sentry traces: view spans for this run |
4 tasks
ottovlotto
added a commit
that referenced
this pull request
May 27, 2026
Update product context to v0.18 scoring overhaul, tutorial rename
(Rock Paper Scissors, not "The Stadium"), stars one-way (CR2),
display name precedence (registry username → wallet name → H160),
sample apps status (Feedback Board built, others candidates), and
prize logistics (4-way $500 split). Drop adjective-noun display
name model; drop per-feature build statuses; trim items now
resolved ("modded-from capture not yet built", "parallelised dep
install not yet built") that have since landed.
Also adds the v0.18 backlog items now in scope (mobile signing hang
detection, up-front phone approval count, dot mod post-clone UX) and
the dot decentralize command that shipped under PR #211 (spec calls
this V2.5 dot import).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds on #181 (
feat/decentralize, rebased onto currentmain) and makesdot decentralizea first-class interactive command that reuses the existingdot deploypublish machinery.dot decentralizewith no--siteopens an Ink TUI: a yellow advisory callout, site URL prompt, dev/phone signer picker,.dotname prompt with live availability check, a publish-to-playground prompt, a confirm card, and a deploy-style step-row progress view (mirror / upload+dotns / publish) with a throttled latest-log line.dot decentralize --site=...keeps its existing contract (the demo service that passes--suri=//Bobis unaffected). Added an opt-in--playgroundflag for registry-publish parity.(mode, userSigner)through deploy'sresolveSignerSetupand callspublishToPlayground, so dev-mode-with-session records the user's H160 as the registry owner. Mirrored sites publish withrepositoryUrl: nullandisModdable: false(no GitHub source).Bug fixes folded in
wget --no-host-directorieskeeps URL path segments as subdirectories, sohttps://host/foo/wroteindex.htmlone level below the upload root and Bulletin's viewer returned "Archive missing index.html".findIndexHtmlRootnow resolves the real document root before upload. Verified againsthttps://utkarshbhardwaj007.github.io/visualise-agents/.createAliceSignerForDevPublish→createDevPublishSigner(it is not Substrate's//Alice) and exported it for reuse.Notes
publish(); dev-signer publishes carryis_dev_signer=trueand earn 0 (anti-abuse). Phone-mode publishes earn launch_points — same rule asdot deploy.claimedOwnerH160).Test plan
pnpm format:check,pnpm lint:license,pnpm build,pnpm test— 593 passed / 1 skippeddot decentralizeinteractive end-to-end on paseo-next-v2 (dev + phone signers)