Repository navigation
feat: let groups override the default unblock duration and key - #123
Merged
Merged
Conversation
Edit Group has a new Unblocking section with Default Duration and Default Key. Both start on App Default, which follows Settings; any other choice, including None, overrides it for that group. A group's default applies wherever the app default would: its card, widgets and links set to Default Duration, and Shortcuts. Explicit choices and Unblock All are unchanged. Closes #91.
ykisana
force-pushed
the
feat/group-unblock-defaults
branch
from
November 18, 2026 15:37
93f4aeb to
92e3d51
Compare
ykisana
added a commit
that referenced
this pull request
Nov 19, 2026
While anything is blocked the group sheet is read-only, which also locked the Unblocking section #123 added. Changing a group's Default Duration or Default Key doesn't loosen anything: an unblock still needs a key, and the duration sheet already offers every duration. The two pickers now stay editable while blocked, and Done saves them. Name, apps, websites and keys stay locked.
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.
Closes #91.
What
When the group's default applies
How
AppGroupstoresoverridesDefaultDuration+defaultUnblockSecondsandoverridesDefaultKey+defaultKeyType. All are optional or defaulted, so existing groups migrate lightly and start on App Default.durationOverrideandkeyOverrideread them as aDefaultOverride(.appDefault,.none,.value).Settings.defaultDuration(for:)anddefaultKeyType(for:)resolve a group's effective default.unblockLength(for:group:)now requires the group, so every caller decides.Tests
GroupUnblockDefaultsTests: following, overriding and turning off the app defaults; a removed duration acting as None; explicit requests ignoring the group default; choosing App Default again clearing the override.AppUnblockIntentPerformerTests: a Shortcuts location unblock uses the group's duration, and handing off to the app uses the group's key.StoreUpgradeTests: 1.4 groups open on App Default.BlockingUITests.testGroupDefaultDurationSkipsTheDurationSheet: with no app default, sets a group to 4 hours in Edit Group, checks the row reads App Default and the menu says what it is, then unblocking starts without the duration sheet.