Skip to content

perf(dashboard): lazy-load routes + split vendors; polish session-list placeholders - #72294

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-df87038b
Jul 26, 2026
Merged

perf(dashboard): lazy-load routes + split vendors; polish session-list placeholders#72294
teknium1 merged 2 commits into
mainfrom
hermes/hermes-df87038b

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Dashboard load-time and session-list polish — the two follow-ups deferred from the #72234 QA pass. First paint no longer downloads the entire 2 MB admin bundle (xterm/terminal included), and session lists stop rendering "Untitled · unknown" placeholder stacks.

Salvages #72119 by @erick713006 (route-level code splitting, fixes #25912), cherry-picked with authorship preserved.

Changes

perf: lazy-load routes + split heavy vendors (salvaged from #72119, @erick713006)

  • web/src/App.tsx: all page imports converted to React.lazy, <Routes> wrapped in <Suspense> with a shared spinner fallback; the persistent embedded-chat host (and its xterm chunk) is deferred until the first /chat visit, sticky afterward so the PTY still survives tab switches (latchChatActivation).
  • web/vite.config.ts: rolldown codeSplitting groups for react/xterm/three/plot/motion/ui/vendor; chunkSizeWarningLimit: 600 so true regressions still warn. Follow-up commit normalizes the CRLF line endings the cherry-pick introduced.

fix: session lists render placeholders gracefully

  • Session rows omit the model segment entirely when the store has no model — no more unknown with a dangling separator.
  • The Overview "Recent Sessions" card falls back to the message preview as the row label (italic, matching the History list) instead of bare "Untitled", and skips the duplicate preview paragraph when the preview is the label.

Validation

Check Result
Bundle (before → after) one 2,021 kB main chunk (577 kB gz) → 548 kB shell (160 kB gz) + on-demand chunks (xterm 496 kB loads only on /chat)
web npm run check (typecheck + vitest + eslint) 106/106 tests, 0 errors
Live smoke (fresh build, isolated HERMES_HOME) all routes render through Suspense; /chat terminal + PTY works; xterm chunk absent from network until /chat visited; #72234's header buttons still survive; sessions rows show preview labels and no "unknown"
ruff / footguns clean (no Python changes)

Infographic

Dashboard perf + polish infographic

erick713006 and others added 2 commits July 26, 2026 16:06
The production dashboard build packed almost every page plus xterm/three/
plot into one large JS chunk, which trips Vite's 500kB warning and slows
first paint even when the user only opens Sessions/Config.

- Lazy-load route pages in App.tsx behind Suspense
- Defer mounting the persistent embedded chat host (and xterm) until the
  first /chat visit, while keeping the sticky PTY latch afterward
- Add rolldown vendor codeSplitting groups (react, xterm, three, plot,
  motion, ui) and raise chunkSizeWarningLimit modestly to 600kB

Addresses #25912 (partial: route lazy-load + vendor splits + fallbacks;
not yet CI bundle analysis or documented entry budget).

Verified locally: npm run typecheck, npm run test (97), npm run build
with separate page/vendor chunks.
…n lists

Sessions that die before title generation (or predate model tracking)
rendered as 'Untitled · unknown · 0 msgs' — two placeholders stacked in
one row reads as breakage to Hermes Cloud users. Now:

- Session rows omit the model segment entirely when the store has no
  model (no more 'unknown' + dangling separator).
- The Overview 'Recent Sessions' card falls back to the message preview
  as the row label (italic, same treatment as the History list) instead
  of a bare 'Untitled', and skips the duplicate preview paragraph when
  the preview IS the label.
@alt-glitch alt-glitch added type/perf Performance improvement or optimization comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P3 Low — cosmetic, nice to have labels Jul 26, 2026
@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 97a41f2

ℹ️ Info

Desktop E2E visual evidence · View test artifacts · View job

1 visual diff.

inline evidence upload failed.

Failed to upload diff-665a0833239e-onboarding-overlay-diff.png with gh image (exit code 1): Error uploading /home/runner/work/_temp/e2e-evidence/diff-665a0833239e-onboarding-overlay-diff.png: step 0 (get upload token): uploadToken not found on repo page — do you have write access to NousResearch/hermes-agent? (or, if NousResearch enforces SAML SSO, authorize at https://github.com/orgs/NousResearch/sso)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P3 Low — cosmetic, nice to have type/perf Performance improvement or optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split the dashboard bundle by route and heavyweight feature dependencies

3 participants