chore(ui): verify theme propagation and add audit warnings - #33254
chore(ui): verify theme propagation and add audit warnings#33254shah-harshit wants to merge 2 commits into
Conversation
Code Review ✅ ApprovedAdds regression tests for theme propagation and portal behavior, verifying that root OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
✅ Playwright Results — workflow succeededValidated commit ✅ 4500 passed · ❌ 0 failed · 🟡 6 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 53m 8s ⏱️ Max setup 5m 5s · max shard execution 21m 7s · max shard-job elapsed before upload 24m 33s · reporting 23s 🌐 218.73 requests/attempt · 2.24 app boots/UI scenario · 38.28% common-shard skew Optimization targets still in progress:
🟡 6 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |



Describe your changes:
Part of open-metadata/openmetadata-collate#6566
Closes open-metadata/openmetadata-collate#6567
Gate contract: open-metadata/openmetadata-collate#6564
Token foundation: #33249
This PR combines two small shared-theme foundation slices:
ThemeProvidergoverns application and portal content.tw:dark:*overrides and unsupported--ai-*theme tokens as review warnings.The reference to #6566 is intentionally non-closing because that ticket also owns the separate Collate pre-paint restoration change. Existing audit errors remain errors; only the new migration rules are warning-level and non-blocking.
Type of change:
High-level design:
The ThemeProvider tests exercise the existing provider through its public context and observable DOM/root-style effects. Portal content is rendered through
createPortalintodocument.body, while the active theme remains owned bydocument.documentElement.The token scanners reuse their existing finding and severity model. They classify
tw:dark:*and--ai-*occurrences as warnings so migration debt is visible without blocking incremental AI-mode work. Existing hardcoded-value error classifications and exit behavior are unchanged.There are no production runtime, token-value, component, domain, generated-file, API, or submodule changes.
Tests:
Use cases covered
document.bodydo not receive copied theme classes.--ai-*tokens produce warnings, not errors.Unit tests
yarn test src/context/UntitledUIThemeProvider/theme-provider.test.tsx --runInBand— 15 tests passed.node scripts/design-tokens/scanner.test.js— 28 checks passed.node --test scripts/design-tokens/tw-scanner.test.js— 3 tests passed.node scripts/tw-audit.js scripts/design-tokens/tw-scanner.test.js— 0 errors and 4 expected warnings; exit 0.Backend and ingestion integration tests
Playwright tests
Local verification
git diff --checkpassed.UI screen recording / screenshots:
Not applicable. This PR adds regression coverage, audit warnings, and contributor guidance without changing rendered UI.
Checklist: