Add mach commands for the desktop-theme skills' token, contrast and pixel-diff scripts
Categories
(Developer Infrastructure :: General, task)
Tracking
(firefox162 fixed)
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
(Blocks 2 open bugs)
Details
Attachments
(3 external files)
Following up on Tim's comment on https://phabricator.services.mozilla.com/D325615: some of the scripts bug 2071613 bundled with the desktop-theme skills answer questions engineers ask without an agent. Move them out of .claude/skills/ and give each a mach command, with the skills calling the commands:
desktop-theme-tokens/scripts/token-resolve.py: what a design token resolves to per platform, theme and forced-colors state, and which resolved values a.tokens.jsonedit changes. It could sit beside./mach buildtokens.desktop-theme-colors/scripts/contrast.pyandpair-walk.py: WCAG contrast and system-color pair checks for a selector across states, in a running build. They launch Firefox throughdesktop-theme-probing/scripts/probelib.py, which moves with them.desktop-theme-screenshots/scripts/pixel-diff.py: whether two screenshots differ, and where.
Which of the skills' other scripts could back CI checks is a separate question.
| Assignee | ||
Updated•14 days ago
|
| Assignee | ||
Comment 1•14 days ago
|
||
A move with only the import paths fixed. The dashed names take underscores so the mach command in the next patch can import them; screen-grab.py moves too, since probelib.run_steps() runs it from its own directory.
The skills cite the old paths until the last patch of this bug points them at ./mach theme.
Updated•14 days ago
|
| Assignee | ||
Comment 2•14 days ago
|
||
tokens passes its arguments through because token names start with --; the other subcommands parse with the script's own parser, so --help lists its flags. contrast's and pairs' --context becomes --realm, the skills' word for chrome versus content, because mach passes its own context to every handler. pixel-diff's exception handler moved into run() so an error under mach still exits 2 rather than 1, which means the captures differ.
| Assignee | ||
Comment 3•14 days ago
|
||
firefox-probe.py's --context becomes --realm too, to match contrast and pairs.
| Assignee | ||
Updated•9 days ago
|
Comment 6•9 days ago
|
||
Backed out for causing failures at system-color-pairs.md.
Backout link: https://hg.mozilla.org/integration/autoland/rev/818e9d60469d
Failure log: https://treeherder.mozilla.org/logviewer?job_id=606402909&repo=autoland&task=DwpLsndJS02n-NthDdS9eQ.0
| Assignee | ||
Updated•9 days ago
|
Comment 8•9 days ago
|
||
| bugherder | ||
| Assignee | ||
Updated•7 days ago
|
Comment 10•7 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ec0ea19774b4
https://hg.mozilla.org/mozilla-central/rev/1cac99acfe53
Comment 11•7 days ago
|
||
| bugherder | ||
Description
•