Skip to content

Commit bb3e9d1

Browse files
committed
fix: mobile tabs — all views accessible, settings tab, 44px touch targets
1 parent b770cec commit bb3e9d1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

app/page.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,12 @@ export default function EditorLayout() {
133133
const terminalRefreshToken = mode
134134
const terminalStartupCommand = modeSpec.terminalCenter ? 'openclaw tui' : undefined
135135
const usePrismShell = activeView === 'prism'
136-
const mobileViewTabs = useMemo(() => visibleViews.slice(0, 5), [visibleViews])
136+
const mobileViewTabs = useMemo(() => {
137+
// On mobile, curate tabs to useful views + always include settings
138+
const mobile = visibleViews.filter(v => !['prism', 'preview', 'diff', 'skills'].includes(v))
139+
if (!mobile.includes('settings')) mobile.push('settings')
140+
return mobile.slice(0, 5)
141+
}, [visibleViews])
137142
const activeViewMeta = VIEW_ICONS[activeView] ?? {
138143
icon: 'lucide:layout-panel-top',
139144
label: 'Workspace',
@@ -853,12 +858,13 @@ export default function EditorLayout() {
853858
if ('vibrate' in navigator) navigator.vibrate(5)
854859
}}
855860
whileTap={{ scale: 0.92 }}
856-
className={`relative flex min-w-0 flex-col items-center gap-0.5 py-2 text-[10px] font-medium transition-colors ${
861+
className={`relative flex min-w-0 flex-col items-center gap-0.5 py-2.5 text-[10px] font-medium transition-colors touch-manipulation ${
857862
isActive
858863
? 'text-[var(--brand)]'
859864
: 'text-[var(--text-disabled)]'
860865
} ${flashedTab === v ? 'animate-badge-pop' : ''}`}
861866
title={VIEW_ICONS[v].label}
867+
style={{ minHeight: 44, WebkitTapHighlightColor: 'transparent' }}
862868
>
863869
<span className="relative">
864870
<Icon icon={VIEW_ICONS[v].icon} width={20} height={20} />

0 commit comments

Comments
 (0)