fix: address UI docs, hook tests, wallet tests, and Docker Prisma issue - #920
Merged
ogazboiz merged 4 commits intoJun 29, 2026
Merged
Conversation
The backend Docker image was missing the generated Prisma client, causing ERR_MODULE_NOT_FOUND at startup. The client is generated into src/generated/prisma/ which is not compiled by TypeScript and was not copied to the runner stage. Changes: - Copy src/generated directory from builder to runner stage - Move @prisma/client from devDependencies to dependencies (needed at runtime) Fixes LabsCrypt#888
Tests cover: - Body scroll lock (hidden on mount, restored on unmount) - Escape key closes modal (and respects isCloseDisabled) - Tab focus wrapping (last to first) - Shift+Tab focus wrapping (first to last) - Focus restoration on unmount Fixes LabsCrypt#881
Tests cover: - Hydration: restores valid stored session, discards malformed/invalid sessions - Connect: success dispatches and persists session, failure clears stored session - Disconnect: clears state and removes localStorage key - useWallet: throws error when used outside WalletProvider Fixes LabsCrypt#880
Documents Button, Stepper, Card, Skeleton, and TransactionTracker components with props, types, defaults, and usage examples. Each component includes: - Props table with types and default values - Variant/state descriptions - Multiple usage examples - Accessibility notes Fixes LabsCrypt#885
4 tasks
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.
Closes #880, Closes #881, Closes #885, Closes #888
Type of Change
Summary
This PR addresses 4 issues across documentation, testing, and infrastructure:
Critical Bug Fix ([Infra] Backend Docker image never contains the generated Prisma client, so the container crashes on startup #888): Backend Docker image was missing the generated Prisma client, causing ERR_MODULE_NOT_FOUND at startup. Fixed by copying the generated directory to the runtime image and moving @prisma/client to runtime dependencies.
Hook Tests ([Testing] useModalDialog focus-trap / Escape / scroll-lock hook has no tests despite powering every modal's a11y #881): Added comprehensive tests for useModalDialog hook covering Escape key handling, focus trapping (Tab/Shift+Tab wrapping), body scroll lock, and focus restoration.
Context Tests ([Testing] WalletProvider (context/wallet-context.tsx) connect/disconnect/hydrate reducer and session persistence are untested #880): Added tests for WalletProvider context covering hydration (valid/malformed/invalid sessions), connect success/failure flows, disconnect behavior, and useWallet hook validation.
Documentation ([Docs] Shared src/components/ui primitives (Button/Stepper/Card/Skeleton/TransactionTracker) have no usage docs or stories #885): Added comprehensive documentation for all UI primitives (Button, Stepper, Card, Skeleton, TransactionTracker) with props tables, type definitions, defaults, and usage examples.
Motivation / Context
These changes improve code reliability, maintainability, and developer experience:
Closes #880, Closes #881, Closes #885, Closes #888