feat(highlights): add command to set highlight scheme for all tags - #8
Merged
Merged
Conversation
Closes #2 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
# Conflicts: # agent/tasks.md # agent/timeline.md
# Conflicts: # agent/tasks.md # agent/timeline.md
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
Adds a new command TaskVision: Set Highlight Scheme for All Tags (
taskvision.setHighlightSchemeForAllTags) so users can uniformly set the highlight scheme for every tag at once, instead of editing each entry undertaskvision.highlights.customHighlight.This resolves the root cause called out in the issue: the shipped per-tag
customHighlightdefaults (TODO/FIXME/BUG/HACK/XXX/NOTE/BLOCKER/[ ]/[x]/[ x]) each carry their ownscheme, and insrc/attributes.jsgetAttribute()the per-tag entry always wins overdefaultHighlight— makingdefaultHighlightappear to do nothing.Behavior
neon/glass/neon+glass/none(mirrors the existing per-tagtaskvision.setScheme).schemeinto every existingcustomHighlightentry anddefaultHighlight. Tags without an entry inherit fromdefaultHighlight.noneclears theschemekey from every entry anddefaultHighlight; all other properties are preserved.resolveConfigTarget()(Workspace when a folder is open, otherwise Global), consistent with the per-tag command.onDidChangeConfigurationlistener (watchescustomHighlight/defaultHighlight).Entry points
⋯overflow menuImplementation
src/highlightScheme.js→applySchemeToAllTags(customHighlight, defaultHighlight, scheme)(deep-clones, never mutates inputs), which keeps the write logic unit-testable.src/extension.js; contribution + menu inpackage.json; EN/中文 titles inpackage.nls.json/package.nls.zh-cn.json.README.md/README_zh.md.Testing
test/highlightScheme.tests.js(acceptance): applyingneonsetsschemeon all existing entries +defaultHighlight; other props preserved;noneclears everywhere; inputs are not mutated; empty config handled.test/extension.tests.js.npm test→ 126 passing (was 119).npm run webpacksucceeds.git diff --checkclean.Closes #2
Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com