Skip to content

refactor: split oversized dashboard components (#335) - #349

Merged
El-swaggerito merged 3 commits into
Axionvera:mainfrom
Ahbiz:refactor/split-dashboard-components
Jul 29, 2026
Merged

refactor: split oversized dashboard components (#335)#349
El-swaggerito merged 3 commits into
Axionvera:mainfrom
Ahbiz:refactor/split-dashboard-components

Conversation

@Ahbiz

@Ahbiz Ahbiz commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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 in src/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 in src/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

  • Documentation: Created docs/component-structure.md outlining component sizing thresholds (<250 lines) and directory organization patterns.
  • Unit Tests: Updated tests/components/Navbar.test.tsx and tests/components/SessionPlaybackPanel.test.tsx with full provider test coverage (ThemeProvider, OfflineProvider, WorkspaceProvider, VaultProvider, GovernanceProvider).

Verification

  • npx tsc --noEmit passes with 0 type errors
  • npx jest tests/components/ passes 100% (7/7 test suites, 21/21 tests)
  • Merged latest upstream/main with 0 conflicts

Ahbiz added 3 commits July 29, 2026 19:40
…board-components

# Conflicts:
#	src/components/layout/Navbar.tsx
#	tests/components/Navbar.test.tsx
#	tests/components/SessionPlaybackPanel.test.tsx
@El-swaggerito
El-swaggerito merged commit 3e20576 into Axionvera:main Jul 29, 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.

Split oversized Axionvera dashboard components

2 participants