Skip to content

feat(highlights): add command to set highlight scheme for all tags - #8

Merged
Yuki-zik merged 3 commits into
masterfrom
yuki-zik-set-highlight-scheme-for-all-tags
Jul 8, 2026
Merged

Yuki-zik merged 3 commits into
masterfrom
yuki-zik-set-highlight-scheme-for-all-tags

Conversation

@Yuki-zik

@Yuki-zik Yuki-zik commented Jul 8, 2026

Copy link
Copy Markdown
Owner

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 under taskvision.highlights.customHighlight.

This resolves the root cause called out in the issue: the shipped per-tag customHighlight defaults (TODO/FIXME/BUG/HACK/XXX/NOTE/BLOCKER/[ ]/[x]/[ x]) each carry their own scheme, and in src/attributes.js getAttribute() the per-tag entry always wins over defaultHighlight — making defaultHighlight appear to do nothing.

Behavior

  • Shows a QuickPick of neon / glass / neon+glass / none (mirrors the existing per-tag taskvision.setScheme).
  • Writes the chosen scheme into every existing customHighlight entry and defaultHighlight. Tags without an entry inherit from defaultHighlight.
  • none clears the scheme key from every entry and defaultHighlight; all other properties are preserved.
  • Uses the existing resolveConfigTarget() (Workspace when a folder is open, otherwise Global), consistent with the per-tag command.
  • Highlights refresh automatically via the existing onDidChangeConfiguration listener (watches customHighlight/defaultHighlight).

Entry points

  • Command Palette
  • Tree view title ⋯ overflow menu

Implementation

  • New pure helper src/highlightScheme.js → applySchemeToAllTags(customHighlight, defaultHighlight, scheme) (deep-clones, never mutates inputs), which keeps the write logic unit-testable.
  • Command registered in src/extension.js; contribution + menu in package.json; EN/中文 titles in package.nls.json / package.nls.zh-cn.json.
  • Docs: README.md / README_zh.md.

Testing

  • New test/highlightScheme.tests.js (acceptance): applying neon sets scheme on all existing entries + defaultHighlight; other props preserved; none clears everywhere; inputs are not mutated; empty config handled.
  • New wiring/contribution assertions in test/extension.tests.js.
  • npm test → 126 passing (was 119). npm run webpack succeeds. git diff --check clean.

Closes #2

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Yuki-zik and others added 3 commits July 8, 2026 11:14
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
@Yuki-zik
Yuki-zik merged commit 4f2e592 into master Jul 8, 2026
6 checks passed
@Yuki-zik
Yuki-zik deleted the yuki-zik-set-highlight-scheme-for-all-tags branch July 8, 2026 07:12
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.

[feature request] 可以统一设置highlight model 吗

2 participants