Refactor dashboard client: session helpers, shared state, and async/await - #837
Merged
graceuvala-collab merged 4 commits intoOct 2, 2026
Merged
Conversation
…ter, cursor and se Closes StellarGateLabs#679
|
@Gadflyxx Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactor dashboard client: session helpers, shared state, and async/await
What was solved
#678 — Dashboard: extract API key storage into
session.jsExtract the API key storage/expiry helpers (
storedKey,storeKey,forgetKey) from the dashboard code into a newstatic/session.jsmodule, preserving the #252 expiry behaviour exactly, and wire it up so the dashboard continues to work without leaking the key.Addressed:
static/session.jscontaining the extractedstoredKey,storeKeyandforgetKeystorage/expiry logiclocalStoragewith no expiry #252 exactly as-is (no behavioural change)#679 — Dashboard: add a single state object for filter, cursor and selection
Introduce a single shared state object for the dashboard that holds active filters, pagination cursor, loaded rows, and the selected payment, exposing a small get/set/subscribe API in static/state.js, and refactor static/dashboard.js to render from that state instead of ad-hoc DOM reads.
Addressed:
#680 — Dashboard: convert promise chains to async/await
Convert the five promise-chain functions in the dashboard client (loadPayments, openDetail, loadDeliveries, loadVersion, pollHealth) to async/await with try/catch, preserving existing behavior, error handling, and the no-API-key-in-URL/log guarantee.
Addressed:
Changes
static/session.js(modify)static/state.js(modify)README.md(modify)Approach
session.js#678 — Dashboard: extract API key storage intosession.js(Changed: static/session.js, static/session.js, static/session.js)Issues
Closes #678
Closes #679
Closes #680