Skip to content

fix: show Home's block controls when only websites are selected - #110

Merged
ykisana merged 1 commit into
mainfrom
fix/home-websites-only-selection
Nov 15, 2026
Merged

ykisana merged 1 commit into
mainfrom
fix/home-websites-only-selection

Conversation

@ykisana

@ykisana ykisana commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Problem

When only websites are selected (no apps), the Block All shortcut blocks them, but Normal itself offers no way to unblock:

  • Home shows "Please select apps to block in the selection tab." and no Unblock All button.
  • App Select is locked while anything is blocked.

The only ways out are the Unblock All shortcut, the Quick Unlock widget, or an emergency unblock.

The shortcut counts websites as something to block (IntentContext.mainSelection), but Home only counts apps. UI tests didn't catch this because Home shows its controls whenever UITestSupport.isActive is set.

Fix

  • SelectedApps.hasItemsToBlock(customDomainsEnabled:) holds the shortcut's rule, and both Home and the shortcut use it. Home's status and button views already count websites.
  • Removed Home's UITestSupport.isActive override. UI tests have seeded apps into the main selection since 0837fa5, so it only hid this case.
  • New -uiTestWebsitesOnly launch option: seeds example.com with no apps, and with -uiTestStartBlocked starts with that site blocked.

Websites-only users now also get Block All on Home, matching the shortcut. Groups and Schedules still require apps.

Tests

  • New testBlockedWebsitesWithoutAppsCanBeUnblockedFromHome: starts with only websites blocked and unblocks them from Home with the key.
    • Fails with Home's previous apps-only check: "Home should offer Unblock All while only websites are blocked".
    • Passes with the fix.
  • Full unit suite, iOS 27: 879/879.
  • Full UI suite, iPhone 17 iOS 27: 40/42 on the first run, which stalled for 5.7 hours. Both failures were "Timed out while synthesizing event", and both pass when rerun on a fresh simulator.

@ykisana
ykisana merged commit 046c7e0 into main Nov 15, 2026
1 check passed
@ykisana
ykisana deleted the fix/home-websites-only-selection branch November 15, 2026 09:53
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