Skip to content

Autoload transaction dashboard when tx hash is populated#2044

Open
jeesunikim wants to merge 1 commit intomainfrom
issue-2028
Open

Autoload transaction dashboard when tx hash is populated#2044
jeesunikim wants to merge 1 commit intomainfrom
issue-2028

Conversation

@jeesunikim
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 16, 2026 23:01
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Apr 16, 2026
@jeesunikim jeesunikim linked an issue Apr 16, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds automatic loading behavior to the Transaction dashboard when a transaction hash is already present (e.g., from persisted/query-string state), and updates the auto-generated network limits constants.

Changes:

  • Auto-refetch transaction details when a valid tx hash + supported network + RPC URL are present.
  • Update networkLimits.ts constants (state size windows + config JSON cost parameters).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/constants/networkLimits.ts Updates auto-generated network limit/config constants for mainnet/testnet/futurenet.
src/app/(sidebar)/transaction/dashboard/page.tsx Adds an effect to auto-load transaction details when the tx hash input is populated and valid.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +131 to +147
useEffect(() => {
if (
transactionHashInput &&
!transactionHashInputError &&
isCurrentNetworkSupported &&
network.rpcUrl
) {
fetchTxDetails();
trackEvent(TrackingEvent.TRANSACTION_DASHBOARD_LOAD_TX, {});
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
transactionHashInput,
transactionHashInputError,
isCurrentNetworkSupported,
network.rpcUrl,
]);
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

The auto-load effect relies on transactionHashInputError, but that error state is only set in the <Input onChange> handler. When transactionHashInput is populated programmatically (e.g., from txDashboard.transactionHash on page load or from latestTxn.hash), transactionHashInputError may still be empty even if the hash is invalid, causing a fetch with an invalid hash. Consider validating the hash in the effect (or when setting transactionHashInput) and setting transactionHashInputError before calling fetchTxDetails.

Copilot uses AI. Check for mistakes.
Comment on lines +131 to +147
useEffect(() => {
if (
transactionHashInput &&
!transactionHashInputError &&
isCurrentNetworkSupported &&
network.rpcUrl
) {
fetchTxDetails();
trackEvent(TrackingEvent.TRANSACTION_DASHBOARD_LOAD_TX, {});
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
transactionHashInput,
transactionHashInputError,
isCurrentNetworkSupported,
network.rpcUrl,
]);
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

This new effect triggers fetchTxDetails() + TRANSACTION_DASHBOARD_LOAD_TX tracking whenever a valid hash is present, but the form onSubmit below also refetches and tracks the same event. That can lead to duplicate network requests and double-counted analytics when users still click “Load transaction”. Consider gating the effect to only run for pre-populated hashes (e.g., from txDashboard.transactionHash on mount) or removing one of the tracking/refetch paths.

Copilot uses AI. Check for mistakes.
Comment on lines 85 to +90
"live_soroban_state_size_window": [
"698933560",
"699854984",
"700498804",
"700342140",
"700482104",
"700881920",
"701866036",
"702327232",
"702236112",
"702418272",
"702794004",
"703655676",
"703906824",
"704134152",
"704376184",
"704566128",
"704783500",
"705684296",
"706367628",
"706533156",
"706697884",
"706985136",
"707803656",
"707819944",
"707582232",
"708142500",
"708686816",
"709541828",
"710004992",
"709889972"
"730964418",
"730506222",
"729773650",
"729352446",
"729319902",
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

networkLimits.ts is marked as auto-generated, but this PR updates large blocks of network-limit constants that don’t appear related to the PR title (“Autoload transaction dashboard…”). If these updates are intentional, it would help to mention why they’re needed here; otherwise consider splitting them into a separate PR to keep the functional change reviewable.

Copilot uses AI. Check for mistakes.
@stellar-jenkins-ci
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog (Not Ready)

Development

Successfully merging this pull request may close these issues.

Autoload transaction dashboard when tx hash is populated

2 participants