refactor: split oversized dashboard components (#335) - #349
Merged
El-swaggerito merged 3 commits intoJul 29, 2026
Conversation
…board-components # Conflicts: # src/components/layout/Navbar.tsx # tests/components/Navbar.test.tsx # tests/components/SessionPlaybackPanel.test.tsx
6 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.
Summary
Resolves #335. Refactors oversized Axionvera dashboard components into smaller, single-responsibility subcomponents aligned with the updated repository layout. Maintains 100% backward compatibility, exact UI behavior, and public API interfaces.
Changes Made
1. Navbar Component Refactoring
src/components/layout/Navbar.tsx: Reduced file size from 358 lines to ~110 lines by delegating UI sections to focused subcomponents insrc/components/layout/nav/:WalletIcon.tsx: Reusable inline SVG renderer for wallet logos.NavLinks.tsx: Presentational navigation link bar.ConnectedWalletDropdown.tsx: Active wallet badge, address copying, wallet switching, and disconnect options.WalletPickerDropdown.tsx: Disconnected wallet connection button and wallet selector modal.index.ts: Subcomponent exports.2. SessionPlaybackPanel Component Refactoring
src/features/diagnostics/components/SessionPlaybackPanel.tsx: Reduced file size from 478 lines to ~170 lines by delegating sections to subcomponents insrc/features/diagnostics/components/playback/:playbackUtils.ts: Pure timestamp formatting, string helpers, and event descriptor logic.PlaybackControls.tsx: Replay transport controls (Play, Pause, Stop, Run to End, Speed presets).PlaybackTimeline.tsx: Captured event log timeline list.PlaybackInspector.tsx: Event JSON payload inspector pane.index.ts: Subcomponent exports.3. Documentation & Test Suite Updates
docs/component-structure.mdoutlining component sizing thresholds (<250 lines) and directory organization patterns.tests/components/Navbar.test.tsxandtests/components/SessionPlaybackPanel.test.tsxwith full provider test coverage (ThemeProvider,OfflineProvider,WorkspaceProvider,VaultProvider,GovernanceProvider).Verification
npx tsc --noEmitpasses with 0 type errorsnpx jest tests/components/passes 100% (7/7 test suites, 21/21 tests)upstream/mainwith 0 conflicts