Skip to content

Phase 5: history, apps, app detail, bottom navigation - #7

Merged
hupcus merged 5 commits into
mainfrom
phase-5-history-apps
Sep 24, 2026
Merged

hupcus merged 5 commits into
mainfrom
phase-5-history-apps

Conversation

@hupcus

@hupcus hupcus commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Phase 5 — Historie + Aplikace (PLAN.md)

Scope: bottom navigation Přehled / Historie / Aplikace / Nastavení (Navigation Compose 2.9.8, @Serializable routes, D14); Historie 7 / 30 days / 12 months in a custom Canvas bar chart with per-day statistics; Aplikace Dnes / 7 dní / 30 dní / Celkem with sort by distance or time, share and a measurement-quality word; app detail with period totals, pace, scroll share and 30-day charts; minimal Nastavení (service, Usage access, Přesnost měření, debug tools moved here). ADR-029.

DoD

  • SPEC §23 (Historie: switch, chart, Průměr / den, Nejvyšší den, Nejnižší den, Celkem)
  • SPEC §24 (Aplikace: default Dnes, switch, sort, row with share and quality, detail with periods and chart)
  • No fake accuracy percentage — quality is a word + explanation (MeasurementQuality, spec §20)
  • D19: sort Vzdálenost | Čas; detail shows distance + time charts and "Scrolluješ X z Y v aplikaci (Z %)"; time-only apps show "—" and "bez dat o scrollu"
  • Tests: quality thresholds, 12-month aggregation, chart mapping (scale, labels), ranking, paired totals, deep-link scrub, package-name validation — 216 JVM tests

Verification

  • Gates: testDebugUnitTest lintDebug assembleDebug assembleRelease green (lint: only the 6 old SetTextI18n in the Phase 1 debug View surface), 25 tools tests, manifest policy OK for debug + release. No new permission, no new exported component.
  • Emulator API 34: 19 screenshots (light + dark) reviewed by a subagent; R8 release: navigation, detail route with argument, no debug classes in dex; an intent with Navigation deep-link extras opens nothing; debug --es devtool still works.
  • Reviews: /topshit (quality on all-time counters, localizable subtitle), Stage 2 security + functional (Fable): 2× MEDIUM (deep-link extras → UI spoofing; pace/share mixed spans) + 5× LOW + 1× INFO fixed in 7fa5920.

CI

GitHub Actions are still blocked by the account's billing / spending limit (open point in handoff.md). The merge relies on the CI-equivalent gate run in a clean checkout of this branch (same commands as .github/workflows/ci.yml + assembleRelease, JDK 21).

🤖 Generated with Claude Code

hupcus and others added 5 commits September 24, 2026 09:32
… ranking

Pure Kotlin for Phase 5: MeasurementQuality HIGH/MEDIUM/LOW/UNKNOWN from the
event counters and the calibration in force (thresholds in MeasurementConfig),
history bars per day or month with per-day statistics from the first measured
day, round chart axes (decimal steps for distance, clock steps for minutes),
app ranking by distance or time with share and quality, the scroll share of
time in app, and per-app day summaries plus the first measured day from Room.

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

Navigation Compose 2.9.8 with @serializable routes and a bottom bar
Přehled / Historie / Aplikace / Nastavení. Historie: 7 / 30 days and 12 months
in a custom Canvas bar chart with tap-to-read bars and per-day statistics.
Aplikace: Dnes / 7 dní / 30 dní / Celkem, sort by distance or time, share and
a quality word; time-only apps show "—" and "bez dat o scrollu". The detail
shows the period, quality with its explanation and 30-day distance and time
charts. Nastavení holds the service and usage-access status, Přesnost měření
and, in debug builds, the developer screens that left Přehled. ADR-029.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Quality describes how an app reports scrolling, not a period: rated on today's
handful of events it read "málo dat" every morning. The list and the detail now
rate on the app's all-time counters. The "43,7 % · Kvalita …" subtitle is one
format string instead of a concatenation, and the detail no longer reads the
first measured day it never used.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Navigation honours explicit deep-link extras on any intent that starts the
  exported launcher activity: MainActivity now drops them, and the app-detail
  route only renders a well-formed package name (MEDIUM, UI spoofing).
- Pace and the scroll share sum both sides only over days that have a time in
  app; the usage sync looks back at most 9 days, so "Celkem" mixed spans (MEDIUM).
- Aplikace ranks only once the all-time counters are read (no quality flash);
  a bar-chart label cannot invert its range on a narrow plot; "Zpět" checks the
  top entry instead of RESUMED; one unit per distance axis; history statistics
  survive a first day after today; chart selection is keyed by date.
- kotlinx-serialization-core instead of -json: routes need no JSON.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

@hupcus
hupcus merged commit 498b301 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