Repository navigation
fix(ui): Settings rows take the tap across their whole area - #1176
Conversation
DashUIKit's MenuItem draws no background, so a plain-style button around it answered only on the icon and the text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The minimum row height moved inside the tap shape, and a toggle row without an explainer is a button whose action is the toggle, so tapping anywhere on Notifications or Enable Voting flips the switch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rows read as switches Enable Voting rebuilds the items after the flip, so a row tap moves the switch. A plain toggle row presents one VoiceOver element: a toggle with its state. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the subtitle Co-Authored-By: Claude Opus 5.5 <[email protected]>
… in place Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughSettings rows now use title-based identity, a rectangular hit area, and updated action and accessibility behavior. The voting action refreshes menu items after toggling the voting preference. ChangesSettings menu
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Settings rows should now respond across their whole area, and the Enable Voting switch should update after a toggle. No concrete problems were found; do the planned manual tap and VoiceOver checks before merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Final review complete — no blockers (commit 7e93dfe) · triage: low |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The Settings changes correctly address the reported hit-target, toggle-refresh, stable-identity, and accessibility behavior, and the exact-head CI snapshot shows the title and accessibility checks passing. No blocking defect was found, but the new full-row toggle interactions and unified accessibility representation lack focused regression coverage.
🟡 1 suggestion(s)
Review provenance
Source: reviewer 1: gemini-3.8-flash-high (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.1-sol(effort low) — The diff is a small, Settings-only UI fix to row hit targets, toggle refresh, stable row identity, and accessibility semantics, with no changes to critical wallet surfaces. - Phase 1 reviewers:
gemini-3.8-flash-high— general (completed, effort high); agentphase1-reviewer - Phase 1 model:
gemini-3.8-flash-high— antigravity quota: weekly 90% left, 5h 50% left - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort medium); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `DashWallet/Sources/UI/Menu/Settings/SettingsScreen.swift`:
- [SUGGESTION] DashWallet/Sources/UI/Menu/Settings/SettingsScreen.swift:165-170: Add regression coverage for full-row toggle interactions
This change wraps the Notifications and Enable Voting rows in buttons while retaining their interactive switch accessories, and replaces their accessibility representation with a single Toggle. The existing AdvancedModeRowUITests covers only the Advanced mode split and does not verify the new plain-toggle behavior. Add focused UI coverage that taps the title-to-switch gap, the additional minimum-height area, and the switch itself, asserting that each action changes the setting exactly once and that the displayed switch state updates immediately. Also verify that VoiceOver exposes one labeled toggle with the current value and subtitle.
Out-of-scope follow-up suggestions (1)
These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.
- Add contentShape to DashUIKit.MenuItem to fix hit-testing globally — DashUIKit.MenuItem still relies on callers to provide a content shape. For example, the interactive address-source rows in EnterAddressView wrap DashUIKit.MenuItem in a plain Button without adding contentShape, so transparent gaps can remain outside the hit region. This is a concrete shared-component follow-up, but the PR explicitly limits its fix to Settings and identifies the broader DashUIKit change separately.
- Follow-up: Track a DashUIKit MenuItem contentShape change and audit its interactive callers.
| } else if let action = item.action { | ||
| // For a plain toggle row the action is the toggle itself, so a tap | ||
| // anywhere on the row flips the switch. | ||
| Button(action: action) { content } | ||
| .buttonStyle(.plain) | ||
| .modifier(ToggleRowAccessibility(item: item, isOn: Self.toggleBinding(item))) |
There was a problem hiding this comment.
🟡 Suggestion: Add regression coverage for full-row toggle interactions
This change wraps the Notifications and Enable Voting rows in buttons while retaining their interactive switch accessories, and replaces their accessibility representation with a single Toggle. The existing AdvancedModeRowUITests covers only the Advanced mode split and does not verify the new plain-toggle behavior. Add focused UI coverage that taps the title-to-switch gap, the additional minimum-height area, and the switch itself, asserting that each action changes the setting exactly once and that the displayed switch state updates immediately. Also verify that VoiceOver exposes one labeled toggle with the current value and subtitle.
source: gpt-6.1-sol (phase2-reviewer: general)
There was a problem hiding this comment.
Added in 7e93dfe: DashPayRecoveryUITests/SettingsRowsUITests launches the real SettingsScreen through a simulator-only DEBUG fixture and, for Notifications and Enable Voting, taps the title-to-switch gap, the minimum-height strip and the switch, asserting a single flip after each tap. It also checks that VoiceOver sees one labeled switch with no nested switch. Neither row has a subtitle in its toggle state, so there is no subtitle to assert. Without the row's contentShape the gap tap fails, so the test catches the original defect.
There was a problem hiding this comment.
Resolved (re-reviewed at 7e93dfe2): Thank you—the registered SettingsRowsUITests use the real SettingsScreen fixture and assert a state flip after gap, minimum-height-strip, and switch taps for both rows, plus a labeled switch with no nested switch. You are also correct that neither row has a subtitle in its toggle state, so no subtitle assertion is needed for these cases.
SettingsRowsUITests launches the real SettingsScreen through a simulator-only DEBUG fixture (SETTINGS_ROWS_UI_TEST=1) and, for Notifications and Enable Voting, taps the gap between title and switch, the minimum-height strip and the switch itself, asserting after each tap that the switch flipped exactly once. It also checks that VoiceOver sees one labeled switch with no nested switch inside it. Removing the row's contentShape makes the gap tap fail, so the test catches the original defect. Co-Authored-By: Claude Opus 5.5 <[email protected]>
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
Independently inspected the complete base-to-head diff at 7e93dfe and found no actionable in-scope defects. The row hit-target changes, Voting state refresh, stable row identities, and registered regression tests address the intended Settings behavior and the prior coverage suggestion. Verification was static: the supplied exact-head CI snapshot reports successful title and accessibility checks, but provides no build or UI-test execution results, so the reported local runtime validation remains unverified.
🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)
Review provenance
Source: reviewer 1: gemini-3.8-flash-high (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.1-sol(effort low) — This is a small, contained Settings UI fix covering row hit targets, toggle refresh and identity, and VoiceOver semantics, with focused UI tests and no changes to critical wallet surfaces. - Phase 1 reviewers:
gemini-3.8-flash-high— general (completed, effort high); agentphase1-reviewer - Phase 1 model:
gemini-3.8-flash-high— antigravity quota: weekly 46% left, 5h 58% left - Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort medium); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.
No unresolved findings remain from the prior review on this head.
llbartekll
left a comment
There was a problem hiding this comment.
LGTM. I read through this against DashUIKit at the pinned 83cf65a:
- No double fire on the switch.
SwitchViewhandles its tap with its own.onTapGesture, and SwiftUI gives a child gesture priority over theButtonaround it. So tapping the switch runsitem.actiononce through the binding, and the row button does not fire.SettingsRowsUITestschecks this. contentShapecovers the full width.MenuItemisHStack { leading; central; Spacer(); trailing }, so the row fills the width, and movingframe(minHeight: 60)inside the shape also covers the bottom strip.- Enable Voting used to write the pref and leave the switch on the stale
item.isToggleduntil something else refreshed the list.refreshMenuItems()plus[weak self]fixes that. - Keying rows by
\.title. I checked everyLocalizable.strings: no locale gives two Settings rows the same title, so the IDs are unique. Notifications swapping between its toggle and "Open Settings" forms switchesifbranches, so SwiftUI rebuilds that row anyway. That is fine. - VoiceOver.
accessibilityRepresentationreplaces the whole button subtree, so the nestedSwitchViewelement goes away. Activating the representation goes through the sametoggleBindingsetter, so it fires one action. - Fixture guards match: ObjC
TARGET_OS_SIMULATOR && DASHPAYinside#if DEBUG, and SwiftDEBUG && targetEnvironment(simulator). It never reaches device or release builds. It follows the same pattern asDWUsernameRecoveryUITestFixture.
One small point about running the tests locally (not blocking): testNotificationsRowFlipsFromAnywhereOnTheRow depends on the simulator's notification grant. If anyone has tapped "Don't Allow" for the app on that simulator, effectiveState() returns .blockedBySystem. The row then becomes the "Open Settings" button, and the test fails with "VoiceOver would read a stateless button", which points at the wrong cause. A check like if app.buttons["settings_row_notifications"].exists { throw XCTSkip("notifications denied on this simulator") }, or a clearer failure message, would save someone time.
I did a static review only. I didn't run the build or the UI tests myself.
…me-redesign Conflicts: the identity coordinator now logs through DWLogger (#1155), so this branch's os.Logger privacy annotations are dropped and its log lines kept; the Enable Voting comment takes develop's wording (#1176); the catalogs keep "Shield your funds first", still used by the funding-privacy screen, and drop "Shield", which nothing uses any more. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Issue being fixed or feature implemented
Settings rows answered taps only on their icon and text:
DashUIKit.MenuItemdraws no background, so a plain-style button around it is hit-tested only where something is drawn. Taps on the gap between the title and the trailing control, or in the strip the 60 pt minimum height adds, did nothing. Plain toggle rows (Notifications, Enable Voting) answered only on the switch.What was done?
contentShape(Rectangle()).UUID, so a toggle updates its row in place: the switch slides and VoiceOver keeps its focus.Scope is Settings only. The root cause is
DashUIKit.MenuItemhaving no content shape; fixing it there would cover every other caller (Send, Swap, Internal transfer, …) and is suggested as a follow-up.How Has This Been Tested?
dashpayscheme builds for the simulator (Xcode 27, iOS 26.5 SDK, arm64).AdvancedModeRowUITestscovers that last split).SettingsRowsUITests(DashPayRecovery scheme) pass: for Notifications and Enable Voting, a tap on the title-to-switch gap, the minimum-height strip and the switch each flips the setting exactly once, and VoiceOver sees one labeled switch. With the row'scontentShaperemoved the gap tap fails.Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code
Summary by CodeRabbit