mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
d5ad1efcd0
Two issues found after the example merged: 1. The closed chat panel is only translated off-screen, so its inputs/buttons stayed in the tab order and the a11y tree. Mark the <aside> `inert` while closed (`[attr.inert]`), so focus/AT skip it; removed when open. 2. The dev web inspector (and its @copilotkit/web-inspector dep, ~660 kB) shipped in the production initial bundle. Gate it behind `@defer (when isDev)` so it's split into a lazy chunk that a prod build (isDev=false) never loads. Verified: prod `ng build` initial bundle 4.59 MB -> 3.93 MB with web-inspector now a lazy chunk; dev serve still mounts the inspector; closed-panel focus is blocked (activeElement falls back to body), open panel unaffected.