Navigate between surfaces
Pass the stable surface key from ui.surfaces:
await host.navigate('drafts');
Navigation resolves inside the current app installation. It does not accept arbitrary URLs or undeclared surface keys.
const buttons = document.querySelectorAll<HTMLElement>('[data-surface]');
for (const button of buttons) {
button.addEventListener('click', async () => {
const surfaceKey = button.dataset.surface;
if (surfaceKey) await host.navigate(surfaceKey);
});
}
Use this to keep a custom overview lightweight: show app-specific summaries and calls to action, then hand off editing, chat, data, or scheduling to the corresponding native surface.