Skip to content

Conversation

@lk340
Copy link
Collaborator

@lk340 lk340 commented Jul 17, 2025

Summary

This PR only tackles the AccessibilityNotificationsManager, KeyboardShortcutsManager and minor UI aspects of the pinned text highlight feature (FileRow is the "key" UI aspect of this feature, so it was turned into its own PR). As a result, this branch will not build. I did this to separate concerns and make the updated code more reviewable.

I've separated the manager updates and UI updates by commit, so I recommend reviewing this PR on a commit-by-commit basis.

If you want to test the full buildable version of the pinned text highlight feature, checkout to the branch in the last PR: #341

Parts

  1. Text Highlight: Update Highlighted Text Behavior #339
  2. Text Highlight: Auto-add To Context #340
  3. Text Highlight (Pin - 1): Update to Data Files and OnitPanelState #342 (Pin 1)
  4. YOU ARE HERE (Pin 2)
  5. Text Highlight: Pin #341 (Pin 3)

lk340 added 2 commits July 17, 2025 15:22
… with pinned text highlight updates.

* `AccessibliityNotificationsManager` now properly handles removing `InputView` from the UI when it matches the current highlighted text, and the current highlighted text is about to be removed.
* `AccessibliityNotificationsManager` also now handles setting the unpinned highlighted context and showing it in the UI.
* `KeyboardShortcutsManager` now clears all states related to highlighted text.
* Add pin icon.
* ContextTag can now handle the pin action and shows pinned corner icon when pinned.
* ExternalTetheredButton now accounts for both auto-highlighted and tracked highlighted text.
* InputView `smallRemove` button now clears the unpinned highlighted text context tag when it matches the removed InputView text.
* Update FinalContextView to now show full array of input (highlighted text) contexts.
* Update PromptCore to properly show the selected highlighted text context.
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR implements significant changes to support a new pinned text highlight feature, focusing on the underlying management systems and UI updates. The key changes include:

  1. Input state management has been refactored from a single pendingInput to multiple states (selectedPendingInput, unpinnedPendingInput, trackedPendingInput, pinnedPendingInputs)
  2. AccessibilityNotificationsManager and KeyboardShortcutsManager have been updated to handle these new input states
  3. UI components (ContextTag, InputButtons, etc.) have been modified to support pinning functionality
  4. Core data structures like Input have been made Hashable to support new collection requirements

The changes lay the groundwork for users to pin multiple text selections while maintaining a clear separation between pinned and unpinned text states.

Confidence score: 3/5

  1. While the code changes are well-structured, this PR intentionally does not build as it's part of a larger feature implementation
  2. The score reflects the incomplete nature of the changes and potential edge cases in state management that need attention
  3. Files needing careful review:
    • AccessibilityNotificationsManager.swift: Complex state management logic
    • OnitPanelState.swift: Core state changes
    • InputButtons.swift: Potential edge cases in state clearing logic

11 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile

@lk340 lk340 closed this Jul 18, 2025
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.

2 participants