Uh oh!
There was an error while loading. Please reload this page.
refactor(ui): govern all border-radius via --radius-* tokens (#406 gap 4) - #418
Merged
Conversation
Astro-Han added a commit
that referenced
this pull request
Jul 2, 2026
…l scan, value pinning Address code review on PR #418: - P2: replace permissive --radius-* regex with explicit whitelist (control/surface/modal/pill + button/sm/md/lg/xl aliases); typos and private tokens now fail the contract - P2: scan border-{top,bottom}-{left,right}-radius longhand and rounded-{t,tr,tl,b,br,bl,l,r}-[...] directional utilities, not just shorthand and rounded-[...] - P2: pin each canonical token's resolved px value (6/8/12/999) so a silent edit of --radius-modal is caught - P3: collapse CSS collection to a single readAllRendererCss() entry — it already recursively unfolds styles.css imports (which include maka-tokens.css and the styles/ tree); remove the duplicate scans - P3: sync the stale header comment (was '8px modal / 10px code block', now matches docs/design-system.md §1.4: surface 8px, modal 12px)
Astro-Han added a commit
that referenced
this pull request
Jul 2, 2026
…contract test Address code review round 2 on PR #418: P2: Button/Input/Toggle/SelectItem/TabsTrigger used rounded-md/rounded-lg (surface 8px) but are control components — must use rounded-sm (control 6px). Migrate all control components in packages/ui to rounded-sm; surface components (TabsList, SelectPopup, ToggleGroup, Item, Menu popup, Alert, Toolbar, EmptyState) keep rounded-md. input/textarea/input-group primitives also move to rounded-sm with calc(var(--radius-sm)-1px) inner ring. session-list-panel nav rows and row actions move to rounded-sm. P2: ALLOWED_ROUNDED_ARBITRARY and CALC_TOKEN_RE only matched the shape --radius-* without checking the whitelist. Extract isWhitelistedVar() and isWhitelistedCalc() that both validate against RADIUS_TOKEN_WHITELIST. CSS var(), CSS calc(), TSX rounded-[var(...)], and TSX calc(...) now share one validation path. Add negative-case tests: typos (var(--radius-modla)) and private tokens (var(--radius-private)) must fail in both var() and calc() contexts. P3: Collapse collectTsxOffenders into a single pass (was called twice). Remove docs/design-system.md text-content assertion (not a production behavior check). Remove redundant >12px CSS test (covered by whitelist + value pinning). Contract is now 4 focused tests: CSS whitelist, TSX whitelist, control-class usage, token value pinning.
Astro-Han added a commit
that referenced
this pull request
Jul 2, 2026
…, logical radius Address code review round 3 on PR #418: P2: Badge was classified as control (6px) but docs/design-system.md §1.4 requires badge to use --radius-pill (999px). Both Badge implementations (packages/ui/src/ui.tsx and packages/ui/src/primitives/badge.tsx) moved to rounded-[var(--radius-pill)]. Contract updated to assert Badge uses pill tier, not control. P2: control contract only banned rounded-md/lg (negative check) but did not positively assert the expected class. Replace with a COMPONENT_RADIUS table that maps each component to its expected tier (control/surface/pill) and asserts both presence of the correct class and absence of wrong-tier classes. A control component using rounded-[var(--radius-surface)] now fails. P2: calc() only validated token whitelist, not direction. calc(var (--radius-modal) + 20px) would pass and break the 12px cap. isWhitelisted Calc now rejects +Npx addition and multipliers > 1; only subtraction (inner-ring shrink like calc(var(--radius-sm) - 1px)) passes. Negative cases added. P2: TSX regex missed Tailwind logical radius utilities (rounded-s/se/ ee-[...]) and CSS regex missed logical longhand (border-start-start- radius etc.). Both scan paths extended with s/e/ss/se/es/ee and logical properties. P3: Removed packages/ui/src/primitives/textarea.tsx from control contract — it has zero production imports (dead primitive, gap 1 cleanup target). Adding test dependencies on dead modules cements them. input.tsx and input-group.tsx kept (still imported by search-modal.tsx and index.ts).
Astro-Han added a commit
that referenced
this pull request
Jul 2, 2026
… match guard Address code review round 4 on PR #418: P2: .maka-code used --radius-control (6px) and .maka-skeleton-card used --radius-modal (12px) with a stale comment referencing the old 'cards 12, modals 16-18' scale. Both are surface elements per docs/design-system.md §1.4 — code block and card both map to --radius-surface (8px). Fixed both declarations and deleted the stale comment. Added a selector contract that asserts these two classes use var(--radius-surface). P2: checkComponentTier() silently passed when its regex matched 0 blocks, giving false confidence. InputPrimitive was such a case — the file exports 'function Input', not 'InputPrimitive'. Added a matched counter; 0 matches now reports 'stale contract entry or renamed component'. Removed the dead primitives/input.tsx entry (zero production imports, gap 1 deletion target). P2: isWhitelistedCalc was a blacklist (rejected +Npx and *[2-9]), leaving gaps like *1.5, /0.5, and --1px. Replaced with a positive allowlist regex: only calc(var(--radius-whitelisted) - <positive>px) passes. Added negative cases for multiplication, division, double-negative, and zero subtraction. P3: Removed primitives/input.tsx from COMPONENT_RADIUS — it is a dead shadcn leftover with zero production imports. Keeping it in the contract would cement a module slated for deletion.
Astro-Han added a commit
that referenced
this pull request
Jul 2, 2026
…tract Address code review round 5 on PR #418: P2: .settingsPermissionRefresh (covers shared Button) used --radius-surface (8px) — Button is control, changed to --radius-control (6px). .settingsCapabilityGuidanceActions code (block code) used --radius-control (6px) — block code is surface, changed to --radius-surface (8px). P2: Component tier contract lacked modal tier — DialogPopup uses rounded-xl (modal 12px) but was not covered. Added 'modal' to Tier union and TIER_CLASS map, added DialogPopup to COMPONENT_RADIUS. Expanded selector contract to cover .maka-composer-inner (modal), .settingsPermissionRefresh (control), and .settingsCapabilityGuidanceActions code (surface). Verified: --radius-button has 3 production call sites in maka-tokens.css (lines 840, 866, 1604) — not a dead alias, kept in whitelist.
Astro-Han added a commit
that referenced
this pull request
Jul 2, 2026
… --radius-button Address code review round 6 on PR #418: P2: TSX scanner missed Tailwind rounded-(...) shorthand (e.g. rounded-(--thumb-size) in menu.tsx) and rounded-4xl+ utilities. Extended ROUNDED_RE to cover rounded-(...), directional/logical rounded-*- (...) and rounded-[2-9]xl. Added negative-case tests for rounded-(--private), rounded-se-(--private), rounded-4xl, rounded-9xl. Non-radius custom properties like --thumb-size are exempt (not --radius-* tokens). P2: Component tier contract only checked class names, not arbitrary/calc token references inside the block. InputGroup (control) had **:[textarea_button]:rounded-[calc(var(--radius-md)-1px)] — a surface token inside a control component. Fixed to --radius-sm. Contract now extracts every --radius-* reference in the component block and validates against TIER_TOKENS[expectedTier]. A control component using --radius-md/surface now fails. P3: --radius-button was a --radius-control alias with 3 production call sites (.maka-sidebar-row, .maka-sidebar-button, line 1604 button). All 3 migrated to --radius-control directly. Deleted the alias definition, docs reference, whitelist entry, and alias value pinning. Added a stale-reference contract test that asserts --radius-button appears nowhere in renderer CSS or maka-tokens.css. Verified: zero grep hits across the entire codebase.
Astro-Han added a commit
that referenced
this pull request
Jul 2, 2026
…can, thumb-size cleanup Address code review round 7 on PR #418 with a full-repo tier audit instead of point-fixing only reported selectors. Audit method: grepped every border-radius: var(--radius-*) declaration across all renderer CSS (~200 sites), judged each against the four-tier system (control 6px / surface 8px / modal 12px / pill 999px), and fixed all 26 mismatched selectors in one pass. Tier fixes (26 selectors): modal→surface: .settingsPermissionIntro, .settingsPermissionError, .settingsCapabilityRow, .settingsOsPermissionList, .settingsHealthIntro, .settingsHealthError, .settingsBotList button, .settingsBotHero, .settingsBotStatusGrid div, .settingsRows, .settingsNotice, .settingsAboutLogo, .settingsAboutPrivacy, .settingsWechatQrFrame, .settingsWechatQrState, .providerUnavailableNotice, .maka-firstrun-list, .maka-first-run-checklist, .providerLogo, .maka-turn[search-highlight] surface→modal: .settingsModal, .maka-palette-modal modal→control: .maka-onboarding-quickchat-submit, .enabledEmptyChip, .maka-browser-address surface→control: .settingsWechatQrClose Selector contract expanded from 5 to 28 entries, covering every selector that was wrong in the audit. The contract now catches any future tier drift on these high-value selectors. TSX scanner: extended ROUNDED_RE to cover directional/logical scale classes (rounded-s-2xl, rounded-t-3xl, rounded-se-4xl, etc.). Added negative cases. menu.tsx: rounded-(--thumb-size) was a non-radius custom property exempt from token governance. The thumb is a square element that morphs to a rounded shape on active — rounded-full is the correct static state (a square with border-radius == side length IS a circle). Removed the --thumb-size exemption from the contract. Existing tests updated: permissions-unified-card-contract (list 12→8px surface), command-palette-a11y-copy-contract (palette 8→12px modal).
Astro-Han added a commit
that referenced
this pull request
Jul 2, 2026
…humb-size exception Address code review round 8 on PR #418: P2: .settingsHealthRefresh (Button override) used --radius-surface, changed to --radius-control (consistent with .settingsPermissionRefresh). P2: 5 card/panel selectors used --radius-control but are surface elements: .maka-plan-shell (page card), .maka-daily-review-panel, .maka-daily-review-info, .maka-daily-review-archive-body (daily review cards), .settingsPermissionSummaryTile (summary tile). All changed to --radius-surface. P2: selector-tier contract upgraded from presence-check to all-blocks-must-match semantics. Every border-radius in every matching block for each listed selector must equal the expected token. A stale entry (selector not found) also fails. Added the 6 newly-fixed selectors to the contract (now 34 entries). P3: --thumb-size morph animation exception deleted. The active-state morph value rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.10)] is replaced with rounded-full — the thumb is always circular (a square with border-radius == side length is a circle), so border-radius animation is unnecessary. No exceptions remain in the TSX scanner.
…p 4) Migrate every hardcoded border-radius literal (Npx) in renderer CSS and every rounded-[Npx] arbitrary value in TSX to the token system (--radius-control 6px / --radius-surface 8px / --radius-modal 12px / --radius-pill 999px). Delete the --card-radius and --agents-content-area-radius intermediate variables; their call sites now reference the canonical tokens directly. Intermediate values (2/3/4/5/7/9/10px) collapse to the nearest component-type tier: button/input/chip/kbd/inline-code → control, card/popover/code-block/toast/notice/table → surface, modal/composer → modal, pill/badge/dot → pill. Non-symmetric shorthand (e.g. blockquote 0 8px 8px 0) now uses per-corner token references. The radius-converge-contract test now scans the full CSS and TSX source tree, banning any bare Npx border-radius or rounded-[Npx] that is not a var(--radius-*) reference (0/50%/inherit/initial exempt). Six existing contract tests that asserted literal Npx values are updated to assert the token references. Closes#406 gap 4.
…l scan, value pinning Address code review on PR #418: - P2: replace permissive --radius-* regex with explicit whitelist (control/surface/modal/pill + button/sm/md/lg/xl aliases); typos and private tokens now fail the contract - P2: scan border-{top,bottom}-{left,right}-radius longhand and rounded-{t,tr,tl,b,br,bl,l,r}-[...] directional utilities, not just shorthand and rounded-[...] - P2: pin each canonical token's resolved px value (6/8/12/999) so a silent edit of --radius-modal is caught - P3: collapse CSS collection to a single readAllRendererCss() entry — it already recursively unfolds styles.css imports (which include maka-tokens.css and the styles/ tree); remove the duplicate scans - P3: sync the stale header comment (was '8px modal / 10px code block', now matches docs/design-system.md §1.4: surface 8px, modal 12px)
…contract test Address code review round 2 on PR #418: P2: Button/Input/Toggle/SelectItem/TabsTrigger used rounded-md/rounded-lg (surface 8px) but are control components — must use rounded-sm (control 6px). Migrate all control components in packages/ui to rounded-sm; surface components (TabsList, SelectPopup, ToggleGroup, Item, Menu popup, Alert, Toolbar, EmptyState) keep rounded-md. input/textarea/input-group primitives also move to rounded-sm with calc(var(--radius-sm)-1px) inner ring. session-list-panel nav rows and row actions move to rounded-sm. P2: ALLOWED_ROUNDED_ARBITRARY and CALC_TOKEN_RE only matched the shape --radius-* without checking the whitelist. Extract isWhitelistedVar() and isWhitelistedCalc() that both validate against RADIUS_TOKEN_WHITELIST. CSS var(), CSS calc(), TSX rounded-[var(...)], and TSX calc(...) now share one validation path. Add negative-case tests: typos (var(--radius-modla)) and private tokens (var(--radius-private)) must fail in both var() and calc() contexts. P3: Collapse collectTsxOffenders into a single pass (was called twice). Remove docs/design-system.md text-content assertion (not a production behavior check). Remove redundant >12px CSS test (covered by whitelist + value pinning). Contract is now 4 focused tests: CSS whitelist, TSX whitelist, control-class usage, token value pinning.
…, logical radius Address code review round 3 on PR #418: P2: Badge was classified as control (6px) but docs/design-system.md §1.4 requires badge to use --radius-pill (999px). Both Badge implementations (packages/ui/src/ui.tsx and packages/ui/src/primitives/badge.tsx) moved to rounded-[var(--radius-pill)]. Contract updated to assert Badge uses pill tier, not control. P2: control contract only banned rounded-md/lg (negative check) but did not positively assert the expected class. Replace with a COMPONENT_RADIUS table that maps each component to its expected tier (control/surface/pill) and asserts both presence of the correct class and absence of wrong-tier classes. A control component using rounded-[var(--radius-surface)] now fails. P2: calc() only validated token whitelist, not direction. calc(var (--radius-modal) + 20px) would pass and break the 12px cap. isWhitelisted Calc now rejects +Npx addition and multipliers > 1; only subtraction (inner-ring shrink like calc(var(--radius-sm) - 1px)) passes. Negative cases added. P2: TSX regex missed Tailwind logical radius utilities (rounded-s/se/ ee-[...]) and CSS regex missed logical longhand (border-start-start- radius etc.). Both scan paths extended with s/e/ss/se/es/ee and logical properties. P3: Removed packages/ui/src/primitives/textarea.tsx from control contract — it has zero production imports (dead primitive, gap 1 cleanup target). Adding test dependencies on dead modules cements them. input.tsx and input-group.tsx kept (still imported by search-modal.tsx and index.ts).
… match guard Address code review round 4 on PR #418: P2: .maka-code used --radius-control (6px) and .maka-skeleton-card used --radius-modal (12px) with a stale comment referencing the old 'cards 12, modals 16-18' scale. Both are surface elements per docs/design-system.md §1.4 — code block and card both map to --radius-surface (8px). Fixed both declarations and deleted the stale comment. Added a selector contract that asserts these two classes use var(--radius-surface). P2: checkComponentTier() silently passed when its regex matched 0 blocks, giving false confidence. InputPrimitive was such a case — the file exports 'function Input', not 'InputPrimitive'. Added a matched counter; 0 matches now reports 'stale contract entry or renamed component'. Removed the dead primitives/input.tsx entry (zero production imports, gap 1 deletion target). P2: isWhitelistedCalc was a blacklist (rejected +Npx and *[2-9]), leaving gaps like *1.5, /0.5, and --1px. Replaced with a positive allowlist regex: only calc(var(--radius-whitelisted) - <positive>px) passes. Added negative cases for multiplication, division, double-negative, and zero subtraction. P3: Removed primitives/input.tsx from COMPONENT_RADIUS — it is a dead shadcn leftover with zero production imports. Keeping it in the contract would cement a module slated for deletion.
…tract Address code review round 5 on PR #418: P2: .settingsPermissionRefresh (covers shared Button) used --radius-surface (8px) — Button is control, changed to --radius-control (6px). .settingsCapabilityGuidanceActions code (block code) used --radius-control (6px) — block code is surface, changed to --radius-surface (8px). P2: Component tier contract lacked modal tier — DialogPopup uses rounded-xl (modal 12px) but was not covered. Added 'modal' to Tier union and TIER_CLASS map, added DialogPopup to COMPONENT_RADIUS. Expanded selector contract to cover .maka-composer-inner (modal), .settingsPermissionRefresh (control), and .settingsCapabilityGuidanceActions code (surface). Verified: --radius-button has 3 production call sites in maka-tokens.css (lines 840, 866, 1604) — not a dead alias, kept in whitelist.
… --radius-button Address code review round 6 on PR #418: P2: TSX scanner missed Tailwind rounded-(...) shorthand (e.g. rounded-(--thumb-size) in menu.tsx) and rounded-4xl+ utilities. Extended ROUNDED_RE to cover rounded-(...), directional/logical rounded-*- (...) and rounded-[2-9]xl. Added negative-case tests for rounded-(--private), rounded-se-(--private), rounded-4xl, rounded-9xl. Non-radius custom properties like --thumb-size are exempt (not --radius-* tokens). P2: Component tier contract only checked class names, not arbitrary/calc token references inside the block. InputGroup (control) had **:[textarea_button]:rounded-[calc(var(--radius-md)-1px)] — a surface token inside a control component. Fixed to --radius-sm. Contract now extracts every --radius-* reference in the component block and validates against TIER_TOKENS[expectedTier]. A control component using --radius-md/surface now fails. P3: --radius-button was a --radius-control alias with 3 production call sites (.maka-sidebar-row, .maka-sidebar-button, line 1604 button). All 3 migrated to --radius-control directly. Deleted the alias definition, docs reference, whitelist entry, and alias value pinning. Added a stale-reference contract test that asserts --radius-button appears nowhere in renderer CSS or maka-tokens.css. Verified: zero grep hits across the entire codebase.
…can, thumb-size cleanup Address code review round 7 on PR #418 with a full-repo tier audit instead of point-fixing only reported selectors. Audit method: grepped every border-radius: var(--radius-*) declaration across all renderer CSS (~200 sites), judged each against the four-tier system (control 6px / surface 8px / modal 12px / pill 999px), and fixed all 26 mismatched selectors in one pass. Tier fixes (26 selectors): modal→surface: .settingsPermissionIntro, .settingsPermissionError, .settingsCapabilityRow, .settingsOsPermissionList, .settingsHealthIntro, .settingsHealthError, .settingsBotList button, .settingsBotHero, .settingsBotStatusGrid div, .settingsRows, .settingsNotice, .settingsAboutLogo, .settingsAboutPrivacy, .settingsWechatQrFrame, .settingsWechatQrState, .providerUnavailableNotice, .maka-firstrun-list, .maka-first-run-checklist, .providerLogo, .maka-turn[search-highlight] surface→modal: .settingsModal, .maka-palette-modal modal→control: .maka-onboarding-quickchat-submit, .enabledEmptyChip, .maka-browser-address surface→control: .settingsWechatQrClose Selector contract expanded from 5 to 28 entries, covering every selector that was wrong in the audit. The contract now catches any future tier drift on these high-value selectors. TSX scanner: extended ROUNDED_RE to cover directional/logical scale classes (rounded-s-2xl, rounded-t-3xl, rounded-se-4xl, etc.). Added negative cases. menu.tsx: rounded-(--thumb-size) was a non-radius custom property exempt from token governance. The thumb is a square element that morphs to a rounded shape on active — rounded-full is the correct static state (a square with border-radius == side length IS a circle). Removed the --thumb-size exemption from the contract. Existing tests updated: permissions-unified-card-contract (list 12→8px surface), command-palette-a11y-copy-contract (palette 8→12px modal).
…humb-size exception Address code review round 8 on PR #418: P2: .settingsHealthRefresh (Button override) used --radius-surface, changed to --radius-control (consistent with .settingsPermissionRefresh). P2: 5 card/panel selectors used --radius-control but are surface elements: .maka-plan-shell (page card), .maka-daily-review-panel, .maka-daily-review-info, .maka-daily-review-archive-body (daily review cards), .settingsPermissionSummaryTile (summary tile). All changed to --radius-surface. P2: selector-tier contract upgraded from presence-check to all-blocks-must-match semantics. Every border-radius in every matching block for each listed selector must equal the expected token. A stale entry (selector not found) also fails. Added the 6 newly-fixed selectors to the contract (now 34 entries). P3: --thumb-size morph animation exception deleted. The active-state morph value rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.10)] is replaced with rounded-full — the thumb is always circular (a square with border-radius == side length is a circle), so border-radius animation is unnecessary. No exceptions remain in the TSX scanner.
Codex review found @maka/ui test suite failed because chat-primitives.test.ts still asserted old literal radius values (rounded-[999px], rounded-[8px]) and dropped utility (rounded-md) after the PR migrated chat.tsx to token references (rounded-[var(--radius-pill)], rounded-[var(--radius-surface)]) and buttonVariants base to rounded-sm. - rounded-[999px] → rounded-[var(--radius-pill)] - rounded-[8px] → rounded-[var(--radius-surface)] - dropped utility check: rounded-md → rounded-sm (buttonVariants base changed)
Review findings (round 9):
P1: checkComponentTier extractor used \nexport lookahead to delimit
component blocks, which is fragile when exports share a line or when no
export follows. Replaced with a brace-matching scanner that tracks the
outermost () for cva/forwardRef calls and skips the parameter () then
matches the body {} for function declarations. Verified: buttonVariants
block no longer contains badgeVariants, ToggleGroup no longer contains
Radio's rounded-full.
P2: .maka-plan-card and .maka-plan-template-strip[data-layout=cards]
.maka-plan-template-card both use --radius-control (6px) but are card
surfaces with border/background/min-height/hover-shadow. Migrated to
--radius-surface (8px). Added both selectors to SELECTOR_TIER contract.
Note: P1-2 (@layer selector matching) verified as not reproducing —
all 34 SELECTOR_TIER selectors match correctly because @layer and
.selector are on separate lines in all CSS files.Codex fresh-eye review found .maka-skill-library still uses --radius-control (6px) despite being a page-level card with background/border/shadow. Migrated to --radius-surface (8px) and added to SELECTOR_TIER contract.
Review round 10:
P2: extractComponentBlock for const declarations scanned for the first
'(' without skipping string literals. String-concat constants like
settingsButtonClass contain 'var(--foreground-60)' inside string
literals, so the extractor mistook that '(' for a function call and
truncated mid-declaration. Fixed: skipStringsToChar() now skips
single/double/backtick string literals. If no real '(' is found before
';', the entire declaration up to ';' is returned. Verified: if
rounded-md were appended to settingsButtonClass, the test would detect it.
P1 (defensive): selector-tier regex relied on (?:^|\n)\s*selector
which works for current CSS but is format-dependent. Added CSS
normalization: insert newlines after '{' and before '}' before matching.
This makes selector matching immune to @layer { .selector on the same
line. All 37 SELECTOR_TIER selectors still match correctly.Review round 11 P2: CSS scanner regex was case-sensitive and required colon immediately after 'border-radius'. Added /i flag and \s* tolerance so 'BORDER-RADIUS : 10px' is caught. Also fixed CALC_ALLOW_RE and extractRadiusToken to tolerate whitespace inside var() and calc() parens, preventing false positives on valid calc expressions. Added 3 negative-case tests verifying: - Case-insensitive + space-before-colon bare px detection - calc() with internal whitespace passes for valid tokens - var() with internal whitespace passes for valid tokens P2-2 (SELECTOR_TIER table removal) and P3 (input/textarea deletion) pushed back: SELECTOR_TIER provides tier-level coverage that a bare token whitelist cannot; input/textarea deletion belongs to #406 gap 1, not gap 4.
Astro-Hanforce-pushed
the
opencode/radius-governance
branch
from
July 2, 2026 12:20
046292b to
81c49dbComparejackwener added a commit
to sunheyi6/maka-agent
that referenced
this pull request
Jul 2, 2026
…pache#429) - startup-loading-shell contract: the second test asserted a Suspense/StartupFallback/maka-preload wiring in app.tsx that was never implemented (app.tsx imports AppShell eagerly). Repoint it at the actual fix — the inline preload skeleton in index.html — so it guards real behavior instead of a red, aspirational contract. - onboarding.css: the new .maka-onboarding-loading skeleton used bare border-radius: 12px/999px, violating the radius-token governance contract (apache#406/apache#418). Use var(--radius-modal)/var(--radius-pill). - package.json: restore root `dev` to the governed `dev:hmr` fast-HMR path (real-window-smoke contract); the new scripts/dev.mjs launcher stays available via `@maka/desktop run dev`. - .gitignore: drop the machine-specific `.suncode/` IDE dir leak. Full suite green: core/storage/runtime/headless/ui + 1671 desktop tests.
jackwener added a commit
that referenced
this pull request
Jul 2, 2026
* fix: add inline skeleton loader in index.html to prevent white screen on startup - Add inline CSS + HTML skeleton in index.html that renders before React mounts and external CSS/JS loads - Skeleton matches .maka-onboarding-loading design with hardcoded theme-aware colors (light/dark via prefers-color-scheme) - No external dependencies — visible immediately after HTML parse - Eliminates blank white/gray screen during 355KB CSS + 5.8MB JS window * review: fix failing contract tests, radius tokens, and scope leaks (#429) - startup-loading-shell contract: the second test asserted a Suspense/StartupFallback/maka-preload wiring in app.tsx that was never implemented (app.tsx imports AppShell eagerly). Repoint it at the actual fix — the inline preload skeleton in index.html — so it guards real behavior instead of a red, aspirational contract. - onboarding.css: the new .maka-onboarding-loading skeleton used bare border-radius: 12px/999px, violating the radius-token governance contract (#406/#418). Use var(--radius-modal)/var(--radius-pill). - package.json: restore root `dev` to the governed `dev:hmr` fast-HMR path (real-window-smoke contract); the new scripts/dev.mjs launcher stays available via `@maka/desktop run dev`. - .gitignore: drop the machine-specific `.suncode/` IDE dir leak. Full suite green: core/storage/runtime/headless/ui + 1671 desktop tests. --------- Co-authored-by: jackwener <jakevingoo@gmail.com>
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
Migrate every hardcoded
border-radius: Npxliteral in renderer CSS and everyrounded-[Npx]arbitrary value in TSX to the token system (--radius-control6px /--radius-surface8px /--radius-modal12px /--radius-pill999px). Delete the--card-radiusand--agents-content-area-radiusintermediate variables; their call sites now reference the canonical tokens directly.Why
Part of #406 (gap 4 — radius governance). The audit in #406 found 292
border-radiusdeclarations across 14 distinct values and two competing token systems. This PR consolidates to a single token system with per-component-type radius tiers. Gap 4 of 6; #406 remains open until all gaps land.Scope
Changed:
border-radius: Npx→var(--radius-*)across 20 CSS filesrounded-[Npx]/rounded-[.25rem]→rounded-[var(--radius-*)]across 6 TSX files--card-radius: 6pxand--agents-content-area-radius: 12pxremoved; call sites now usevar(--radius-control)/var(--radius-modal)directly0 8px 8px 0) → per-corner token referencesradius-converge-contract.test.tsnow scans the full CSS and TSX source tree, banning bareNpxborder-radiusorrounded-[Npx]that is not avar(--radius-*)reference (0/50%/inherit/initial/calc(...token...)exempt)Npxvalues updated to assert token referencesdocs/design-system.md§1.4 updated with alias system and new contract rulechat.tsx"Values are LITERAL" comment updated to reflect token adoptionNot included:
var(--accent)sites)input.tsx/textarea.tsx(gap 1 cleanup, zero imports but out of scope)Verification
npm --workspace @maka/desktop test: 1645 tests pass, 0 failnpm run typecheck: all packages passUser-facing impact
Visual changes are minimal: some 10px cards/notices move to 8px, 9px logos move to 8px, 7px buttons move to 6px. These are 1-2px differences that do not affect layout (radius does not occupy layout space).
Reviewer notes
--card-radiusand--agents-content-area-radiusintermediate variables are deleted; call sites use tokens directly. If per-surface tuning is needed later, semantic aliases can be re-introduced.chat.tsxbubble user variant comment previously said "the visual refresh, not this governance pass, owns adopting the scale" — this PR adopts the token per user confirmation (full convergence).