Skip to content

Add docs/FEATURES.md — language-agnostic spec for v2 rewrite#21

Open
bryanroscoe wants to merge 3 commits into
mainfrom
docs/feature-catalog
Open

Add docs/FEATURES.md — language-agnostic spec for v2 rewrite#21
bryanroscoe wants to merge 3 commits into
mainfrom
docs/feature-catalog

Conversation

@bryanroscoe
Copy link
Copy Markdown
Owner

Adds `docs/FEATURES.md` as the canonical source of truth for what Shield Optimizer does.

Why

We've decided on Rust + Tauri 2 for v2 (full rewrite to native installable app with auto-update + eventual mobile client). v2 needs a language-agnostic spec rather than reverse-engineering 4,000 lines of PowerShell. This is that spec.

The doc is structured by domain — connection, optimization, launcher, snapshot, etc. Every feature gets: purpose, behavior, exact ADB commands invoked, edge cases, and a function-name reference to the v1 implementation for traceability.

Also doubles as a living capability changelog. The maintenance checklist at the bottom puts the onus on PR authors to keep it current.

Contents

  • 15 sections covering all v1 behavior (connection/discovery, optimization, health, launcher, tuning, snapshot, sideload, reboot, recovery, profile, UI, data catalogs, cross-cutting)
  • 501 lines, ~all of v1 documented
  • README pointer added so it's discoverable

No code changes.

Creates docs/FEATURES.md as the canonical source of truth for what
Shield Optimizer does. Catalog is structured by domain (connection,
optimization, launcher, snapshot, etc.), each feature documented with
purpose, behavior, exact ADB calls, edge cases, and a pointer to its
v1 implementation function for traceability.

The rewrite to Rust + Tauri 2 needs a language-agnostic spec rather
than reverse-engineering 4,000 lines of PowerShell. This doc is that
spec. Also serves as a living changelog of capabilities — PRs that
add or change behavior update this doc in the same commit.

README gets a one-paragraph pointer so the catalog is discoverable.

No code changes.
Comprehensive verification pass against the script identified gaps in
the initial catalog. Adds:

§0 Invocation & startup
- Command-line parameters (-ForceAdbDownload, -LightMode, -DarkMode,
  -Subnet)
- Platform detection ($Script:Platform, $IsUnix)
- Startup sequence with strict mode + terminal resize behavior

§1 Connection & discovery (extended)
- §1.6 Device enumeration & friendly names (Get-Devices, batched
  property query, Shield codename → friendly model map, USB-detection
  caveat for Shield)
- §1.7 UNAUTHORIZED device guidance flow

§2 Main menu (new section, was implicit before)
- Static actions: Scan Network, Connect IP, Pair Device, Report All,
  Refresh, Restart ADB, Help, Quit with shortcuts
- Device row selection behavior including unauthorized handling

§13 Device profile & detection (expanded)
- Documents the two device-type detection paths that exist in v1
  (Get-DeviceType and the inline detection in Get-Devices) which use
  different inputs. Flag for v2 to consolidate.
- Splits profile display vs detection logic

§16 Cross-cutting (expanded)
- §16.5 Play Store deep-link (Open-PlayStore)
- §16.6 Uninstall / install error decoding (Get-UninstallErrorReason)
- §16.7 Utility helpers table (Test-PackageInList, Test-AppPackage,
  Test-ValidIP, Format-FileSize, Get-ParsedTemperature,
  Get-ParsedRamInfo, Get-VitalColor, Get-VitalAnsiColor)
- §16.8 Notes --user 0 convention

All section numbers renumbered; all internal cross-references updated;
TOC kept in sync with header set. Maintenance checklist references
updated to point at the renumbered sections.

No script changes.
Independent review caught seven inaccuracies in docs/FEATURES.md.
Fixed:

- Provenance line dropped the stale `df70dd5` commit hash — citations
  track current HEAD; doc now says so explicitly with a re-verify
  instruction for future editors.
- §5.1 Health Report: the batched dumpsys parser uses per-section
  sentinels (`::THERMAL::`, `::MEMINFO::`, `::STORAGE::`, `::PROPS::`,
  `::SETTINGS::`, `::PACKAGES::`), not a single `::SECTION::` marker.
  The exact echo string is reproduced now so v2 can match output
  bytes for byte.
- §14.1 Themes: macOS uses an `osascript` AppleScript snippet (not
  `defaults read -g AppleInterfaceStyle` — the defaults entry is stale
  on modern macOS). Linux has no detection at all and falls through
  to the dark default; that's a v2 improvement opportunity rather
  than a current capability.
- §16.6 Get-UninstallErrorReason: documented the wrong codes.
  Actual function recognizes `Broken pipe`, `not installed for`,
  and `DELETE_FAILED_INTERNAL_ERROR`. The `INSTALL_FAILED_*` codes
  live inline in `Install-ApkFile` (~lines 1364-1372) — flagged for
  v2 consolidation.
- §1.6 device returned shape: missing the `ID` field (1-based menu
  position used by the shortcut layer).
- §7 Tweaks: enum label for match_content_frame_rate value 1 is
  "Seamless only", not "Seamless".
- §6.2 Setup wizard: the menu also exposes "Stock Launcher" as a
  selectable option (with [ACTIVE]/[DISABLED]/[NOT FOUND] status
  tag) — re-enabling and re-activating the stock launcher is a
  first-class flow that wasn't documented. Behavior section now
  describes all menu options and exit paths.
- §16.7 utility helpers table: added line-number citations for
  Open-PlayStore and Get-UninstallErrorReason for consistency with
  other entries.

No behavior changes; doc only.
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