feat: animate execution page#701
Conversation
|
Hey! This is your new endpoint: https://c075c283.widget-animateexe.pages.dev |
|
Hey! This is your new endpoint: https://92a25e64.widget-animateexe.pages.dev |
77dcdad to
7c77db2
Compare
|
Hey! This is your new endpoint: https://d64097a4.widget-animateexe.pages.dev |
7c77db2 to
2dd02d4
Compare
|
Hey! This is your new endpoint: https://c1f03285.widget-animateexe.pages.dev |
|
Hey! This is your new endpoint: https://a40669b3.widget-animateexe.pages.dev |
| @@ -0,0 +1,11 @@ | |||
| { | |||
| "version": "0.0.1", | |||
There was a problem hiding this comment.
Do we need to merge this config for Claude?
| @@ -1,10 +1,10 @@ | |||
| import type { RouteExtended } from '@lifi/sdk' | |||
There was a problem hiding this comment.
Same file as on Transaction details? Could we make it reusable, if so?
| "ignoreDependencies": ["@mui/system", "csstype"], | ||
| "workspaces": { | ||
| "packages/widget": { | ||
| "ignore": ["src/components/TransactionStatusCard/index.ts"] |
There was a problem hiding this comment.
Could we drop this index file, from this config and in the directory?
| route: RouteExtended, | ||
| toAddress?: string | ||
| ): ExecutionRow[] { | ||
| const { getTransactionLink } = useExplorer() |
There was a problem hiding this comment.
Could you check how stable this dependency is? Otherwise there is no use from this memoization :)
|
Hey! This is your new endpoint: https://fac35a66.widget-animateexe.pages.dev |
|
Hey! This is your new endpoint: https://9251e4a1.widget-animateexe.pages.dev |
Code Inspection Findings🔴 Must address before merge
🟡 Should fix
🔵 Worth noting
Index-based Full test plan including 19 test cases, automation guide, and exit criteria available on request. |
|
Hey! This is your new endpoint: https://d29bc025.widget-animateexe.pages.dev |
|
Hey! This is your new endpoint: https://c4db33d0.widget-animateexe.pages.dev |
|
Hey! This is your new endpoint: https://29965eff.widget-animateexe.pages.dev |
10f6162 to
2aa86a0
Compare
|
Hey! This is your new endpoint: https://fd5b14b8.widget-animateexe.pages.dev |
| if (!routeExecution) { | ||
| const enqueueStaggered = (task: () => void): void => { | ||
| const q = staggerRef.current | ||
| q.next = task |
There was a problem hiding this comment.
Could you confirm we are not losing any events when pacing updates on UI?
| return | ||
| } | ||
| q.scheduled = true | ||
| setTimeout( |
There was a problem hiding this comment.
Cleanup for this timeout would be nice :)
| staggerRef.current.lastAt = Date.now() | ||
| run() | ||
| }, | ||
| q.lastAt + STAGGER_INTERVAL - Date.now() |
There was a problem hiding this comment.
With zero q.lastAt, it will be negative - maybe Math.max(0, ...) would make it a bit cleaner.
| const queryClient = useQueryClient() | ||
| const { account } = useAccount() | ||
| const resumedAfterMount = useRef(false) | ||
| const staggerRef = useRef({ |
There was a problem hiding this comment.
I think it would be nice if we could fully decouple staggering from the logic of receiving execution data from SDK - it's already pretty complicated.
| step.execution.status = 'PENDING' | ||
| for (const action of step.execution.actions ?? []) { | ||
| if (action.status === 'FAILED') { | ||
| action.status = 'PENDING' |
There was a problem hiding this comment.
Not sure if we should updateRoute(reset) here - let's see if he could omit it when decoupling the animation.
| @@ -0,0 +1,12 @@ | |||
| import type { StorybookConfig } from '@storybook/react-vite' | |||
There was a problem hiding this comment.
If we are not going to support a storybook for the repo - I would be nice to drop it.
| @@ -0,0 +1,17 @@ | |||
| import type { ReactNode } from 'react' | |||
There was a problem hiding this comment.
Could you move this type inline? We don't really follow the convention of creating separate types.tsx files for components. Just for consistency.
| @@ -0,0 +1,2 @@ | |||
| export { ExecutionStatusCard } from './ExecutionStatusCard.js' | |||
There was a problem hiding this comment.
The components can be exported right from the files, without this barrel file.
| deleteRoute: () => void | ||
| } | ||
|
|
||
| /** Action buttons shown when route execution fails: retry, delete, and optional contact support. */ |
There was a problem hiding this comment.
Subjective: I think it's nice to have comments around complex logic, trade-offs, etc. Not sure they are necessary when the code is rather self-documenting. Personally, I would clean them up and left only the necessary ones (e.g. for animations, etc.) Otherwise it ends up being too many comments to read (and support) 😅
| return ( | ||
| <Box | ||
| sx={{ | ||
| position: 'relative', |
There was a problem hiding this comment.
Until we moved away from MUI, these 3+ property styles could be moved to a style file (StatusIcon.style.tsx). Just a suggestion to keep in mind.
Which Linear task is linked to this PR?
Why was it implemented this way?
Explain the reasoning behind the implementation. Were there alternative approaches? Why was this solution chosen?
Visual showcase (Screenshots or Videos)
If applicable, attach screenshots, GIFs, or videos to showcase the functionality, UI changes, or bug fixes.
Checklist before requesting a review