Skip to content

feat: assistant widget#6754

Open
dks333 wants to merge 2 commits into
mainfrom
sam/assistant-widget
Open

feat: assistant widget#6754
dks333 wants to merge 2 commits into
mainfrom
sam/assistant-widget

Conversation

@dks333

@dks333 dks333 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Documentation changes

Brief description of what's being updated

Closes


For Reviewers

When reviewing documentation PRs, please consider:

✅ Technical accuracy

  • Code examples work as written
  • Commands and configurations are correct
  • Links resolve to the right destinations
  • Prerequisites and requirements are accurate

✅ Clarity and completeness

  • Instructions are clear and easy to follow
  • Steps are in logical order
  • Nothing important is missing
  • Examples help illustrate the concepts

✅ User experience

  • A new user could follow these docs successfully
  • Common gotchas or edge cases are addressed
  • Error messages or troubleshooting guidance is helpful

Note

Low Risk
Documentation and client-side embed wiring for a single docs route; no auth, API, or core product logic changes.

Overview
Adds Assistant Widget documentation under Optimize → Assistant, covering install, custom triggers, update(), API reference, and CSP guidance for @mintlify/assistant-widget.

The new assistant/widget page includes an interactive Widget playground that adjusts presentation, theme, hooks, and emits copy-ready HTML or Next.js install snippets while syncing options to a live widget on that page.

assistant-widget.js loads the hosted embed only on /assistant/widget, opens it after init(), keeps appearance aligned with docs light/dark mode, and tears the widget down when navigating away (via data-current-path / popstate).

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

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tomee 🟢 Ready View Preview Jul 26, 2026, 8:15 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify 🟢 Ready View Preview Jul 26, 2026, 8:15 AM

@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 using default effort and found 1 potential issue.

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 ba07b1a. Configure here.

Comment thread assistant-widget.js
observeDocsTheme(assistant);
notifyAssistantReady();
void syncAssistantTheme(assistant).catch(reportAssistantError);
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Theme sync overrides playground

Medium Severity

openAssistantWidget notifies the playground to apply its settings, then syncAssistantTheme immediately patches appearance.theme back to the docs theme. The theme MutationObserver keeps doing the same on every docs theme toggle, so an explicit light/dark choice in the playground cannot stick.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ba07b1a. Configure here.

@mintlify

mintlify Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify 🟡 Building Jul 26, 2026, 8:13 AM

@mintlify

mintlify Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tomee 🟡 Building Jul 26, 2026, 8:13 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

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.

2 participants