Skip to content

Simplify indicator to on/off toggle#116

Merged
FuJacob merged 2 commits into
mainfrom
ui/simplify-indicator
May 21, 2026
Merged

Simplify indicator to on/off toggle#116
FuJacob merged 2 commits into
mainfrom
ui/simplify-indicator

Conversation

@FuJacob

@FuJacob FuJacob commented May 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace 3-mode indicator picker (None / Caret / Tabby Icon) with a simple on/off toggle in both settings and menu bar
  • Rename "Clipboard Context" → "Include Clipboard Context" in menu bar (matches settings)
  • Comment out Ghost Text Color picker — only relevant for inline overlay which isn't stable yet
  • Remove FieldEdgeIconIndicatorView and field-edge positioning logic (~100 lines deleted)
  • ActivationIndicatorController.show() simplified to enabled: Bool + caretRect
  • ActivationIndicatorMode enum kept for backward-compatible deserialization

Test plan

  • Build succeeds
  • Settings: "Show Indicator" toggle, no Ghost Text Color row
  • Menu bar: "Include Clipboard Context" and "Indicator" toggles
  • Toggle on → caret pointer appears; toggle off → no indicator
  • Users with prior "Tabby Icon" preference gracefully fall back

🤖 Generated with Claude Code

Greptile Summary

Replaces the three-mode activation indicator picker (None / Caret / Tabby Icon) with a simple on/off toggle across Settings and the menu bar, removing FieldEdgeIconIndicatorView and its field-edge positioning logic (~100 lines). The ActivationIndicatorMode enum is kept for backward-compatible deserialization of persisted preferences, and users who had "Tabby Icon" selected gracefully fall back to the caret indicator.

  • ActivationIndicatorController.show() API simplified from (mode:caretRect:inputFrameRect:) to (enabled:caretRect:), eliminating the unused field-edge code path.
  • Both SettingsView and MenuBarView now use a Toggle backed by showCaretIndicator / setShowCaretIndicator on SuggestionSettingsModel.
  • The ghost-text color customization UI is commented out with a TODO pending overlay stability.

Confidence Score: 4/5

Safe to merge — the simplification is well-scoped, the backward-compat path for persisted fieldEdgeIcon users is correctly handled, and no logic regressions were found.

The code changes are clean and the reduction in surface area is a net positive. The two stale doc comments in SuggestionSettingsModel and SuggestionModels now describe the opposite of the current design intent, which could mislead a future contributor into treating the boolean-based API as a deprecated shim scheduled for removal.

The doc comments on showCaretIndicator/setShowCaretIndicator in SuggestionSettingsModel.swift and the enum-level comment in SuggestionModels.swift should be updated to reflect that the boolean toggle is now the primary interface, not a transitional shim.

Important Files Changed

Filename Overview
tabby/App/Core/AppDelegate.swift Drops mode and inputFrameRect from the activationIndicatorController.show() call-site; now passes enabled: Bool and caretRect only. Simple, correct change.
tabby/Services/UI/ActivationIndicatorController.swift Removed FieldEdgeIconIndicatorView and all field-edge positioning logic (~100 lines); show() now takes enabled: Bool + caretRect, always displays CaretAnchorIndicatorView. No regressions found; early-return optimization is preserved.
tabby/UI/MenuBarView.swift Replaces MenuBarPickerRow + Picker for indicator with a simple Toggle("Indicator"); also renames "Clipboard Context" label to "Include Clipboard Context" for consistency with SettingsView. Clean change.
tabby/UI/SettingsView.swift Replaces Picker("Indicator") with Toggle("Show Indicator") and comments out the ghost-text color section with a TODO. The commented-out block is well-scoped and the TODO is clear.

Sequence Diagram

sequenceDiagram
    participant User
    participant SettingsView/MenuBarView
    participant SuggestionSettingsModel
    participant AppDelegate
    participant ActivationIndicatorController

    User->>SettingsView/MenuBarView: Toggle "Show Indicator" (on/off)
    SettingsView/MenuBarView->>SuggestionSettingsModel: setShowCaretIndicator(Bool)
    SuggestionSettingsModel->>SuggestionSettingsModel: selectIndicatorMode(.caretAnchor / .hidden)
    SuggestionSettingsModel->>SuggestionSettingsModel: persist to UserDefaults

    AppDelegate->>SuggestionSettingsModel: read showCaretIndicator
    AppDelegate->>ActivationIndicatorController: show(enabled: Bool, caretRect: CGRect)
    alt "enabled == true && caretRect non-empty"
        ActivationIndicatorController->>ActivationIndicatorController: render CaretAnchorIndicatorView
        ActivationIndicatorController->>ActivationIndicatorController: panel.orderFrontRegardless()
    else
        ActivationIndicatorController->>ActivationIndicatorController: panel.orderOut (hide)
    end
Loading

Reviews (1): Last reviewed commit: "Rename clipboard toggle in menu bar, dis..." | Re-trigger Greptile

FuJacob and others added 2 commits May 20, 2026 19:39
Replace the three-mode indicator picker (None / Caret / Tabby Icon) with a
simple on/off toggle in both the settings window and menu bar panel.

- ActivationIndicatorController.show() now takes a bool + caretRect instead
  of mode + caretRect + inputFrameRect
- Remove FieldEdgeIconIndicatorView and its positioning logic
- Keep the ActivationIndicatorMode enum for backward-compatible deserialization
  of persisted preferences

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Menu bar: "Clipboard Context" → "Include Clipboard Context" (matches settings)
- Comment out Ghost Text Color picker/description until inline overlay is stable

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@FuJacob FuJacob merged commit b36d00b into main May 21, 2026
2 of 3 checks 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