Commit 374f598
fix(mobile): responsive dialogs + safe-area + workspace events + X-Frame fallback + https auto-prefix (Phase 7 fixes) (#37)
* fix(mobile): responsive dialogs + safe-area insets + workspace events + X-Frame fallback + https:// auto-prefix
Six device-test issues from real-hardware run:
1. Dialogs (AddWorkspace / OpenPad / etc.) overflowed phone viewports —
DialogShell width now `min(${width}px, calc(100vw - 16px))` so a 420
panel caps at viewport-16 on phones. Tighter padding under 480px.
2. Bare hostname URLs were rejected — AddWorkspaceDialog auto-prefixes
`https://` when the input has no `://` scheme.
3. (Same as #1 — OpenPadDialog uses DialogShell.)
4. "Black screen" on pad open — likely X-Frame-Options DENY/SAMEORIGIN
from the server. PadIframeStack now starts a 6s timeout per iframe;
if no onLoad fires, an opaque overlay surfaces with an "Open in
browser" button that hands the URL off to @capacitor/browser.
5. Status bar overlapped the rail — shell-root-wrapper now applies
`env(safe-area-inset-*)` padding. Zero visual change on desktop;
stops mobile WebView from drawing under the status bar / notch.
6. Newly added workspaces didn't appear in the rail — mobile platform's
`events.onWorkspacesChanged` was a noop. workspace-store now owns
a tiny listener Set; CapacitorPlatform wires it through so the
shell's `onWorkspacesChanged` handler in App.tsx receives the new
`{workspaces, order}` after every add / update / remove / reorder.
DialogShell width-test dropped (jsdom can't parse CSS `min()`; behaviour
is exercised in Playwright on real Chromium).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(mobile): icons + collapse handle + auto-collapse + userName + pad-history + Ctrl-K hint + tests
Round 2 of device feedback:
- App icons: regenerated all five mipmap densities + adaptive foregrounds
from packages/desktop/build/icons/icon-512.png. The Capacitor default
icon is gone; Etherpad branding everywhere.
- Removed the always-visible PadActionsOverlay (share is redundant with
Etherpad's own UI; the "open in browser" button forced over content).
- Collapse handle now flush to left edge, 14px wide (was 22 + 3px gap),
right-flat border so it reads as a tab sticking out.
- Tab.open auto-collapses the workspace rail (mobile UX) — fires only on
the open event, doesn't fight subsequent manual expands.
- Tab.open upserts pad-history so QuickSwitcher's name search finds the
pad. Wired events.onPadHistoryChanged through.
- Settings.userName threads into the iframe src as `&userName=` so the
user's name applies to existing + new pads (Etherpad reads the query
param at join time).
- "Tip: Ctrl+K opens this from anywhere" hidden via `@media (pointer:
coarse)` — touch devices can't issue keyboard shortcuts anyway.
- Tests: 8 mobile Playwright cases now (added 3 — auto-collapse,
pad-history populate, userName in src). X-Frame detection removed
(Chromium fires onLoad even for blocked iframes; needs the native
WebChromeClient hook in Phase 6b).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(mobile): swipe gestures + Android back-button + upsert error logging
- Edge-swipe right from left edge expands the rail; swipe left from
inside collapses it. Touch-only — doesn't fire when a dialog is open
(dialogs handle their own gestures).
- Android hardware/gesture back: dismiss open dialog first, else collapse
rail, else minimise the app. Mirrors stock Android navigation expectations.
- padHistory.upsert errors now log to console.warn instead of being
swallowed by `void`. Earlier logcat confirmed upsert is firing and
writing 'Jehejej' to SharedPreferences as expected.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3c13426 commit 374f598
30 files changed
Lines changed: 351 additions & 154 deletions
File tree
- packages
- mobile
- android
- app
- src/main/res
- mipmap-hdpi
- mipmap-mdpi
- mipmap-xhdpi
- mipmap-xxhdpi
- mipmap-xxxhdpi
- src
- components
- platform
- storage
- tabs
- tests
- shell
- src
- components
- dialogs
- styles
- tests/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
0 commit comments