Skip to content

fix(deploy): surface allowance approvals in the TUI, drop guessed step totals#278

Merged
UtkarshBhardwaj007 merged 1 commit into
mainfrom
fix/deploy-allowance-prompt-visibility
Jun 4, 2026
Merged

fix(deploy): surface allowance approvals in the TUI, drop guessed step totals#278
UtkarshBhardwaj007 merged 1 commit into
mainfrom
fix/deploy-allowance-prompt-visibility

Conversation

@UtkarshBhardwaj007
Copy link
Copy Markdown
Member

Problem

Two related UX failures in phone-mode playground deploy / playground decentralise (observed in field testing, 4 June):

  1. Invisible phone prompts. RFC-0010 Bulletin allowance requests (first-use slot grant, quota Increase top-up) travel over the statement store outside any PolkadotSigner, so the signing proxy never saw them. The phone showed "Product dot-cli requests resource allocation" while the terminal sat silent — users had no idea a tap was being waited on. With slot grants observed at ~10 txs / 4 MiB and chunks at 2 MiB, the Increase tap recurs on most deploys.
  2. Wrong step totals. The "step N of M" total came from a pre-deploy plan that regularly drifted from what bulletin-deploy actually submitted (e.g. a predicted setUserPopStatus the runtime skipped), stranding users on "step 4 of 5" with no fifth step. Allowance taps additionally were never counted, so phone taps and the counter disagreed.

Changes

  • signingProxy.ts: new createApprovalPrompt(counter, onEvent) emits the existing sign-request / sign-complete / sign-error events around non-signer phone taps, sharing the deploy's step counter — one continuous sequence across signing and allowance approvals.
  • allowances/bulletin.ts: getBulletinAllowanceSigner takes an optional onPrompt (AllowancePrompt). Fires "Grant Bulletin storage allowance" only on a real slot-key cache miss (probe mirrors ensureSlotAccountSigner's own hit/miss decision) and "Increase Bulletin storage allowance" around the quota top-up. Errors fail the prompt and rethrow; handles close exactly once on every path.
  • Threaded through every resolution site: resolveStorageSignerOptions (chunk-upload slot key), publishToPlayground (metadata upload incl. the Payment-error retry), in both deploy and decentralise, interactive TUI and headless output.
  • createSigningCounter() no longer takes a predicted total; SigningEvent carries only step. Prompts read "approve step 1", "approve step 2", … PhoneApprovalCallout's total is now optional — init's fixed 1-of-1 flows keep passing it.
  • Pre-deploy summary says "Phone approvals expected: N" and, in phone mode, notes the possible extra Bulletin allowance approval.

Not in scope

  • The phantom "all three allowances" dialog mid-deploy is a stale pg init request redelivered by the statement store — needs an upstream mobile/host-papp fix.
  • pg init re-requesting all three resources when only the bulletin quota is exhausted (AccountSetup.tsx) — candidate follow-up.

Verification

  • pnpm test: 643/643 (7 new tests: prompt fires on cache miss / Increase, stays silent on cache hit, fail paths, counter continuity, dev-mode hint gating)
  • pnpm format:check, pnpm lint:license: clean
  • tsc --noEmit: 13 errors — exactly the pre-existing baseline
  • No React/Ink imports added under src/utils/deploy/ (RevX surface intact); no e2e consumers of the removed total field
  • Changeset included (patch)

…p totals

Phone-mode deploys send RFC-0010 Bulletin allowance requests (first-use
slot grant, quota Increase) over the statement store outside any
PolkadotSigner, so the signing proxy never saw them: the phone showed an
approval dialog while the terminal sat silent. getBulletinAllowanceSigner
now takes an onPrompt hook, fired only when a tap will actually happen
(cache-miss probe mirrors ensureSlotAccountSigner's own decision), and
deploy/decentralise thread a createApprovalPrompt built on the shared
step counter into every resolution site, including the metadata-upload
retry.

The step counter also no longer carries a predicted total. The plan
regularly drifted from what bulletin-deploy actually submitted (a
predicted setUserPopStatus the runtime skipped stranded users on
"step 4 of 5" with no fifth step), and allowance taps are demand-driven
so they can never be counted up front. Prompts now read "approve step 1",
"approve step 2", ... and the pre-deploy summary labels its count as
expected, noting the possible extra Bulletin allowance approval. Init's
fixed 1-of-1 callouts keep their explicit total.
@UtkarshBhardwaj007 UtkarshBhardwaj007 merged commit e37de84 into main Jun 4, 2026
18 of 19 checks passed
@UtkarshBhardwaj007 UtkarshBhardwaj007 deleted the fix/deploy-allowance-prompt-visibility branch June 4, 2026 16:00
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

E2E Test Pass · ✅ PASS

Tag: e2e-ci-pr · Branch: fix/deploy-allowance-prompt-visibility · Commit: a57f4ed · Run logs

Cell Result Time
pr-init-session ✅ PASS 1m56s
pr-deploy-frontend ✅ PASS 8m16s
pr-deploy-foundry ✅ PASS 0m42s
pr-preflight ✅ PASS 2m37s
pr-deploy-cdm ✅ PASS 3m31s
pr-install ✅ PASS 0m50s
pr-mod ✅ PASS 1m24s
${{ matrix.cell }} ⏭️ SKIP 0m00s
${{ matrix.cell }} ⏭️ SKIP 0m00s

Sentry traces: view spans for this run

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