Page loading performance

The shared shell loads on every application page. Optimize common startup code, repeated catalog work and provider selection rendering without changing authentication, route history or model capabilities.

Measured implementation

The baseline chat export references 33 JavaScript files totaling 832419 gzip bytes. All fourteen DiceBear styles enter the initial dependency graph although one configured avatar style is used. Two avatar chunks account for approximately 270 KB gzip. The native Provider list request takes 1138 ms in the observed timeline; a separate Python profile reports 234 credential-store enumerations and 1.318 seconds cumulative enumeration work for one catalog request. Native session-long resource counts include three-second polling and are not cold-start timings.

References and choices

Next lazy loading and React lazy loading support splitting optional runtime code. Use explicit dynamic imports for optional avatar styles, keep the small default style synchronous, share in-flight loads, and recover from a failed import. Use React memo with stable provider-row callbacks; a selected-row change must not regenerate every unchanged icon. Keep module-level SVG reuse bounded and avoid generating DiceBear SVGs in upload or letter mode.

Data and compatibility

Provider catalog computation reads a credential-presence snapshot within one request. A snapshot never crosses request boundaries or becomes an authentication decision cache. Unsupported providers stay unsupported; local provider identity, aliases, account presence, CLI fallbacks and env/cloud credential semantics remain the existing contract. Do not expose credential values in metrics.

Successful settings reads can seed the initial Provider catalog view only while fresh. Mutation invalidation remains authoritative. Cache expiry, failed requests and loading placeholders must not display another provider as the selected route. Avatar imports and asynchronous results are ignored after unmount or configuration changes. Existing upload, letter, generated styles, Thumbs background and SVG ID isolation remain available.

Acceptance

Public Avatar import loads only the default style; chosen styles load once and all fourteen remain selectable. Repeated identical avatars reuse generated markup within a bounded cache. Catalog list tests prove one credential enumeration per request and immediate changes on the next request. Provider selection updates render only affected rows; warm catalog revisits show cached rows immediately. Compare final production entry JavaScript bytes and same-machine catalog measurements against the recorded baseline. Verify chat, Agents, Abilities, General and Provider navigation in the installed default App.

Implementation status

Implementation passed independent specification and quality reviews. Initial JavaScript gzip is 496156 bytes versus 832419; same-machine five-sample warm catalog median is 267.607 ms versus 1248.779 ms, with 234 credential enumerations reduced to one and 239 selection redraws reduced to two. Full verification and default App acceptance are separately recorded in the acceptance report. These figures are not end-to-end click timings.