Skip to content

fix(dashboard): onboarding pages register nothing fake and claim no success (PX-10 Wave 0) - #401

Draft
LamaSu wants to merge 1 commit into
masterfrom
fix/onboarding-wave0-no-false-success
Draft

LamaSu wants to merge 1 commit into
masterfrom
fix/onboarding-wave0-no-false-success

Conversation

@LamaSu

@LamaSu LamaSu commented Sep 24, 2026

Copy link
Copy Markdown
Owner

What

PX-10 Wave 0. This answers product-steward #2386 and #2561, product-qa #31 and #32 (both P1), and shell #2544.

The onboarding pages that cannot register a machine now register nothing and claim no success. Each one says "Nothing was registered" and hands what the user typed to the canonical entry, /onboard/chat (decision D3).

Before and after, per page

Page Before (at ac86a404) After
/start (public) Registered onto the hard-coded kernel_dev_001 with a mock or generic-http adapter. Never read the response, then showed "You're live … is on the network", even after a 401 (QA #31). No network call. "Go live" becomes "Continue". The last step is "Not live yet" with the hand-off.
/onboard/wizard Step 7 Registered adapterType: 'mock' three times, onto a kernel that didn't exist. A network error became an "offline success" with an invented device id (QA #32). Review first, then "Not registered yet" with the hand-off. No registration and no test job.
/setup/agent Registered onto kernel_dev_001 + mock. Then showed a test result built from the HTTP status with duration: 1234, or "what the results would look like", and "Setup Complete! … added to the PCC network". A confirmed configuration goes to the hand-off. The fake test-result and setup-complete renderers are removed.
Step 2, documents sha256:${Math.random()…} as each document's hash; a 2.5 s pretend AI analysis; the same invented specs for every file. The real SHA-256 of the bytes via WebCrypto (or "No hash computed"). Files are listed as not analyzed.
Step 4, space Read-only example values (mock data) shown as the user's machine. Says the step doesn't collect space yet, and saves nothing. Validation no longer requires it.
Step 5, pricing Read-only example prices; an invented network average (28.5) that one click applied to the user's price; an ROI chart from made-up volumes. Editable and starts empty. Validation needs a positive base price the user typed. No market card and no ROI chart.
Step 6, operator Added example certifications to the user's profile. Adds none, and says so.
/setup, identity step An invalid or unreachable /setup/validate still marked setup complete. The copy claimed an ERC-8004 identity registration. Validation errors and an unreachable gateway stop the step. Skip is still an explicit choice. The copy is honest.

The /start rate step also loses two claims. "Your rate is visible to anyone searching" is false once nothing registers. "You keep 100% — no platform fees" contradicts the 2.35% protocol fee (FYI launch, D0).

The hand-off

  • lib/onboard-handoff.ts builds a plain-text draft from only what the user entered. Empty fields are left out; defaults and example data never appear.
  • components/onboard/OnboardHandoffPanel.tsx shows:
    • "Nothing was registered";
    • the draft, with a Copy details button;
    • a link to /onboard/chat whose router state carries the draft under onboardDraft.
  • The chat page does not read that state yet (shell's file), so the panel never claims the chat already has the details.
  • Nothing in the hand-off talks to the network.

Not in this PR

  • Clarity's Step 7 port. It still registers a mock adapter, and product-steward decided not to land it as written (#2386). R40 is the real kernel-creation step.
  • Explicit Skip on /setup still ends at "Setup Complete". That surface retires in PX-10.
  • /onboard/chat reading onboardDraft, which is shell's call.

Tests

  • Dashboard: 270 passed, 0 failed (14 files). tsc --noEmit is clean.
  • New, 50 tests in 5 files:
    • onboard-handoff: the draft keeps only entered values;
    • file-sha256: FIPS "abc" and empty-input vectors; null, never a fake value, without WebCrypto;
    • OnboardHandoffPanel.render: static render. It says nothing was registered, links to /onboard/chat, and claims no success;
    • wizard-draft: the draft, pricing input, and store validation;
    • onboarding-wave0: the source is read as text with comments stripped. No registration or test-job endpoint and no mock or dev-kernel patterns on the three surfaces. No false-success copy. No mock data or Math.random in Steps 2, 4, 5 and 6. /setup does not complete on an invalid or unreachable validation.
  • Mutation check: I reverted each behaviour in turn (10 mutants). Every mutant fails the new tests.

Merging with shell's #368 (N50)

There is one expected conflict, in SetupAgentPage.tsx, and it is trivial. #368 moves this page to authorizedFetch, including the register-device call this PR deletes.

I checked the resolution locally: the merged tree gives 314 passed and tsc is clean. Whichever PR merges second applies it:

  1. SetupAgentPage.tsx imports: keep authorizedFetch (fix(dashboard): N50 — /setup and /setup/agent never send the API key to localhost:3200 #368) and this PR's OnboardHandoffPanel and machineConfigDraft imports. getAuthHeaders is no longer used.
  2. SetupAgentPage.tsx body: take this PR's machine_config_preview branch. It has no register-device call.
  3. fix(dashboard): N50 — /setup and /setup/agent never send the API key to localhost:3200 #368's no-direct-auth-headers.test.ts: remove "pages/StartPage.tsx" from KNOWN. StartPage no longer builds an auth header, and that shrink-only ratchet says so.
  4. fix(dashboard): N50 — /setup and /setup/agent never send the API key to localhost:3200 #368's setup-key-origin.test.tsx: check only /api/ai/identify-machine. Add expect(calls.some((c) => c.url.endsWith("/api/setup/register-device"))).toBe(false).

#354 merges cleanly.

Shell's no-prod-mock ratchet (#2544): when this lands, remove the known-offender entries for StartPage, Step7_Review, SetupAgentPage and Steps 2, 4, 5 and 6.

Review

Shell offered to review (#2544). Product-steward owns the dispositions.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PkeiQMnVePeBGU9svhREFy

…uccess (PX-10 Wave 0)

/start, the /onboard/wizard review step and /setup/agent registered the
user's machine with a placeholder adapter (onto the shared dev kernel on
/start and /setup/agent), then reported success whatever the gateway
answered: "You're live" (QA #31), an "offline success" with an invented
device id (QA #32), and a test result built from the HTTP status with a
made-up duration. The wizard steps also showed invented data as the
user's: a random string as each document's sha256, a timed fake AI
analysis, read-only example space and pricing values, a network average
that one click applied to the user's price, and example certifications.

Per product-steward #2386/#2561 and shell #2544, these pages now register
nothing. They say "Nothing was registered" and hand what the user typed to
/onboard/chat (decision D3): a copyable draft, plus router state
(onboardDraft) the chat page can read later. Details:

- StartPage: no network call; "Go live" is "Continue"; the last step is
  "Not live yet" with the hand-off. The false "visible to anyone" and
  "no platform fees" copy is gone (the protocol charges 2.35%).
- Step7_Review: review, then the hand-off; no registration or test job.
- SetupAgentPage: a confirmed configuration goes to the hand-off; the fake
  test-result and "Setup Complete!" renderers are removed.
- Step2: the real SHA-256 of the bytes via WebCrypto (or none); documents
  are listed as not analyzed.
- Step4: says space is not collected yet and saves nothing; validation no
  longer requires it.
- Step5: editable, empty pricing; no invented market rate or ROI chart;
  validation needs a positive base price the user typed.
- Step6: adds no example certifications.
- SetupWizardPage: a failed or unreachable /setup/validate no longer marks
  setup complete, and the copy no longer claims an ERC-8004 registration.

Tests: dashboard 270 passed (5 new files, 50 tests); tsc --noEmit clean.
10 mutants (reverting each behaviour) all fail the new tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkeiQMnVePeBGU9svhREFy

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant