Skip to content

feat(launch): rebuild the wizard as a 2-step Control Room - #2404

Open
dcccrypto wants to merge 3 commits into
playgroundfrom
feat/launch-control-room
Open

feat(launch): rebuild the wizard as a 2-step Control Room#2404
dcccrypto wants to merge 3 commits into
playgroundfrom
feat/launch-control-room

Conversation

@dcccrypto

Copy link
Copy Markdown
Owner

Replaces the 4-step / two-mode launch wizard with Token → Control Room. Manual mode is gone; everything technical is auto-resolved, everything a creator actually chooses gets a real instrument.

The Control Room

Four machined rotary dials — leverage, trading fee, liquidity, insurance. Drag, scroll, or arrow-key them; they snap to detents and run a power-on needle sweep on mount, the way real instruments self-test on boot. Launching is a press-and-hold key with a filling ring instead of a click — a launch is irreversible and costs rent, so the gesture should cost something too. Release aborts. Reduced-motion and mock-mode get a plain press.

It also removes two things the old UI was lying about

1. Slab tiers don't exist in v17. The wizard already passed a fixed slabDataSize: DEFAULT_SLAB_SIZE (26,364 B = v17MarketAccountLen(14), the program's max capacity — InitMarket reverts on any other size). So SlabTierPicker changed the displayed cost and not one on-chain byte — a placebo control. Real rent is 0.184 SOL (verified against devnet), not the ~7 SOL the stale hardcoded TIER_COSTS string claimed. In v17 portfolios are their own accounts, so there's no user-capacity to size for.

2. The leverage readout was false. Default initialMarginBps was 1000 and the UI said 10×, but create() floors to MIN_SAFE_INITIAL_MARGIN_BPS (1500) — so markets were actually created at 6.67×. The dial is now bounded at the real ceiling (2×–6.5×) with a 2000 bps (5×) default, so the number shown is the number that lands on-chain.

Changes

  • Added: RotaryDial, HoldToLaunch, StepControlRoom
  • Deleted: ModeSelector, SlabTierPicker, StepOracleSelect, StepParameters, StepReview (+ obsolete tests)
  • Updated: CreateMarketWizard (2 steps), WizardProgress, CostEstimate, LaunchSuccess

Launch semantics, resume/recovery, pre-fund, duplicate check, and balance validation are all untouched.

Test

tsc clean · wizard suite 26/26 · no new failures vs the pre-existing baseline (101 unrelated failures before and after). Accessible: dials are role="slider" with arrow/Home/End keys; hold key works with Space/Enter.

🤖 Generated with Claude Code

Replaces the 4-step, two-mode launch wizard (Token → Oracle → Parameters →
Review, with a Quick/Manual toggle) with a 2-step flow: Token → Control Room.
Manual mode is gone; everything technical is auto-resolved and everything a
creator actually chooses gets a real instrument.

The Control Room is four machined rotary dials (leverage, trading fee,
liquidity, insurance) — drag, scroll, or arrow-key them; they snap to detents
and perform a power-on needle sweep on mount. Launch is a press-and-hold key
with a filling ring rather than a click: a launch is irreversible and costs
rent, so the gesture should cost something too. Release aborts. Reduced-motion
and mock-mode users get a plain activating press.

Also removes two things the old UI was quietly lying about:

1. SLAB TIERS DON'T EXIST IN v17. The wizard already passed a fixed
   `slabDataSize: DEFAULT_SLAB_SIZE` (26,364 B = v17MarketAccountLen(14), the
   program's max capacity — InitMarket reverts on any other size), so
   SlabTierPicker changed the displayed cost and not one on-chain byte. It was
   a placebo control. Deleted, along with the misleading tier label/slot count
   in CostEstimate and LaunchSuccess. Real rent is 0.184 SOL (verified against
   devnet), not the ~7 SOL the stale hardcoded TIER_COSTS string claimed.

2. THE LEVERAGE READOUT WAS FALSE. Default initialMarginBps was 1000 and the UI
   said "10×", but create() floors to MIN_SAFE_INITIAL_MARGIN_BPS (1500), so the
   market was actually created at 6.67×. The dial is now bounded at the real
   ceiling (2×–6.5×) and the default is 2000 bps (5×), so the number shown is
   the number that lands on-chain.

Deleted: ModeSelector, SlabTierPicker, StepOracleSelect, StepParameters,
StepReview (+ their obsolete tests).
Added: RotaryDial, HoldToLaunch, StepControlRoom.

tsc clean; wizard suite 26/26; no new failures against the pre-existing baseline.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
percolator-launch Ready Ready Preview, Comment Jul 13, 2026 7:54pm
percolator-mainnet Ready Ready Preview, Comment Jul 13, 2026 7:54pm
percolator-playground Error Error Jul 13, 2026 7:54pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2973d33f-a81c-42a8-8044-feed3ea57bd4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/launch-control-room

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…wizard

Found by actually clicking through /create in a browser rather than trusting tsc.

1. app/create/page.tsx still hardcoded "small: ~0.45 SOL · medium: ~1.8 SOL ·
   large: ~7 SOL" in the page subtitle — the same dead v12 tier costs the
   components were just purged of. v17 has no tiers and the real rent is
   ~0.19 SOL. Replaced with "~0.19 SOL rent · max capacity · 1 approval".

2. The quick-launch defaults effect wrote initialMarginBps: 1000 straight into
   wizard state. create() floors that to MIN_SAFE_INITIAL_MARGIN_BPS (1500 =
   6.67x), while the leverage dial snaps to 0.5x and can only render 6.5x — so
   the dial read 6.5x while the state would actually create a 6.67x market.
   Neither the raw 1000 nor a plain floor to 1500 fixes it. Round-tripping
   bps → leverage → bps lands on 1538 bps, which IS exactly 6.5x, so the number
   on the dial is now the number written on-chain. Same class of lie as the old
   "10x" readout that this PR set out to remove.

tsc clean; wizard suite 26/26.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… the network

next.config.ts already had allowedDevOrigins, but it only covered 192.168.1.*
and localhost. Next blocks cross-origin requests to /_next/* dev resources by
default, so reaching the dev server on any other host returned the full HTML and
then blocked every JS chunk — a page that renders <body> and nothing else. The
LAN address that WAS allowlisted is firewalled, so Next advertises the Tailscale
address instead, which wasn't. Added it (plus the 100.64.* CGNAT range).

Dev-only; no effect on production builds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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