Skip to content

Assert the generated VS Code theme extension sets _watch - #13766

Open
SorenHJohansen wants to merge 2 commits into
omacom:quattrofrom
SorenHJohansen:fix/vscode-theme-test
Open

SorenHJohansen wants to merge 2 commits into
omacom:quattrofrom
SorenHJohansen:fix/vscode-theme-test

Conversation

@SorenHJohansen

@SorenHJohansen SorenHJohansen commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Assert the generated VS Code theme extension sets _watch

Context

The stale symlink and static-1.0.0 assertions this PR originally targeted were fixed independently on quattro by #14259 (commit 0e7d6c2), which seeds the obsolete marker with the checksum-derived version and replaces the symlink/readlink checks with a not-a-symlink check plus a cmp against the current palette. This branch now merges current quattro and adds only what is still missing.

What is still missing: _watch

bin/omarchy-theme-set-vscode writes the theme as a real same-inode file rather than a symlink precisely so VS Code's watcher fires and reloads the theme when the palette changes. That reload depends on the manifest declaring _watch: true. Nothing else in the suite covers that flag, so removing it would silently disable live theme reload with no failing test.

Change

One assertion on top of current quattro:

jq -e '.contributes.themes[0]._watch == true' "$PI_TMPDIR/.vscode/extensions/omarchy-theme/package.json" >/dev/null || fail "vscode generated theme declares _watch for live reload"

This tests the manifest flag only, not that a reload actually happens.

Verification

The suite cannot run on a development host; verify in the disposable VM:

cd ../omarchy-iso
./bin/omarchy-iso-test release/<iso>.iso --reuse-base --sync-all ../omarchy --no-preview

@SorenHJohansen
SorenHJohansen marked this pull request as ready for review September 29, 2026 17:50
@sanjyay

sanjyay commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Independent community review

This is an independent community review and unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Tested: test/cli VS Code theme extension and obsolete marker assertions, verified in a clean Omarchy test environment.

Result: The change behaved as expected. The base branch reproduces the test failure on quattro HEAD (not ok - vscode generated theme references current theme file): omarchy-theme-set-vscode writes a regular file with content-derived versioning and _watch: true, so the prior assertions expecting a symlink and a static 1.0.0 obsolete key failed. Updating the assertions to check content equality (cmp -s), _watch, and matching version-derived obsolete keys resolves the failure. ./test/cli passes cleanly.

Testing details
  • Tested PR commit: 9f9d4f7
  • Base comparison:
    • Base (quattro): ./test/cli aborted at not ok - vscode generated theme references current theme file (line 580), masking the remaining metadata and routing checks.
    • PR: ./test/cli passed all 115 assertions with 0 failures (ok - vscode generated theme copies current theme into a real file, ok - vscode generated theme declares _watch for live reload, ok - vscode generated theme clears obsolete extension marker).

If you'd prefer not to receive these independent reviews on your PRs, reply to this comment and say so, and I won't review your future PRs.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for tracking this down. The bug this fixes is real, and quattro has since fixed it the same way: 0e7d6c2 (#14259, merged Oct 4) seeds the obsolete marker with the checksum-derived version and replaces the symlink and readlink checks with a not-a-symlink check plus a cmp against the current palette (test/cli:612-619 on quattro). That is why this branch now conflicts.

What was checked: the diff read against quattro at 060c57b and against bin/omarchy-theme-set-vscode there. Nothing was run on a worker, because the stale assertions are already gone from quattro, so there is nothing left for this branch to reproduce against. The second opinion (Codex Medium) reached the same conclusion; independence is not guaranteed, since it can read this review's working notes.

One assertion here is not on quattro: .contributes.themes[0]._watch == true, which matches what bin/omarchy-theme-set-vscode:97 writes. Codex flagged it as worth keeping. It checks the manifest flag only, not that a live reload happens.

Next step is the maintainer's: close this as fixed by #14259, or keep the _watch check, which would mean reducing this branch to that one assertion on top of current quattro.

@SorenHJohansen SorenHJohansen changed the title Fix stale VS Code theme assertions in test/cli Assert the generated VS Code theme extension sets _watch Oct 8, 2026
@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Adds assertions to an existing test suite.

This test-only change appears safe to merge.

What we checked:

  • New check matches generated theme: The test calls omarchy-theme-set-vscode, which writes exactly one theme with _watch set to true.

Summary

Adds a check in test/cli that the generated VS Code theme declares _watch: true.

  • The check matches what omarchy-theme-set-vscode already writes.
  • The palette-copy and obsolete-marker checks are unchanged in this diff.
  • No actionable issues found. Tests were not run.

Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'upstream/q..." · Reviewed by Greptile

@omarchybot omarchybot added enhancement New feature or request and removed bug Something isn't working labels Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants