fix(apollo-wind): quality pass across the component library (coverage gate, exports, a11y, tokens, API consistency) - #1075
fix(apollo-wind): quality pass across the component library (coverage gate, exports, a11y, tokens, API consistency)#1075snuziale wants to merge 10 commits into
Conversation
…emos Vitest only enforces limits nested under coverage.thresholds; the previous top-level lines/functions/branches/statements keys were silently ignored, so the 80% gate never ran. Nest them under thresholds with a ratcheting floor based on current coverage, and exclude src/templates (Storybook-only demos already excluded from the published build) from the metric. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015n5YBa3rwBSxCUjkGNRKbG
chart and drawer were fully implemented but unreachable: neither the ui barrel nor the package root exported them. Add both, plus the missing ui barrel entries for portal-container, lockable-value-field and variable-picker, and give src/foundation an index so the design tokens (colors, spacing, radius, shadows, strokes, typography, responsive) can be imported from JS via the new ./foundation subpath. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015n5YBa3rwBSxCUjkGNRKbG
- drop tailwindcss from dependencies: no shipped code imports it, and both @tailwindcss/cli (build) and @tailwindcss/postcss (consumer ./postcss export) depend on it themselves, so shipping it as a hard dependency only risked a duplicate Tailwind install in consumer graphs; it stays in devDependencies - remove @tailwindcss/postcss and autoprefixer from devDependencies: they were duplicated in dependencies, where they must remain because postcss.config.export.js imports them at consumer runtime - add the ./foundation exports subpath for the token barrel - fix the biome linter exclusion for templates: the !templates glob never matched src/templates, so the demo apps were linted against the library rules despite the config's intent - delete src/components/UiPath (an empty index.ts, referenced nowhere) - remove the deprecated fontFamily.sans alias; all call sites already use fontFamily.base Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015n5YBa3rwBSxCUjkGNRKbG
Accessibility: - tree-view: label the icon-only expand/collapse, actions and details buttons with the item name - form-designer: label the remove-option, edit-rule and delete-rule icon buttons - prompt-editor toolbar: expose the Edit/Preview switcher as a labelled group with aria-pressed state instead of color-only state Semantic tokens: - replace raw palette classes (green/red/orange/yellow/blue/gray) with success/warning/error/info/muted tokens in tree-view, stats-card, form-designer, form-state-viewer and form-examples - replace the duplicated bg-[#0092b8] logo tile hex in panel-delegate and panel-flow with the brand token - unify the dialog, alert-dialog, sheet and drawer overlays on the theme-aware bg-curtain scrim token (previously three different raw bg-black opacities) API consistency: - stats-card: move the per-render variant map into cva variants - avatar: add a cva size variant (sm, default, lg) with the previous h-10 w-10 as the default - forward refs from combobox, date-picker, date-range-picker, datetime-picker, file-upload and tree-view so consumers can manage focus, matching the rest of the library Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015n5YBa3rwBSxCUjkGNRKbG
Covers avatar (including the new size variants), chart, drawer, editable-cell, table, collapsible and portal-container, which shipped without any Storybook documentation. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015n5YBa3rwBSxCUjkGNRKbG
Adds tests for all 14 components in src/components/custom (106 tests, each file including a jest-axe check), stories for the three components that had none (canvas-studio, flow-properties-simple, viewport-guard), and fixes the two accessibility gaps the new tests surfaced: the panel-flow rail nav buttons had no resting accessible name (label was tooltip-only) and the flow-properties-simple select trigger was not associated with its field label. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015n5YBa3rwBSxCUjkGNRKbG
Adds tests for chart, drawer, editable-cell, button-group, command and datetime-picker plus the layout row/column/grid primitives (113 tests, each file including a jest-axe check). The datetime-picker suite also pins the new ref forwarding to the trigger button. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015n5YBa3rwBSxCUjkGNRKbG
…s ui data-slot was previously set by only 4 of ~70 components, and calendar.tsx already shipped selectors targeting [data-slot=card-content] and [data-slot=popover-content] that never matched because card and popover did not set the attribute. Add data-slot to the root element of every exported part in src/components/ui (51 files), converting bare Radix re-exports to thin wrappers exactly as shadcn v4 does (forwardRef wrappers wherever the part renders DOM, so ref behavior is unchanged). Also swap the prompt-editor mode switcher's role=group div for a fieldset to satisfy biome's useSemanticElements rule. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015n5YBa3rwBSxCUjkGNRKbG
…a viewers Adds tests for the previously untested form-designer (the package's largest file), form-plugins, form-state-viewer and schema-viewer, each with a jest-axe check, plus stories for form-state-viewer and schema-viewer. Also re-wraps one over-long line in form-examples to the biome line width. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015n5YBa3rwBSxCUjkGNRKbG
…coverage floor Label the icon-only section and field move/delete buttons, the section accordion chevron, the Always required checkbox and the rule-builder selects in form-designer, and associate the field-renderer select trigger with its field label. This lets the form-designer axe test enforce the button-name rule (only the two structural exclusions remain). With the new suites in place, raise the enforced coverage floor to lines 60, functions 63, branches 54, statements 58 (current: 64.8, 67.7, 57.6, 62.3). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015n5YBa3rwBSxCUjkGNRKbG
|
Apollo Coded App preview deployments are ready.
|
| it('sanitizes unsafe characters out of ids and keys', () => { | ||
| const { container } = render( | ||
| <ChartStyle | ||
| id='evil"] { } <script>' |
Dependency License Review
License distribution
Excluded packages
|
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
Storybook visual diffBaseline is the deployed main Storybook, so changes merged to main after this branch was last updated can also appear here. Logs Updated (PT): Aug 21, 2026, 04:36:14 PM |
Summary
A quality pass over
packages/apollo-windaddressing seven audit findings. No breaking API changes; all existing exports keep their signatures (a few gain refs, variants, ordata-slotattributes).1. The coverage gate was a silent no-op
vitest.config.tsdeclaredlines/functions/branches/statements: 80directly undercoverage, where Vitest ignores them, so coverage never failed CI. They now live undercoverage.thresholdsas a ratcheting floor (lines 60, functions 63, branches 54, statements 58) calibrated just below current coverage, with Storybook-onlysrc/templatesexcluded from the metric (they are already excluded from the published build).2. Finished components were unreachable
chart(341-line Recharts wrapper) anddrawer(vaul) are now exported from the ui barrel and the package root.portal-container,lockable-value-field, andvariable-pickerwere missing from the ui barrel.src/foundationdesign tokens (colors, spacing, radius, shadows, strokes, typography, responsive) got an index and a new./foundationexports subpath, so tokens are importable from JS for the first time.3. Story and test gaps closed
custom/components, form-designer (previously the largest untested file), form-plugins, form-state-viewer, schema-viewer. Every new test file includes a jest-axe check.4. Accessibility
fieldsetwitharia-pressedstate instead of color-only indication.button-name; only two structural exclusions remain (documented in the test).5. Semantic tokens instead of raw palette values
green/red/orange/yellow/blue/gray-*classes withsuccess/warning/error/info/mutedtokens in form-designer, tree-view, stats-card, form-state-viewer, and form-examples.bg-[#0092b8]logo-tile hex in panel-delegate/panel-flow with thebrandtoken.bg-curtainscrim token (previously three different rawbg-blackopacities, none dark-mode aware).6. API consistency
data-slotconvention across allui/components (51 files). This also fixes a latent bug:calendar.tsxshipped selectors targeting[data-slot=card-content]and[data-slot=popover-content]that never matched because card and popover did not set the attribute.stats-cardvariants moved from a per-render object literal to cva;avatargained a cvasizevariant (sm/default/lg, default unchanged).combobox,date-picker,date-range-picker,datetime-picker,file-upload, andtree-viewnow forward refs like the rest of the library.7. Packaging cleanups
tailwindcssremoved fromdependencies(nothing shipped imports it;@tailwindcss/cliand@tailwindcss/postcssbring their own), eliminating the duplicate-Tailwind risk in consumer graphs.@tailwindcss/postcssandautoprefixerstay independencies(required at consumer runtime by the./postcssexport) and lost their duplicate devDependency entries.react-hook-form/zod: kept as regular dependencies since the package ships unbundled and npm dedupe handles compatible ranges; promoting them to peers would break existing consumers.!templatesexclusion that never matchedsrc/templates, deleted the emptysrc/components/UiPath/directory, and removed the deprecatedfontFamily.sansalias (all call sites already use.base).Validation
turbo run build --filter=@uipath/apollo-wind(including apollo-core) green;dist/foundation/output verified.biome formatandbiome lint: zero errors.tsc --noEmit: clean.check-dependency-version-consistency: clean; lockfile regenerated.vitest run --coverage: 1402/1402 tests passing with the new thresholds enforced.Notes for reviewers
bg-black/50|80→bg-curtain) is an intentional visual normalization: light theme gets a slightly lighter scrim (30%), dark theme a heavier one (75%), per the apollo-core semantic token.data-slot, matching shadcn v4;ResizablePanelwas intentionally left as a re-export to avoid touching its imperative ref handle.🤖 Generated with Claude Code
https://claude.ai/code/session_015n5YBa3rwBSxCUjkGNRKbG
Generated by Claude Code