-
Notifications
You must be signed in to change notification settings - Fork 88
Feat/migrate naga explorer #1000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the naga explorer Single Page Application into the monorepo under apps/explorer, consolidating build tooling and Docker deployment configuration while preserving all existing functionality.
Key Changes:
- Integrated standalone naga-explorer repository into monorepo structure
- Configured Vite build system with TypeScript and React
- Added Docker/Nginx deployment infrastructure
- Implemented comprehensive component refactoring for maintainability
Reviewed Changes
Copilot reviewed 85 out of 161 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added apps workspace to monorepo configuration |
| docs/sdk/getting-started/lit-client.mdx | Updated network import references and added tree-shaking documentation |
| apps/explorer/vite.config.ts | Configured Vite with custom version page generation plugin |
| apps/explorer/vercel.json | Added Vercel deployment configuration with SPA routing |
| apps/explorer/tsconfig.json | TypeScript configuration for React SPA with path mappings |
| apps/explorer/src/styles/global.css | Global styles and theme variables for the explorer |
| apps/explorer/src/router.tsx | React Router configuration for SPA navigation |
| apps/explorer/src/main.tsx | Application entry point with Wagmi and RainbowKit setup |
| apps/explorer/src/lit-login-modal/types.ts | Type definitions for authentication and network management |
| apps/explorer/src/lit-login-modal/context/LitAuthContext.tsx | React context for Lit authentication state |
| apps/explorer/src/lit-login-modal/components/*.tsx | Authentication UI components (ledger funding, settings panel) |
| apps/explorer/src/lit-login-modal/PKPSelectionSection.tsx | PKP wallet selection with pagination and balance display |
| apps/explorer/src/lit-login-modal/LitAuthProvider.tsx | Main authentication provider with multi-method support |
| apps/explorer/src/lit-logged-page/protectedApp/utils/*.ts | Utility functions for formatting, ledger refresh, and chain management |
| apps/explorer/src/lit-logged-page/protectedApp/types.ts | Type definitions for PKP operations and permissions |
| apps/explorer/src/lit-logged-page/protectedApp/hooks/*.ts | Custom hooks for payment manager, ledger balance, and withdrawal status |
| apps/explorer/src/lit-logged-page/protectedApp/contexts/*.tsx | Context providers for PKP permissions management |
| apps/explorer/src/lit-logged-page/protectedApp/components/ui/*.tsx | Reusable UI components (spinner, buttons, toasts) |
| apps/explorer/src/lit-logged-page/protectedApp/components/wallet/*.tsx | Wallet operation components (transactions, signing, payments) |
| apps/explorer/src/lit-logged-page/protectedApp/components/pkp/*.tsx | PKP information display components |
| apps/explorer/src/lit-logged-page/protectedApp/components/permissions/*.tsx | Permission management UI components |
| apps/explorer/src/lit-logged-page/protectedApp/components/layout/*.ts | Layout and navigation component exports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const EVENT_NAME = "ledger-refresh"; | ||
| const SNAPSHOT_EVENT_NAME = "ledger-snapshot"; | ||
|
|
||
| // Queue to handle sequential refresh requests | ||
| class RefreshQueue { | ||
| private queue: Array<{ address?: string | null; snapshotBalance?: string | null; resolve: () => void }> = []; |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Complex inline type definition reduces readability. Consider extracting this to a named interface like QueueItem to improve code clarity and enable reuse.
| const EVENT_NAME = "ledger-refresh"; | |
| const SNAPSHOT_EVENT_NAME = "ledger-snapshot"; | |
| // Queue to handle sequential refresh requests | |
| class RefreshQueue { | |
| private queue: Array<{ address?: string | null; snapshotBalance?: string | null; resolve: () => void }> = []; | |
| // Represents an item in the refresh queue | |
| interface QueueItem { | |
| address?: string | null; | |
| snapshotBalance?: string | null; | |
| resolve: () => void; | |
| } | |
| const EVENT_NAME = "ledger-refresh"; | |
| const SNAPSHOT_EVENT_NAME = "ledger-snapshot"; | |
| // Queue to handle sequential refresh requests | |
| class RefreshQueue { | |
| private queue: QueueItem[] = []; |
| const account = privateKeyToAccount( | ||
| "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded private key exposed in source code. This appears to be a well-known test key (Hardhat's default), but should be documented as such or sourced from configuration to avoid confusion and potential security risks.
| const account = privateKeyToAccount( | |
| "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" | |
| // NOTE: This uses Hardhat's default test private key for local development only. | |
| // Never use this key in production. To override, set REACT_APP_TEST_PRIVATE_KEY in your environment. | |
| const account = privateKeyToAccount( | |
| process.env.REACT_APP_TEST_PRIVATE_KEY || | |
| "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" |
…js-sdk into feat/migrate-naga-explorer
WHAT