Skip to content

feat: embedded agent shortcuts#244

Merged
dcrawbuck merged 3 commits into
mainfrom
dcrawbuck/embedded-agent-all-in-one-ui-shortcuts
Jul 8, 2026
Merged

feat: embedded agent shortcuts#244
dcrawbuck merged 3 commits into
mainfrom
dcrawbuck/embedded-agent-all-in-one-ui-shortcuts

Conversation

@dcrawbuck

@dcrawbuck dcrawbuck commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Switch the docs agent integration to manually initialize the hosted all-in-one widget.js API so the site can choose floating or docked presentation.
  • Add global shortcuts: Cmd/Ctrl+I opens or closes the floating agent, Esc closes the agent UI, and Cmd+Shift+I opens/toggles docked mode.
  • Route the search dialog Ask AI action through the widget controller, preserve typed search queries, and add a custom shortcut tooltip matching the search trigger kbd UI.
  • Honor the hosted widget's --superwall-agent-panel-width variable so docked mode pushes the docs layout on desktop.

Validation

  • bunx oxlint src/components/AgentChatWidget.tsx src/components/SearchDialog.tsx
  • bun run build:cf
  • bun test
  • Runtime smoke test against local docs verified floating open/close, Esc close, docked open, and docked close behavior.
  • Autoreview: /Users/dcrawbuck/.agents/skills/autoreview/scripts/autoreview --mode local reported no accepted/actionable findings.

Note

Medium Risk
Touches global keyboard handlers and third-party widget lifecycle (init/destroy), which can affect layout and shortcut behavior site-wide, but failures are caught so docs stay usable.

Overview
Replaces passive widget.js injection with manual window.SuperwallAgent initialization so the docs site can pick floating vs docked presentation, re-init when the mode changes, and seed opens with an optional query.

Adds keyboard control: Cmd/Ctrl+I toggles the floating agent (close if open, else open), Esc closes it, and Cmd+Shift+I toggles docked mode. Search Ask AI and in-dialog Cmd/Ctrl+I now call openAgentWidget directly (with the current search text); Cmd+Shift+I from search opens docked. The Ask AI control gets an accessible shortcut tooltip styled like other search kbd hints.

Layout/CSS: introduces --superwall-agent-panel-width and animates margin-right on the main Fumadocs layouts so docked mode pushes content on desktop; drops the old locally ported [data-agent-*] panel/teaser styles now owned by the hosted widget.

Reviewed by Cursor Bugbot for commit 7808377. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread src/components/AgentChatWidget.tsx Outdated
@dcrawbuck dcrawbuck changed the title [codex] Support embedded agent shortcuts feat: embedded agent shortcuts Jul 8, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
superwall-docs 7808377 Commit Preview URL

Branch Preview URL
Jul 08 2026, 08:13 PM

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1f519fa. Configure here.

Comment thread src/components/AgentChatWidget.tsx Outdated
Comment thread src/components/AgentChatWidget.tsx Outdated
@dcrawbuck dcrawbuck marked this pull request as ready for review July 8, 2026 19:53
@dcrawbuck dcrawbuck merged commit 59b8c5d into main Jul 8, 2026
3 checks passed
@dcrawbuck dcrawbuck deleted the dcrawbuck/embedded-agent-all-in-one-ui-shortcuts branch July 8, 2026 20:35
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