fix(chat): closed drawer sidenav must not intercept clicks on content beneath it#778
Conversation
In drawer mode the chat-sidenav host is a fixed, drawer-width, full-height,
z-index:1001 box that stays put whether open or closed — only the inner
.chat-sidenav PANEL slides off-screen (translateX(-100%)) when closed. The
transparent closed host had no pointer-events:none, so it silently swallowed
clicks over the left strip of the content beneath it. App mode forces drawer
mode on desktop, so it covered the itinerary overlay + welcome suggestions
('Plan a long weekend in Paris' was unclickable).
Fix: the drawer host is pointer-events:none (inert); the .chat-sidenav panel
re-enables pointer-events:auto (harmless off-screen when closed, interactive
when open). Adds an examples/chat e2e guard: in App mode a point over the
closed drawer box resolves to the content beneath, not the sidenav.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @blove's task in 1m 41s —— View job Code Review
The fix is correct and minimal. The root cause analysis is accurate: the host element in drawer mode is a fixed, full-height box that sits in place regardless of open/close state — only the inner panel slides off-screen. Without
The CSS pattern applied here —
I also checked The
The test is well-structured. One observation: the Minor gap: it('drawer host is pointer-events: none (closed host must not intercept clicks)', () => {
expect(normalized).toMatch(
/:host\(\[data-mode="drawer"\]\)\s*\{[^}]*pointer-events:\s*none\s*;/,
);
});
it('drawer panel restores pointer-events: auto', () => {
expect(normalized).toMatch(
/:host\(\[data-mode="drawer"\]\)\s*\.chat-sidenav\s*\{[^}]*pointer-events:\s*auto\s*;/,
);
});This is a minor improvement, not a blocker. The e2e guard already catches the regression. The fix itself is correct. |
Bug
In App mode (canonical demo), the left thread sidenav covered the content and swallowed clicks — you couldn't click the "Plan a long weekend in Paris" welcome suggestion.
Root cause
chat-sidenav.styles.ts, drawer mode: the host isposition: fixed; left:0; width: ~280px; height:100%; z-index:1001. When the drawer is closed, only the inner.chat-sidenavpanel slides off-screen (translateX(-100%)) — the host box stays put. With nopointer-events, that transparent host is an invisible click-catcher over the left strip of whatever's beneath it. App mode forces drawer mode on desktop, so it sat over the itinerary overlay + welcome suggestions and ate the clicks. (Latent on mobile too.)Fix
pointer-events: none(inert whether open or closed)..chat-sidenavpanel →pointer-events: auto(harmless off-screen when closed; interactive when open, where it covers the host box).Two-line CSS change, scoped to drawer mode; expanded/collapsed modes untouched. Benefits every drawer-mode consumer (incl. the ag-ui demo).
Test
Adds an
examples/chate2e guard: in App mode (/sidebar?appmode=on, drawer closed), a point over the closed-drawer box resolves to the content beneath (notchat-sidenav), and the host computespointer-events: none. Red before this fix, green after.Verification note
Local browser verification was blocked in this environment (Chrome-MCP classifier outage + a parallel nx
serveholding the serve-target lock), so this relies on the new e2e guard running in clean CI. The fix is a deterministic CSS change traced directly from the source.🤖 Generated with Claude Code