Skip to content

Unify home & rules row labels across rule types#12

Merged
brendan-ch merged 3 commits into
mainfrom
chore/consistent-home-screen-labels
Jun 15, 2026
Merged

Unify home & rules row labels across rule types#12
brendan-ch merged 3 commits into
mainfrom
chore/consistent-home-screen-labels

Conversation

@brendan-ch

Copy link
Copy Markdown
Owner

Summary

Makes Home and Rules rows render consistently across all three rule kinds (Schedule / Time Limit / Open Limit). Previously the two tabs used three different row systems and schedule rows had no icon, type, or countdown on Home.

Every row now has one shape: leading kind icon → name → context subtitle, with the trailing status string removed.

  • Home subtitle is <Type> · <context>; Rules omits the type (its section header already conveys the kind).
  • Schedule blocking rows show a countdown (Schedule · 6h left).
  • Limit rows show adaptive context: live usage once used (Time Limit · 18m of 45m used), else the daily budget (Time Limit · 45m / day). A spent limit reads its usage everywhere — never a clock countdown.
  • Icons restored on Home rows (reverts the earlier removal); the red Hard-Mode lock still shows on Currently-Blocking rows.
  • "today" dropped from usage rows as redundant (30m of 30m used, 2 of 5 opens). The on-device shield text is a separate surface and is unchanged.

Implementation

  • Replaced BlockingRule.statusLabel with a single rowContext source of truth (RuleStatus.swift).
  • Restructured UsageDisplayusagePhrase / budgetPhrase / homeSubtitle (dropped typedSubtitle / remainingLabel).
  • The Rules ruleStatus-<name> accessibility id moved onto the context subtitle.
  • Updated Docs/AGENT_RULES_FEATURE_SPEC.md §3 and §6 to match.

Design decisions

  • Rules subtitle is context-only (the Block · Distractions apps summary is dropped from the list; it remains in the rule detail sheet).
  • Limit context is adaptive (usage when used today, else the daily budget).
  • A paused/unblocked limit now reads Paused (was Unblocked until tomorrow), unified with how schedule rules render.

Test plan

  • RuleStatusTests + UsageDisplayTests updated/added for rowContext, adaptive context, and the homeSubtitle prefix.
  • UsageUITests updated (no trailing labels, Paused wording, no today).
  • Full suite green: 219/219 tests pass on iPhone 17 Pro (iOS 26.4).
  • Visually verified Home across all three seed scenarios (standard, limits, hard-mode-active) and the Rules tab.

🤖 Generated with Claude Code

brendan-ch and others added 3 commits June 15, 2026 17:10
Render every Home and Rules row with one shape — leading kind icon, name,
and a context subtitle — and drop the trailing status string so the two
tabs (and the three rule kinds) read consistently.

- Home subtitle is "<Type> · <context>"; the Rules tab omits the type since
  its section header conveys it. Blocking schedule rows now show a countdown
  ("Schedule · 6h left"); limit rows show adaptive context — live usage once
  used today ("18m of 45m used today"), else the daily budget ("45m / day").
- Add the leading kind icon to Home rows (reverts the earlier icon removal).
- Replace BlockingRule.statusLabel with a single rowContext source of truth;
  restructure UsageDisplay (usagePhrase / budgetPhrase / homeSubtitle; drop
  typedSubtitle / remainingLabel). The Rules ruleStatus-<name> id moves onto
  the context subtitle.
- Update Docs/AGENT_RULES_FEATURE_SPEC.md §6 and the affected unit/UI tests
  (219 passing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The usage subtitle covers the current day by definition, so "used today" /
"opens today" was redundant. Trim to "30m of 30m used" / "2 of 5 opens" on
both the Home and Rules rows. The on-device shield text ("Opened X of N
times today") is unchanged — it is a separate surface.

Also refreshes the now-stale §3 Usage description in the feature spec
(trailing labels were removed and "Unblocked until tomorrow" became "Paused"
in the prior commit).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@brendan-ch brendan-ch merged commit ca436e4 into main Jun 15, 2026
1 check passed
@brendan-ch brendan-ch deleted the chore/consistent-home-screen-labels branch June 15, 2026 22:10
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