Skip to content

feat: shell breadcrumbs, fee-bump request logging, persisted query cache, wallet auto-reconnect - #853

Merged
ritaifeoluwa merged 2 commits into
SmartDropLabs:mainfrom
jescinta:fix/appshell-signfeebump-query-wallet-786-787-788-789
Nov 18, 2026
Merged

ritaifeoluwa merged 2 commits into
SmartDropLabs:mainfrom
jescinta:fix/appshell-signfeebump-query-wallet-786-787-788-789

Conversation

@jescinta

Copy link
Copy Markdown
Contributor

Closes #786
Closes #787
Closes #788
Closes #789

What changed

  • AppShell: no breadcrumb trail for nested routes #786: New buildRouteBreadcrumbs() in src/components/AppShell/routeBreadcrumbs.ts. AppShell renders the existing Breadcrumbs component above the page for nested routes. Each segment links to its parent, the last is the current page, segments are decoded, and long ids are truncated. Top-level pages get no trail, and /farm/* is skipped because those pages already render their own data-aware trail. Unit-tested.
  • SignFeeBump API: no request logging #787: /api/sign-fee-bump logs one structured line per request (route, requestId, status, durationMs), at error level for 5xx and info otherwise. An inbound x-request-id is reused, or one is generated, and it's echoed on the response. The body, XDR, caller IP and sponsor secret are never logged. Tests added.
  • useSorobanQuery: no cache persistence to localStorage #788: New src/lib/queryPersistence.ts (localStorage, versioned keys, 24h max age, every access guarded). usePersistedQueryCache restores the last-known usePools and usePlatformStats data after mount and writes fresh results back. It seeds in an effect, not via initialData, so the first client render matches the server render, and the restored entry keeps its timestamp so staleTime still triggers a refetch. Only public, wallet-independent data is persisted. Tests added.
  • StellarWalletContext: no auto-reconnect on page load #789: StellarWalletContext remembers a successful connect() with a flag (no key material). On mount it reconnects silently using only isConnected/isAllowed/getAddress, so no Freighter popup appears. An explicit disconnect(), or revoked site access, forgets the flag; an unexpected drop (locked extension) keeps it. Tests added. The four existing wallet test files now clear localStorage in beforeEach, so the remembered flag can't leak between tests.
  • Pre-existing breakage on main in files I touched, fixed here:
    • AppShell.tsx used ServiceWorkerRegistrar without importing it.
    • useSorobanQuery.ts called an undefined shouldRetry. It's now defined: transient errors only, per normalizeError, at most 3 tries.

Why

  • Better orientation on nested routes, debuggable fee-bump requests, an instant first paint after a refresh, and no reconnect prompt on every visit.

How to test

  • npm test: routeBreadcrumbs.test.ts, sign-fee-bump/route.test.ts, queryPersistence.test.ts, useSorobanQuery.persist.test.tsx, StellarWalletContext.autoconnect.test.tsx.
  • Connect Freighter and reload: the wallet reconnects without a popup. Disconnect and reload: it stays disconnected.

Note: not run locally; I'm relying on CI. I didn't touch anything under .github/.

@netlify

netlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

👷 Deploy request for spiffy-melomakarona-eb1e8a pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 2879c55

@netlify

netlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

👷 Deploy request for smart-drop pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 2879c55

@drips-wave

drips-wave Bot commented Nov 18, 2026

Copy link
Copy Markdown

@jescinta 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! 🚀

Learn more about application limits

@ritaifeoluwa
ritaifeoluwa merged commit 3440671 into SmartDropLabs:main Nov 18, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants