Skip to content

Use SDK runtime boundary in apps#30

Merged
phroi merged 6 commits into
masterfrom
review/app-runtime-sdk-migration
May 10, 2026
Merged

Use SDK runtime boundary in apps#30
phroi merged 6 commits into
masterfrom
review/app-runtime-sdk-migration

Conversation

@phroi
Copy link
Copy Markdown
Member

@phroi phroi commented May 10, 2026

Why

Interface and tester still duplicated account projection, transaction completion, and confirmation polling that PR 29 moved behind the SDK boundary.

Changes

  • Move interface account projection, base transaction assembly, completion, and send confirmation onto SDK APIs
  • Refresh interface transaction state immediately before wallet confirmation
  • Extract tester runtime state and transaction building into an importable SDK-backed module
  • Remove stale app-local migration surfaces that the SDK now owns
  • Add app-level tests for the new SDK-owned runtime boundaries

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors transaction handling and state management across the interface and tester applications, delegating core logic to the @ickb/sdk. Key updates include the adoption of sendAndWaitForCommit for transaction lifecycles, utilizing projectAccountAvailability for state projections, and streamlining transaction construction through SDK methods. The tester application was also modularized with a new runtime component. Feedback was provided regarding a redundant query invalidation in Action.tsx, where invalidating a parent prefix already covers the specific state query.

Comment thread apps/interface/src/Action.tsx Outdated
@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 10, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the interface and tester applications to delegate core transaction building, state management, and account projection logic to the @ickb/sdk. Key changes include updating getL1State and transact in the interface to use SDK methods, and moving tester runtime logic into a dedicated module. Feedback was provided regarding the error handling in Action.tsx, suggesting more specific error messages when transaction fees are missing or invalid to improve user feedback.

Comment thread apps/interface/src/Action.tsx Outdated
@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 10, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors transaction building and state management across the interface and tester applications by delegating core logic to the @ickb/sdk. Key updates include the adoption of projectAccountAvailability for balance calculations and the use of SDK-provided methods for transaction finalization. Feedback identifies a critical runtime error in the transaction preview logic where a non-existent clone method is called, and a regression in the interface's balance projection where a missing configuration flag prevents finished orders from being included in available balances.

Comment thread apps/interface/src/transaction.ts
Comment thread apps/interface/src/queries.ts Outdated
@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 10, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the interface and tester applications to utilize the @ickb/sdk for account state management and transaction construction. Key changes include updating getL1State to use SDK projections, streamlining transaction finalization with completeTransaction, and modularizing the tester's runtime logic. Review feedback identifies performance concerns regarding repeated RPC calls within loops in transaction.ts and suggests improving the user experience in Action.tsx by removing a redundant stale state check. Additionally, there is a recommendation to ensure the correct order of cache invalidation and UI state updates within the transaction's finally block.

Comment thread apps/interface/src/transaction.ts
Comment thread apps/interface/src/transaction.ts
Comment thread apps/interface/src/Action.tsx Outdated
Comment thread apps/interface/src/Action.tsx
@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 10, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the interface and tester applications to leverage the @ickb/sdk for state management and transaction building. Key changes include integrating sendAndWaitForCommit for transaction handling, using SDK-provided methods for account state projection and transaction finalization, and modularizing the tester logic into a new runtime module. Additionally, the interface now fetches fresh state directly before transaction building, and redundant local utilities have been removed. I have no feedback to provide.

@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 10, 2026

LGTM

Phroi %179

@phroi phroi merged commit dd75512 into master May 10, 2026
1 check passed
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