Skip to content

refactor(instruction-card): use one UnknownDetailsCard on both pages - #1387

Open
askov wants to merge 1 commit into
solana-foundation:masterfrom
hoodieshq:refactor/unknown-instruction-card
Open

askov wants to merge 1 commit into
solana-foundation:masterfrom
hoodieshq:refactor/unknown-instruction-card

Conversation

@askov

@askov askov commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Renders an instruction that the explorer cannot decode with one UnknownDetailsCard on the tx page and in the inspector.

Changes

  • Moves UnknownDetailsCard to @entities/instruction-card and deletes the tx-page and inspector copies.
  • Takes the card frame from InstructionSurfaceProvider instead of the InstructionCardComponent and result props.
  • Adds toInstructionNode to build an InstructionNode from ix, so callers do not pass programId.
  • Migrates the Associated Token card to InstructionCardView and InstructionFields.
  • Records in the unify-instruction-card-rendering spec that every program's UnknownDetailsCard takes its card frame from InstructionSurfaceProvider.

Behavior Changes

  • The inspector's Unknown card now has the title <program>: Unknown Instruction instead of <program> Instruction.
  • The inspector's Unknown card now opens expanded, in raw mode, with a Raw button.

Type of change

  • Other: one unknown instruction card for the tx page and the inspector

Screenshots

Testing

  • The inspector opens the Unknown card expanded, in raw mode. Open the devnet message in the inspector (preview · production) and read card #2. Expect the title Unknown Program (Unk1111111111111111111111111111111111111111): Unknown Instruction and the Raw and Collapse buttons. Production shows Unknown Program (Unk1111111111111111111111111111111111111111) Instruction with only an Expand button.
  • The tx page keeps its Unknown card and its inner cards. Open the devnet transaction (preview · production) and read card #3. Expect Unknown Program (5xZenqSrpGjmCYzCrcKYK3if4U2fPr9q4mVNmGWApZou): Unknown Instruction in raw mode, with the inner cards #3.1 and #3.2. Production shows the same card.
  • The Associated Token card is unchanged on the tx page. Open the transaction (preview · production) and read card #3. Expect Associated Token Program: Create Idempotent with six account rows and the inner cards #3.1 to #3.4. Production shows the same card.

Related Issues

Closes HOO-1997

Part of HOO-1267

Checklist

  • My code follows the project's style guidelines
  • I have added tests that prove my fix/feature works
  • All checks pass locally (pnpm test, pnpm lint, pnpm typecheck)
  • I have updated documentation as needed
  • I have run build:info script to update build information

Additional Notes

  • The PR adds 307 lines and deletes 544. Without tests, stories and OpenSpec, it adds 164 lines and deletes 358.

Each page had its own UnknownDetailsCard, and the two disagreed on title, collapse and Raw mode.
The entity card takes an InstructionNode and reads its frame from the surface.
@vercel

vercel Bot commented Oct 9, 2026

Copy link
Copy Markdown

@askov is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable regressions were found.

Summary

Shares one UnknownDetailsCard between the transaction page and inspector.

  • Unknown instructions use the same card on both pages.
  • Associated Token instructions use the shared card frame.

Reviews (1) · Last reviewed commit: "refactor(instruction-card): use one Unkn..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
explorer Ready Ready Preview Oct 9, 2026 8:53am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 18fed7f2 Deployed Oct 9, 2026 by vercel[bot]
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.

1 participant