Repository navigation
Simplify extension dedup, width table, and skills section construction - #1
Merged
Merged
Conversation
- Replace the path-suffix disambiguation walk in listResolvedExtensions with a flat rule: unique label, then scope:label, then scope + full path. - Move wide code point ranges into a WIDE_RANGES table and drop the combining-mark/zero-width regex; combining marks now approximate to one column. - Extract addSkillsSection so /context skills and the default view share one section builder. Net -8 lines in src with all 35 tests passing.
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
Three targeted simplifications from a code-review pass on
src/index.ts, with no behavior change in the common path:listResolvedExtensionswith a flat rule: unique label → label; duplicate →scope:label; still duplicate →scope+ full path. Duplicate labels are rare, and the old fallback already degraded to a full path.WIDE_RANGEStable and drops the per-character combining-mark/zero-width regex. Combining marks now approximate to one column, which can only wrap slightly early — never overflow./context skillsand the default view now use oneaddSkillsSectionhelper parameterized by cap instead of two copies of the same construction.Net −8 lines in
src/index.ts; the suffix-walk branch was the hardest-to-test code in the file and is gone.Trade-offs
Verification
npm test— 35/35 passnpm run typecheck— clean