Skip to content

Commit ff9d3f6

Browse files
committed
feat: mobile — native-style slim tab bar, haptic feedback, hide model picker
1 parent 67769ae commit ff9d3f6

2 files changed

Lines changed: 16 additions & 19 deletions

File tree

app/page.tsx

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -833,11 +833,11 @@ export default function EditorLayout() {
833833

834834
{showMobileBottomTabs && (
835835
<div
836-
className="shrink-0 border-t border-[var(--border)] bg-[color-mix(in_srgb,var(--bg-elevated)_94%,black)] px-2 pt-2"
837-
style={{ paddingBottom: 'calc(env(safe-area-inset-bottom) + 0.75rem)' }}
836+
className="shrink-0 border-t border-[var(--border)] bg-[color-mix(in_srgb,var(--bg-elevated)_96%,black)]"
837+
style={{ paddingBottom: 'calc(env(safe-area-inset-bottom) + 0.25rem)' }}
838838
>
839839
<div
840-
className="grid gap-1.5"
840+
className="grid"
841841
style={{
842842
gridTemplateColumns: `repeat(${mobileViewTabs.length}, minmax(0, 1fr))`,
843843
}}
@@ -848,25 +848,22 @@ export default function EditorLayout() {
848848
<motion.button
849849
key={v}
850850
type="button"
851-
onClick={() => setView(v)}
852-
whileTap={{ scale: 0.97 }}
853-
className={`flex min-w-0 flex-col items-center gap-1 rounded-[20px] px-2 py-2.5 text-[10px] font-medium transition ${
851+
onClick={() => {
852+
setView(v)
853+
if ('vibrate' in navigator) navigator.vibrate(5)
854+
}}
855+
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 ${
854857
isActive
855-
? 'bg-[color-mix(in_srgb,var(--brand)_12%,transparent)] text-[var(--text-primary)] shadow-[var(--shadow-xs)]'
856-
: 'text-[var(--text-secondary)] hover:bg-[color-mix(in_srgb,var(--text-primary)_5%,transparent)] hover:text-[var(--text-primary)]'
858+
? 'text-[var(--brand)]'
859+
: 'text-[var(--text-disabled)]'
857860
} ${flashedTab === v ? 'animate-badge-pop' : ''}`}
858861
title={VIEW_ICONS[v].label}
859862
>
860-
<span
861-
className={`relative flex h-10 w-10 items-center justify-center rounded-2xl border ${
862-
isActive
863-
? 'border-[color-mix(in_srgb,var(--brand)_35%,var(--border))] bg-[color-mix(in_srgb,var(--brand)_10%,transparent)] text-[var(--brand)]'
864-
: 'border-[var(--border)] bg-[color-mix(in_srgb,var(--bg)_92%,transparent)] text-[var(--text-secondary)]'
865-
}`}
866-
>
867-
<Icon icon={VIEW_ICONS[v].icon} width={18} height={18} />
863+
<span className="relative">
864+
<Icon icon={VIEW_ICONS[v].icon} width={20} height={20} />
868865
{v === 'git' && dirtyCount > 0 && (
869-
<span className="absolute -right-1 -top-1 min-w-[18px] rounded-full bg-[var(--brand)] px-1 text-center text-[9px] font-bold leading-[18px] text-[var(--brand-contrast)]">
866+
<span className="absolute -right-2 -top-1 min-w-[14px] rounded-full bg-[var(--brand)] px-0.5 text-center text-[8px] font-bold leading-[14px] text-[var(--brand-contrast)]">
870867
{dirtyCount > 9 ? '9+' : dirtyCount}
871868
</span>
872869
)}

components/chat/chat-input-bar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,10 @@ export function ChatInputBar({
594594
</div>
595595
</div>
596596

597-
{/* Bottom bar — mode + model */}
597+
{/* Bottom bar — mode + model (model hidden on mobile) */}
598598
<div className="flex items-center justify-between mt-1">
599599
<ModeSelector mode={agentMode} onChange={setAgentMode} />
600-
<div className="flex items-center gap-2">
600+
<div className="hidden sm:flex items-center gap-2">
601601
{modelInfo.current && (
602602
<div className="relative">
603603
<button

0 commit comments

Comments
 (0)