ui-metrics keyed the component-origin map with path.resolve(), which uses the
host separator, but compared it against the file name TypeScript reports for a
symbol declaration, which always uses forward slashes. On Windows every lookup
missed, so imported shared controls were never counted as library usage: the
scheduled adoption test failed and npm run design:metrics reported 0% component
library coverage in its CI artifact.
Normalising both sides of the lookup restores the real figure (93.98%,
1202/1279 on this checkout) and keeps the existing test as the regression guard.
The sibling checker already normalises separators in
scripts/check-component-imports.ts, which is why only the reporting path was
wrong.
Validation:
- node --test tests/ui-metrics.test.ts
- npm run design:metrics
* Extract Open Design UI and report component adoption and detached styles
* Invalidate cached Studio builds when Open Design UI source changes
* Compare UI metrics against the tested merge parent in PR CI
---------
Co-authored-by: 罗高 <luogao@users.noreply.github.com>