Skip to content

Add tooltips across Settings and the menu-bar quick controls#313

Merged
FuJacob merged 3 commits into
mainfrom
settings-tooltips
May 27, 2026
Merged

Add tooltips across Settings and the menu-bar quick controls#313
FuJacob merged 3 commits into
mainfrom
settings-tooltips

Conversation

@FuJacob

@FuJacob FuJacob commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

Every interactive control in Settings and the menu-bar quick-controls panel now has a .help("...") tooltip explaining what it does, with the trade-off named when there is one (latency vs. context, CPU vs. snappiness, etc.). Self-explanatory buttons (Open Folder, Quit, Open Welcome Guide) are intentionally left untipped to avoid noise. The redundant description paragraphs above the Languages, Custom Rules, and Suggestion Delay controls have been removed, since the new tooltips carry their copy and the body text was hurting density.

Validation

xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' build
# ** BUILD SUCCEEDED **

swiftlint lint --quiet
# 3 pre-existing warnings in SuggestionCoordinator+Input.swift and FocusTracker.swift;
# 0 violations in any file touched by this PR.

awk 'length > 140' on the four edited files
# no lines exceed the 140-char line-length limit

Not verified in the running app: I did not manually hover every control to read the rendered tooltip popovers, since tooltip strings are inert at compile time and the failure mode for a typo is just bad copy on hover, not a crash.

Linked issues

No tracked issue. Direct request.

Risk / rollout notes

  • Tooltips are additive .help(...) calls on existing controls. No behavior changes, no settings migrations, no pbxproj edits.
  • One real semantic change: the Use LM Studio button now picks its tooltip based on whether ~/.lmstudio/models exists. Reuses the same FileManager.default.fileExists check that already drives .disabled(...), so no extra IO. Worst case if that check ever drifts, the tooltip wording disagrees with the disabled state, which is purely cosmetic.
  • Existing tooltip copy on Accept Punctuation With Word and Fast Mode was rewritten for consistent voice (no em dashes, lead with the verb / outcome). The Fast Mode change appears in both Settings and the menu-bar panel so they stay in sync.
  • Three caption-style Text(...) rows were removed (LanguageTagsEditor line 43, CustomRulesEditor line 44, SettingsView Performance section). If you'd rather keep that copy visible without hovering, easy to put back.

Greptile Summary

This PR adds .help(...) tooltip strings to every interactive control in SettingsView, MenuBarView, CustomRulesEditor, and LanguageTagsEditor, and removes three now-redundant caption Text rows whose copy has been folded into the new tooltips.

  • Tooltips are purely additive .help() modifiers; no logic, state, or layout is changed beyond extracting lmStudioAvailable as a local let so the existing FileManager.default.fileExists check is shared between .disabled() and the new conditional .help() (net I/O is unchanged).
  • Three caption Text views (LanguageTagsEditor, CustomRulesEditor, SettingsView Performance section) are removed; their content is preserved in the tooltip copy, at the cost of requiring a hover to read it.

Confidence Score: 5/5

Safe to merge; all changes are additive tooltip strings with no behavioral side effects.

Every change is a .help(...) string or a cosmetic copy tweak. The one structural change — extracting lmStudioAvailable — is a clean refactor that reduces the number of fileExists calls from one-per-modifier to one-per-render. The three removed caption Text views are matched by equivalent tooltip copy, so no information is lost. No logic, state, navigation, or persistence is altered.

No files require special attention.

Important Files Changed

Filename Overview
Cotabby/UI/SettingsView.swift Adds .help() tooltips throughout all settings sections; extracts lmStudioAvailable local var to reuse for both .disabled() and .help(); replaces one caption Text with a tooltip.
Cotabby/UI/MenuBarView.swift Adds .help() tooltips to Fast Mode, Enable Globally, per-app toggle, clipboard context, multi-line, engine picker, and length picker; rewrites Fast Mode tooltip for consistent imperative voice.
Cotabby/UI/CustomRulesEditor.swift Adds tooltips to the Rules label and Clear button; removes the now-redundant caption Text below the header.
Cotabby/UI/LanguageTagsEditor.swift Adds tooltips to the Languages label and Clear button; removes caption Text; replaces em dashes with periods in the file comment and footer disclaimer.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User hovers control] --> B{Has .help modifier?}
    B -- Yes --> C[Show tooltip popover]
    B -- No --> D[No tooltip shown]

    subgraph LM Studio Path
        E[Render LabeledContent Folder]
        E --> F["let lmStudioAvailable = FileManager.fileExists(...)"]
        F --> G[".disabled(!lmStudioAvailable)"]
        F --> H{lmStudioAvailable?}
        H -- true --> I["tooltip: Point Cotabby at LM Studio..."]
        H -- false --> J["tooltip: Install LM Studio first..."]
    end
Loading

Fix All in Codex Fix All in Claude Code

Reviews (1): Last reviewed commit: "Mirror the new Settings tooltips on the ..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

FuJacob added 3 commits May 27, 2026 01:34
Surfaces .help() copy on every interactive control so hovering reveals
what the setting does and the trade-off, rather than forcing users to
guess. Settings whose effect is obvious from the label (Open Folder,
Quit, Open Welcome Guide) are intentionally left untipped to avoid
noise.

Also drops the redundant description paragraphs above the Languages
and Custom Rules editors, since the tooltip on the section label now
carries that copy and the body Text was hurting density. The Suggestion
Delay caption is replaced by a tooltip on the Stepper itself for the
same reason.
Adds .help() copy to the Engine and Selected Model pickers, the Folder
row and its buttons, the Add App button, and the Open Settings button
in the permission rows. The status text rows (Availability, Runtime)
are left untipped since they already describe themselves.

The Use LM Studio button picks its tooltip based on whether
~/.lmstudio/models exists: enabled state explains what it does,
disabled state explains why it's disabled. Reuses the same
fileExists check that already drives .disabled(...), so no extra IO.
Adds .help() to every toggle and picker that exists in both surfaces
(Enable Globally, Enable in <app>, Include Clipboard Context, Allow
Multi-line, Engine, Length) so hovering in the menu-bar panel reveals
the same context as the Settings window. Tightens the existing Fast
Mode copy to match the rewrite in Settings. Footer buttons (Settings,
Check for Updates, Quit) stay untipped since their labels are
self-explanatory.
@FuJacob FuJacob merged commit 2d2fea8 into main May 27, 2026
2 of 3 checks passed
@FuJacob FuJacob deleted the settings-tooltips branch May 27, 2026 08:37
Toggle("Enable in \(application.applicationName)", isOn: appEnabledBinding(for: application))
.toggleStyle(.switch)
.controlSize(.small)
.help("Disable Cotabby just in this app. Overrides Enable Globally.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 The tooltip on the per-app toggle reads "Disable Cotabby just in this app" regardless of the toggle's current state. When the toggle is already off (Cotabby disabled for this app) and the user hovers, the tooltip implies the action is to disable — but they'd actually be re-enabling it. A neutral, bidirectional description avoids this mismatch.

Suggested change
.help("Disable Cotabby just in this app. Overrides Enable Globally.")
.help("Override the global switch for this app only. Overrides Enable Globally.")

Fix in Codex Fix in Claude Code

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