Skip to content

Demo: trigger Angie on sidebar open in full-config example - #48

Merged
matipojo merged 6 commits into
masterfrom
AI-8410-v2-host-bridge
Jun 1, 2026
Merged

Demo: trigger Angie on sidebar open in full-config example#48
matipojo merged 6 commits into
masterfrom
AI-8410-v2-host-bridge

Conversation

@matipojo

@matipojo matipojo commented Jun 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Wire the load-sidebar-v2-full-config demo toggle to call triggerAngie with an SEO prompt when opening Angie (capture phase so it runs before the SDK collapse handler).
  • Document the behavior in the demo page copy.
  • Sync package-lock.json root version fields to 1.4.9 to match package.json.

Test plan

  • Run the full-config demo locally and open the sidebar via #demo-toggle
  • Confirm Angie receives the SEO optimization prompt on open
  • Confirm closing/collapsing the sidebar does not re-trigger the prompt
  • Verify npm ci succeeds with the updated lockfile

✨ PR Description

1. Problem & Context

Demo showcase for triggering Angie AI assistant with contextual prompts when user opens sidebar. Demonstrates the triggerAngie API capability in full-config example (ticket: AI-8410).

2. What Changed (Where)

  • host.js: Added click handler to toggle button that fires SEO optimization prompt when sidebar opens
  • index.html: Documented the new SEO prompt behavior in demo description

3. How It Works

Toggle click listener checks aria-expanded attribute; if opening (not 'true'), calls sdk.triggerAngie() with SEO prompt. Captures sidebar open event via existing toggle element.

4. Risks

None — demo-only code with optional chaining (?.), guarded by isOpening check preventing duplicate triggers on close.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

matipojo and others added 6 commits June 1, 2026 13:10
…ar boot process

- Added ExternalHeadersCallback type to support dynamic header retrieval.
- Integrated initHostApiBridge function to initialize the host API with external headers.
- Updated bootSidebar to call initHostApiBridge with the necessary configuration.
- Created tests for host API bridge to validate header retrieval and error handling.
- Ensured callbacks are preserved in the configuration resolution process.
- Added support for retrieving website and analytics context from the host configuration.
- Updated initHostApiBridge to accept host configuration, including website and analytics data.
- Implemented new message types for website and analytics context requests.
- Enhanced tests to validate the retrieval of website and analytics context from the host.
- Introduced localStorage handling for GET and SET operations in the host API bridge.
Add integration README, full-config browser demo with host CSS, and link from root README.
Wire the full-config demo toggle to call triggerAngie with an SEO prompt when opening Angie, and sync package-lock.json to v1.4.9.
@matipojo
matipojo merged commit 8e25ec9 into master Jun 1, 2026
14 checks passed
@matipojo
matipojo deleted the AI-8410-v2-host-bridge branch June 1, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant