Unify home & rules row labels across rule types#12
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 →
contextsubtitle, with the trailing status string removed.<Type> · <context>; Rules omits the type (its section header already conveys the kind).Schedule · 6h left).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."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
BlockingRule.statusLabelwith a singlerowContextsource of truth (RuleStatus.swift).UsageDisplay→usagePhrase/budgetPhrase/homeSubtitle(droppedtypedSubtitle/remainingLabel).ruleStatus-<name>accessibility id moved onto the context subtitle.Docs/AGENT_RULES_FEATURE_SPEC.md§3 and §6 to match.Design decisions
Block · Distractionsapps summary is dropped from the list; it remains in the rule detail sheet).Paused(wasUnblocked until tomorrow), unified with how schedule rules render.Test plan
RuleStatusTests+UsageDisplayTestsupdated/added forrowContext, adaptive context, and thehomeSubtitleprefix.UsageUITestsupdated (no trailing labels,Pausedwording, notoday).standard,limits,hard-mode-active) and the Rules tab.🤖 Generated with Claude Code