Remove the tooltip feature entirely#362
Merged
Merged
Conversation
Two prior PRs (#350, #354) attempted to make SwiftUI's .help(_:) actually render on macOS 26 beta for our LSUIElement app. Both shipped, neither actually shows a visible tooltip — the click-through overlay returns nil from hitTest and NSToolTipManager only displays a tooltip for the view it hit-tests under the cursor, so the toolTip property was set but never queried. Rather than ship a third attempt, rip the whole surface out: delete TooltipSupport.swift, drop every .cotabbyHelp(...) and .help(...) call across SettingsView, MenuBarView, CustomRulesEditor, and LanguageTagsEditor. The labels in those controls already describe what they do.
This was referenced May 28, 2026
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.
Summary
Two prior PRs (#350, #354) tried to make SwiftUI's
.help(_:)actually render on macOS 26 beta for our LSUIElement app. Neither actually shows a visible tooltip — the click-through overlay returnsnilfromhitTest(_:), andNSToolTipManageronly displays a tooltip for the view it hit-tests under the cursor, so thetoolTipproperty was set but never queried. Rather than ship a third attempt, rip the surface out:Cotabby/UI/TooltipSupport.swift..cotabbyHelp(...)and remaining.help(...)call acrossSettingsView,MenuBarView,CustomRulesEditor, andLanguageTagsEditor(44 sites).The control labels in those screens already describe what each setting does.
Validation
swiftlint lint --quiet→ exit 0xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' build→ ** BUILD SUCCEEDED **xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' build-for-testing→ ** TEST BUILD SUCCEEDED **xcodegen generateregenerated the project after the source-file deletion.Linked issues
Refs #313, #350.
Risk / rollout notes
helpText) is no longer attached to any of those controls. If we want VoiceOver to keep reading the longer descriptions on focus, that's a separate accessibility pass we should do deliberately rather than by side-effect of.help(_:)..help(_:)back in one place at a time only where it has a clear product story — not blanket-restored.Greptile Summary
This PR strips out the tooltip feature entirely — deleting
TooltipSupport.swiftand removing all 44.cotabbyHelp(...)and bare.help(...)call sites across the four UI files — after two prior attempts to work around a SwiftUI tooltip regression in macOS 26 beta both failed at the AppKit hit-test level.TooltipSupport.swiftdeleted: removes theCotabbyTooltipModifier,TooltipOverlayView, andClickThroughTooltipViewNSView subclass.SettingsView,MenuBarView,CustomRulesEditor, andLanguageTagsEditorare fully purged of both the custom.cotabbyHelp(...)modifier and the underlying.help(...)calls.Confidence Score: 4/5
Safe to merge — purely a deletion of a non-functional surface with no logic changes.
Every
.cotabbyHelpcall site is removed and no dangling references remain, so the build stays clean. The one wrinkle is the "Use LM Studio" button: it remains disabled when LM Studio is absent, but the only text that explained the reason to the user (the conditional tooltip) is now gone, leaving a silently-greyed-out button. That is a minor discoverability gap, not a correctness bug.Cotabby/UI/SettingsView.swift— specifically the disabled "Use LM Studio" button which lost its contextual explanation.Important Files Changed
cotabbyHelpViewModifier, the AppKit overlay NSViewRepresentable, and theClickThroughTooltipViewhelper class..cotabbyHelp(...)and bare.help(...)calls; the disabled "Use LM Studio" button now has no UI explanation for why it is greyed out..cotabbyHelp(...)and.help(...)modifier calls; no functional or structural changes to controls or logic..cotabbyHelp(...)calls from the rules header and the Clear button; no other changes..cotabbyHelp(...)calls from the Languages header and the Clear button; no other changes.TooltipSupport.swift(PBXBuildFile, PBXFileReference, and Sources group entry), correctly regenerated byxcodegen.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["SwiftUI View\n(.cotabbyHelp modifier)"] -->|"PR #362 removes"| B["CotabbyTooltipModifier\n(TooltipSupport.swift — deleted)"] B --> C[".help(text)\nSwiftUI tooltip"] B --> D["TooltipOverlayView\nNSViewRepresentable"] D --> E["ClickThroughTooltipView\nNSView — hitTest returns nil"] E --> F["NSToolTipManager\n(AppKit — never queried)"] C --> G["NSToolTipManager\n(SwiftUI bridge — broken on macOS 26 beta)"] A2["SwiftUI View\n(post-PR)"] -->|"no modifier"| H["No tooltip rendered\n(no VoiceOver helpText either)"] style B fill:#f88,stroke:#c00 style D fill:#f88,stroke:#c00 style E fill:#f88,stroke:#c00 style H fill:#ffc,stroke:#aa0Comments Outside Diff (1)
Cotabby/UI/SettingsView.swift, line 496-501 (link)The
"Use LM Studio"button is silently disabled when LM Studio is not detected. The previous.cotabbyHelp(...)was the only affordance that told users why it was greyed out — it rendered the string "Install LM Studio with at least one model first. Cotabby couldn't find ~/.lmstudio/models." With the tooltip removed there is nothing in the UI to explain the disabled state to a user who hasn't installed LM Studio yet. Consider replacing the disabled button with a small secondary label, or at minimum keep a non-interactive.help(...)on this control so VoiceOver can convey the reason.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Reviews (1): Last reviewed commit: "Remove the tooltip feature entirely" | Re-trigger Greptile