Skip to content

Phase 4: dashboard - #6

Merged
hupcus merged 2 commits into
mainfrom
phase-4-dashboard
Sep 24, 2026
Merged

hupcus merged 2 commits into
mainfrom
phase-4-dashboard

Conversation

@hupcus

@hupcus hupcus commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Phase 4 — Dashboard (PLAN.md Phase 4)

What changed

  • Přehled (ui/dashboard/DashboardScreen) replaces the POC home: "Dnes" as the main number inside a progress ring to the daily goal, "z cíle 500 m" / "Cíl … splněn"; this week / month / total; top apps today with label + icon (4 rows + "Ostatní"); at most one comparison card; accuracy row; debug tools in debug builds. All values are live (stored + unflushed).
  • Service status (§32): red banner "Měření je vypnuté" + "Zapnout měření" first; a "Měří se" chip only while the service runs.
  • Time in app (D19): with Usage access each row shows "V aplikaci 12 min · 9,5 m/min"; without it "Scrollování 3 min" and one dismissible card → a disclosure screen (ui/usage/UsageAccessScreen: what is read, stored, not read; works without) → Android settings; returning with access closes it.
  • Pure Kotlin (ADR-028): DistanceFormatter (m/km boundaries decided on rounded values, locale of the strings), TimeFormatter (unknown "—", never "0 min"; pace only ≥ 1 min), DistanceComparisonProvider (spec §22 references; almost / about / more than / N×), TopApps.
  • Labels & icons via PackageManager with one <queries> launcher intent (ADR-008) — no QUERY_ALL_PACKAGES; PolicyGuardTest allows exactly that query and guards format/ + insights/ as pure packages.
  • Theme follows Settings.theme.

Definition of Done

  • SPEC §21 complete (header + goal ring, secondary stats, top apps with "Ostatní", comparison card, service banner)
  • Tests: formatter (m/km boundaries, rounding, Czech comma), comparison provider (428 m → running lap, 4,2 km → almost a 5 km run, 42,3 km → marathon), top apps, time/pace; repository aggregation from Phase 3
  • Screenshots verified by a subagent in light and dark (top + bottom), without Usage access (card, "Scrollování …"), service off (banner), disclosure screen; ring / km / comparison on clearly synthetic rows inserted into the emulator DB only for the shot and deleted right after
  • Never "0 min" for an unknown value (verified: synthetic app row shows "V aplikaci —")

Gates

GitHub Actions could not start ("recent account payments have failed or your spending limit needs to be increased" — account billing, not code). The CI-equivalent gate ran instead in a clean checkout of 858a985: ./gradlew testDebugUnitTest lintDebug assembleDebug processReleaseManifest → 183 tests, 0 failed; manifest policy ok (debug + release); tools tests OK; wrapper unchanged in this PR. Recorded in handoff.md.

./gradlew testDebugUnitTest lintDebug assembleDebug assembleRelease (183 tests; lint: 6 pre-existing debug warnings) · tools tests (24) · check_manifest_policy.py ok for debug and release.

Review

  • Stage 1 (own pass over the diff): settings loaded as null first so a dismissed card never flashes; calibration path simplified (via Přesnost měření); comparison card moved to a neutral surface (dynamic colour made it look like the warning banner — screenshot reviewer's note). The colour change itself was not re-screenshotted.
  • Stage 2 security (read of the diff): no new permission; <queries> = launcher intent only (pinned by test); AppInfoProvider reads only packages already stored, catches everything, logs nothing; settings open only after the explicit "Povolit"; no network, no export. No findings.

🤖 Generated with Claude Code

- Přehled replaces the POC home (spec §21): today in a ring against the
  goal, week / month / total, top apps today with labels and icons
  (4 + "Ostatní"), one comparison, accuracy row; all numbers live.
- Service off: red banner with "Zapnout měření" first (§32); the
  "Měří se" chip only while the service runs.
- Time in app (D19): rows show time in app + m/min with Usage access,
  scroll time without; a dismissible card leads to a disclosure screen
  before Android's Usage-access settings.
- Pure Kotlin: DistanceFormatter, TimeFormatter (unknown is "—", never
  "0 min"), DistanceComparisonProvider (spec §22), TopApps; numbers
  formatted in the strings' locale; Czech plurals in resources.
- App labels/icons via PackageManager with one launcher <queries>
  (ADR-008), pinned by PolicyGuardTest; format/ and insights/ guarded
  as pure packages. Theme follows Settings.theme.
- ADR-028; docs and handoff updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

…-checkout gate

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@hupcus
hupcus merged commit 96b3495 into main Sep 24, 2026
1 check failed
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