fix: simplify storage error type labels - #1302
ayaanoncrypto wants to merge 1 commit into
Conversation
WalkthroughThe storage report now removes contract-specific substrings from type labels. It applies the normalized labels to layout changes, nested types, unknown types, struct and enum members, and type transition descriptions. Original labels remain as a fallback. ChangesType label normalization
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🔵 Low · up to The change simplifies displayed storage type labels, but it may hide struct-versus-enum type-kind changes in compatibility reports if those transitions are valid. The PR is mergeable with explicit owner confirmation of this bounded reporting risk. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🔇 Additional comments (2)
packages/core/src/storage/report.ts (2)
14-14: LGTM!Also applies to: 122-122, 188-192, 224-224, 269-269, 284-284, 337-340
315-316: 🎯 Functional Correctness
⚠️ Unverified finding
Sandbox verification was unavailable.Verify that normalized labels do not hide type-kind changes.
describeTransitionnow compares normalized labels. If parsed types such asstruct C.Itemandenum C.Itemcan occur in a transition, the report will show onlyto C.Itemand omit the detected type-kind change. Compare a type identity that retains the kind, and use normalized labels only for display when these pairs are valid.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4fd1788e-863b-4576-bfa3-97746a0ac43b
📒 Files selected for processing (1)
packages/core/src/storage/report.ts
Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.
Closes #728
Storage compatibility errors now remove leading Solidity type keywords such as
struct,enum, andcontractfrom displayed type labels. This keeps retype annotations copy-pastable while preserving the underlying storage comparison behavior.Validation:
git diff --checkpassed. Full TypeScript and AVA validation was unavailable because dependencies are not installed in the sandbox.Summary by CodeRabbit