Skip to content

feat: render validation messages and alerts in loading_spinner_skeleton (#277) - #387

Merged
godamongstmen897 merged 22 commits into
Goldii-locks:mainfrom
Junirezz:feat/277-loading-skeleton-validation
Sep 1, 2026
Merged

feat: render validation messages and alerts in loading_spinner_skeleton (#277)#387
godamongstmen897 merged 22 commits into
Goldii-locks:mainfrom
Junirezz:feat/277-loading-skeleton-validation

Conversation

@Junirezz

Copy link
Copy Markdown

Closes #277

Summary

Adds field error indicators and alerts to the LoadingSkeleton layout so invalid input configurations are highlighted when validations trigger.

Changes

  • Added error?: string | null prop to render a single validation alert
  • Added validationErrors? prop that accepts either a field-keyed Record<string, string> or an array of { field?, message } objects
  • Each validation message renders as an accessible alert (role="alert", aria-live="assertive") with high-contrast error styling (text-red-400 on bg-red-950/40 with border-red-800)
  • Alerts are linked to the skeleton via aria-describedby="loading-skeleton-errors"
  • No alerts render when no errors are provided (backwards compatible)

Verification

  • Added __tests__/loading-skeleton-validation.test.tsx (14 tests) covering single error, field-keyed records, array form, empty/null cases, ARIA attributes, and interactive mode integration
  • All existing tests continue to pass (2045 tests / 123 files)

emmyokolo2525-cyber and others added 5 commits August 28, 2026 13:10
…addresses

Add state serialization to rabe_connector so active wallet addresses
survive page reload cycles.

New exports:
- RABE_CACHE_KEY: localStorage key for the cache entry
- RabeActiveAddressCache: versioned interface (version, address, savedAt, network)
- validateRabeAddressCache: strict runtime validation (address format,
  timestamp, network)
- serializeRabeAddressCache / deserializeRabeAddressCache: JSON
  round-trip with validation on read-back; returns null on corrupt data
- saveRabeAddressCache: writes to localStorage; SSR-safe; logs warning
  on QuotaExceededError via existing logRabeWarning
- loadRabeAddressCache: reads + validates from localStorage; SSR-safe
- clearRabeAddressCache: removes entry on disconnect; no-op if absent

Tests: 33 new cases covering validation, serialization round-trips,
and all localStorage integration scenarios (save/load/clear, overwrite,
corrupt data, storage errors, timestamp bounds).

All 376 existing tests continue to pass. TypeScript: 0 errors.

Closes Goldii-locks#137
…disconnect_handler (Goldii-locks#235)

- Add WalletDisconnectUserRejectedError class for user rejection scenarios
- Add isWalletDisconnectUserRejected() function to detect rejection errors
- Modify disconnectWalletWithCheck to handle rejections with toast notifications
- Return success=true when user rejects (intentional cancellation)
- Remove active key from persistent store even on rejection
- Add comprehensive test cases for rejection handling (23 new tests)
- Pattern mirrors albedo_connector and freighter_connector for consistency
…i-locks#273)

- Add aria-busy to advertise the in-progress loading state
- Add motion-reduce variants to disable pulse/fade animations
- Preserve role=status, aria-live, sr-only message, and keyboard support
- Add tests covering ARIA semantics, reduced motion, and keyboard nav
…oldii-locks#277)

- Add error and validationErrors props that render accessible role=alert
  messages with aria-live=assertive
- Link alerts to the skeleton via aria-describedby
- Support both field-keyed record and array-of-errors forms
- Apply high-contrast error styling (text-red-400 on bg-red-950)
- Add tests covering validation message rendering and toggling
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Junirezz 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

GitHub Copilot and others added 17 commits August 31, 2026 22:09
- Add DashboardList.stories.tsx covering loading, error, empty, single/multiple
  jobs, expanded panels, role badges, and large milestone counts
…#272)

- Cover loading, error, empty, and disconnected-wallet states
- Verify job rendering, ID prefix, funded status, role badges, and search/filter
- Assert ARIA attributes for expand/collapse, filters, and accessibility
The rabe_connector conflict was structural, not semantic: this branch's
addition is a single append-only hunk at the end of the file (156 lines,
zero deletions), but main has grown past that point, so git aligned the
two additions and split an existing function in half. Rebuilt as main's
file plus the branch's block appended -- the persistent address cache
lands whole.

Running the suite then exposed a real defect in
dashboard-accessibility.test.tsx (from Goldii-locks#306): five waitFor calls that
are never awaited.

Three are nested inside an outer waitFor, so the click replays on every
retry and the inner assertions never gate the test; one of them leaked a
rejection that made vitest exit 1 while reporting all tests passed. Two
more sit in synchronous tests, where nothing inside them ever ran.

With the assertions actually running, two failed for a second reason:
the dashboard auto-expands the first job once the fetch resolves, so an
unconditional click closed the very panel they were looking for. They
now click only while the row is still collapsed, and go through
fireEvent so React flushes the update inside act().

lint 0 errors / tsc 0 errors / 2173 tests passing / build OK, exit 0
…e-connector-persistent-cache

feat(rabe_connector): implement secure persistent caching for active addresses
…-micro-animations-and-tests

fixed ci test
…eleton-a11y

feat: ensure a11y ARIA compliance for loading_spinner_skeleton (Goldii-locks#273)
…list-stories

feat: add Storybook stories for dashboard_list (Goldii-locks#271)
The suite merges cleanly but does not typecheck -- 8 errors, all from
untyped helpers in the new file:

- `mockJobsResponse(jobs = [])` infers `never[]` from the default, so
  every call that passes real job objects is rejected. It now takes
  `MockJob[]`, derived from mockJob's own return type so the fixture
  and its consumers cannot drift apart.
- `mockJob(overrides = {})` and `setupFetch(response)` were implicitly
  `any`.
- `let resolveFetch` is assigned inside a Promise executor, which
  TypeScript cannot see as definite; it now carries a definite-assignment
  annotation and its call signature.

No assertions were changed -- all 67 cases pass as written.

lint 0 errors / tsc 0 errors / 2240 tests passing / build OK
…gnature

The branch merges cleanly but fails tsc twice: toastSpy is declared as
ReturnType<typeof vi.fn>, which widens to Mock<Procedure | Constructable>
and will not satisfy disconnectWalletWithCheck's showToast parameter.

Declared the handler signature once and threaded it through both the
declaration and vi.fn<...>(), so the spy is checked against the shape it
is actually passed as. No assertions changed.

lint 0 errors / tsc 0 errors / 2242 tests passing / build OK
…list-tests

test: add comprehensive RTL tests for dashboard_list (Goldii-locks#272)
…llet-disconnect-user-rejection-handling

feat: gracefully catch user signature rejection exceptions in wallet_…
…eton

CI failed with "Parsing error: File appears to be binary" because
app/components/LoadingSkeleton.tsx was committed as UTF-16LE -- git
records it as a binary blob (Bin 6228 -> 17612 bytes), and eslint will
not parse it.

Converted back to UTF-8, that file is identical to main's apart from two
artefacts of the round-trip: a byte-order mark, and the ellipsis in
"Loading job data…" mangled to "ΓǪ" (its UTF-8 bytes re-read as a
single-byte codepage). The validation support the PR describes is
already on main, so the component carried no change of its own -- only
the damage. Took main's copy.

The new suite is the real contribution and passes as written against
main's component: 34 cases, all green.

Worth checking the editor that produced this -- saving .tsx as UTF-16
will keep breaking CI the same way.

lint 0 errors / tsc 0 errors / 2276 tests passing / build OK
@godamongstmen897
godamongstmen897 merged commit 94a9533 into Goldii-locks:main Sep 1, 2026
1 check 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

Development

Successfully merging this pull request may close these issues.

Render validation messages and alerts inside loading_spinner_skeleton

5 participants