Repository navigation
feat(vault): migrate market/proposals/witnesses callers to useSessionSigning (A6-T4) - #397
Merged
Merged
Conversation
…Signing (A6-T4) Migrates the last five business signing callers onto the unified useSessionSigning entry and closes the market/proposals login-dialog UX gap, completing the A6 caller migration. - Callers: market-page-client (limit_order_create / limit_order_cancel), proposals-page-client (update_proposal_votes), proposal-creator-dialog (create_proposal), proposal-remove-dialog (remove_proposal), witness-vote-form (account_witness_vote / account_witness_proxy). Operation tuples are byte-identical to the retired SteemSigner builders (including the limit_order_create ISO expiration conversion); broadcast routes/payloads unchanged; privateKey behavior unchanged apart from the disclosed dialog tightening below. - All seven call sites sign at the ACTIVE floor. update_proposal_votes is active-class on Steem (the legacy postingOps whitelist never listed it; the pre-T4 caller signed with the active-or-owner key) - the classifier table already classified all five op types; new pin tests guard them. - UX gap closure: the market/proposals/witnesses sign-in dialogs now pass requiredAuthTypes ['active'] with no fixedUsername (session-account pages), so a privateKey login is fit for purpose the first time. The LoginForm dispatcher no longer shows the vaultUnsupported notice for requiredAuthTypes alone - identity selection stays available in Vault Mode and the per-action password dialog enforces the floor after login; the notice remains for account-pinned (fixedUsername) re-auth. The witness login dialog's conditional fixedUsername (the last business notice reachability) is retired. - Vault identity sessions get every action on the three pages through the per-key password dialog (action gates widen to authenticated-session); keyless privateKey sessions get the classic account-locked re-auth dialog per caller (needsClassicReauth). - Docs: 09-vault.md (known UX gaps none left except the permanent permissions key-reveal notice; final who-still-signs-directly inventory), 02-auth.md, 06-frontend.md. - Tests: new wallet-t4-session-signing suite (5 callers x 3 session shapes + tuple pins + dialog propagation + witness notice retirement), reworked caller suites onto the hook boundary, dispatcher narrowing pin, classifier pins, and a vault-session proposals-vote e2e (exact broadcast tuple, zero /api/auth/* traffic).
- 06-frontend.md: disambiguate the T4 floor phrasing — 'each of the five T4 callers at the ACTIVE floor', with the earlier callers' posting/owner floors referenced as the documented exceptions (mirrors 02-auth.md). - wallet-t4-session-signing: pin the re-auth dialog props (fixedUsername + requiredAuthTypes ['active']) in the remove-dialog keyless test, matching the create-dialog's test. - PR body: the lint warning note now states the exhaustive-deps warning's file (login-form.tsx) is touched by this PR (line moved 178->187).
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.
Part of #381
Summary
A6-T4 — the LAST migration PR: moves the final five business signing callers onto the unified
useSessionSigning()entry and closes the documented market/proposals login-dialog UX gap. Vault identity sessions now sign market limit orders, proposals votes / create / remove and witness vote / proxy through the per-key password dialog (no re-login loop); privateKey behavior is preserved exactly apart from the disclosed first-login tightening below. Operation tuples are byte-identical to the retiredSteemSigner.*builders; broadcast routes and payloads unchanged.Per-caller role floors and classifier state (all verified against the current key resolution — every op here was already in
OPERATION_AUTHORITY_CLASSES, so the classifier needed NO code changes, only new pins):limit_order_create/limit_order_cancelat the active floor (table entries; same active→owner resolution the previoususeActiveSigningKeygave). Tuple pins cover field order,fill_or_kill: false, the ISOexpirationconversion (unixSecToSteemIsoTimestamp— condenser_api expectstime_point_sec, not unix seconds) and uint32 orderid range.update_proposal_votesat the active floor. Deviation from the task hint ("posting class"): update_proposal_votes is an ACTIVE-class Steem operation — three agreeing sources: the classifier table (in place since A4 feat(vault): manager, signer and unified signing facade (A4) #389), the legacypostingOpswhitelist (vote, comment, delete_comment, custom_json, claim_reward_balance— proposal votes absent, so legacy signed them with the active key), and the pre-T4 caller itself (useActiveSigningKey= active→owner). A posting floor would have silently CHANGED privateKey key resolution; 'active' preserves it exactly.create_proposalat the active floor (table entry; normalized creator/receiver kept, pinned).remove_proposalat the active floor (table entry;proposal_ownernormalization kept, pinned).account_witness_vote/account_witness_proxyat the active floor (table entries). The pre-A6signingKeyRefgate is gone: an authenticated vault session votes through the password path instead of re-opening a login dialog, and the login dialog's conditionalfixedUsername— the last business reachability of thevaultUnsupported*notice — is retired (pinned: vault session → action completes, zero LoginForm mounts).Login-dialog decisions (the documented gap closure)
requiredAuthTypes: ['active']— derived from each dialog's actions: every action on these pages is active-class (order place/cancel, vote, create, remove, witness vote, proxy). This is a deliberate privateKey UX tightening, disclosed per the documented gap: a posting-only privateKey login that previously "succeeded" and then looped (action → no key → dialog reopened) is now rejected up front withinsufficientAuthority. Proposals asks for active, NOT the task-hinted posting, because its ops are active-class —['posting']would re-open the exact loop the gap closure removes.fixedUsernameon these dialogs: they are session-account pages; the dialogs open only for unauthenticated visitors who may log in as any account. Each caller'sneedsClassicReauthsurface is a separate account-locked re-auth dialog (fixedUsername+['active']), matching the delegate/transfer pattern.LoginFormdispatcher narrowing:requiredAuthTypesALONE no longer triggers thevaultUnsupported*notice — Vault Mode keeps identity selection there and the per-action password dialog enforces the floor after login ("the real path ... that A6 wires" from the T2 comment). The notice remains for account-pinned (fixedUsername) re-auth — identity selection would switch accounts — so every existing consumer (which all pass both props) is unchanged; the permissions key-reveal notice stays permanently. Pinned inlogin-form-dispatch.test.tsxand by the t4 suite's dialog-propagation tests.Implementation notes
useActiveSigningKeydid; keyless sessions getneedsClassicReauth→ the classic re-auth dialog (per caller: market, proposals page, creator dialog, remove dialog, witness form each own one).pendingActionreplay effect drops itssigningKeyRefcondition (fires on authenticated session; a keyless privateKey replay ends in the re-auth dialog rather than silently doing nothing — a small improvement over the old behavior where the replay quietly never ran for a posting-only login).SteemSignerinventory (no business callers remain — cleanup of the retired builders is a separate decision, NOT done here):login-form.tsxsignChallenge(login challenge, permanent);recover-account-confirmation-page.tsxsignRecoverAccount(dual old+new owner signatures, invariant 20, permanent);claim-rewards-banner.tsxsignClaimRewardBalance(device-remembered posting-key branch — key exists in no session);communities-section.tsxsignOperations(hivemind setup ops with the new community owner's freshly derived key — exists in no session).login-form.tsx(derive/privateKeyToPublicKey/isValid/verify),recover-account-step-1-page.tsx,recover-account-confirmation-page.tsx,account-keys.ts,change-password.ts,claim-rewards-banner.tsx(verifyPrivateKey).signLimitOrderCreate,signLimitOrderCancel,signUpdateProposalVotes,signCreateProposal,signRemoveProposal,signWitnessVote,signWitnessProxy(this PR), plus the T2/T3a/T3b batch (signTransfer,signDelegate,signPowerDown,signTransferToVesting,signConvert,signSetWithdrawVestingRoute,signCancelTransferFromSavings,signAccountUpdate,signAccountCreate,signChangeRecoveryAccount).09-vault.md— "Known UX gaps" block rewritten (none left for vault sessions; permissions key-reveal notice permanent), module map + invariant-21 consequences + R3-decisions notice semantics + the A6 progress block now states the COMPLETE caller migration with the final who-still-signs-directly inventory;02-auth.md— signing-entry inventory, the update_proposal_votes authority note and the login-dialog contract;06-frontend.md— key-selection rule status.wallet.reauthTitle/reauthDescription, all four locales).Test plan
pnpm verifygreen (type-check + lint — 0 errors, 3 warnings: the exhaustive-deps warning is pre-existing but its file (login-form.tsx) IS touched by this PR (the dispatcher comment rewrite moved its line 178→187); the other two warnings are in untouched files — plus 153 files / 1681 unit tests + coverage 83.99% stmts / 75.9% branches / 86.25% lines + build).tests/unit/wallet-t4-session-signing.test.tsx: 5 callers × 3 session shapes (privateKey-with-key signs the byte-identical tuple at the active floor; vault session completes with zero LoginForm mounts; keyless privateKey → account-locked re-auth withfixedUsername+['active']) + tuple pins for all seven ops + dialog-propagation pins (market/proposals/witnesses sign-in dialogs:['active'], no fixedUsername) + the witness notice-retirement pin.market-page-client.test.tsx(G-7/G-14 orderid pins preserved),proposals-page-vote.test.tsx(optimistic flip K-3 preserved),proposal-creator-dialog.test.tsx,proposal-remove-dialog.test.tsx(normalization pins preserved).login-form-dispatch.test.tsx:requiredAuthTypes-alone now pins identity selection;fixedUsernamenotice case unchanged.vault-signer.test.ts: classifier pins for all seven T4 shapes.pnpm e2egreen — 20/20, including the new vault-session proposals-vote flow invault-session-signing.spec.ts(SPA navigation via the side panel, active-floor dialog offers only the active-stored key, byte-identicalupdate_proposal_votestuple broadcast, zero/api/auth/*traffic).Not verified or known limits
useActiveSigningKeygate) — same shape as the T3a wallet forms; flagged as behavior-visible.SteemSignerbuilders are left in place intentionally (per task instructions); deleting them is a separate orchestrator decision recorded in the inventory above.