Skip to content

Visible row colors, clearer row wording, skip granted permission page - #6

Merged
jappeace merged 3 commits into
jappeace:masterfrom
jappeace-sloth:feat/row-color-and-page-skip
Jul 14, 2026
Merged

jappeace merged 3 commits into
jappeace:masterfrom
jappeace-sloth:feat/row-color-and-page-skip

Conversation

@jappeace-sloth

Copy link
Copy Markdown

Field findings from testing the merged #5:

Row colors actually render now

The rate coloring never showed on-device: WidgetStyle properties apply to the single node they wrap (Hatter.Render.applyStyle sets the property on that node), so styling the row's column set text color on a LinearLayout, a silent no-op. Every text node of the row now carries the color itself. The color test asserts all six row texts are colored and was verified to fail against the old container styling. Colors remain: green when the measured advertisement rate matches the expected interval input within 25%, red when it deviates, uncolored until a rate is measured (second advertisement).

Wording

  • ~1024 ms read as meters/second: now renders as every ~1024 ms (the measured advertising interval).
  • found now reads not yet configured.

Permission page skips when everything is granted

The first render probes checkPermission for both permissions (safe: jni_bridge.c registers the platform bridges immediately before invoking the first render) exactly once, and lands directly on the scanner when both are granted. A denial keeps the page as before. The emulator test now asserts the skip (CI pre-grants via pm); the permission-page unit tests pre-mark the probe since the desktop stub always grants.

65 tests green, zero warnings, shellcheck clean; both new behaviours sabotage-verified to fail their tests alone.

🤖 Generated with Claude Code

Three field findings from Jappie:

- The rate coloring never rendered: WidgetStyle properties apply to
  the single node they wrap (Hatter.Render.applyStyle), so styling
  the row's column set text color on a container, a silent no-op.
  Every text node of the row now carries the color itself; the color
  test asserts all six texts are colored (it fails against the old
  container styling).
- "~1024 ms" read as meters/second: the rate now renders as
  "every ~1024 ms". The "found" status now reads "not yet
  configured".
- When both permissions are already granted the app skips the
  permission page: the first render probes checkPermission (the
  platform bridges are registered right before the first render, see
  jni_bridge.c) exactly once and flips straight to the scanner. The
  emulator test asserts the skip since CI pre-grants via pm; the
  permission-page unit tests pre-mark the probe because the desktop
  stub always grants.

Both new behaviours sabotage-verified to fail their tests alone.

Prompt: we still don't have the colored row if the configured
interval mismatches what's on the ble device, also what does the m/s
mean? and what does found mean? use the latest master. also if all
permissions are set we should skip the permission screen

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jappeace-sloth

Copy link
Copy Markdown
Author

Heads-up: the last commit pins hatter at the jappeace/hatter#243 branch (text color moved into the text-bearing configs, resolving hatter#242 so this class of invisible styling cannot recur) and migrates rowText to the new coloredText. After #243 merges, the pin repoints to hatter master (hash-only). Merge order: hatter#243, then this.

jappeace-sloth and others added 2 commits July 14, 2026 14:55
hatter #243 moved text color from WidgetStyle into the text-bearing
configs, resolving #242 so a container color is unrepresentable.
rowText uses the new coloredText constructor, the TextInput records
carry the new field, and the test walker reads the config colors.
Pin moves to the hatter PR branch; repoint to master after #243
merges (hash-only).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Identical tree to the reviewed branch head; the text-color API is
upstream.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jappeace
jappeace merged commit 95565a6 into jappeace:master Jul 14, 2026
3 checks 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