Repository navigation
feat: re-run and follow runtime calls from the workspace - #189
Conversation
|
@sharmis-tp is attempting to deploy a commit to the Streamsphere Labs Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
voliva
left a comment
There was a problem hiding this comment.
Thanks! So far looks good to me.
I think we would also need to have the "follow" toggle available in RuntimeCallResultContent
| } | ||
| aria-label="Follow best blocks" | ||
| aria-pressed={follow} | ||
| className={twMerge("h-7 w-7", follow && "text-primary")} |
There was a problem hiding this comment.
text-primary isn't that different from the default. We didn't want to make the pink polkadot color the primary either as that was way too much pink in all UI elements of the page, so we put it into a custom tailwind color instead. And I personally think it looks nice as an indicator for active in this case.
| className={twMerge("h-7 w-7", follow && "text-primary")} | |
| className={twMerge("h-7 w-7", follow && "text-polkadot")} |
|
Thanks! Both done |
voliva
left a comment
There was a problem hiding this comment.
Awesome thank you very much 🚀
|
Thanks for the reviews and the merge, @voliva! I've enjoyed working on the console (#188 and #189) and I'd like to keep going. If Polkadot-API has room for a contractor, I'd be glad to help with forklift (fork, reorg and pruned-branch scenarios are close to what I did in #188) or with the console, and I can start with a small paid task. @josepot, I've also reached out to you directly. |
Closes #161
Runtime call entries in the workspace ran once, pinned to the block they were queried at. They can now be refreshed:
How
runtimeCallToWorkspaceEntrydrives the call from a stream of block hashes: the queried block, the latest best block on each re-run, and best blocks while following. While following,throttle(() => runDone$, { leading: true, trailing: true })emits the first new best block, then reopens only when the current call finishes, carrying the newest best block. All runs go throughconcatMap, so they never overlap. The entry status is derived from the sharedresult$, andRuntimeCallResultnow carries theblockHashit ran at.Testing
pnpm build(tsc + vite) passes and Prettier is clean.pnpm lintcurrently crashes onmainas well (TypeScript 7 with typescript-eslint), so I couldn't run ESLint.