fix(mobile): responsive dialogs + safe-area + workspace events + X-Frame fallback + https auto-prefix (Phase 7 fixes)#37
Merged
Conversation
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
… + 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>
…-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>
…ging - 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.
2be8bbb to
fa0dd22
Compare
3 tasks
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.
Summary
Six device-test issues surfaced on a real Android run; all fixed in one PR.
min(${width}px, calc(100vw - 16px))UrlValidationErrorhttps://when no schemeenv(safe-area-inset-*)padding on shell-root-wrapper (no-op on desktop)Mobile-specific surface (no desktop behaviour change)
shell-root-wrappersafe-area padding usesenv(...)which resolves to 0 on Electron/desktop browsers.min(...)width cap also produces the same 420px on desktop viewports.packages/mobile/.Test plan
pnpm testclean (203 shell + 281 desktop + 6 mobile)pnpm typecheck/test/test:e2e🤖 Generated with Claude Code