screentinker/docs
ScreenTinker 3333d5e968 Stop Android panels losing controls when they update
A declared capability set REPLACES the per-platform baseline rather than
merging with it, so anything the baseline grants and the player omits is a
control the operator loses by updating. Three were being lost.

- display.brightness: the per-window dim (setWindowBrightness) is Tier 0 —
  no permission, no owner, no WRITE_SETTINGS — and MainActivity applies it
  unconditionally. It was simply never declared.

- remote.screenshot / remote.stream: gated on the accessibility service,
  while captureScreen() falls through to ScreenshotCapture.captureView,
  a plain view draw with no permission check. A Tier-0 panel lost live view
  and screenshots by updating, and a GRANTED MediaProjection never became a
  capability either — consent given, capture working, server still refusing,
  because nothing re-declared.

- system.device_owner: no player declared it, so the server accepted
  system.kiosk as a stand-in for every Tier-2 command. Declaring the
  canonical name makes refusals say what they mean; the stand-in can retire
  one release after this reaches displays.

display.power stays conditional on purpose: screen_on works anywhere via a
wake lock but screen_off needs owner/admin/accessibility, and a control that
sleeps a panel it cannot wake is worse than no control. It is the sole entry
in the DELIBERATE set in player-parity-baselines.test.js.

Also fixes the capture-bootstrap gate in device-detail.js. It hung off
can('remote.screenshot'), which hid the button from exactly the panels that
need it. The gate is now Android-and-nothing-else, NOT "Android that lacks
capture": /api/devices/:id ships capabilitiesFor(), which flattens declared
and baseline into one array, and the android baseline contains
remote.screenshot — so a "lacks capture" test hides the button from all ~440
undeclared panels in the field. isAndroidDevice() mirrors platformFamily()
with all four signals in order; an Android-test-only helper classified every
Tizen TV as Android, since Tizen registers android_version 'Tizen 6.5'.

Tests: the suite could not see any of this. Mutation testing showed deleting
either capability line, or reverting isAndroidDevice to its buggy form, left
all tests green. Added an update-invariant test (declared set vs baseline,
with an argued exception list), a test that executes the shipped helper
rather than the harness stub, and a legacy-panel test using the shape the API
actually returns instead of one it never produces. All four mutations now
fail.

Verified on a real Android 16 device across all three tiers: Tier 0 captures
live video (no accessibility, no MediaProjection, no owner), Tier 1 gains
display.power via accessibility, Tier 2 declares system.device_owner and every
Tier-2 command delivers. An in-place upgrade from the pre-change build lost
nothing and gained exactly these three.

Baselines deliberately NOT moved — a baseline entry moves in the release
AFTER the one carrying the player fix, once it has reached displays.

Parity gaps 3 and 4 were implemented, audited and reverted; docs/player-parity.md
records why so the next attempt starts from the traps. Gap 3 (wiring "Force
update") meets an unbounded synchronous download against a 120s watchdog and a
3-attempt counter with no version binding, so three presses refuse a panel every
future version. Gap 4 (deferring to BS.capabilities()) removes working
screenshot/stream from diskless BrightSigns that capture to RAM, over-declares
transitions, and rides a probe timeout that discards a late answer permanently.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bvjey4FNam49MN7ybjcq6A
2026-08-10 10:31:33 -05:00
..
104-draft-preview-build-plan.md feat(preview): draft-aware device-free playlist preview via player reuse (#104) 2026-06-15 14:11:05 -05:00
109-android-pip-visibility.md fix(#109): render Android PiP overlay above the YouTube WebView video plane (#135) 2026-06-19 14:49:20 -05:00
134-device-reporting.md fix(#134): quiet false "reconnect" log + report HDMI output and UI render resolution (#136) 2026-06-19 15:32:11 -05:00
146-hardening-fallout.md feat(#146): always-on devices_connected + admin-toggleable /api/status debug block 2026-07-01 18:45:40 -05:00
146-hardening-plan.md docs(#146): event-loop hardening plan — blast-radius audit + failure model + sequenced plan 2026-06-30 20:44:46 -05:00
148-android-duplicate-socket-fix.md docs(#148): android duplicate-socket root-cause fix + verification spec 2026-07-02 19:29:50 -05:00
148-connection-lifecycle-analysis.md docs(#148): mass-disconnect + connection-lifecycle + half-open analyses 2026-07-02 14:59:25 -05:00
148-half-open-fix.md docs(#148): mass-disconnect + connection-lifecycle + half-open analyses 2026-07-02 14:59:25 -05:00
148-mass-disconnect-analysis.md docs(#148): mass-disconnect + connection-lifecycle + half-open analyses 2026-07-02 14:59:25 -05:00
148-server-eviction-storm-analysis.md docs(#148): server eviction-storm analysis (field-safe net spec) 2026-07-02 19:12:46 -05:00
android-troubleshooting.md feat(android): hidden settings menu with multi-tap BACK/ESC detection 2026-07-07 16:57:49 -04:00
billing-authz-plan.md feat(#146): billing:read scoped token — dual-path auth for the Usage Report (Option C) 2026-07-01 21:16:21 -05:00
billing.md feat(#146): owner-only CLI to mint billing:read tokens (scripts/mint-billing-token.js) 2026-07-01 21:31:11 -05:00
device-owner-provisioning.md feat(device-owner): tier foundation + QR provisioning + content-expiry & device enhancements (#168) 2026-07-12 19:41:07 -05:00
local-ai-setup.md docs: local AI setup guide for the Content Designer (#41) 2026-06-09 13:57:02 -05:00
maintenance-device-status-log.md docs(#142): 1.9.2-beta1 changelog + device_status_log VACUUM maintenance note 2026-06-27 19:59:17 -05:00
multi-tenancy-design.md Phase 1: multi-tenancy design doc + migration scripts 2026-05-11 19:37:15 -05:00
openapi.yaml chore(release): v1.9.33 2026-08-07 20:47:58 -05:00
player-parity.md Stop Android panels losing controls when they update 2026-08-10 10:31:33 -05:00
seo-directory-listings.md feat(seo): IndexNow + landing-page optimization (schema, FAQ, CWV, content) (#177) 2026-07-13 11:22:37 -05:00