Skip to content

Native on a phone: the v0 clone feels like a chat app - #5

Draft
ruehowl wants to merge 1 commit into
mainfrom
claude/festive-ritchie-o3kib6
Draft

ruehowl wants to merge 1 commit into
mainfrom
claude/festive-ritchie-o3kib6

Conversation

@ruehowl

@ruehowl ruehowl commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

On a phone (below the md breakpoint, 768 px), the web app now behaves like a native chat app such as the Claude mobile app. Wide screens look and work as before.

What changes on a phone

Navigation

  • The chats are a drawer. Open it with the menu button or a swipe from the left edge. Close it with the scrim, a swipe back, Escape, the ✕ button, or by opening a chat. While closed it is invisible, so the keyboard and screen readers skip it.
  • Top bar: menu on the left, the title in the middle, new chat on the right.
  • On a chat:
    • The actions (Publish / View, Duplicate, Download) sit in one ⋯ menu.
    • A Chat | Preview | Code switch shows one pane at a time, starting on the chat. Before this, a phone could not show the preview or the code at all.

Screens

  • Home: the question sits in the middle and the composer is at the bottom, within thumb reach, with padding for the home indicator.
  • Composer:
    • The text is 16 px, so iOS does not zoom in when the box gets focus. Before, compact mode used text-sm.
    • The box is rounder and the send button is round.
    • The Return key on a touch keyboard adds a new line. You send with the button.
  • Reading:
    • Chat text is 15 px and the bubbles are rounder.
    • Rows in the drawer and in menus are taller.
    • The chat-item ⋯ button no longer needs hover, which touch screens don't have.
    • Dialogs slide up from the bottom as sheets, with a grab handle.
    • In the code pane, the file list becomes a row of chips and the editor text is 16 px.

The page itself

  • It runs edge to edge (viewport-fit=cover) with safe-area padding, and the keyboard resizes the page (interactive-widget=resizes-content).
  • No rubber-band scrolling, no double-tap zoom, and no grey flash on tap.
  • A theme colour per colour scheme.
  • app/manifest.ts and appleWebApp metadata, so the app opens full screen when added to the home screen.

Checks

  • apps/web: tsc --noEmit passes; eslint reports no errors; the warnings are the same kinds as before, plus one more window.location.assign warning, matching the sidebar's existing New Chat button.

  • next build passes; /manifest.webmanifest is prerendered.

  • tests/web: 52 tests pass. The new mobile-shell.test.tsx covers:

    • the drawer, its scrim and the safe area;
    • the top bar;
    • the Chat | Preview | Code switch and the actions menu;
    • the composer's 16 px text and round send button;
    • the manifest.

    It adds @types/react-dom to tests/web; the lockfile gains 3 lines.

  • These baseline contract tests pass: manifest, phases, coverage, rebrand, retouch, bootstrap-defer and leak. The generated component docs are refreshed (tests/web/docs/architecture.md lists the new suite), and gen-component-docs.py --check is clean.

  • I checked it by hand in Chromium emulating an iPhone 15, light and dark, against a stand-in v0 API: home, drawer open and closed, Chat / Preview / Code, the actions menu, the API-key bottom sheet, and desktop unchanged.


Generated by Claude Code

On a phone the app now works the way a native chat app does:

- The chats are a drawer: the menu button or a swipe from the left edge
  opens it, the scrim, a swipe back, Escape, the close button or going to
  another chat shuts it. Shut, it leaves the tab order. A wide screen keeps
  the sidebar beside the page, as before.
- A top bar: menu, the title in the middle, new chat. On a chat, its
  actions (Publish, Duplicate, Download) sit in one menu, and a
  Chat | Preview | Code switch shows one pane at a time, the chat first.
- Home: the question in the middle, the composer docked at the bottom
  under the thumb, padded for the home bar.
- The composer: 16px text so iOS does not zoom on focus, a rounder box, a
  round send button; a touch keyboard's return key starts a new line.
- 15px chat text and rounder bubbles; bigger rows in the drawer and in
  menus; chat options visible without hover; dialogs rise from the bottom
  as sheets; the code pane's files become a row of chips.
- The page runs edge to edge (viewport-fit cover, safe-area padding), the
  keyboard resizes it, no rubber-band or double-tap zoom, no grey tap
  flash, and a web app manifest so it opens full screen from the home
  screen.

tests/web: mobile-shell.test.tsx covers the drawer, the top bar, the
switch, the composer's size and the manifest (adds @types/react-dom).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019PcpNWBtvn3y8id6vTP3Yz
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.

2 participants