fix(theme): support tweakcn registry json imports#107
Merged
Conversation
This was referenced May 21, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for importing tweakcn themes from shadcn registry JSON (in addition to the existing CSS export format), and wires the import modal to accept/paste/drag-drop JSON input.
Changes:
- Introduces
parse_blocks_or_jsonand a JSON registry parser that extractscssVars.light/cssVars.darkOKLCH tokens. - Refactors OKLCH parsing into shared helpers used by both CSS and JSON paths.
- Updates the import modal to route parsing through the CSS-or-JSON entrypoint and accept
.jsonfiles via drag/drop.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/src/themes/tweakcn_import.rs | Adds registry JSON parsing and shared OKLCH/CSS-decls parsing helpers plus tests. |
| app/src/settings_view/import_theme_modal.rs | Switches parsing to CSS-or-JSON and extends drag/drop to accept .json. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
cssVars.light/cssVars.darkthemes.jsondrag/dropmainCloses #91.
Closes #92.
Supersedes #99.
Supersedes #106.
Verification
./script/check_ai_attribution./script/check_rebrandgit diff --checkcargo test -p warp-app themes::tweakcn_import --features local_fscargo check -p warp-app --bin cast-codes --features gui