Skip to content

Comments

fix(mobile): improve native app feel on mobile browsers#121

Open
qard-spacebot wants to merge 7 commits intospacedriveapp:mainfrom
qard-spacebot:mobile-tab-scroll
Open

fix(mobile): improve native app feel on mobile browsers#121
qard-spacebot wants to merge 7 commits intospacedriveapp:mainfrom
qard-spacebot:mobile-tab-scroll

Conversation

@qard-spacebot
Copy link

@qard-spacebot qard-spacebot commented Feb 22, 2026

Goal

Make the web UI feel like a native app when used on a mobile browser. Three issues prevented this: the tab bar overflowed off-screen with no way to scroll, the sidebar was not factored into the page layout so content spanned the full viewport width, and focusing any text input triggered iOS Safari's auto-zoom, breaking the fixed-layout feel.

Summary

  • Install vitest + jsdom + @testing-library/react + @testing-library/jest-dom as first frontend test infrastructure
  • Add overflow-x-auto no-scrollbar to the AgentTabs container so tabs are swipeable on narrow viewports
  • Fix sidebar layout: add shrink-0 and initial={{ width }} to the sidebar motion.nav so framer-motion sets the correct pixel width on first paint, and min-w-0 to the content div — previously the content area consumed the full viewport width on all pages
  • Fix iOS Safari auto-zoom on input focus: add font-size: 16px \!important to input and textarea at max-width: 768px so mobile viewports are not zoomed when the chat input (or any other input) is focused; desktop styles are unchanged

Test plan

  • cd interface && npm test — 9 tests pass
  • Narrow viewport: tabs scroll horizontally with no visible scrollbar chrome
  • Wide viewport: all 10 tabs visible, no layout change
  • Sidebar occupies its column on all pages (overview, settings, agent pages)
  • Focusing the chat input on an iPhone does not zoom the page

🤖 Generated with Claude Code

Add vitest test infrastructure and fix tab bar overflow on narrow
viewports.

- Install vitest, jsdom, @testing-library/react and @testing-library/jest-dom
- Add vitest.config.ts with jsdom environment and @ path alias
- Add src/test/setup.ts importing jest-dom matchers
- Add AgentTabs.test.tsx asserting overflow-x-auto and no-scrollbar
  classes are present (tests fail before the fix)
- Add overflow-x-auto and no-scrollbar to the AgentTabs container div
  so tabs are swipeable on mobile with no visible scrollbar chrome

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@qard-spacebot qard-spacebot changed the title feat(ui): make AgentTabs horizontally scrollable on mobile fix(mobile): improve native app feel on mobile browsers Feb 22, 2026
Stephen Belanger and others added 6 commits February 22, 2026 19:03
Without shrink-0 and an initial width, framer-motion did not set the
sidebar width inline style before first paint, causing the content area
to consume the full viewport width. Adding initial={{ width }} ensures
the correct width is applied synchronously, shrink-0 prevents flex from
compressing the sidebar, and min-w-0 on the content div allows it to
shrink below its content size.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
iOS Safari zooms the page when focusing any input with font-size < 16px.
Applies font-size: 16px to all inputs and textareas at viewports ≤768px
so desktop styles are entirely unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tailwind utility classes (.text-sm etc.) have class-level specificity
(0,1,0) which wins over bare element selectors (0,0,1). Adding
!important ensures the 16px floor takes effect on mobile regardless of
what font-size utility is applied to the input.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Responsive section navigation: desktop shows w-52 vertical sidebar,
mobile shows horizontal overflow-x-auto tab bar with group dividers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace inline sidebar with shared SettingSectionNav component.
Outer wrapper gains flex-col md:flex-row for responsive stacking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace inline two-group sidebar with shared SettingSectionNav component.
Outer wrapper gains flex-col md:flex-row for responsive stacking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant