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): gate remote local controls

Maxa94d6c13130c
diff --git a/tests/test_ui_remote_access_auth.py b/tests/test_ui_remote_access_auth.py
index ecaccb089..e25561841 100644
--- a/tests/test_ui_remote_access_auth.py
+++ b/tests/test_ui_remote_access_auth.py
@@ -1584,7 +1584,7 @@ def test_remote_show_page_icon_upload_is_blocked_before_filesystem_access(
("/api/models/runtime/status", False),
("/api/models/agents", False),
("/api/backend/codex/runtime", True),
- ("/api/backend/codex/auth", False),
+ ("/api/backend/codex/auth", True),
],
)
def test_remote_model_and_backend_reads_follow_execution_safety_policy(path, local_only):
diff --git a/ui/src/components/AppShell.tsx b/ui/src/components/AppShell.tsx
index 8eddf85c7..9538dbd07 100644
--- a/ui/src/components/AppShell.tsx
+++ b/ui/src/components/AppShell.tsx
@@ -306,6 +306,7 @@ export const AppShell: React.FC = () => {
['/agents', '/harness', '/apps/library'].some(
(path) => location.pathname === path || location.pathname.startsWith(`${path}/`),
);
+ const localSystemPath = location.pathname.startsWith('/admin/settings/service');
const resourceUseDenied =
(location.pathname.startsWith('/skills') && !capabilities.can_use_skills) ||
(location.pathname.startsWith('/vaults') && !capabilities.can_use_vault_secrets);
@@ -314,6 +315,7 @@ export const AppShell: React.FC = () => {
const terminalOnlyPath = location.pathname.startsWith('/apps/terminal');
if (
(ownerOnlyPath && !capabilities.can_manage_instance) ||
+ (localSystemPath && !capabilities.can_use_system) ||
resourceUseDenied ||
(fileOnlyPath && !capabilities.can_use_files) ||
(terminalOnlyPath && !capabilities.can_use_terminal)
diff --git a/ui/src/components/workbench/ChatPage.tsx b/ui/src/components/workbench/ChatPage.tsx
index fd29ed01e..eb7b7cb84 100644
--- a/ui/src/components/workbench/ChatPage.tsx
+++ b/ui/src/components/workbench/ChatPage.tsx
@@ -193,7 +193,7 @@ export const ChatPage: React.FC = () => {
const { capabilities } = useInstanceAuthorization();
const [sessionCanChat, setSessionCanChat] = useState(false);
const canChat = capabilities.can_chat && sessionCanChat;
- const canManageShowPage = capabilities.can_manage_instance;
+ const canManageShowPage = capabilities.can_manage_instance && capabilities.can_use_system;
const { unreadBySession, markRead: markInboxRead } = useWorkbenchInbox();
// The mobile chat surface is a fixed full-screen flex column; this keeps the
// composer glued to the iOS keyboard (settle-then-correct; see the hook).
diff --git a/ui/src/features/organization/OrganizationProvider.tsx b/ui/src/features/organization/OrganizationProvider.tsx
index 32795534d..a4ba61994 100644
--- a/ui/src/features/organization/OrganizationProvider.tsx
+++ b/ui/src/features/organization/OrganizationProvider.tsx
@@ -100,6 +100,9 @@ export function OrganizationProvider({ children }: { children: React.ReactNode }
const selectOrganization = useCallback(async (organizationId: string) => {
const generation = ++operationGeneration.current;
+ setSelectedOrganizationId(organizationId);
+ setDetail(null);
+ sessionStorage.setItem(SELECTED_ORG_KEY, organizationId);
try {
await loadOrganizationAtGeneration(organizationId, generation);
} catch (error) {