mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2953] [Issue]: Theme JSON import says 'No valid themes found' with no clue what was wrong #1529
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1529
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Jun 28, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2953
Originally assigned to: @SpicyMarinara on GitHub.
What's wrong
When you import a theme JSON file, entries that parse but have an empty/missing
cssfield, or the wrong shape, are dropped silently — they aren't counted as skipped or failed. So if every entry is like that, you get the generic toast "No valid themes found in file." even though the JSON parsed fine, with no hint that thecsswas the problem. The extension importer, by contrast, reports per-entry reasons, so this is an inconsistency that leaves theme-import users guessing.How to reproduce (try it yourself)
theme.json={"name":"X","css":""}(or{"foo":"bar"}).You'll see: toast "No valid themes found in file." with no indication that the
csswas empty/missing or the shape was wrong.Expected: a per-entry diagnostic like "1 theme skipped — empty/missing css", the way the extension importer reports skips.
Where it is
packages/client/src/components/panels/SettingsPanel.tsx—handleImportThemeFile, the JSON branch at lines 3417-3442. The barecontinueat 3419 (non-object / wrong shape) and at 3424 (empty css) drop entries without incrementingskippedorfailed, soimported/skipped/failedall stay 0 and collapse into the generic toast at line 3470. (Duplicates, at 3426, are counted — only the empty-css and wrong-shape cases are silent.) Contrast the extension importer (~3960-4011), which tracksskippedplusfailureMessages.What's happening
Those two
continues drop entries without counting them, and there's no per-entry message channel like the extension importer has, so the summary can't say what went wrong.Suggested fix
Count and surface skipped entries with reasons (empty css, wrong shape) in the summary toast, mirroring the extension importer's
failureMessageshandling.AI-investigated against v2.0.6; cited lines read. Please confirm before fixing.
@SpicyMarinara commented on GitHub (Jun 28, 2026):
Fixed on staging: theme JSON import now counts and reports wrong-shape entries, missing/empty CSS, duplicates, and per-entry failures instead of only showing the generic no-valid-themes toast.