fix(mobile): improve native app feel on mobile browsers#121
Open
qard-spacebot wants to merge 7 commits intospacedriveapp:mainfrom
Open
fix(mobile): improve native app feel on mobile browsers#121qard-spacebot wants to merge 7 commits intospacedriveapp:mainfrom
qard-spacebot wants to merge 7 commits intospacedriveapp:mainfrom
Conversation
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>
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>
3bbcde1 to
198e423
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
overflow-x-auto no-scrollbarto theAgentTabscontainer so tabs are swipeable on narrow viewportsshrink-0andinitial={{ width }}to the sidebarmotion.navso framer-motion sets the correct pixel width on first paint, andmin-w-0to the content div — previously the content area consumed the full viewport width on all pagesfont-size: 16px \!importanttoinputandtextareaatmax-width: 768pxso mobile viewports are not zoomed when the chat input (or any other input) is focused; desktop styles are unchangedTest plan
cd interface && npm test— 9 tests pass🤖 Generated with Claude Code