Skip to content

Replace iPad-broken confirmation dialogs with menus and alerts - #224

Merged
dprodger merged 1 commit into
mainfrom
fix/ipad-confirmation-dialogs
Sep 13, 2026
Merged

dprodger merged 1 commit into
mainfrom
fix/ipad-confirmation-dialogs

Conversation

@dprodger

Copy link
Copy Markdown
Owner

Long-pressing a song title on iPad opened a menu with nothing readable in it — visible in the original report as a pale rounded panel over the tab bar with a downward arrow and no content.

Cause

On iPad a SwiftUI confirmationDialog is presented as a popover, and on iPadOS 26 — with the UIDesignRequiresCompatibility opt-out this app ships — that popover renders empty. Verified by A/B on an iPad (A16) / iPadOS 26.1 simulator: with the key present the dialog shows nothing at all; remove the key and the same dialog renders normally. The key stays (the app depends on it for opaque bars), so the dialogs go instead.

Changes

Song refresh (SongDetailView) — now a .contextMenu on the title. Native match for a long press, draws its own chrome, anchors to the title instead of floating over the tab bar. It also explains why refresh is unavailable when the song is already queued; the old gesture was silently a no-op in that state.

The other five are all tap-triggered confirmations carrying a message, so they become alerts — centred modals on iPad, unaffected by the opt-out:

Site Note
MusicBrainzSearchSheet "Request Song" real two-way isPresented binding replacing a .constant; Link → Button via @Environment(\.openURL), since alerts only take buttons
YouTubeImportView "Link to Recording?" straight conversion
AuthorityRecommendationView "Delete Authority Reference" presenting: so the message can't render empty
AuthorityRecommendationView "Link to This Recording" same
RecordingContributionEditView "Delete Contribution" straight conversion

UIUserInterfaceStyle = Light — alert buttons inherit the tab bar's brand tint, which was navy on near-black whenever the device was in dark mode. This was pre-existing and hit the old dialogs equally. ApproachNoteTheme is a single hardcoded light palette, so the app's own screens render light either way and only the system surfaces we don't draw were drifting out of step. The Mac app already does this with .preferredColorScheme(.light).

Verification

Each of the six was driven to on screen on the iPad (A16) / iPadOS 26.1 simulator and read, not just compiled. The five alert sites are all behind login, so the auth gates were temporarily bypassed and the YouTube share payload stubbed to reach them; all of that scaffolding is reverted and both the ApproachNote and ApproachNoteMac schemes build clean. Each alert was dismissed without confirming, so nothing was written to production.

Not fixed here

Result rows in the MusicBrainz sheet only respond to taps landing on the text — .buttonStyle(.plain) hit-tests the label's content shape, so the empty part of the row is dead. Pre-existing and unrelated; a .contentShape(Rectangle()) on the row label would fix it.

🤖 Generated with Claude Code

On iPad a confirmationDialog is presented as a popover, and on iPadOS 26
— with the UIDesignRequiresCompatibility opt-out this app ships — that
popover renders as an empty panel with no readable content. Verified by
A/B on an iPad (A16) / iPadOS 26.1 simulator: with the key present the
dialog shows nothing; remove the key and the same dialog renders.

The song-title long press now opens a context menu instead. That is the
native match for a long press, draws its own chrome, and anchors to the
title rather than floating over the tab bar. It also says why the refresh
is unavailable when the song is already queued, where the old gesture was
silently a no-op.

The five remaining dialogs are all tap-triggered confirmations carrying a
message, so they become alerts, which present as a centred modal on iPad
and are unaffected by the opt-out. Two get `presenting:` so their message
can no longer render empty, and the MusicBrainz search dialog gains a real
two-way isPresented binding in place of a `.constant`. Alerts only take
buttons, so its "View on MusicBrainz" link opens through the environment.

Alert buttons inherit the tab bar's brand tint, which was navy on
near-black whenever the device was in dark mode. ApproachNoteTheme is a
single hardcoded light palette, so the app's own screens are light either
way and only the system surfaces we don't draw were drifting. Declaring
the app light-only keeps them in step, as the Mac app already does with
.preferredColorScheme(.light).

Each of the six was driven to on screen on the iPad simulator.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@dprodger dprodger left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dprodger
dprodger merged commit 567414e into main Sep 13, 2026
1 check passed
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