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(vaults): repair mobile header layout (#890)

Call White4b4ee6376f1a
diff --git a/ui/src/components/workbench/CapabilityTabs.tsx b/ui/src/components/workbench/CapabilityTabs.tsx
index 2bf46645c..99f223aa9 100644
--- a/ui/src/components/workbench/CapabilityTabs.tsx
+++ b/ui/src/components/workbench/CapabilityTabs.tsx
@@ -1,3 +1,4 @@
+import { useEffect, useRef } from 'react';
import { NavLink, useLocation } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { Activity, Bot, KeyRound, WandSparkles } from 'lucide-react';
@@ -17,6 +18,12 @@ const TABS = [
export const CapabilityTabs: React.FC = () => {
const { t } = useTranslation();
const { pathname } = useLocation();
+ const activeTabRef = useRef<HTMLAnchorElement | null>(null);
+
+ useEffect(() => {
+ activeTabRef.current?.scrollIntoView({ block: 'nearest', inline: 'nearest' });
+ }, [pathname]);
+
return (
<div className="-mx-4 flex gap-2 overflow-x-auto px-4 pb-0.5 md:hidden">
{TABS.map(({ to, icon: Icon, key }) => {
@@ -24,6 +31,7 @@ export const CapabilityTabs: React.FC = () => {
return (
<NavLink
key={to}
+ ref={active ? activeTabRef : undefined}
to={to}
className={clsx(
'flex shrink-0 items-center gap-1.5 rounded-full border px-3.5 py-1.5 text-[12.5px] font-medium transition',
diff --git a/ui/src/components/workbench/VaultsPage.tsx b/ui/src/components/workbench/VaultsPage.tsx
index 3d1064330..6015155f6 100644
--- a/ui/src/components/workbench/VaultsPage.tsx
+++ b/ui/src/components/workbench/VaultsPage.tsx
@@ -783,24 +783,38 @@ export const VaultsPage: React.FC = () => {
icon={<KeyRound className="size-6" />}
title={t('vaults.title')}
subtitle={t('vaults.subtitle')}
+ stackActionsOnMobile
actions={
<>
- <VaultLockIndicator />
- <Button variant={showAudit ? 'secondary' : 'ghost'} size="icon" onClick={toggleAudit} aria-label={t('vaults.history')}>
+ <VaultLockIndicator className="max-sm:order-last max-sm:w-full max-sm:justify-between" />
+ <Button
+ variant={showAudit ? 'secondary' : 'ghost'}
+ size="icon"
+ className="max-sm:border max-sm:border-border max-sm:bg-surface"
+ onClick={toggleAudit}
+ aria-label={t('vaults.history')}
+ >
<History className="size-4" />
</Button>
<Button
variant={showSettings ? 'secondary' : 'ghost'}
size="icon"
+ className="max-sm:border max-sm:border-border max-sm:bg-surface"
onClick={() => setShowSettings(true)}
aria-label={t('vaults.settings.title')}
>
<Settings className="size-4" />
</Button>
- <Button variant="ghost" size="icon" onClick={refresh} aria-label={t('vaults.refresh')}>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="max-sm:border max-sm:border-border max-sm:bg-surface"
+ onClick={refresh}
+ aria-label={t('vaults.refresh')}
+ >
<RefreshCw className="size-4" />
</Button>
- <Button onClick={() => setAdding(true)}>
+ <Button className="max-sm:flex-1" onClick={() => setAdding(true)}>
<Plus className="size-4" />
{t('vaults.add')}
</Button>
diff --git a/ui/src/components/workbench/WorkbenchPageHeader.tsx b/ui/src/components/workbench/WorkbenchPageHeader.tsx
index df8b3a27b..b356f32ae 100644
--- a/ui/src/components/workbench/WorkbenchPageHeader.tsx
+++ b/ui/src/components/workbench/WorkbenchPageHeader.tsx
@@ -19,6 +19,8 @@ export interface WorkbenchPageHeaderProps {
accent?: Accent;
/** Right-aligned actions (buttons). */
actions?: ReactNode;
+ /** Move a dense action group below the title on narrow mobile screens. */
+ stackActionsOnMobile?: boolean;
}
/**
@@ -27,9 +29,16 @@ export interface WorkbenchPageHeaderProps {
* headers are identical bar the icon + copy). Extracted so capability pages
* reuse one header instead of re-rolling the markup.
*/
-export function WorkbenchPageHeader({ icon, title, subtitle, accent = 'mint', actions }: WorkbenchPageHeaderProps) {
+export function WorkbenchPageHeader({
+ icon,
+ title,
+ subtitle,
+ accent = 'mint',
+ actions,
+ stackActionsOnMobile = false,
+}: WorkbenchPageHeaderProps) {
return (
- <div className="flex items-center gap-4">
+ <div className={clsx('flex items-center gap-4', stackActionsOnMobile && 'flex-wrap')}>
<div
className={clsx(
'flex size-10 shrink-0 items-center justify-center rounded-[10px] border',
@@ -38,11 +47,20 @@ export function WorkbenchPageHeader({ icon, title, subtitle, accent = 'mint', ac
>
{icon}
</div>
- <div className="flex flex-1 flex-col">
+ <div className="flex min-w-0 flex-1 flex-col">
<h1 className="text-[24px] font-bold text-foreground">{title}</h1>
- {subtitle ? <p className="text-[12px] text-muted">{subtitle}</p> : null}
+ {subtitle ? <p className="text-[12px] leading-snug text-muted">{subtitle}</p> : null}
</div>
- {actions}
+ {actions ? (
+ <div
+ className={clsx(
+ 'flex shrink-0 items-center gap-2',
+ stackActionsOnMobile && 'w-full min-w-0 flex-wrap justify-end sm:w-auto sm:flex-nowrap',
+ )}
+ >
+ {actions}
+ </div>
+ ) : null}
</div>
);
}