Skip to content

feat(cli): classmap-aware support reporting and migration tooling#3896

Closed
afonsojramos wants to merge 15 commits into
feat/spotify-version-support-gatefrom
feat/classmap-aware-support
Closed

feat(cli): classmap-aware support reporting and migration tooling#3896
afonsojramos wants to merge 15 commits into
feat/spotify-version-support-gatefrom
feat/classmap-aware-support

Conversation

@afonsojramos

Copy link
Copy Markdown
Member

What

Stacked on #3895. Builds the classmap-aware layer on top of the version gate, toward the v3 goal of per-version, saved-across-versions mapping:

  1. Classmap model (src/utils/classmap.go): nested semantic-path -> hashed-class tree with validation, resolution, and leaf counting, matching the @delu/tailor / spicetify/classmaps shape. Lookup walks search roots in documented order (binary dir, then config dir); within a root, classmap.json wins over classmap-*.json globs.
  2. Schema v2 + spicetify support: supported-versions.json gains optional per-version map metadata (maps, default_map_status), and a new spicetify support [version] command reports allowlist status, classmap key, map status, and local classmap presence. An unavailable list renders as unknown rather than not allowlisted, matching the gate's fail-open stance.
  3. Window widening: support range extends to 1.2.70-1.2.93 as its own commit.
  4. Migration tooling (scripts/), dev-only:
    • classmap_capture.py: migrates a base classmap to a new target using CSS signature similarity + css-map semantic fit, with false-friend rejection (e.g. actionBar can never satisfy a playbar path), evidence-based confidence labels, and explicit stale markers for leaves that keep their old hash.
    • classmap_cdp_verify.mjs: verifies a classmap against a live Spotify client over CDP (hash + semantic modes, optional UI navigation). Requires Node >= 22, paths via --out-dir or explicit flags.
    • classmap_e2e.sh: orchestrates migrate -> static verify -> CDP verify. Enables remote debugging by appending --remote-debugging-port to existing spotify_launch_flags (no --remote-allow-origins=*), and restores the original config-xpui.ini on exit, including on Ctrl-C/SIGTERM. Applied (non-stock) xpui.spa copies are detected and never used as a migrate source.

Test plan

  • go test ./...: classmap validation/resolution, multi-root precedence (root order beats glob names, within-root preference), schema v2 negatives (bad status, bad key, duplicate normalized keys), support report with maps, list-unavailable reporting.
  • python3 -m unittest scripts.test_classmap_capture: 14 tests covering the hash heuristic, semantic false friends, identity/stale handling, and the CSS-evidence rules.
  • Manually verified spicetify support for supported, unsupported, and missing-list cases.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e58e8f95-5017-4ebe-bbf6-54dedbf7271c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/classmap-aware-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@afonsojramos
afonsojramos deleted the branch feat/spotify-version-support-gate July 21, 2026 23:51
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.

1 participant