Skip to content

feat: add ADK assistant to the docs bot panel#469

Merged
jacksonyzj merged 3 commits intomasterfrom
add-adk-bot
May 1, 2026
Merged

feat: add ADK assistant to the docs bot panel#469
jacksonyzj merged 3 commits intomasterfrom
add-adk-bot

Conversation

@jacksonyzj
Copy link
Copy Markdown
Contributor

Updates assistant.js and styles.css to integrate a second bot panel for ADK pages.

What changed

Two-iframe approach — both the default docs bot and the new ADK assistant load
on page init. Switching between them is a CSS visibility toggle (opacity +
pointer-events) rather than a src swap, so there's no reload flash when navigating
between ADK and non-ADK pages.

Route-based switching/adk/* pages show the ADK assistant; everything else
shows the default docs bot. No change to existing bot behavior on non-ADK routes.

Session restore — clicking a docs link inside the bot navigates same-tab and
automatically reopens the panel on the destination page via sessionStorage.

Theme sync — light/dark class changes are forwarded to both iframes so the chat
UI matches the docs theme.

Panel height fix — changed calc(100vh - 4.64rem) to bottom: 0; height: auto
so the panel fills to the bottom of the viewport correctly on all screen heights.

Follow-up needed after merge

ADK_BOT_URL currently points at a fork-hosted preview
(jacksonyzj.github.io/docs-bot/adk-bot-frontend/). Once
botpress/docs-bot#1 merges and the
GitHub Action deploys to botpress.github.io, update line 64 to:

const ADK_BOT_URL = 'https://botpress.github.io/docs-bot/adk-bot-frontend/'

jacksonyzj and others added 2 commits April 30, 2026 14:05
assistant.js changes:
  - DEFAULT_BOT_URL / ADK_BOT_URL constants; iframe.src is swapped at
    init and on every SPA route change based on isAdkRoute().
  - On `requestTheme` messages from the iframe, post the current
    <html class="dark"> state back as a themeChanged event.
  - MutationObserver on <html> class — broadcasts themeChanged to the
    iframe whenever the docs theme toggles.

⚠️ ADK_BOT_URL is currently set to the local dev server
(http://localhost:5173/docs-bot/agent-0-copilot/) for prototyping the
three frontend designs. Swap it to the gh-pages deploy URL or the
production cdn.botpress.cloud URL before pushing this branch.
- Point ADK_BOT_URL at adk-bot-frontend (port 5175, gh-pages path)
- Fix isAdkRoute(): only swap bot on /adk/<subpage>, not bare /adk or /adk/
- Restore panel open state across same-tab navigations via sessionStorage
- Handle navigate postMessage from iframe (same-origin: same tab, cross-origin: new tab)
- Fix bot panel bottom gap: switch from fixed height to bottom:0/height:auto

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jacksonyzj jacksonyzj requested a review from adkah as a code owner May 1, 2026 14:31
@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 1, 2026

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

Project Status Preview Updated (UTC)
botpress 🟢 Ready View Preview May 1, 2026, 2:39 PM

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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jacksonyzj jacksonyzj merged commit b3a5076 into master May 1, 2026
4 checks passed
@jacksonyzj jacksonyzj deleted the add-adk-bot branch May 1, 2026 18:31
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