Skip to content

perf(core): Route code-splitting, lazy visualizers, Cmd+K palette & chat refactor - #6

Merged
arvarik merged 1 commit into
mainfrom
perf-nav-foundation
Sep 7, 2026
Merged

arvarik merged 1 commit into
mainfrom
perf-nav-foundation

Conversation

@arvarik

@arvarik arvarik commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary of PR 1

  1. Route-Level Code Splitting:

    • Converted all 9 top-level routes in src/App.jsx to React.lazy() wrapped with Suspense and a spinner fallback.
    • Initial production bundle dropped from 1.91 MB to 161.16 kB (a 91.6% reduction).
    • Configured custom chunking for heavy vendor modules (@xyflow, katex, react-syntax-highlighter, lucide-react, react-router, react).
  2. Lazy-Loaded Visualizers:

    • Converted Mermaid diagrams in src/components/shared/MermaidRenderer.jsx to load the heavy mermaid package on demand only when a diagram actually appears.
  3. Universal Command Palette (Cmd+K / Ctrl+K):

    • Bound Cmd+K / Ctrl+K across all pages to trigger the global search / quick switcher modal.
    • Enhanced SearchDialog with direct links to all core pages with keyboard shortcut badges.
    • Preserved Cmd+J for Chat toggle and added hints in shortcuts modal.
  4. Component Decomposition:

    • Extracted PersonaPicker and SessionPicker out of the 1,220-line LearningChat.jsx into modular, testable sub-components with dedicated personas.js constants.

Verification

  • npm run lint passed (0 errors, 0 warnings).
  • npm test passed (18 test suites, 248 passed).
  • npm run build passed successfully.

@arvarik
arvarik merged commit eb36900 into main Sep 7, 2026
1 check passed
@arvarik
arvarik deleted the perf-nav-foundation branch September 7, 2026 22:16
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.

1 participant