Skip to content

380 persist theme preference#507

Open
codenerde wants to merge 4 commits into
CredenceOrg:mainfrom
codenerde:380-persist-theme-preference
Open

380 persist theme preference#507
codenerde wants to merge 4 commits into
CredenceOrg:mainfrom
codenerde:380-persist-theme-preference

Conversation

@codenerde

Copy link
Copy Markdown

Closes #380

codenerde and others added 4 commits June 29, 2026 21:16
- Detect chunk-load errors by analyzing error messages
- Show network-type ErrorState for chunk-load failures
- Maintain existing retry functionality
- Add comprehensive tests

Closes CredenceOrg#382

Co-authored-by: openhands <openhands@all-hands.dev>
Closes CredenceOrg#382

- Remove errorElement from root Route in App.tsx so chunk-load errors
  propagate to ErrorBoundary instead of being caught by RouteErrorPage
- Tighten isChunkLoadError detection: remove over-broad 'load' match,
  add precise patterns for Vite/Webpack chunk-load errors
- Add regression test verifying ErrorBoundary catches chunk-load errors
  from lazy-loaded routes and shows retry UI (connection issue + try again)
- Fix existing test error messages to not trigger chunk-load detection

User-visible impact: chunk-load failures (network blips, deploy
skew) now show a branded 'Connection issue' panel with a 'Try again'
button instead of a white screen or the generic route error page.
Previously some users were refreshing the page as a workaround;
the retry button makes this a one-click recovery.
Closes CredenceOrg#380, Closes CredenceOrg#393, Closes CredenceOrg#374

CredenceOrg#380 - Persist theme preference across reloads (FOUC fix)
- Add inline script in index.html reading credence:settings from localStorage
  before React renders, preventing flash-of-unstyled-content on reload
- Resolves 'system' preference via matchMedia inline matching SettingsContext
- Update docs/dark-mode.md with FOUC guard documentation

CredenceOrg#393 - Add explicit loading state to connect-wallet button
- Add isLoading support to EmptyState action prop (disabled + aria-busy +
  visual dimming + 'Connecting...' text)
- Wire isConnecting to Dashboard EmptyState action button
- Wire isConnecting to Bond 'Create Bond / Connect to Continue' button
  loading/disabled state to prevent double-clicks while extension opens
- Fix pre-existing bond: add missing connect/isConnecting destructuring,
  add missing useTranslation calls, fix undefined openConnectModal ref

CredenceOrg#374 - Skeleton loaders for primary data lists
- Verified all data-fetching pages (Dashboard, Transactions, TrustScore,
  TrustSummary) already use LoadingSkeleton with appropriate variants
- No remaining spinner-only loading for data lists

Other: add i18n config import to test-setup.ts so tests can use
useTranslation without setup errors
@codenerde

Copy link
Copy Markdown
Author

done

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.

Persist theme preference across reloads

1 participant