Repository navigation
Filter dictionary properties by term kind - #65
Merged
Merged
Conversation
- Centralize term enumeration and Cocoa filtering in an internal dictionary catalog - Cover the real completion path with a same-name property and command collision Impact: Imported properties remain available unless Cocoa defines the same property
Reviewer's GuideCentralizes dictionary term collection and Cocoa filtering into DictionaryTermCatalog, updates resolver to use term-kind-aware matching, and adds regression tests for ordering and completion behavior. Sequence diagram for Cocoa-aware dictionary term filtering via DictionaryTermCatalogsequenceDiagram
participant Resolver as AppleScriptDictionaryResolveProcessor
participant Registry as AppleScriptProjectDictionaryService
participant Dictionary as ApplicationDictionary
participant Catalog as DictionaryTermCatalog
Resolver->>Dictionary: collectTerms(dictionaryComponents, shouldFilterCocoa)
alt shouldFilterCocoa
Resolver->>Registry: getCocoaStandardTerminology()
Registry-->>Resolver: cocoaStandardTerminology
Resolver->>Catalog: missingTerms(Dictionary, cocoaStandardTerminology)
Catalog-->>Resolver: filteredComponents
else
Resolver->>Catalog: allTerms(Dictionary)
Catalog-->>Resolver: allComponents
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
- Cover filtered ordering, missing Cocoa terminology, and no-use fallbacks - Keep mutable dictionary and discovery state inside hermetic cleanup scopes - Remove an inaccurate private helper comment exposed by the new coverage Impact: Completion refactors now preserve fallback and ordering behavior under direct regression tests
- Model an unavailable Cocoa dictionary at the internal catalog boundary - Replace process-global discovery mutation with a direct null-contract regression - Preserve the resolver's fail-closed completion behavior without startup races Impact: Dictionary completion tests are deterministic on clean macOS runners
barad1tos
marked this pull request as ready for review
August 13, 2026 19:55
There was a problem hiding this comment.
Sorry @barad1tos, you have reached your weekly rate limit of 1500000 diff characters.
Please try again later or upgrade to continue using Sourcery
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
Keep imported dictionary properties available in completion when Cocoa defines a command with the same name. Term enumeration and kind-aware Cocoa filtering now live in a small internal catalog instead of resolver-private collection branches.
Changes
DictionaryTermCatalogwhile preserving existing unfiltered and filtered ordering.Validation
IDE inspections reported no findings in all three touched Kotlin files.
Mutation verification confirmed that the tests fail when property-kind lookup, filtered ordering, missing-Cocoa handling, or no-use fallback behavior is regressed.
Review notes
The historical term ordering remains intentionally different between unfiltered projection and Cocoa-filtered projection. No
ApplicationDictionaryAPI, BNF, lexer, parser, generated source, or persisted user setting changed.