Repository navigation
fix(tokens): keep token action forms under their heading and add a Create Token shortcut - #1129
Conversation
Pin dash-sdk, rs-sdk-trusted-context-provider, platform-wallet and platform-wallet-storage to dashpay/platform v5.1-dev 063589bf (5.0.0-rc.8). The lockfile moves only the Platform packages. The upstream V019 wallet-storage migration adds a nullable asset-lock operation id; V001-V018 are unchanged. The compatibility bridge gets the 033ecae destination snapshot it compares against, and the pin guard records the new revision with an unchanged migration fingerprint. BREAKING CHANGE: the wallet storage upgrade to V019 is forward only. An older build cannot open upgraded storage; going back needs a copy of the data directory taken before the upgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The new rust-dashcore wraps secp256k1 keys in EcdsaSecretKey and EcdsaPublicKey, returns secret bytes as Zeroizing, and drops the Secp256k1 context argument. Signers, single-key wallets, DashPay derivation, address and QR handling, migrations and their tests follow the new types. Signing stays on the non-grinding dpp::secp256k1 path, and a parity test pins the BLS signature bytes the previous SDK made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Handle the dpp and SDK types the new pin adds, keeping today's behaviour: - Document replace keeps moderated_at and moderated_by; new documents start without them. - The document editor refuses typed-array fields instead of dropping their contents, and keeps referenced key ids as numbers. - Shielded token events show read-only in group actions, and the shielded pool token settings are refused before anything is signed. - Contested document creation states the protocol's base contest fund, so the SDK never auto-quotes a larger one. - Masternode vote reads use ResourceVoteWithCount, the SDK's new vote type; the vote count is not used yet. - New query fields, wallet events, wallet error variants and asset-lock funding modes are handled where the SDK now requires them. - Entropy-only document ids are documented as placeholders from protocol 14, and deferred upstream features link to their issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The SDK was pinned to the protocol 13 table, so it could not build any protocol 14 transition or follow the versioned identity lookup. It now starts at upstream's per-network minimum and ratchets to what proven responses report. - System contracts are cached per protocol version and served through accessors. The context provider serves them at the version the proof verifier asks for and fails rather than serve another version's. - A proved epoch sets the fee multiplier and raises the protocol version. An older epoch than the adopted one is ignored. - Rebuilding the connection resets the protocol version, fee multiplier and adopted epoch under one lock before the new SDK is published, and drops reads begun on the old connection. - Capabilities read the network's version through a helper that stays closed for a version this build does not define. - Contest timing reads the live version; retired vote schedules keep the protocol 13 notice window they were created under. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Compare the protocol 13 client tables with a recorded snapshot, so an upstream change to them is reviewed, and check that keys and documents DET builds on a protocol 13 network use encodings protocol 13 decodes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Map the refusals the new protocol adds to flows DET already offers to dedicated TaskError variants: a full username contest, a vote choice the contest does not allow, a name someone else asked for first, a token that cannot be moved, a changed immutable document field, a reference to a document type that cannot be deleted, and a moderators' fee on a contract without moderation. Names supplied by the node stay in the typed source only, never in the message. Token operations that fail inside the wallet runtime keep their SDK cause, so they are classified like any SDK error; an unclassified one names the operation that did not complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Add a dated design note for the pin, the protocol version sources, the connection state rules and the protocol 13 guards, and point AGENTS.md at From<SdkError> for TaskError as the SDK error reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…transfer Protocol version 14 lets a token configuration make a token non-transferable, and Platform refuses every transfer of such a token. - My Tokens no longer offers Transfer for a token that cannot be transferred; the disabled button says why. - The token creator offers "Holders can send this token to other identities", on by default. Turning it off uses upstream TokenConfiguration::set_transferable, which moves to a version 1 configuration only for a non-transferable token, so a transferable token keeps the version 0 format older networks accept. - The option is gated on a new NonTransferableTokens capability: the connected protocol version must decode version 1 token configurations. The creator and the backend both refuse a non-transferable token on a network that does not, before anything is signed. - Platform's refusal of a tradeable non-transferable token maps to a dedicated, actionable error. - User story TOK-020. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…it refusals Protocol version 14 refusals that flows already in DET can hit get dedicated, actionable messages, each keeping the SDK error as its source: - an identity banned or suspended (until when) on a moderated contract; - a gas sponsor short of credits, a gas payer the document type does not offer, and mixed gas payers in one batch; - pre-programmed token distributions of one time over the limit. An overflowing shielded note total is logged at warn: it means corrupt or hostile sync data, not routine noise. Tests cover contracts saved at protocol 12 loading unchanged at 13 and 14, and contracts saved at 14 decoding at 13 and in full again at 14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…efusals from the Platform bump Merges 74695e7 from chore/bump-platform-063589bf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
A lookup at another version, as the proof verifier makes at a response's version, swapped out the app's set, so each such lookup reloaded the system contracts and the next app read reloaded them again. Each version now keeps its own set; the app's reads keep the set they last got for a failed reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…poch When the epoch cannot be read, the proved DPNS fallback confirmed the SDK's version, which starts at the network's upstream minimum (14 on devnet), as the network's. It now confirms the version of the responses the SDK verified, and nothing before any. Restores the completed-withdrawal status list with the reason sending FAILED to a protocol 13 network is safe, and its test, now comparing the protocol 13 schema with the latest one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The derived key DET signs with is copied into secp256k1's own type, which keeps its bytes after use. Wrap it so it is erased on drop, as the derived key it comes from would be; signatures stay byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
… protocol 13 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The new refusals sent users to another document editor or token client. They now say the app cannot edit this field type, sign this action or change this token setting yet, in one wording, and the shielded setting refusal sits with the token contract errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Also corrects the platform compatibility fixtures README: no code reads e3cd7cf.sql any more; it is the V001-V018 checksum reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Capability::NonTransferableTokens opens from protocol version 14 through known_protocol_version_at_least, like every other protocol capability, instead of probing the token configuration format version (which feature_gate.rs itself warns against). The token creator's local refusal and disabled-checkbox hint reuse TaskError::NonTransferableTokenNotSupported's text instead of copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…ferable token branch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The protocol version fallback takes only a version the SDK verified, and a mock expectation's metadata is never recorded as verified, so the three headless refresh tests saw the version stay unconfirmed. The mock now has the SDK accept the version from metadata treated as proved, as after a live network's signed response, and a new test pins that a response the SDK never verified leaves the version unconfirmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The SDK picks each transition's encoding from the platform version DET passes in, so these tests checked dpp's version tables rather than DET. The mainnet start version and the contest fund cap stay covered by the platform_info and fee_estimation tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The SDK at this pin already tracks the version the network has proven: it records the version of every response whose proof and quorum signature it verified, and a rebuilt connection is a new SDK that starts from nothing. DET's own copy, raised from proved epochs and DPNS reads and reset on every rebuild, duplicated that state. The app now reads the current SDK's verified version; capabilities still stay closed before a version is proven and for one this build does not define, and network info shows the proven number or says none is confirmed. Proved epochs still set the fee multiplier, in epoch order and only on the current connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
A connection rebuild never changes the chain, the multiplier changes once per epoch and feeds only fee estimates, so ordering epoch reads and dropping those begun before a rebuild guarded against nothing worth the machinery. A proved epoch read sets the multiplier directly again; an unavailable epoch still keeps the last known value and labels it as such. A rebuild still reads the epoch, so the new SDK proves the network's version again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
A released protocol's tables and each network's minimum version are upstream's to keep fixed; DET's start is covered by platform_version_starts_at_the_network_minimum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The proof verifier asks for contracts at the version it verifies with, which can be newer than the SDK's. System contracts were already served at that version; a saved user contract was decoded at the SDK's version instead, dropping newer-protocol settings such as action fees. The fallback now decodes it at the version asked for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…king Building the recoverable-signature envelope returns an error upstream; it is now reported as the existing message-signing failure, with the detail logged, instead of aborting the signing path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…rable The squash commit's tree equals #1114's final head, which this branch already contains, so the tree is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…ferable tests #1114 removed DET's protocol version copy. The tests prove versions through the SDK, which only raises them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…eate Token shortcut The shared token action scaffold (mint, burn, freeze, unfreeze, destroy frozen funds, pause, resume) placed its "Advanced Options" checkbox in a bare right-to-left layout inside the top-down central panel. egui gives such a layout all remaining height and centres the checkbox vertically in it, so the form started at the bottom of the window. The checkbox now shares the heading's row, as on the transfer, claim, purchase, set price and update config screens. My Tokens gains a "Create Token" toolbar button that switches to the Token Creator through a new typed DesiredAppAction::SetMainScreen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Token Creator navigation src/app.rs, src/ui/tokens/tokens_screen/mod.rs, tests/kittest/tokens_screen.rs |
A new app action carries the root screen to select. My Tokens adds a Create Token button. Tests check that the button selects Token Creator, updates the root-screen setting, and displays the Token Creator subscreen. |
Token action screen headings src/ui/tokens/token_action_screen.rs, tests/kittest/tokens_screen.rs |
The heading appears in the no-keys and locked-wallet paths. In the normal form path, it shares a row with Advanced Options. Layout tests cover seven token action screens. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Suggested reviewers: lklimek
Merge Risk: 
Minimal · up to 308aa
-
The token navigation and layout changes have no identified merge-blocking issue; proceed with normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Comment @coderabbitai help to get the list of available commands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
|
✅ Final review complete — no blockers (commit 308aa92) · triage: low · Phase 2 only (no Phase 1 for this repository) |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 2 only (no Phase 1 for this repository)
The PR correctly keeps the shared token-action heading, advanced-options checkbox, and form together in a compact row layout, while preserving headings for no-key and locked-wallet states. The new Create Token toolbar action uses the existing typed root-screen navigation and persistence path, and the added tests cover all seven scaffolded actions and the navigation flow. Clippy and policy checks passed; the Test Suite was still in progress, with no code issue identified.
Review provenance
Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.1-sol(effort low) — This is a small, well-contained UI layout and navigation change with focused regression tests and no critical-surface modifications. - Phase 1 reviewers: not run (disabled for this repository)
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort medium); agentphase2-reviewer
A choice to make a token non-transferable could be made in Advanced mode, stay hidden in Simple mode, and be signed without the confirmation saying so. And whenever the network's support was not confirmed yet, the creator silently flipped the choice back to transferable on that frame. - The "Holders can send this token to other identities" checkbox is shown in Simple mode too, so nothing hidden is submitted. - The choice is kept while the network does not (yet) accept non-transferable tokens; allowing transfers again stays possible. The existing NonTransferableTokenNotSupported reason shows next to the checkbox and blocks "Create Token" and "Register Token Contract" (with the reason next to and on hover over the blocked button). The backend still refuses it too. - The confirmation states what gets signed: "Holders can send this token to other identities." or "Holders cannot send this token to other identities. This cannot be changed later." - The Simple-mode hint below "Create Token" is now one complete sentence per case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
|
Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post |
|
Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post |
|
Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Its changes are already on this branch through #1118's final head. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
|
Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 2 only (no Phase 1 for this repository)
The pull request correctly constrains the Advanced Options control to the token-action heading row, preserves headings on no-key and locked-wallet paths, and adds typed navigation for the Create Token toolbar action. The new kittests cover all seven shared action screens and the My Tokens navigation flow; Clippy and Test Suite checks passed. The remaining PR Hygiene check is a workflow gate, not a code failure.
🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)
Review provenance
Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.1-sol(effort low) — This is a small, well-contained UI layout and navigation change with focused kittests and no critical-surface impact. - Phase 1 reviewers: not run (disabled for this repository)
- Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort medium); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.
No unresolved findings remain from the prior review on this head.
|
Policy satisfied — this can merge. |
TL;DR
The Mint screen (and six sibling token action screens) showed a big empty gap under the heading, with "Advanced Options" floating mid-screen and the form pushed to the bottom. The checkbox now sits on the heading row and the form starts right below it. "My Tokens" now has a Create Token button in its top bar that opens the Token Creator.
User story
As a token owner, I want to open Mint (or Burn, Freeze, Pause…) and see the form right away, so I don't have to scroll past a blank screen to find it.
As a user on My Tokens, I want a visible "Create Token" action next to "Import Token", so I can start a new token without hunting for the sub-screen chooser.
Scenario
Detailed discussion
Builds on #1118, which is merged.
Root cause.
TokenActionScreen(src/ui/tokens/token_action_screen.rs) is the scaffold shared by mint, burn, freeze, unfreeze, destroy frozen funds, pause and resume. It rendered the checkbox with a bareui.with_layout(Layout::right_to_left(Align::Center), …)inside the top-down central panel. egui gives that child layout all of the remaining height and centres the checkbox vertically inside it, so everything after it starts below the screen's midpoint. The other token screens (transfer, claim, purchase, set price, update config, token creator) wrap the same layout inui.horizontal(heading + checkbox), which limits it to one row. The scaffold now does the same thing. The heading still appears on the "no keys" and "wallet locked" early-return paths.Screens checked:
ui.horizontalwrapper): transfer, claim, direct purchase, set price, update config, token creator.right_to_leftuses inmy_tokens.rsanddata_contract_json_pop_up.rsare "Close" buttons at the end of auto-sized popups, with no content below them.Create Token. The toolbar's
DesiredAppActionhad no way to switch root screens, so a typedDesiredAppAction::SetMainScreen(RootScreenType)is added; it maps toAppAction::SetMainScreen. That avoids a stringly-typedCustom("…")round trip. The label is "Create Token" (Title Case) to match the "Import Token" button next to it and the rest of the toolbar ("Create Wallet", "Register Contract").Testing
New kittests in
tests/kittest/tokens_screen.rs:token_action_forms_start_right_under_the_headingpushes each of the 7 scaffold screens onto the realAppState. It asserts that "Advanced Options" sits on the heading's row and that the first form step ("1. …") starts no more than 60 px below the heading. On the old code it fails on Mint: heading at y≈199–220, checkbox at y≈494–512.my_tokens_create_token_button_opens_token_creatorclicks "Create Token" on My Tokens. It asserts that the root screen and the persisted setting switch to Token Creator and that the visible tokens screen is the Token Creator sub-screen. It fails on the old code because the button is missing.Local runs:
cargo test --test kittest --all-features tokens_screen::(3 passed),cargo clippy --all-features --all-targets -- -D warnings(clean),cargo fmt --all.Not done: a live-GUI check of the Mint screen against testnet (it needs an identity that owns a token).
🤖 Co-authored by Claudius the Magnificent AI Agent
🤖 Generated with Claude Code
https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
PR Hygiene ·
308aa92src/app.rs,src/ui/tokens/token_action_screen.rs,src/ui/tokens/tokens_screen/mod.rsand 1 more) — approved by lklimekWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.Summary by CodeRabbit