docs: add monorepo, UI components, state management and testing guides - #595
Merged
Conversation
Adds docs/monorepo.md (workspace layout, Turbo task graph, shared tooling), apps/web/docs/components-ui.md (shared UI primitives reference), apps/web/docs/concepts-state-management.md (provider tree, Auth/Wallet contexts, ProtectedRoute), and apps/web/docs/testing.md (Vitest setup, fake-indexeddb, WebCrypto, socket mocking). Closes codebestia#544 Closes codebestia#568 Closes codebestia#572 Closes codebestia#573 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R8SebNynWtmCebVq8tpgxS
|
@promisszn 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 was referenced Aug 30, 2026
Closed
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
Adds four documentation guides for the frontend workspace and monorepo tooling:
docs/monorepo.md— workspace layout (pnpm-workspace.yaml,apps/*+contracts), the Turbo task graph (build/dev/lint, what's cached), root vs. per-app scripts, shared Prettier/ESLint tooling, and whycontractsis a pnpm workspace member despite being a Cargo project.apps/web/docs/components-ui.md— reference for the shared UI primitives insrc/components/ui/(Avatar,Badge,CopyButton,EmptyState,Modal,ProposalCard,SkeletonLoader,Spinner): props, usage examples, accessibility behavior, presentational vs. stateful, and current test coverage.apps/web/docs/concepts-state-management.md— the provider tree,AuthProvider/AuthContext/useAuth,WalletContext, andProtectedRoute's redirect/loading gate, plus the boundary between context state, per-route server state, and IndexedDB-persisted state.apps/web/docs/testing.md— the web app's Vitest setup, thefake-indexeddbreset pattern, WebCrypto round-trip testing, and socket-client mocking conventions.Notable finding
While documenting state management, I found three separate
AuthContextimplementations inapps/web/src. Only one pair is actually live —WalletProvider(src/contexts/WalletContext.tsx) wrappingAuthProvider(src/components/auth/AuthProvider.tsx), mounted insrc/app/layout.tsxand consumed viauseAuth()/useWallet().src/contexts/AuthContext.tsxandsrc/lib/auth.tsx(referenced only bysrc/app/providers.tsx, which is itself never imported) appear to be dead code. Documented as such rather than papered over; worth a follow-up cleanup issue if confirmed.Similarly,
apps/web/docs/testing.mdnotes there is currently no dedicatedsocket.io-clientmock ornavigator.serviceWorkerfake in the test suite — documented the closest existing patterns (vi.stubGlobal, dependency injection) honestly rather than inventing conventions that don't exist yet.Test plan
Closes #544
Closes #568
Closes #572
Closes #573