Skip to content

Graceful Context7 chat widget transitions#122

Merged
MarketDataApp merged 2 commits intomainfrom
staging
Feb 24, 2026
Merged

Graceful Context7 chat widget transitions#122
MarketDataApp merged 2 commits intomainfrom
staging

Conversation

@MarketDataApp
Copy link
Owner

Summary

  • Sticky widget: Chat bubble stays on non-widget pages (e.g. /account/) only if the user has opened it at least once. If never interacted with, the bubble is cleaned up.
  • Deferred switching: When navigating between SDK sections (e.g. Python → PHP) while the user has an active conversation (panel open + messages sent), the switch is deferred until the user closes the chat panel.
  • Immediate switching: When the chat panel is closed or the user hasn't sent any messages, switching between SDK sections happens instantly.
  • Theme fix: Dark/light mode toggle now updates widget colors in-place via shadow DOM style rewriting instead of destroying and recreating the entire widget (which previously lost conversations).

Test plan

  • Navigate to /sdk/py/ → widget loads
  • Navigate to /account/ without opening chat → bubble disappears
  • Navigate to /sdk/py/, open chat, close it, navigate to /account/ → bubble stays (sticky)
  • Navigate to /sdk/php/ with panel closed → immediate switch to PHP
  • Open chat on /sdk/py/, type a message, navigate to /sdk/php/ → chat stays open with Python context
  • Close the chat panel → silently switches to PHP widget
  • Toggle dark/light mode while chatting → color changes without destroying conversation

🤖 Generated with Claude Code

…tching

- Keep widget open when navigating to non-widget pages (sticky behavior)
- Defer SDK switch when user has active conversation (panel open + messages)
- Switch immediately when panel is closed or no user messages
- Fix theme toggle to update colors in-place instead of destroying widget
Remove the bubble when navigating to non-widget pages if the user
never interacted with it. Prevents a stale SDK-specific chat bubble
from lingering on unrelated pages like /account/.
@MarketDataApp MarketDataApp merged commit 05e89b7 into main Feb 24, 2026
1 check passed
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