Skip to content

feat(explorer): show detailed account info based on account type#813

Draft
beeman wants to merge 1 commit intomainfrom
beeman/account-info
Draft

feat(explorer): show detailed account info based on account type#813
beeman wants to merge 1 commit intomainfrom
beeman/account-info

Conversation

@beeman
Copy link
Copy Markdown
Member

@beeman beeman commented Dec 19, 2025

Description

This PR implements the work to make the account pages in the explorer adapt to their type.

The type of account is detected through the getAccountType in the solana-client package. In the future we'll be able to add more types here and handle rendering and logic of certain accounts based on that type.

Screenshots / Video

image image image image

Important

Add detailed account information display in explorer based on account type using getAccountType.

  • Behavior:
    • ExplorerFeatureAccountInfoContent in explorer-feature-account-info-content.tsx uses getAccountType to render account-specific components.
    • Handles 'token-account', 'token-mint', 'token-unknown', 'system', and 'system-program' types.
    • Displays error page for unknown token types.
  • Components:
    • ExplorerFeatureAccountInfoTokenAccount and ExplorerFeatureAccountInfoTokenMint added for rendering token account and mint details.
    • ExplorerFeatureAccountInfo in explorer-feature-account-info.tsx integrates account type display and content rendering.
    • ExplorerFeatureAccountOverview updated to use ExplorerFeatureAccountInfo.
  • Utilities:
    • ExplorerUiDetailGrid added for layout consistency.
  • i18n:
    • Updated explorer.json in locales/en and locales/es for new labels.
    • Updated resources.d.ts to include new i18n keys.
  • Constants:
    • Added SYSTEM_ACCOUNT, NATIVE_LOADER, BPF_LOADER to constants.ts.
  • Tests:
    • Added integration tests for getAccountInfo and getAccountType in get-account-info.integration.test.ts and get-account-type.integration.test.ts.

This description was created by Ellipsis for 0436802. You can customize this summary. It will automatically update as commits are pushed.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Dec 19, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
samui-wallet-web fd08fae Commit Preview URL

Branch Preview URL
Jan 21 2026, 11:28 AM

@beeman beeman force-pushed the beeman/account-info branch from 70b3449 to 8e1282e Compare December 19, 2025 09:59
@bundlemon
Copy link
Copy Markdown

bundlemon bot commented Dec 19, 2025

BundleMon

Files added (3)
Status Path Size Limits
apps/extension/.output/chrome-mv3/chunks/tabl
e-(hash).js
+1.16KB -
apps/web/dist/assets/table-(hash).js
+1.16KB -
apps/desktop/dist/assets/table-(hash).js
+1.16KB -
Files removed (3)
Status Path Size Limits
apps/extension/.output/chrome-mv3/chunks/badg
e-(hash).js
-1.89KB -
apps/desktop/dist/assets/badge-(hash).js
-1.89KB -
apps/web/dist/assets/badge-(hash).js
-1.88KB -
Files updated (21)
Status Path Size Limits
apps/web/dist/assets/index.browser-(hash).js
1.34KB (+398B +40.82%) -
apps/extension/.output/chrome-mv3/chunks/port
folio-(hash).js
2.62KB (+252B +10.37%) -
apps/web/dist/assets/portfolio-(hash).js
2.62KB (+249B +10.23%) -
apps/desktop/dist/assets/portfolio-(hash).js
2.62KB (+248B +10.19%) -
apps/desktop/dist/assets/constants-(hash).js
3.31KB (+133B +4.08%) -
apps/extension/.output/chrome-mv3/chunks/cons
tants-(hash).js
3.32KB (+131B +4.01%) -
apps/web/dist/assets/constants-(hash).js
3.31KB (+128B +3.92%) -
apps/desktop/dist/assets/settings-(hash).js
21.82KB (-13B -0.06%) -
apps/web/dist/assets/settings-(hash).js
21.82KB (-18B -0.08%) -
apps/extension/.output/chrome-mv3/chunks/tool
s-(hash).js
1.11KB (-19B -1.65%) -
apps/extension/.output/chrome-mv3/chunks/sett
ings-(hash).js
21.81KB (-22B -0.1%) -
apps/web/dist/assets/tools-(hash).js
1.1KB (-22B -1.91%) -
apps/desktop/dist/assets/tools-(hash).js
1.1KB (-26B -2.25%) -
apps/extension/.output/chrome-mv3/chunks/clie
nt-(hash).js
256.13KB (-28B -0.01%) -
apps/web/dist/assets/index-(hash).js
281.32KB (-43B -0.01%) -
apps/extension/.output/chrome-mv3/chunks/inde
x.browser-(hash).js
979B (-400B -29.01%) -
apps/extension/.output/chrome-mv3/chunks/form
at-(hash).js
166B (-415B -71.43%) -
apps/desktop/dist/assets/format-(hash).js
166B (-417B -71.53%) -
apps/web/dist/assets/format-(hash).js
166B (-419B -71.62%) -
apps/desktop/dist/assets/index.browser-(hash)
.js
1.34KB (-3.52KB -72.4%) -
apps/desktop/dist/assets/index-(hash).js
173B (-253.15KB -99.93%) -
Unchanged files (74)
Status Path Size Limits
apps/extension/.output/chrome-mv3/chunks/deri
ve-(hash).js
23.43KB -
apps/web/dist/assets/derive-(hash).js
23.42KB -
apps/desktop/dist/assets/derive-(hash).js
23.42KB -
apps/web/dist/assets/form-(hash).js
12.32KB -
apps/extension/.output/chrome-mv3/chunks/form
-(hash).js
12.32KB -
apps/desktop/dist/assets/form-(hash).js
12.31KB -
apps/extension/.output/chrome-mv3/chunks/sele
ct-(hash).js
8.08KB -
apps/desktop/dist/assets/select-(hash).js
8.08KB -
apps/web/dist/assets/select-(hash).js
8.08KB -
apps/extension/.output/chrome-mv3/chunks/elli
psify-(hash).js
6.55KB -
apps/web/dist/assets/ellipsify-(hash).js
6.55KB -
apps/desktop/dist/assets/ellipsify-(hash).js
6.55KB -
apps/extension/.output/chrome-mv3/chunks/onbo
arding-(hash).js
4.45KB -
apps/desktop/dist/assets/onboarding-(hash).js
4.45KB -
apps/web/dist/assets/onboarding-(hash).js
4.45KB -
apps/extension/.output/chrome-mv3/chunks/crea
te-(hash).js
4.23KB -
apps/desktop/dist/assets/create-(hash).js
4.23KB -
apps/web/dist/assets/create-(hash).js
4.22KB -
apps/desktop/dist/assets/use-(hash).js
3.21KB -
apps/web/dist/assets/use-(hash).js
3.2KB -
apps/extension/.output/chrome-mv3/chunks/use-
(hash).js
3.2KB -
apps/desktop/dist/assets/vanity-(hash).js
2.78KB -
apps/web/dist/assets/vanity-(hash).js
2.78KB -
apps/desktop/dist/assets/toggle-(hash).js
2.58KB -
apps/extension/.output/chrome-mv3/chunks/togg
le-(hash).js
2.58KB -
apps/web/dist/assets/toggle-(hash).js
2.58KB -
apps/extension/.output/chrome-mv3/chunks/drop
down-(hash).js
2.16KB -
apps/web/dist/assets/dropdown-(hash).js
2.16KB -
apps/desktop/dist/assets/dropdown-(hash).js
2.16KB -
apps/extension/.output/chrome-mv3/chunks/fiel
d-(hash).js
1.95KB -
apps/desktop/dist/assets/field-(hash).js
1.94KB -
apps/web/dist/assets/field-(hash).js
1.94KB -
apps/extension/.output/chrome-mv3/chunks/chec
kbox-(hash).js
1.89KB -
apps/desktop/dist/assets/checkbox-(hash).js
1.88KB -
apps/web/dist/assets/checkbox-(hash).js
1.88KB -
apps/extension/.output/chrome-mv3/chunks/requ
est-(hash).js
1.85KB -
apps/desktop/dist/assets/request-(hash).js
1.85KB -
apps/web/dist/assets/request-(hash).js
1.77KB -
apps/desktop/dist/assets/explorer-(hash).js
1.52KB -
apps/extension/.output/chrome-mv3/chunks/expl
orer-(hash).js
1.52KB -
apps/web/dist/assets/explorer-(hash).js
1.52KB -
apps/web/dist/assets/item-(hash).js
1.22KB -
apps/desktop/dist/assets/item-(hash).js
1.21KB -
apps/extension/.output/chrome-mv3/chunks/item
-(hash).js
1.21KB -
apps/desktop/dist/assets/zod-(hash).js
766B -
apps/web/dist/assets/zod-(hash).js
764B -
apps/extension/.output/chrome-mv3/chunks/zod-
(hash).js
763B -
apps/desktop/dist/assets/standard-(hash).js
652B -
apps/extension/.output/chrome-mv3/chunks/stan
dard-(hash).js
647B -
apps/web/dist/assets/standard-(hash).js
646B -
apps/web/dist/assets/button-(hash).js
579B -
apps/extension/.output/chrome-mv3/chunks/inpu
t-(hash).js
577B -
apps/desktop/dist/assets/button-(hash).js
576B -
apps/extension/.output/chrome-mv3/chunks/butt
on-(hash).js
576B -
apps/web/dist/assets/input-(hash).js
576B -
apps/desktop/dist/assets/input-(hash).js
575B -
apps/extension/.output/chrome-mv3/chunks/ui-(
hash).js
526B -
apps/desktop/dist/assets/ui-(hash).js
525B -
apps/web/dist/assets/ui-(hash).js
525B -
apps/extension/.output/chrome-mv3/chunks/labe
l-(hash).js
515B -
apps/web/dist/assets/label-(hash).js
515B -
apps/desktop/dist/assets/label-(hash).js
514B -
apps/desktop/dist/assets/convert-(hash).js
424B -
apps/extension/.output/chrome-mv3/chunks/conv
ert-(hash).js
424B -
apps/web/dist/assets/convert-(hash).js
424B -
apps/desktop/dist/assets/dev-(hash).js
277B -
apps/extension/.output/chrome-mv3/chunks/dev-
(hash).js
276B -
apps/web/dist/assets/dev-(hash).js
275B -
apps/extension/.output/chrome-mv3/chunks/side
panel-(hash).js
203B -
apps/extension/.output/chrome-mv3/chunks/popu
p-(hash).js
201B -
apps/extension/.output/chrome-mv3/chunks/inde
x-(hash).js
174B -
apps/desktop/dist/assets/network-(hash).js
121B -
apps/extension/.output/chrome-mv3/chunks/netw
ork-(hash).js
121B -
apps/web/dist/assets/network-(hash).js
121B -

Total files change -259.14KB -22.81%

Groups updated (3)
Status Path Size Limits
apps/web/dist/**/*-.js
472.81KB (+467B +0.1%) -
apps/desktop/dist/**/*-.js
446.44KB (+434B +0.1%) -
apps/extension/.output/chrome-mv3/**/*-
.js
444.47KB (+407B +0.09%) -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌

Reviewed everything up to 70b3449 in 2 minutes and 37 seconds. Click for details.
  • Reviewed 488 lines of code in 16 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/explorer/src/explorer-feature-account-info-token-mint.tsx:14
  • Draft comment:
    Avoid using @ts-expect-error; refine the types for accountData.parsed.info properties so that type errors are handled properly.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 35% vs. threshold = 50% The comment is about code that was changed/added in the diff. It's suggesting a code quality improvement - replacing @ts-expect-error with proper typing. This is generally a good practice and the comment is actionable. However, I need to consider: 1) Is this obvious? Using @ts-expect-error is generally considered a code smell, so suggesting to fix it might be obvious. 2) Is this clearly requiring a code change? The rules say "Do NOT comment unless there is clearly a code change required." While better typing is preferable, the code technically works as-is. 3) The comment doesn't explain HOW to fix it, just says to "refine the types" which is somewhat vague. Looking at the additional rules about code quality refactors: "Comments that suggest code quality refactors are good! But only if they are actionable and clear." This comment suggests a refactor but doesn't provide clear guidance on how to do it. The comment is about a legitimate code quality issue (using @ts-expect-error), and code quality refactors are explicitly allowed if actionable and clear. While the comment identifies the problem, it may not be specific enough about the solution. Also, there might be a valid reason for using @ts-expect-error here if the upstream types are not well-defined. While code quality refactors are allowed, this comment lacks specificity about how to fix the issue. It's also possible the author is aware of the type suppression and chose it deliberately because the upstream AccountInfoWithParsedData['data'] type may not have proper definitions for the parsed token mint structure. Without seeing the type definition, we can't be sure this is fixable or that the author didn't already consider this. The comment identifies a code quality issue but lacks actionable guidance on how to fix it. Given the uncertainty about whether the upstream types can be refined and the lack of specific instructions, this comment is borderline useful but leans toward not being actionable enough to keep.
2. packages/solana-client/test/get-account-type.integration.test.ts:14
  • Draft comment:
    Avoid using async callbacks directly in the describe block; instead, use beforeAll for asynchronous setup.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_mCvd28eu0C0WIcLb

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Comment thread packages/explorer/src/explorer-feature-account-info-token-account.tsx Outdated
Comment thread packages/solana-client/test/get-account-info.integration.test.ts
@beeman beeman force-pushed the beeman/account-info branch from 8e1282e to 0436802 Compare December 19, 2025 10:01
@beeman beeman marked this pull request as draft December 19, 2025 10:03
Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌

Reviewed 0436802 in 2 minutes and 50 seconds. Click for details.
  • Reviewed 486 lines of code in 16 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/solana-client/src/get-account-type.ts:13
  • Draft comment:
    BPF_LOADER case returns 'system-program', but the integration test expects 'system'. Please reconcile this inconsistency.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% This comment references an integration test that is not shown in the diff. I have no way to verify whether the integration test actually expects 'system' for BPF_LOADER accounts, or if such a test even exists. The code in the diff appears internally consistent - 'system-program' is a valid return type defined in the AccountType union. Without being able to see the test file, I cannot confirm this is a real issue. According to my instructions, if understanding the comment requires more context (such as seeing other files), I should delete the comment. This clearly requires seeing the test file to verify the claim. Perhaps the reviewer has access to the integration test and knows there's a real inconsistency. Maybe this is a legitimate bug that needs to be fixed, and I'm being too strict by requiring all evidence to be in the diff itself. While the reviewer may have seen the test, my instructions are clear: I must see STRONG EVIDENCE in the diff that the comment is correct. The comment references external files (integration tests) that are not part of this diff. Without being able to verify the claim, I cannot confirm this is a real issue versus a misunderstanding or outdated information. Delete this comment because it references integration tests that are not visible in the diff, and I cannot verify the claimed inconsistency. The code in the diff itself appears internally consistent.
2. packages/explorer/src/explorer-feature-account-info-token-account.tsx:14
  • Draft comment:
    Consider refining the types for accountData.parsed.info to avoid using @ts-expect-error.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% The comment says "Consider refining the types" which is a suggestion, not a clear directive. It's asking the author to potentially improve type safety, but it's not pointing out a bug or a clear issue. The use of @ts-expect-error is intentional by the author (they explicitly added these comments), suggesting they're aware of the typing issue. The comment doesn't provide specific guidance on HOW to refine the types or what the actual problem is. This feels like a "nice to have" code quality suggestion rather than identifying a real problem. According to the rules, comments should not be speculative or purely informative - they should clearly indicate a code change is required. The author explicitly added @ts-expect-error comments, which suggests they made a conscious decision about the typing approach. Perhaps there's a legitimate reason the types can't be easily refined (e.g., the upstream type definition is incomplete or complex). The comment might be valid if proper typing is actually achievable and important. While there might be a legitimate reason for the type suppressions, the comment uses "Consider" which makes it a suggestion rather than a clear requirement. It doesn't demonstrate that refining the types is definitely possible or necessary. Without seeing the actual type definition of AccountInfoWithParsedData['data'], we can't verify if this is actionable. This comment should be deleted. It uses soft language ("Consider") and doesn't provide clear, actionable guidance. It's essentially asking the author to improve code quality without demonstrating that there's a definite issue or providing specific direction on how to fix it.
3. packages/explorer/src/explorer-feature-account-info-token-mint.tsx:14
  • Draft comment:
    Avoid using @ts-expect-error here; consider updating the type definitions for accountData.parsed.info for better type safety.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% This comment is suggesting a code quality improvement - to fix the type definitions rather than suppress errors. However, looking at the rules, I need to consider: 1) Is this actionable and clear? It's somewhat vague - it says "consider updating" which is not a strong directive. 2) The author clearly made a deliberate choice to use @ts-expect-error here (they added it in new code). 3) The comment doesn't provide specific guidance on HOW to fix the types or what the correct types should be. 4) This could be considered speculative - we don't know if updating the type definitions is feasible or if there's a good reason for the current approach. 5) The rules say comments should be actionable and clear for code quality refactors, but this is more of a general suggestion without specific implementation guidance. The author might have a valid reason for using @ts-expect-error here - perhaps the type definitions come from an external library they don't control, or the parsed data structure is dynamic and hard to type properly. The comment might be pointing out a legitimate technical debt issue that should be addressed. While there might be legitimate reasons to improve typing, the comment is too vague and doesn't provide actionable guidance. It uses "consider" which is a weak suggestion, and doesn't explain how to fix it or what the correct approach would be. The author clearly made a deliberate choice here, and without more specific guidance, this comment is not actionable enough to be useful. This comment should be deleted. It's a vague suggestion ("consider updating") without specific, actionable guidance on how to fix the issue. The author deliberately added these @ts-expect-error comments, and the review comment doesn't provide clear enough direction to be useful.

Workflow ID: wflow_xlhbTpC6zLmFeFp5

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Comment thread packages/solana-client/test/get-account-info.integration.test.ts
@beeman beeman force-pushed the beeman/account-info branch 7 times, most recently from 7ad5147 to 9f53fb3 Compare December 20, 2025 18:34
@beeman beeman force-pushed the beeman/account-info branch from 9f53fb3 to 7c8fbe7 Compare January 20, 2026 00:05
@tobeycodes
Copy link
Copy Markdown
Contributor

@beeman What's the status of this one?

@beeman
Copy link
Copy Markdown
Member Author

beeman commented Jan 20, 2026

@beeman What's the status of this one?

It's draft 😆 the reasons is that I wanted to do the heavy lifting about getting account info (type/etc) in #818 first.

I'll clean it up and set it to Ready.

@beeman beeman force-pushed the beeman/account-info branch 5 times, most recently from 3d4a2ab to 2c6c60b Compare January 20, 2026 18:38
@beeman beeman force-pushed the beeman/account-info branch from 2c6c60b to fd08fae Compare January 21, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants