Skip to content

fix(mobile): drawer chat and Cupertino layout fixes - #596

Merged
Leo310 merged 6 commits into
mainfrom
fix/mobile-drawer-cupertino
Nov 26, 2026
Merged

Leo310 merged 6 commits into
mainfrom
fix/mobile-drawer-cupertino

Conversation

@Leo310

@Leo310 Leo310 commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

What

Mobile layout fixes found on an iPhone running the Cupertino theme:

  • Chat in the sidebar drawer: the composer's fade band (and the chat's top fade) used the page colour, so it showed as a white slab around the composer on the grey drawer. Inside .workspace-drawer both now use --mobile-sidebar-background.
  • Model picker and search under Cupertino: applyPromptSafeArea moved the whole prompt below the Dynamic Island, but Cupertino's results list already pads itself past the island. That counted the inset twice (a large empty gap above the first row) and, because the prompt carries the theme's backdrop blur, left an unblurred seam at 62px. The prompt now stays where the theme puts it unless the list doesn't clear the island. The model picker's filter bar takes the inset itself, and the results padding and the theme's fade mask are re-anchored below the bar.
  • Search field under Cupertino: the theme's backdrop-filter on .prompt-input survived our pill stripping and drew a lighter rectangle inside the field. It's removed there now.
  • Drawer tab dropdown hidden behind the composer: the drawer's inner box is its own stacking context (contain: content), and the composer was portaled next to it, so it painted over the open tab list and caught its taps. It is now hosted inside .workspace-drawer-inner, where the list (and Cupertino's scrim) stack above it.
  • Fat chips and a broken file card in the composer: Cupertino's phone button rule (48px height, padding: 0 20px, specificity (0,2,2)) beat our scoped button rules. Tray button rules now name .context-tray, so chips are content-sized and the remove button is round again. On a phone a document attachment is now one row (icon + ellipsized name) instead of a 56px card that wrapped even short names.

How I tested it

iPhone (iOS 26), Obsidian mobile, Cupertino light theme, 2.7.0-beta.6 installed, driven through the WebKit inspector bridge. I live-patched each fix on the device and compared screenshots before and after. The search modal now lines up with core's Quick Switcher; the model picker's pills sit right under the island with the list directly below; the drawer composer blends into the drawer. The built bundle itself has not been installed on the device yet. The dropdown, chip and file-card fixes were also live-tested on the device. bun run check, format, lint and test (2449, incl. new promptLayout tests) pass.

AI assistance: Claude Code (Opus) diagnosed this on-device and wrote the change from the maintainer's bug report; the maintainer still has to live-test the build.

Checklist

  • bun run check, bun run format, bun run lint, and bun run test pass locally
  • I tried the change in a real Obsidian vault (or explained above why that isn't applicable)
  • I read CONTRIBUTING.md, including the section on AI assistance
  • If this adds a provider, a bundled skill, a built-in tool, or changes manifest.json: I noted that the docs site needs updating (see "Documentation" in CONTRIBUTING.md)

- A chat docked in a sidebar drawer painted the composer's fade band (and
  the top fade) in the page colour, a white slab on themes whose drawer uses
  --mobile-sidebar-background.
- applyPromptSafeArea no longer moves a full-bleed theme's prompt down when
  its results list already pads past the island (Cupertino). The shift
  counted the inset twice and left an unblurred seam above the prompt. The
  model picker's filter bar now takes the inset itself, and the results'
  padding and fade mask are re-anchored below it.
- The search modal's inline input drops the backdrop blur Cupertino puts on
  .prompt-input, which showed as a lighter rectangle inside the field.

Co-Authored-By: Claude <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; the earlier remove-target overlap is fixed, and no new actionable issue was found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the earlier remove-target overlap is fixed, and no new actionable issue was found.

Summary

This PR fixes phone layouts in sidebar chats and Cupertino-themed search and model pickers.

  • Mobile prompts keep results clear of the island without adding a second gap.
  • Drawer chats keep the composer inside the drawer and below its controls.
  • Phone context chips and document attachments fit the composer more neatly.
  • Search fields no longer show Cupertino's inner blur patch.

No new actionable issues were found. The earlier numbered finding is fixed. Review checks were source-based; no on-device runtime check was performed.

Reviews (5) · Last reviewed commit: "fix(chat): keep phone remove targets ins..." · Reviewed by Greptile

Comment thread src/components/modal/promptLayout.ts Resolved
- Host a drawer chat's composer in .workspace-drawer-inner rather than
  .workspace-drawer. The inner box is its own stacking context (contain:
  content); as a later sibling of it the composer painted over the drawer's
  tab dropdown and swallowed its taps.
- Context-tray buttons name .context-tray so themes' phone button rules
  (Cupertino: 48px height, padding 0 20px at (0,2,2)) no longer win:
  reference chips are content-sized again and the remove button is round.
- On a phone a document attachment is one row (icon + ellipsized name)
  instead of a 56px card that wrapped short names; card radius capped at
  12px.
- Tests for applyPromptSafeArea's layout paths.

Co-Authored-By: Claude <noreply@anthropic.com>
@Leo310 Leo310 changed the title fix(mobile): drawer chat background and Cupertino prompt layout fix(mobile): drawer chat and Cupertino layout fixes Nov 26, 2026
The composer and message area stopped at the navbar clearance, but under
the default theme a drawer leaf ends well above that (its tab switcher and
file header sit below the leaf), so the composer's action row ran behind
the switcher. Publish the leaf's own bottom gap (keyboard down) and add it
as a third term to the max() that picks the bottom edge.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread src/views/chat/Chat.svelte Resolved
Leo310 and others added 2 commits November 26, 2026 15:40
The keyboard animation's band() mirrors the CSS max() that places the
composer, but it was missing the leaf-bottom-gap term, so the composer
dipped behind the tab switcher while the keyboard slid down.

Co-Authored-By: Claude <noreply@anthropic.com>
File pills and reference chips are 36px tall on a phone (44px tap area
for file pills), the file pill's remove button sits inside its right end
instead of overhanging the corner, thumbnail remove badges get a 40px hit
area, and the tray gets 8px of air above and below.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread src/components/chat/ContextTray.svelte Resolved
The thumbnail remove badge's extended hit area reached 16px past the tile
on a 6px gap, so a wrapped row could remove the wrong attachment. It now
grows only down and left (34px), and pill rows get an 8px row gap so their
4px extensions never meet.

Co-Authored-By: Claude <noreply@anthropic.com>
@Leo310
Leo310 merged commit d3216cb into main Nov 26, 2026
3 checks passed
@Leo310
Leo310 deleted the fix/mobile-drawer-cupertino branch November 26, 2026 19:47
Leo310 added a commit that referenced this pull request Nov 26, 2026
Google Gemini (#584), Mistral (#585) and LM Studio (#583) as providers, a
directory of OpenAI-compatible services under More providers (#589), and a
per-agent reasoning effort (#582). Quoting chat text into the input (#593),
chats that open where the last one was (#592), model details read from each
provider instead of models.dev (#586), and mobile fixes for the sidebar
drawer, the Cupertino theme, the formatting toolbar and the empty-chat
greeting (#594, #595, #596).

Co-Authored-By: Claude <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