Skip to content

v0.1.0-alpha.18 — fix NFC tap activation, correct screen-time totals, per-day drill-down - #19

Merged
codebooo merged 1 commit into
mainfrom
claude/lifeos-production-plan-v3-dmynx3
Jul 28, 2026
Merged

v0.1.0-alpha.18 — fix NFC tap activation, correct screen-time totals, per-day drill-down#19
codebooo merged 1 commit into
mainfrom
claude/lifeos-production-plan-v3-dmynx3

Conversation

@codebooo

Copy link
Copy Markdown
Owner

1. NFC tap wasn't activating Brick modes

Two real bugs, both fixed:

  • The manifest only declared NDEF_DISCOVERED (with a custom MIME a blank tag never carries) and TECH_DISCOVERED. Plain tags that fall through to TAG_DISCOVERED matched no filter at all, so nothing launched outside the app. That filter is now declared.
  • In-app taps had no handler — reader mode only ran while pairing. Brick now keeps reader mode on for as long as the screen is open, so a tap there flips the mode directly, exactly like a tap from outside.
  • Tag ids are normalized (trim + uppercase) on both pairing and scanning, the DB lookup is case/whitespace-insensitive, and the toast now names the scanned UID when it's unpaired instead of silently doing nothing. Tapping a different tag while a mode is running now explains why nothing happened instead of no-oping.

2. Screen Time reported ~191h/day

Root cause: queryAndAggregateUsageStats returns each app's total for whatever interval bucket Android picked internally (often weekly/monthly) — querying it once per day handed back the same bloated total for all seven days, which is exactly the identical-bar bug reported. Rewritten to walk the raw UsageEvents stream and sum ACTIVITY_RESUMED → PAUSED/STOPPED pairs per app, with screen-off and end-of-day closing any still-open session. Existing bad rows are wiped and rebuilt once automatically on first launch of this version.

3. Per-day drill-down

Tapping a bar in the weekly chart opens a sheet with that day's total screen time, unlock count, and its own app ranking.

Debug + minified release builds pass; all Brick policy unit tests pass. versionCode 18.

🤖 Generated with Claude Code


Generated by Claude Code

…nt stream, per-day drill-down

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codebooo
codebooo merged commit 051aa8c into main Jul 28, 2026
1 check passed
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.

2 participants