Repository navigation
Preserve theme data and fix capture, comparison, and workflow correctness - #85
Merged
Merged
Conversation
…ach OS The PR preview publisher spliced the workflow_dispatch run_id input straight into a shell script, so whatever a person typed into that box ran as shell. The step now receives both the manual input and the workflow_run ID through the environment, accepts only a plain number, and never echoes the value into the log. Tests run the step under bash with hostile inputs and check that no shell step in the generated publisher interpolates an expression. The unit test job now runs the whole suite on macOS and Windows as well as on each supported Python on Linux, which also covers everything the separate profile-recovery subset did, so that job is folded in. The blob hash test asked git for a hash through the working-tree filters, so core.autocrlf=input made it a test of the developer's git configuration; it now asks for the unfiltered reading under every autocrlf setting. The README says the unit tests need the [images] extra and why. Co-Authored-By: Claude Fable 5.1 <[email protected]>
user.js is now read and written as bytes (surrogateescape), so non-UTF-8 bytes, CRLF/CR endings and a missing final newline survive install, upgrade, rollback and uninstall exactly. Marker lines in a theme's configuration/user.js are neutralised so they can no longer end the block early and stack prefs on every reinstall. Import-site search now skips commented-out @imports and respects strings. Selected optional sheets bring their local nested @imports and url() files along to the same relative place, bounded and confined to the theme and chrome/; anything not carried along is recorded in `sheet_notes` and printed. `fxcss install` lists the theme's pref names before confirming. Co-Authored-By: Claude Opus 5.5 <[email protected]>
compare_view scaled each screenshot to the 960px panel width before diffing, so LANCZOS blended a 1px border on a 1280px capture, or a 1 CSS px border at DPR 2, under the noise threshold and the view read as identical. Each side was also scaled by its own factor, so captures of different widths differed across their whole shared region. Diff the padded captures at their own resolution, then scale both sides by one factor for the panels and shrink the mask so any changed capture pixel keeps its panel pixel. Change pictures take their mask from the full-resolution crop the same way. Box and frame stay in panel coordinates, so grouping, layout placement and the preview comment are unchanged; changed_pixels and total_pixels are now capture pixels. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e names distinct identities build_profile and reload_theme wrote the fxcss placeholder over a customChrome.css the theme itself ships, so previews lacked part of the theme that install keeps. Both now only create the placeholder when the theme has none. find_variant_sheets let a later sheet silently replace an earlier one with the same slug. Sheets in different folders are now told apart by folder (custom-tabs, optional-tabs); sheets in one folder that differ only in case or punctuation raise a ValueError naming both files, which tweaks, init, shot and check report as an error and shell completion swallows. Live captures whose URLs differ only in scheme, www., query, fragment or a truncated path shared a slug and overwrote each other. A new live_capture_names allocator keeps unique names as they were and numbers clashing URLs in request order without taking a name another URL holds. Co-Authored-By: Claude Fable 5.1 <[email protected]>
adamXbot
force-pushed
the
fix/review-round-two
branch
from
October 30, 2026 05:25
1ebe0c9 to
4e3ffba
Compare
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
Fix correctness and data-preservation issues found in two independent codebase review rounds. Theme installation now preserves existing
user.jsbytes and local stylesheet dependencies, captures preserve theme-provided CSS and use distinct filenames, and image comparisons measure changes before resizing so thin borders are detected without introducing false changes when image widths differ.customChrome.cssin previews and reloads, retain empty startup stylesheets for watch/audit, disambiguate variant and live-capture names, and prevent tweaks images from overwriting the baseline or diff panels. Fix Windows catalogue opening and Markdown table escaping.Validation
git diff --check, CLI help smoke check, and Python 3.9 grammar parsing of all 19 source modules pass.Behavior changes and limits
Image counts now use capture pixels. Checks can correctly fail on thin borders that previously disappeared during resizing. Cross-folder variant collisions receive folder-qualified names; ambiguous names within one folder are rejected with an actionable error. Unsupported stylesheet dependency references are reported; CSS URL escapes and dependencies embedded inside non-CSS files are not followed.
Detailed capture-failure reasons, catalogue label mapping, and platform-aware baseline handling remain follow-ups.