Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
description: "Keep the web startup bundle small: views, blocks, and modals load lazily." paths: - "apps/web/src/" - "apps/web/index.html" globs: "apps/web/src/,apps/web/index.html" alwaysApply: false
Startup bundle
- Everything statically reachable from
src/index.tsxdownloads and runs before the first screen. Views, block components, and modals load throughlazy()/lazyNamed(@core/util/lazyNamed) inside a<Suspense>; never statically import one into a shared hub (Root,Layout,AppProviders,componentRegistry,app-router-view,routes/shells.tsx, blockdefinition.ts, Lexicalinit.ts). - Each top-level route picks its shell in
app-router-view.tsx(routes/shells.tsx):authRoutepages and booking links render without app chrome, andappRouterendersAppShell— the app's providers (AppProviders), layout/context owner (SplitLayoutProvider), chrome (AppChromeinLayout.tsx), and split content. Compose these in the route shell; keepAppChromeindependent of page selection. Put state only the app's views use inAppProviders, notRoot;Rootkeeps what every page or call needs. index.htmlpaints a boot shell before any JS runs: the saved theme's background, the rail column, and the desktop app's content card — no app content. The first shell to mount dismisses it (dismissBootShell). Keep its rail width and desktop inset in step withSidebarRailandSplitLayout.- Read a supported iOS notification launch intent before mounting the router; keep startup payload validators in the generated compact push-schema entry rather than importing the full service schema bundle.
- Do not register an asset-caching service worker. Keep
public/sw.jsat its deployed URL so existing workers can update, clear their shell and asset caches, and unregister; it must not intercept requests. - The build fails if any emitted file exceeds CloudFront's 10 MB compression limit; split it rather than raising the limit.
- The build also fails if a chunk has no source map or a map exceeds PostHog's
25 MB symbolication limit.
startupChunks()invite.base.tssplits the code the entry loads intoapp,vendor, andapi-schemaschunks so each map stays under it; it moves only modules the entry already imports.