Skip to content

gui: send txn counts, boot timestamp #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jherrera-jump
Copy link
Contributor

No description provided.

@jherrera-jump jherrera-jump marked this pull request as ready for review June 24, 2025 22:51
@jherrera-jump jherrera-jump force-pushed the jherrera/gui-sankey-epoch-updates branch from 3d5762d to 261b05d Compare June 25, 2025 18:28
@@ -324,7 +325,7 @@ function SlotCardRow({ slot, active }: SlotCardRowProps) {
className={`${styles.rowText} ${active ? styles.active : ""}`}
align="right"
>
{getText(values?.nonVoteTxns)}
{getText(values?.userTxns)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we want to do any renaming on the labels to user txn?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right nonVote is more clear

query.response?.publish.success_user_transaction_cnt &&
query.response?.publish.success_vote_transaction_cnt
? query.response?.publish.success_user_transaction_cnt +
query.response?.publish.success_vote_transaction_cnt
Copy link
Collaborator

Choose a reason for hiding this comment

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

in getLinks there is a success = totalTransactions - failedTransactions. Here totalTransactions is now only success_vote + success_user not including failed. Is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea your're right

@@ -119,6 +130,11 @@ function SlotStats() {

if (!selectedSlot) return;

// right-align txn counts by inserting invisible numbers as padding
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like you're trying to left align by putting invisible text afterwards? Why do we want a different alignment than how it is currently? Think we can probably get it aligned without invisible text too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was going for displaying all 4 counts in the slot progression card. I think I'll just revert the visual change and let you guys figure it out since this stuff isn't my strong suit lol

export const uptimeAtom = atom<
{ uptimeNanos: UptimeNanos; ts: DateTime } | undefined
export const startupTimeAtom = atom<
{ startupTimeNanos: StartupTimeNanos } | undefined
Copy link
Collaborator

Choose a reason for hiding this comment

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

So it now sends a constant start time vs a moving uptime?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea, this would be for the timestamp we put on the tooltip when we hover over the green flag.

@jherrera-jump jherrera-jump force-pushed the jherrera/gui-sankey-epoch-updates branch 3 times, most recently from 88dbeb5 to 4d3a278 Compare June 26, 2025 16:42
@@ -153,9 +164,20 @@ function SlotStats() {
<RowSeparator my="0" />
</div>
<Text>Vote Transactions</Text>
<Text align="right">{values?.voteTxns?.toLocaleString() ?? "-"}</Text>
<Text align="right">
{(values?.failedVoteTxns != null && values?.successfulVoteTxns != null
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's just values that can be undefined? Not the actual values failedVoteTxns and successfulVoteTxns. So just check for values ? ... : undefined. Since how this looks is that if only one of the 2 are null then it'll just not show a value vs showing the remaining. Same below for nonvote

query.response?.publish?.success_nonvote_transaction_cnt != null &&
query.response?.publish?.success_vote_transaction_cnt != null &&
query.response?.publish?.failed_vote_transaction_cnt &&
query.response?.publish?.failed_nonvote_transaction_cnt
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do need to check for != null vs just truthy since they can be 0, same below. Just var out the failed above it'll read clearer const failedTransactions = ...

@jherrera-jump jherrera-jump marked this pull request as draft June 26, 2025 19:42
@jherrera-jump jherrera-jump force-pushed the jherrera/gui-sankey-epoch-updates branch from 4d3a278 to e0b622f Compare June 26, 2025 19:49
@jherrera-jump jherrera-jump marked this pull request as ready for review June 26, 2025 19:50
query.response?.publish.failed_nonvote_transaction_cnt != null &&
query.response?.publish.failed_vote_transaction_cnt != null
? query.response?.publish.failed_nonvote_transaction_cnt +
query.response?.publish.failed_vote_transaction_cnt
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit but don't think you need the ? here anymore after the previous check, unless typescript can't see it for some reason. Same above

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