Fixes four issues in the MoonBit Android launcher (experiments/launcher):
1. System wallpaper hidden behind WebView
Root cause:web/style.css had .light, .dark { background: var(--background); ... } (specificity 0,1,0) overriding html, body { background: transparent; } (0,0,1), painting opaque oklch(.145 0 0) across <html class="dark"> and covering the transparent WebView.
Fix:
Removed background: var(--background) from .light, .dark and explicitly set html, html.dark, html.light, body { background: transparent; } before html.demo so desktop demo mode keeps its gradient backdrop while Android stays transparent.
Added WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER, API 29+ setNavigationBarContrastEnforced(false) / setStatusBarContrastEnforced(false), and explicit Color.TRANSPARENT on root and widgetLayer in HomeActivity.java while keeping WebView hardware acceleration.
2. "Restricted setting" on Windows (Recents) button on Android 13+
Root cause: Sideloaded APKs cannot enable RecentsService in Accessibility settings until Allow restricted settings is toggled once in App info, and HomeActivity.openRecents() previously dropped users straight into Accessibility settings with no explanation or App info shortcut.
Fix:
Exposed RecentsService.isRunning() and added recentsEnabled(), openAccessibilitySettings(), and openSelfAppInfo() on HomeActivity.Bridge, with openRecents() returning boolean (true when RecentsService is active, false when disabled).
Added Sheet::RecentsSetup, Msg::{RecentsUnavailable, OpenAccessibilitySettings, OpenSelfAppInfo}, and corresponding effects + bottom sheet explaining Restricted setting and Allow restricted settings with direct buttons for Open Accessibility settings and Open App info (plus updated recents_service_description in strings.xml).
3. Smooth app drawer animations
Root cause: Unkeyed top-level nodes in app/view.mbt caused patch_children to recycle .sheet-overlay / .notice as .drawer; full-height translateY(-100%) with backdrop-filter: blur(24px) plus a 50ms mid-animation showKeyboard() call and per-frame getBoundingClientRect() polling in cover() caused jank; closing had no exit transition; and drawer icons popped in on first open.
Fix:
Keyed all top-level #app nodes (home=1, drawer=2, sheet-overlay=3, sheet=4, resize-bar=5, notice=6) so overlays never recycle across DOM types.
Replaced full-screen backdrop-filter and translateY(-100%) with a translucent scrim (rgb(10 10 14 / .84)) and GPU-composited drawer-in (180ms) / drawer-out (140ms, .drawer.closing) animations managed via drawer_closing and drawer_gen (Delay(140, DrawerClosed(gen))), keeping prefers-reduced-motion: reduce supported.
Replaced per-frame getBoundingClientRect() rAF polling in cover() with immediate coverWidgets(-1) on open and coverWidgets(0) on close/closing.
Delayed HomeActivity.Bridge.showKeyboard() to 190ms (cancelled by hideKeyboard() / createWebView() / onDestroy()) so the IME opens right after the drawer entrance finishes.
Pre-warmed uncached app icons in web/main.mbt after apps.json loads.
.resize-handle strips sat completely outside the widget (16px wide/tall), falling into the bezel/gesture zone on full-width widgets while WidgetView intercepted touches just inside the border as widget drags.
Holding a resize handle for >= 500ms bubbled Press to .widget-slot's Lift(i), setting lifted while resize stayed active.
Resizing an unpinned widget didn't pin its cell, Right didn't cap width at cols - s.x, only r/b/rb handles existed, measure() wasn't synced on scroll, QueryLimits wasn't fetched until drag start (so non-resizable edges still showed handles), and placeWidgets() bit-packed r[5] without masking.
Fix:
Added WidgetView.dispatchTouchEvent pass-through within 18dp (capped at 30%) of active resize edges when editingWidget == id and masked (r[5] & 0xffffffffL) in HomeActivity.placeWidgets().
Enlarged .resize-handle targets to 36px–40px straddling the border (inside viewport bounds), added .active visual feedback and a .resize-size (cols × rows) badge in .resize-bar.
Added Left and Top edge resizing alongside Right, Bottom, and Corner, pinning unpinned widgets on begin_resize and anchoring opposite edges without shifting s.x/s.y when clamped.
Added press: Some(Nop) on handles and m.resize is None guard on Lift(i).
Queried QueryLimits immediately when entering resize mode, filtered rendered handles by lim.h / lim.v, and synced measure() (including scroll_y) on window.scroll, pointerdown, and native widgetMenu/widgetGrab.
android/build.sh built, zipaligned, and verified build/ultra-launcher.apk locally (aapt2, javac --release 17, d8, apksigner verify) against Android SDK 35
sweet doctor (No release problems found.)
## Summary
Fixes four issues in the MoonBit Android launcher (`experiments/launcher`):
### 1. System wallpaper hidden behind WebView
- **Root cause:** `web/style.css` had `.light, .dark { background: var(--background); ... }` (specificity `0,1,0`) overriding `html, body { background: transparent; }` (`0,0,1`), painting opaque `oklch(.145 0 0)` across `<html class="dark">` and covering the transparent WebView.
- **Fix:**
- Removed `background: var(--background)` from `.light, .dark` and explicitly set `html, html.dark, html.light, body { background: transparent; }` before `html.demo` so desktop demo mode keeps its gradient backdrop while Android stays transparent.
- Added `WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER`, API 29+ `setNavigationBarContrastEnforced(false)` / `setStatusBarContrastEnforced(false)`, and explicit `Color.TRANSPARENT` on `root` and `widgetLayer` in `HomeActivity.java` while keeping WebView hardware acceleration.
### 2. "Restricted setting" on Windows (Recents) button on Android 13+
- **Root cause:** Sideloaded APKs cannot enable `RecentsService` in Accessibility settings until **Allow restricted settings** is toggled once in **App info**, and `HomeActivity.openRecents()` previously dropped users straight into Accessibility settings with no explanation or App info shortcut.
- **Fix:**
- Exposed `RecentsService.isRunning()` and added `recentsEnabled()`, `openAccessibilitySettings()`, and `openSelfAppInfo()` on `HomeActivity.Bridge`, with `openRecents()` returning `boolean` (`true` when `RecentsService` is active, `false` when disabled).
- Added `Sheet::RecentsSetup`, `Msg::{RecentsUnavailable, OpenAccessibilitySettings, OpenSelfAppInfo}`, and corresponding effects + bottom sheet explaining **Restricted setting** and **Allow restricted settings** with direct buttons for **Open Accessibility settings** and **Open App info** (plus updated `recents_service_description` in `strings.xml`).
### 3. Smooth app drawer animations
- **Root cause:** Unkeyed top-level nodes in `app/view.mbt` caused `patch_children` to recycle `.sheet-overlay` / `.notice` as `.drawer`; full-height `translateY(-100%)` with `backdrop-filter: blur(24px)` plus a `50ms` mid-animation `showKeyboard()` call and per-frame `getBoundingClientRect()` polling in `cover()` caused jank; closing had no exit transition; and drawer icons popped in on first open.
- **Fix:**
- Keyed all top-level `#app` nodes (`home=1`, `drawer=2`, `sheet-overlay=3`, `sheet=4`, `resize-bar=5`, `notice=6`) so overlays never recycle across DOM types.
- Replaced full-screen `backdrop-filter` and `translateY(-100%)` with a translucent scrim (`rgb(10 10 14 / .84)`) and GPU-composited `drawer-in` (`180ms`) / `drawer-out` (`140ms`, `.drawer.closing`) animations managed via `drawer_closing` and `drawer_gen` (`Delay(140, DrawerClosed(gen))`), keeping `prefers-reduced-motion: reduce` supported.
- Replaced per-frame `getBoundingClientRect()` rAF polling in `cover()` with immediate `coverWidgets(-1)` on open and `coverWidgets(0)` on close/closing.
- Delayed `HomeActivity.Bridge.showKeyboard()` to `190ms` (cancelled by `hideKeyboard()` / `createWebView()` / `onDestroy()`) so the IME opens right after the drawer entrance finishes.
- Pre-warmed uncached app icons in `web/main.mbt` after `apps.json` loads.
### 4. Widget resizing handles, edge anchoring, scroll sync, and axis limits
- **Root cause:**
- `.resize-handle` strips sat completely outside the widget (`16px` wide/tall), falling into the bezel/gesture zone on full-width widgets while `WidgetView` intercepted touches just inside the border as widget drags.
- Holding a resize handle for `>= 500ms` bubbled `Press` to `.widget-slot`'s `Lift(i)`, setting `lifted` while `resize` stayed active.
- Resizing an unpinned widget didn't pin its cell, `Right` didn't cap width at `cols - s.x`, only `r`/`b`/`rb` handles existed, `measure()` wasn't synced on scroll, `QueryLimits` wasn't fetched until drag start (so non-resizable edges still showed handles), and `placeWidgets()` bit-packed `r[5]` without masking.
- **Fix:**
- Added `WidgetView.dispatchTouchEvent` pass-through within `18dp` (capped at `30%`) of active resize edges when `editingWidget == id` and masked `(r[5] & 0xffffffffL)` in `HomeActivity.placeWidgets()`.
- Enlarged `.resize-handle` targets to `36px–40px` straddling the border (inside viewport bounds), added `.active` visual feedback and a `.resize-size` (`cols × rows`) badge in `.resize-bar`.
- Added `Left` and `Top` edge resizing alongside `Right`, `Bottom`, and `Corner`, pinning unpinned widgets on `begin_resize` and anchoring opposite edges without shifting `s.x`/`s.y` when clamped.
- Added `press: Some(Nop)` on handles and `m.resize is None` guard on `Lift(i)`.
- Queried `QueryLimits` immediately when entering resize mode, filtered rendered handles by `lim.h` / `lim.v`, and synced `measure()` (including `scroll_y`) on `window.scroll`, `pointerdown`, and native `widgetMenu`/`widgetGrab`.
## Verification
- `moon check --target js` (0 errors, 0 warnings)
- `moon test --target js` (68/68 passed)
- `moon test --target wasm-gc` (68/68 passed)
- `scripts/build-web.sh --demo` + `node tests/e2e.cjs` (`launcher ok`) + `node tests/android-sim.cjs` (`android bridge ok`)
- `android/build.sh` built, zipaligned, and verified `build/ultra-launcher.apk` locally (`aapt2`, `javac --release 17`, `d8`, `apksigner verify`) against Android SDK 35
- `sweet doctor` (`No release problems found.`)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Fixes four issues in the MoonBit Android launcher (
experiments/launcher):1. System wallpaper hidden behind WebView
web/style.csshad.light, .dark { background: var(--background); ... }(specificity0,1,0) overridinghtml, body { background: transparent; }(0,0,1), painting opaqueoklch(.145 0 0)across<html class="dark">and covering the transparent WebView.background: var(--background)from.light, .darkand explicitly sethtml, html.dark, html.light, body { background: transparent; }beforehtml.demoso desktop demo mode keeps its gradient backdrop while Android stays transparent.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER, API 29+setNavigationBarContrastEnforced(false)/setStatusBarContrastEnforced(false), and explicitColor.TRANSPARENTonrootandwidgetLayerinHomeActivity.javawhile keeping WebView hardware acceleration.2. "Restricted setting" on Windows (Recents) button on Android 13+
RecentsServicein Accessibility settings until Allow restricted settings is toggled once in App info, andHomeActivity.openRecents()previously dropped users straight into Accessibility settings with no explanation or App info shortcut.RecentsService.isRunning()and addedrecentsEnabled(),openAccessibilitySettings(), andopenSelfAppInfo()onHomeActivity.Bridge, withopenRecents()returningboolean(truewhenRecentsServiceis active,falsewhen disabled).Sheet::RecentsSetup,Msg::{RecentsUnavailable, OpenAccessibilitySettings, OpenSelfAppInfo}, and corresponding effects + bottom sheet explaining Restricted setting and Allow restricted settings with direct buttons for Open Accessibility settings and Open App info (plus updatedrecents_service_descriptioninstrings.xml).3. Smooth app drawer animations
app/view.mbtcausedpatch_childrento recycle.sheet-overlay/.noticeas.drawer; full-heighttranslateY(-100%)withbackdrop-filter: blur(24px)plus a50msmid-animationshowKeyboard()call and per-framegetBoundingClientRect()polling incover()caused jank; closing had no exit transition; and drawer icons popped in on first open.#appnodes (home=1,drawer=2,sheet-overlay=3,sheet=4,resize-bar=5,notice=6) so overlays never recycle across DOM types.backdrop-filterandtranslateY(-100%)with a translucent scrim (rgb(10 10 14 / .84)) and GPU-compositeddrawer-in(180ms) /drawer-out(140ms,.drawer.closing) animations managed viadrawer_closinganddrawer_gen(Delay(140, DrawerClosed(gen))), keepingprefers-reduced-motion: reducesupported.getBoundingClientRect()rAF polling incover()with immediatecoverWidgets(-1)on open andcoverWidgets(0)on close/closing.HomeActivity.Bridge.showKeyboard()to190ms(cancelled byhideKeyboard()/createWebView()/onDestroy()) so the IME opens right after the drawer entrance finishes.web/main.mbtafterapps.jsonloads.4. Widget resizing handles, edge anchoring, scroll sync, and axis limits
.resize-handlestrips sat completely outside the widget (16pxwide/tall), falling into the bezel/gesture zone on full-width widgets whileWidgetViewintercepted touches just inside the border as widget drags.>= 500msbubbledPressto.widget-slot'sLift(i), settingliftedwhileresizestayed active.Rightdidn't cap width atcols - s.x, onlyr/b/rbhandles existed,measure()wasn't synced on scroll,QueryLimitswasn't fetched until drag start (so non-resizable edges still showed handles), andplaceWidgets()bit-packedr[5]without masking.WidgetView.dispatchTouchEventpass-through within18dp(capped at30%) of active resize edges wheneditingWidget == idand masked(r[5] & 0xffffffffL)inHomeActivity.placeWidgets()..resize-handletargets to36px–40pxstraddling the border (inside viewport bounds), added.activevisual feedback and a.resize-size(cols × rows) badge in.resize-bar.LeftandTopedge resizing alongsideRight,Bottom, andCorner, pinning unpinned widgets onbegin_resizeand anchoring opposite edges without shiftings.x/s.ywhen clamped.press: Some(Nop)on handles andm.resize is Noneguard onLift(i).QueryLimitsimmediately when entering resize mode, filtered rendered handles bylim.h/lim.v, and syncedmeasure()(includingscroll_y) onwindow.scroll,pointerdown, and nativewidgetMenu/widgetGrab.Verification
moon check --target js(0 errors, 0 warnings)moon test --target js(68/68 passed)moon test --target wasm-gc(68/68 passed)scripts/build-web.sh --demo+node tests/e2e.cjs(launcher ok) +node tests/android-sim.cjs(android bridge ok)android/build.shbuilt, zipaligned, and verifiedbuild/ultra-launcher.apklocally (aapt2,javac --release 17,d8,apksigner verify) against Android SDK 35sweet doctor(No release problems found.)Fix wallpaper transparency, Recents setup guide, and drawer animationto Fix wallpaper transparency, Recents setup guide, drawer animation, and widget resizing