Commit Graph

2 Commits

Author SHA1 Message Date
c1d367bac2 feat(android-terminal): Phase F — kiosk, immersive, queued-action toast
Some checks failed
CI / ruff (push) Successful in 14s
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has been cancelled
Closes out the Android terminal plan (Phases A → F).

- MainActivity:
  * Immersive mode via WindowInsetsControllerCompat — hides status +
    navigation bars, swipe-to-reveal with auto-hide
    (BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE). Re-applied in onResume so
    a transient overlay can't leave the bars visible.
  * Lock Task Mode — startLockTask() in onResume. The manifest already
    declares lockTaskMode="if_whitelisted", so this enters kiosk on a
    properly MDM-provisioned tablet and is a silent no-op (caught
    SecurityException) on dev / unprovisioned devices.

- TerminalScreen:
  * SnackbarHost pinned at the bottom; LaunchedEffect(actionResult)
    shows "Queued — will sync when back online" whenever an offline
    action gets queued, so the cashier has explicit feedback beyond the
    top-bar pending pill.
  * 4 new locale strings (en/fr/de/lb) for the snackbar copy.

- Manifest cleanup: dropped redundant tools:replace from the debug
  AndroidManifest overlay (networkSecurityConfig isn't set in the main
  manifest, so the replace directive was a no-op + emitted a warning).

Skipped from the plan: a custom splash screen (the existing theme
background renders for the cold-start frame; adding the splashscreen
library is polish for a follow-up) and per-action success toasts
(the action sheet closing + balance refresh + recent-feed update are
adequate confirmation).

Verified by ./gradlew assembleDebug — clean build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 00:20:46 +02:00
c158d920d2 chore(android-terminal): dev cleartext + readable HTTP error messages
Some checks failed
CI / ruff (push) Successful in 16s
CI / pytest (push) Failing after 2h32m6s
CI / validate (push) Successful in 31s
CI / dependency-scanning (push) Successful in 32s
CI / docs (push) Has been skipped
CI / deploy (push) Has been skipped
Two small dev-quality fixes shaken out by manual testing:

- Add a debug-only network_security_config.xml that whitelists 10.0.2.2,
  localhost and 127.0.0.1 for cleartext HTTP. Without this, the dev
  emulator can't reach the Python dev server because targetSdk 35
  forbids cleartext HTTP by default. Lives under app/src/debug/ so it
  ships only in debug APKs — release builds keep the platform default
  (no cleartext at all).

- TerminalViewModel.runAction now extracts the JSON {message: ...} field
  from HttpException response bodies instead of just showing "HTTP 400".
  Cashiers (and developers) now see "Staff PIN is required for this
  operation" / "Daily stamp limit of N reached" inline in the failed
  action sheet, surfacing the same business-error text the server
  already returns.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 23:17:44 +02:00