Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(ui): light sandbox on the Show Page iframe

cyhfa2a37d18d7a
diff --git a/ui/src/components/workbench/ChatPage.tsx b/ui/src/components/workbench/ChatPage.tsx
index a72fcaa9c..2a1381242 100644
--- a/ui/src/components/workbench/ChatPage.tsx
+++ b/ui/src/components/workbench/ChatPage.tsx
@@ -1036,9 +1036,20 @@ export const ChatPage: React.FC = () => {
// The session's Show Page replaces the transcript + composer (the header
// bar stays). Same-origin (/show/<id>/ private or /p/<share>/ public) so
// it inherits the workbench's auth; URL is resolved from ensureShowPage.
+ //
+ // Sandbox is deliberately LIGHT: `allow-same-origin` is required (the page
+ // authenticates with the workbench cookie + runs its own same-origin
+ // fetches/WebSocket), and it intentionally also keeps the page able to
+ // reach the parent — a Show Page interacting with the surrounding
+ // workbench is a wanted (if not-yet-promoted) capability. Real isolation
+ // would need a separate origin, which we won't do (Show Pages are part of
+ // the product). The agent already has full machine access, so frontend
+ // isolation isn't the security boundary anyway. We still drop the exotic
+ // capabilities the page never needs (top navigation, pointer lock, etc.).
<iframe
title={t('chat.showPage.title')}
src={showPageUrl}
+ sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-modals allow-downloads"
className="min-h-0 w-full flex-1 border-0 bg-background"
/>
) : (