feat(solana/dflow): nested swap render (Swap Details / Route / Accounts)#394
Draft
prasanna-anchorage wants to merge 1 commit into
Draft
feat(solana/dflow): nested swap render (Swap Details / Route / Accounts)#394prasanna-anchorage wants to merge 1 commit into
prasanna-anchorage wants to merge 1 commit into
Conversation
…unts cards Restructures the DFlow Aggregator `swap` visualizer into a nested preview_layout: a condensed at-a-glance summary (program, route, quoted out amount, slippage, platform fee) that expands into three collapsible cards -- Swap Details (economics + program id + discriminator), Route (per-action breakdown; single-field actions collapse to a plain field), and Accounts (IDL-resolved accounts by address, with const-seed PDAs derived offline, plus an "Unresolved (lookup table)" index list for ALT-loaded accounts the parser can't resolve offline). Stacked on #393 (number->amount_v2); the swap economics render via the preset's own number_text helper. Token-symbol display for ALT-resolved mints is tracked separately by #388. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5 tasks
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.
What
Renders the DFlow Aggregator
swapinstruction as a nestedpreview_layout: a condensed at-a-glance summary that expands into three collapsible cards.Unresolved (lookup table)index list for ALT-loaded accounts the parser can't resolve offlineFollows the inner-program nesting convention used by the swig/squads visualizers.
Stacking
numberfields as amount_v2 (VSP has nonumbertype) #393 (number->amount_v2). The swap economics render via the preset's ownnumber_texthelper, so they appear astext_v2.main, this diff also shows fix(solana/dflow): collapse arg flattening into one charset-safe field per arg #387'scharset_safechanges to the same file. Once fix(solana/dflow): collapse arg flattening into one charset-safe field per arg #387 + fix(visualsign): rendernumberfields as amount_v2 (VSP has nonumbertype) #393 merge, this will be retargeted tomainand shed those.Render decision
Going with the nested design first (confirmed after reviewing in the VSP playground). The open question is whether the production Anchorage
VSPModalReducerdrills into a nestedpreview_layout; a flat fallback (section-header rows, all detail in one Expanded) is drafted and revertible if iOS confirms it can't. Kept as a draft until that's settled.Follow-ups
🤖 Generated with Claude Code