Skip to content

mobile: the standalone shell — no desktop styles, no switcher bar on Android - #23

Closed
ymote wants to merge 1 commit into
feat/mobile-shellfrom
feat/mobile-standalone
Closed

ymote wants to merge 1 commit into
feat/mobile-shellfrom
feat/mobile-standalone

Conversation

@ymote

@ymote ymote commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

On Android the app IS the phone shell: full screen, one theme, no switcher. The desktop build stays universal unless it asks for the same shell.

Removed (under mobile_only)

  • The desk bar: the style dropdown (Android ▾), the Desktop/Phone toggle, Light/Dark, the rotate button — the bar strip is not shown, the phone strip's drawing and its PhoneHit::{Rotate, Style, Appearance, Desktop} are compiled out, as are phone.desktop_size/_clients/_style (what Desktop restored), open_style_menu, the bar's Appearance/Style presses, the menu's "Desktop style" rows and NextStep's "Appearance" row, and the bar-metrics code.
  • The desktop styles and iOS as things you can reach: startup is Android on every OS (policy::startup_style), nothing offers another style, and --test-action phone:<ios|android> is a logged no-op. The DesktopStyle enum itself stays — it is the hosted apps' wire-protocol style family and Android's sheet rides on it.
  • Kept exactly as they were: status bar, home pages and glance page, drawer/App Library, Recents, shade, island, groups/pairs/split, keyboard, every gesture.

How it is gated

build.rs emits one cfg, mobile_only, when the mobile-only Cargo feature is on or CARGO_CFG_TARGET_OS == "android". The code reads #[cfg(mobile_only)] / crate::MOBILE_ONLY and never the feature or the target — so the condition is written once, cargo makepad android run (which cannot pass features) gets the standalone shell without flags, and plain cargo check stays the universal desktop. A default feature would have inverted every desktop invocation instead.

What moved

  • Light/Dark → the shade's controls grid has a Dark mode tile (Toggle::DarkMode). It drives the same toggle_desktop_appearance path the bar used, so the shell and every hosted app follow; ShadeState::dark mirrors style.dark from set_desktop_style. (Also present in the universal build.)
  • Rotation → the device's; the desktop mobile-only window has no rotate.
  • Safe-area insets → PhoneState::insets, set from the window geometry: the wallpaper fills the desk, the shell (status bar, nav band, shade, apps) lays out inside insets.inset(desk). On the OnePlus in the buildtool's non-immersive mode the insets are zero and the window already sits between Android's status bar and gesture bar.

Verification

  • cargo check, --features mobile-only, mobile-only,app-appcard, mobile-only,mobile-apps: all clean, no dead-code warnings.
  • cargo test: 255 passed (universal); cargo test --features mobile-only: 252 passed (the three bar-metrics tests are gated with the bar).
  • Desktop, --features mobile-only,mobile-apps: standalone-desktop.png (home fills the 412×892 window, no bar), standalone-shade-notes.png, standalone-shade-controls.png (Dark mode tile), standalone-glance.png, standalone-island.png, standalone-group.png, standalone-split.png, standalone-phone-noop.png.
  • Desktop, universal: universal-desktop.png (Omarchy with the shell bar), universal-phone.png (phone style with its Android ▾ / Desktop / Light / ↻ strip still there).
  • OnePlus 6T (1080×2340), cargo makepad android run --release with the bundled kernel: standalone-home.png (no bar, shell under Android's status bar, nav band above the gesture bar), standalone-shade-notes-phone.png, standalone-shade-controls-phone.png, standalone-shade-dark.png (tile toggled), standalone-dark.png (dark home), standalone-glance-phone.png, standalone-app.png (Reference opened, dark), standalone-home-dark.png (swipe up from the bottom → home). logcat: Shade(Notifications), Shade(Controls), Page(Right), Page(Left), HomeUp all commit; android-dark applied; no panics. Note the shade pull now starts in the top 42 pt of the app (y≈150 px), since the 48 pt bar above the status band is gone.

🤖 Generated with Claude Code

…Android

One condition, written once: build.rs turns the `mobile_only` cfg on for
`target_os = "android"` (cargo-makepad passes no features) and for
`--features mobile-only` (a desktop build of the same shell). Under it the
Android phone shell is the whole app: the desk bar — the style dropdown, the
Desktop/Phone toggle, Light/Dark, rotate — is gone, the style menu's rows
and the bar's presses are compiled out, startup is Android everywhere, and
`phone:<ios|android>` is a logged no-op. The universal desktop build keeps
every style and the bar.

What the bar provided moves: Light/Dark is the shade's Dark mode tile (the
same style path, so the shell and every hosted app follow); rotation is
the device's. The shell keeps the platform's safe-area insets for itself:
the wallpaper runs edge to edge, the status bar and the navigation band
lay out inside them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ymote
ymote force-pushed the feat/mobile-standalone branch from 8197abf to 5bd9d58 Compare September 19, 2026 23:56
@ymote

ymote commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded: every commit in this stack (#22–#28) is already on OctoSense-ROM main, where the phone shell continued. Per ADR 0001 the phone layer moves into the shared crates/shell from that copy when OctoSense-Desktop and OctoSense-ROM are merged into one OctoSense repository, so nothing here is lost. #25's octos-app pin is obsolete: AppCard now comes from OctoSense-System-Apps on octos main. The branches are kept.

🤖 Generated with Claude Code

@ymote ymote closed this Sep 27, 2026
chrislearn pushed a commit to chrislearn/OctoSense that referenced this pull request Sep 29, 2026
…age-op-api28

android: the usage-access check works on Android 9
chrislearn pushed a commit to chrislearn/OctoSense that referenced this pull request Sep 29, 2026
…roviders

Home: AI providers system app and the llm host service
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