feat(scopes): diff/log/preprocessor/constants/labels/strikethrough/support coverage - #15
Conversation
…pport coverage
New tokenColors rules and semantic selectors in base.yaml, all bound to
existing role tokens (no new hexes, parity unchanged). Snapshot test now
checks additions-only structural coverage. samples/demo.{diff,log} added
(.gitignore negation for the .log sample).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reviewer's GuideAdds missing scope coverage for diffs, logs, preprocessors, ALL_CAPS constants, labels, markdown strikethrough, support variables, and several semantic token types, all wired to existing role tokens to avoid new palette entries, plus sample files and changelog documentation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In the
Labelstoken color rule,foregroundis set to${semanticTokenColors.label}, which likely expands to an object rather than a hex/string; this should probably reference the actual color value (e.g.${semanticTokenColors.label.foreground}) to match other token → semantic bindings. - For consistency with the rest of
base.yaml, consider using the same style of indirection foreventas for similar selectors (e.g.${semanticTokenColors.property.foreground}instead of${semanticTokenColors.property}) so that semantic token values are always resolved to concrete colors rather than whole objects.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the `Labels` token color rule, `foreground` is set to `${semanticTokenColors.label}`, which likely expands to an object rather than a hex/string; this should probably reference the actual color value (e.g. `${semanticTokenColors.label.foreground}`) to match other token → semantic bindings.
- For consistency with the rest of `base.yaml`, consider using the same style of indirection for `event` as for similar selectors (e.g. `${semanticTokenColors.property.foreground}` instead of `${semanticTokenColors.property}`) so that semantic token values are always resolved to concrete colors rather than whole objects.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Re Sourcery review: |
Summary
Plan step 4 of
docs/plans/2026-08-18-audit-remediation.md— fill the scope gaps the audit found. No new hexes: every new rule binds to an existing role token inbase.yaml, so all variants inherit it and the parity check stays green.TextMate rules added
markup.inserted/deleted/changed(+.diffpunctuation) → git-decoration added/deleted/modified colours;meta.diff.header*/meta.diff.index→ doc-comment colour;meta.diff.range→ keyword colourtoken.info-token/warn-token/error-token(bold) /debug-token→ debug-console colourskeyword.control.directive(bold, keyword colour);entity.name.function.preprocessor|macro(bold, macro colour)variable.other.constant,constant.other.caps,variable.other.enummemberentity.name.label,entity.name.goto-labelstrikethrough)support.variable/.property/.dom/.object.process→*.defaultLibrarycolour, italicSemantic token types added
selfParameter,clsParameter(this/self colour, italic),magicFunction,builtinConstant,boolean,builtinType,lifetime,attribute,derive,formatSpecifier,escapeSequence(bold),event.Also
samples/demo.diff,samples/demo.logfor eyeballing (.gitignoreun-ignoressamples/demo.log)Test plan
npm run check(build → verify all hard-fail checks → README tables) greennpm test26/26 — the v1.2.0 snapshot coverage test (additions-only, name-keyed) passes with the new rulessamples/demo.{diff,log,py,rs}in all three variants🤖 Generated with Claude Code
Summary by Sourcery
Add comprehensive syntax and semantic scope coverage while preserving existing palette roles and variant parity.
New Features:
Enhancements:
Documentation:
Tests: