Uh oh!
There was an error while loading. Please reload this page.
refactor(ui-css): split module styles - #487
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
apps/desktop/src/renderer/styles/module-pages.cssinto focused module-page child stylesheets understyles/module-pages/.styles/module-pages/to their real owners: field focus, SettingsSelect, chat header, model switcher, and shared.detailPanechrome.module-pages.cssas the same renderer import slot, now only an ordered module-page import manifest.styles/module-pages/again, including mixed comma selector lists.Why
Refs #476.
PR1 made renderer CSS parseable and PR2 settled the cascade / bare-field reset path. This PR takes the next CSS hygiene step:
module-pages.csswas still a 2141-line mixed-domain stylesheet. Splitting it by ownership makes future CSS changes easier to review without changing the visual design.Scope
Changed:
apps/desktop/src/renderer/styles/module-pages.cssnow imports only true module-page child styles in a fixed order.apps/desktop/src/renderer/styles/module-pages/plan-reminders.cssowns plan reminder styles.apps/desktop/src/renderer/styles/module-pages/capability-audit.cssownsCapabilityAuditStripstyles.apps/desktop/src/renderer/styles/module-pages/module-shell.cssowns.maka-module-*shell styles.apps/desktop/src/renderer/styles/module-pages/skills.cssowns skill module styles.apps/desktop/src/renderer/styles/field-focus.cssowns the shared renderer field focus rule from PR2.apps/desktop/src/renderer/styles/settings-select.cssowns the sharedSettingsSelect/ grouped select menu chrome.apps/desktop/src/renderer/styles/chat-header.cssnow owns the.maka-chat-header*and chat status cluster rules.apps/desktop/src/renderer/styles/model-switcher.cssowns the.maka-model-switcher*trigger chrome.apps/desktop/src/renderer/styles/base.cssowns shared.detailPanesizing/overflow chrome.apps/desktop/src/main/__tests__/renderer-module-styles-contract.test.tspinsmodule-pages.cssas an ordered import manifest and rejects global/shared/chat/model/select selectors understyles/module-pages/**, including mixed comma selector lists.apps/desktop/src/main/__tests__/renderer-important-audit-contract.test.tsnow points the existing allowlist checks at the moved owner files.Not included:
Verification
renderer-module-styles-contract.test.jsfailed before the split becausemodule-pages.csshad no child imports and still contained selector rules.field-focus.css,chat-header-bridge.css,model-switcher.css,.settingsSelect*, and.detailPaneunderstyles/module-pages/**..foreign-owner, .maka-plan-card { ... }passed under the whole-rule.selectorcheck; after splitting withpostcss.list.comma, the same fixture fails on.foreign-owner, while.maka-plan-a, .maka-plan-b { ... }passes.origin/mainafter fix(ui): visual audit round — list bullets, artifact toolbar, disclosure affordance #488 and mapped its oldmodule-pages.css.maka-skill-featured-artadjustment intostyles/module-pages/skills.css.main:apps/desktop/src/renderer/styles/module-pages.cssand the expanded split CSS with PostCSS; both had 1174 declarations, with 0 missing and 0 added.node ../../worktree-bootstrap.mjs(inside the worktree; links@maka/*to this checkout and runsnpm run rebuild)refactor(ui-css): move shared styles to true owners:npm run -w @maka/desktop build:main && node --test apps/desktop/dist/main/__tests__/renderer-module-styles-contract.test.js apps/desktop/dist/main/__tests__/renderer-important-audit-contract.test.js apps/desktop/dist/main/__tests__/renderer-css-parse-contract.test.js apps/desktop/dist/main/__tests__/renderer-tailwind-compile-contract.test.jstest(ui-css): guard module style ownership:npm run -w @maka/desktop build:main && node --test apps/desktop/dist/main/__tests__/renderer-module-styles-contract.test.jstest(ui-css): split module owner selector lists:npm run -w @maka/desktop build:main && node --test apps/desktop/dist/main/__tests__/renderer-module-styles-contract.test.js apps/desktop/dist/main/__tests__/renderer-css-parse-contract.test.js apps/desktop/dist/main/__tests__/renderer-tailwind-compile-contract.test.js apps/desktop/dist/main/__tests__/renderer-important-audit-contract.test.jsnpm --workspace @maka/ui run build && npm run -w @maka/desktop build:main && node --test apps/desktop/dist/main/__tests__/renderer-module-styles-contract.test.js apps/desktop/dist/main/__tests__/renderer-css-parse-contract.test.js apps/desktop/dist/main/__tests__/renderer-tailwind-compile-contract.test.js apps/desktop/dist/main/__tests__/renderer-important-audit-contract.test.js apps/desktop/dist/main/__tests__/renderer-style-layer-cascade-contract.test.js apps/desktop/dist/main/__tests__/capability-audit-ui-contract.test.js(19 tests pass)node --test apps/desktop/dist/main/__tests__/renderer-css-parse-contract.test.js apps/desktop/dist/main/__tests__/renderer-tailwind-compile-contract.test.js apps/desktop/dist/main/__tests__/renderer-important-audit-contract.test.js apps/desktop/dist/main/__tests__/renderer-style-layer-cascade-contract.test.js apps/desktop/dist/main/__tests__/renderer-module-styles-contract.test.jsnpm run -w @maka/desktop build:renderer(passes; existing Vite chunk-size warning remains)node scripts/capture-screenshots.mjs --scenario module-skills --variant light-1280-motionnode scripts/capture-screenshots.mjs --scenario plan-reminders --variant light-1280-motionnode scripts/capture-screenshots.mjs --scenario provider-workspace --variant light-1280-motionnpm run -w @maka/desktop test(1721 tests pass)User-facing impact
No visual change intended. This is a CSS ownership split plus review fix. The declaration-equivalence checks and targeted screenshots above cover the affected module, capability audit, shared select, chat header, and model-switcher surfaces.
Reviewer notes
Commits are split by rollback reason:
refactor(ui-css): split module stylessplits the old catch-all stylesheet into initial focused files.refactor(ui-css): move shared styles to true ownersaddresses review feedback by moving global/shared/chat/model/select rules out ofstyles/module-pages/**.test(ui-css): guard module style ownershipaddresses review feedback by adding an owner-scoped contract for module-page child styles.test(ui-css): split module owner selector listsaddresses review feedback by validating each comma-separated selector independently.chore: merge main into module styles splitabsorbs fix(ui): visual audit round — list bullets, artifact toolbar, disclosure affordance #488 and keeps its oldmodule-pages.cssvisual fix under the newstyles/module-pages/skills.cssowner.