Simplify indicator to on/off toggle#116
Merged
Merged
Conversation
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>
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
FieldEdgeIconIndicatorViewand field-edge positioning logic (~100 lines deleted)ActivationIndicatorController.show()simplified toenabled: Bool+caretRectActivationIndicatorModeenum kept for backward-compatible deserializationTest plan
🤖 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
FieldEdgeIconIndicatorViewand its field-edge positioning logic (~100 lines). TheActivationIndicatorModeenum 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.SettingsViewandMenuBarViewnow use aTogglebacked byshowCaretIndicator/setShowCaretIndicatoronSuggestionSettingsModel.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
modeandinputFrameRectfrom theactivationIndicatorController.show()call-site; now passesenabled: BoolandcaretRectonly. Simple, correct change.FieldEdgeIconIndicatorViewand all field-edge positioning logic (~100 lines);show()now takesenabled: Bool+caretRect, always displaysCaretAnchorIndicatorView. No regressions found; early-return optimization is preserved.MenuBarPickerRow+Pickerfor indicator with a simpleToggle("Indicator"); also renames "Clipboard Context" label to "Include Clipboard Context" for consistency with SettingsView. Clean change.Picker("Indicator")withToggle("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) endReviews (1): Last reviewed commit: "Rename clipboard toggle in menu bar, dis..." | Re-trigger Greptile