fix(ui): nest assets under their output, decode names, reorder and mend the pin - #91
Merged
Merged
Conversation
…nd the pin Five points from reviewing the shipped detail view. The Outputs panel read as a wrong count. "Outputs (4)" sat above 29 visually identical rows, because each output's native assets were rendered as siblings of the output line: same layout, only smaller and greyer. The count was right; the panel was lying by omission. Assets now sit behind a left rule with a "N assets" header, and collapse past ASSET_PREVIEW_COUNT so the one output holding 20 tokens stops burying its three siblings. Asset names decode to text when their bytes are printable ASCII. 42414e4b means nothing; BANK is recognisable, which is why every explorer decodes them. A name with even one non-printable byte stays hex: partial decoding would let arbitrary bytes put control characters on screen, and a half-decoded name is less trustworthy than an honest hex string. CIP-67 label prefixes (the four CIP-68 classes) are recognised and stripped first, since decoding the label bytes along with the name yields mojibake. The raw unit, the label and the hex all stay in the title. The sub-scores panel moved above the chain-level transaction detail. It explains the score the whole modal is about, and the panels below run to dozens of lines on a multi-asset transaction, so anything after them was effectively hidden. The Avg Risk tooltip said it was unaffected by "the filters on this table". The tooltip hangs off a KPI card at the top of the page, where "this table" has no visible referent: it now names the Risk Alerts table below. The pinned critical alert is one table row again. Two defects had been stacked on each other: the red accent ran only down the alert row, so it started halfway and read as a line cutting the block in two, and TableRow's own bottom border ran between the label strip and the row it described. Carrying the tint on both rows fixed the drawing but not the cause, which was spending a whole table row on two words: the operator read the strip as another alert. The label is now a marker in the row itself, shaped like the "unclusterable model" badge already in this table so there is one visual vocabulary for "metadata about this row, not a field of the transaction". It trails the hash rather than leading it, because ahead of it the pinned row's ID would start 80px right of every other row's and the column would look broken. The tint and the full-height accent delimit the row, no coloured horizontal edge remains, and the spacer row separates it from the sorted list. "Kept in view regardless of the sort below" is gone as superfluous, and the sentence explaining the pin now lives in the marker's title. An existing test had to change rather than being added to: it pinned the head-only truncation of a long asset name using the hex for "CardaSnekNFT123", which is printable and now renders decoded. It keeps its purpose with a non-printable first byte, so the truncation path is still covered. Gates: 148 frontend tests (up 11, and every new behaviour verified falsifiable by injecting the regression: reintroducing the label strip fails four of them, including the one that counts the block's table rows), eslint, tsc and build clean, prettier clean on the files touched. Backend untouched; recall gate 554 run anyway. Every new Tailwind utility was checked against the built CSS, since a class Tailwind cannot generate fails silently; the strip's now-unused hover tint is correspondingly absent from the bundle. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Six points from reviewing the shipped detail view and the pinned alert. UI only: no backend file is touched.
The Outputs panel read as a wrong count
"Outputs (4)" sat above 29 visually identical rows, because each output's native assets were rendered as siblings of the output line: same layout, only smaller and greyer. The count was right; the panel was lying by omission. Assets now sit behind a left rule with an "N assets" header, and collapse past
ASSET_PREVIEW_COUNTso the one output holding 20 tokens stops burying its three siblings.Asset names decode to text
42414e4bmeans nothing;BANKis recognisable, which is why every explorer decodes them. Decoding is deliberately all-or-nothing: a name with even one non-printable byte stays hex, because partial decoding would let arbitrary bytes put control characters on screen, and a half-decoded name is less trustworthy than an honest hex string. CIP-67 label prefixes (the four CIP-68 classes) are recognised and stripped first, since decoding the label bytes along with the name yields mojibake. The raw unit, the label and the hex all stay in the title.The sub-scores panel moved above the chain-level transaction detail
It explains the score the whole modal is about, and the panels below run to dozens of lines on a multi-asset transaction, so anything after them was effectively hidden.
The Avg Risk tooltip named its referent
It said it was unaffected by "the filters on this table", but it hangs off a KPI card at the top of the page, where "this table" has no visible referent. It now names the Risk Alerts table below.
The pinned critical alert is one table row again
Two defects were stacked on each other. The red accent ran only down the alert row, so it started halfway and read as a line cutting the block in two, and
TableRow's own bottom border ran between the label strip and the row it described. Carrying the tint on both rows fixed the drawing but not the cause, which was spending a whole table row on two words: the operator read the strip as another alert.The label is now a marker in the row itself, shaped like the "unclusterable model" badge already in this table, so there is one visual vocabulary for "metadata about this row, not a field of the transaction". It trails the hash rather than leading it, because ahead of it the pinned row's ID would start 80px right of every other row's and the column would look broken. The tint and the full-height accent delimit the row, no coloured horizontal edge remains, and the spacer row separates it from the sorted list. "Kept in view regardless of the sort below" is gone as superfluous; the sentence explaining the pin now lives in the marker's title.
One test changed rather than being added to
It pinned the head-only truncation of a long asset name using the hex for
CardaSnekNFT123, which is printable and now renders decoded. It keeps its purpose with a non-printable first byte, so the truncation path is still covered.Verification
main), and every new behaviour verified falsifiable by injecting the regression it guards: reintroducing the label strip fails four of them, including the one that counts the block's table rows.eslint,tsc -b,vite buildclean;prettier --checkclean on the files touched.tests/analysis/, 554 tests) was run anyway.🤖 Generated with Claude Code