Replace flat rule management with an app-centered flow - #38
Draft
kasnder wants to merge 5 commits into
Draft
Conversation
Replace the flat rules list with an app overview and per-app detail flow, regroup settings and custom rules, and guide picker sessions into the selected app. Keep rule identity and on-device state semantics intact while adding batch pause, safe comment rename, and scoped picker helpers.
Recommend the configured temporary pause whenever blocking is turned off, while preserving permanent disable as an explicit secondary action. Reflect the configured duration in the detail chip and reserve enough width for Material switches on narrow screens.
Replace the crowded glyph toolbar with an intent-scoped sheet that explains the current selection and keeps an explicit top/bottom move action available. Track every picker window for teardown and keep undo feedback opposite the movable controls.
Derive the surrounding pause choices from the configured default so the default remains the emphasized middle choice. Strengthen popup-state and element-picker scope coverage, and clarify that broad-match refusal applies to the selected sibling group.
Treat an all-matching sibling row as the intended scope of Hide all. Reserve the broad-selection refusal for nodes that are the active root or cover its full content bounds.
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.
Concern addressed: Make focus configuration understandable at the app level instead of exposing one flat, technical rule list.
What changed and why:
The main screen is now an app overview with honest active, paused, off, and service-disabled states plus a friction-gated Pause all action. Each app opens a detail screen for launch destination, pause shortcuts, collapsible blocking categories, and a scoped guided picker. Custom rules now have a regular list/edit flow with the raw editor retained as expert mode, and settings are regrouped by purpose. Shared state helpers preserve rule identities, batch pauses, safely rename comments, and refresh the live service after changes. The picker keeps the existing module seam while adding intent-specific actions, plain-language selection labels, match-count safety, undo, Done, and a surfaced active notification.
Evidence:
./gradlew testStandardDebugUnitTest :distractionlib:testDebugUnitTest./gradlew assembleStandardDebug./gradlew lintStandardDebug(completes with no errors; existing warning baseline remains)No Android device was connected. Accessibility overlays, service lifecycle behavior, picker app-switching, friction-gate round trips, and timed pause resume remain explicitly unverified on-device.
Not in this PR: The root-level HTML mockup, implementation plan, and local Gradle daemon JVM file remain untracked and unchanged.