Skip to content

perf(app): defer the inactive thread route - #23

Merged
Itsnotaka merged 1 commit into
mainfrom
daniel/frontend-defer-thread-route
Aug 4, 2026
Merged

Itsnotaka merged 1 commit into
mainfrom
daniel/frontend-defer-thread-route

Conversation

@Itsnotaka

@Itsnotaka Itsnotaka commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • load ThreadPage through one cached dynamic import
  • start that import from the thread route's beforeLoad hook
  • keep Home from requesting transcript, Markdown, composer, tray, tool, and subagent code
  • share the existing connecting frame between the real page and Suspense fallback
  • guard the thread page out of Home's static startup graph

Why

Home could not use 39 modules pulled in by the static ThreadPage import, but every Home launch parsed them.

Measured result

  • eager app source: 1,205.2 to 897.1 KiB, down 25.6%
  • initial JavaScript: 2,731,288 to 1,582,460 bytes, down 42.1%
  • initial gzip: 832,684 to 494,276 bytes, down 40.6%
  • Electron process-to-ready median: 6,449 to 5,125 ms, down 20.5%
  • Electron window-ready median: 5,582 to 4,301 ms, down 23.0%
  • first-frame renderer heap median: 115.16 to 98.75 MiB, down 14.3%
  • React initial render median: 2.2 to 2.1 ms
  • commit-to-next-frame median: 3.8 to 4.5 ms

Verification

  • pnpm --filter @honk/app dev:startup-review failed on thread/page.tsx before the split, then passed and started Vite
  • 11 focused thread route, session layout, and tab controller tests pass
  • exact server-rendered connecting markup is locked by a focused test
  • repeated route preload calls are verified to share one import promise
  • pnpm --filter @honk/app build
  • focused oxfmt, oxlint, and diff checks
  • React Doctor reports no issue in an improvement-8 file

Repository-wide typecheck remains blocked by the same onboarding-layout.tsx:344 gearColossus error on both trees. Design lint reports only the 12 legacy /v2 findings already on main. The architecture check still reports the same five pre-existing oversized files.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
honk-marketing Ready Ready Preview Aug 4, 2026 7:30pm

Request Review

@Itsnotaka
Itsnotaka merged commit a174b0c into main Aug 4, 2026
4 of 5 checks passed
@Itsnotaka
Itsnotaka deleted the daniel/frontend-defer-thread-route branch August 6, 2026 05:46

This branch was successfully deployed

1 active deployment
Preview — 659e0c40 Deployed Aug 4, 2026 by vercel[bot]
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