Uh oh!
There was an error while loading. Please reload this page.
fix(ui-css): clean renderer css hygiene - #480
Merged
Merged
Conversation
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 freeto 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
postcssdev dependency.apps/desktop/src/renderer, so future sibling CSS files are covered automatically.nav-sidebar.csstext that strict CSS parsers reject.[data-theme]selectors and ineffective font token self-references, with narrow regression guards for both patterns.Why
Part of #476. This is PR1 from the shared post-#430 cleanup roadmap and does not close#476.
The immediate bug is that
styles/settings/nav-sidebar.csscontains dangling plain text that Tailwind currently tolerates but a strict CSS parser rejects. The same hygiene pass also removes selectors and declarations that never affect runtime behavior, then pins those removals so the bad patterns do not return silently.Scope
Changed:
apps/desktop/src/main/__tests__/renderer-css-parse-contract.test.tsadds a strict parse contract over every renderer CSS file and guards against retiredhtml[data-theme...]selectors plus self-referential font tokens.apps/desktop/src/renderer/styles/settings/nav-sidebar.cssremoves the dangling partial text line.apps/desktop/src/renderer/styles/theme-glass.cssremoves unreachablehtml[data-theme="..."]rules.apps/desktop/src/renderer/maka-tokens.cssremoves--font-sans/--font-monoself-references.apps/desktop/package.json/package-lock.jsondeclarepostcss@8.5.15directly for the new contract.Not included:
@layerstrategy changes.!important/ input ring-reset changes.module-pages.csssplit.Verification
npm run -w @maka/desktop build:mainnode --test apps/desktop/dist/main/__tests__/renderer-css-parse-contract.test.js(red before fix:nav-sidebar.css:822 Unknown word inputs; final run: 3 tests pass)html[data-theme = "dark"]failed the retired selector assertion; re-adding--font-sans: var( --font-sans );failed the self-reference assertion.node --test apps/desktop/dist/main/__tests__/renderer-tailwind-compile-contract.test.jsnpm run -w @maka/desktop build:renderer(passes; existing Vite chunk size warning remains)npm run -w @maka/desktop test(1706 tests pass)User-facing impact
None expected. This removes invalid dangling text, unreachable selectors, and no-op token declarations.
Reviewer notes
Addressed review feedback by removing the hand-written CSS file list and adding regression assertions for the retired patterns, including CSS-equivalent spaced forms. GitHub Checks are still not providing CI evidence on this PR, so the verification above is local.