Skip to content

H-6460: Finish ds-components beta recipe cleanup#8673

Merged
lunelson merged 22 commits into
mainfrom
ln/ds-random-fixing
May 11, 2026
Merged

H-6460: Finish ds-components beta recipe cleanup#8673
lunelson merged 22 commits into
mainfrom
ln/ds-random-fixing

Conversation

@lunelson
Copy link
Copy Markdown
Contributor

@lunelson lunelson commented Apr 29, 2026

🌟 What is the purpose of this PR?

Finish the remaining @hashintel/ds-components beta-structure cleanup for H-6460 by flattening the lingering src/beta component layout, converting the last Panda config recipes to runtime recipes, and removing transitional preset and Figma tooling leftovers that are no longer part of the package workflow.

🔗 Related links

🚫 Blocked by

  • None

🔍 What does this change?

  • Flattens the remaining src/beta component roots into the sibling-file pattern (foo.tsx, foo.recipe.ts, foo.stories.ts) and updates affected story imports across the beta surface.
  • Extends the beta migration codemod and tests in scripts/migrate-beta-fractal-pilots.ts and scripts/migrate-beta-fractal-pilots.test.ts to support the later migration batches and preserve the explicit .recipe / .stories import behavior.
  • Converts the last remaining Panda defineSlotRecipe(...) holdouts to runtime sva(...) recipes, deletes src/preset/recipes.ts, and removes the temporary recipe registration wiring from src/preset.ts.
  • Keeps the preset typing workaround as a narrow suppression on colorPalette instead of the broader registry-era suppression.
  • Removes the current @hashintel/refractive usage from ds-components for now as part of the beta-surface simplification.
  • Removes cleanup leftovers that were only supporting the migration process, including HANDOFF.md, figma.config.json, and the unused @figma/code-connect dependency.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

  • Some beta runtime recipes still carry TODO(beta-graduation) export-line suppressions for strict-token issues; those were intentionally left for a later cleanup pass.

🐾 Next steps

  • Remove the remaining staged beta recipe suppressions as strict-token issues are fixed.
  • Start graduating stabilized beta components out of src/beta into src/components.

🛡 What tests cover this?

  • yarn fix:eslint
  • yarn fix:format
  • yarn lint:tsc
  • yarn test:unit
  • yarn build

❓ How to test this?

  1. Check out ln/ds-random-fixing.
  2. Run yarn fix:eslint, yarn fix:format, yarn lint:tsc, yarn test:unit, and yarn build from libs/@hashintel/ds-components.
  3. Confirm the package still builds cleanly, the codemod tests pass, and src/preset/recipes.ts / figma.config.json are gone.

📹 Demo

  • N/A

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Error Error May 11, 2026 2:23pm
hashdotdesign-tokens Error Error May 11, 2026 2:23pm
petrinaut Error Error Comment May 11, 2026 2:23pm

@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps > hash.design Affects the `hash.design` design site (app) labels Apr 29, 2026
Copy link
Copy Markdown
Contributor Author

lunelson commented Apr 29, 2026

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 29, 2026

PR Summary

Medium Risk
Broad mechanical refactor across many beta components (file moves, import rewrites, and recipe API migration) that could break build/storybook wiring if any paths or variant typings are missed, but it stays within the beta surface and is largely systematic.

Overview
Completes the src/beta cleanup by flattening remaining components to a sibling-file layout (<component>.tsx, <component>.recipe.ts, <component>.stories.ts) and updating story/component imports accordingly.

Migrates beta styling from Panda defineRecipe/defineSlotRecipe to runtime cva/sva recipes with local recipe imports, adding staged @ts-expect-error suppressions where strict-token issues remain.

Adds a scripts/migrate-beta-fractal-pilots.ts codemod (with Vitest coverage) to automate the file moves and specifier rewrites, and removes leftover tooling/config (e.g., figma.config.json, @figma/code-connect, and @hashintel/refractive dependency/peerDependency entries).

Reviewed by Cursor Bugbot for commit ae4853c. Bugbot is set up for automated code reviews on this repo. Configure here.

@graphite-app graphite-app Bot requested a review from a team April 29, 2026 16:00
Comment thread libs/@hashintel/ds-components/src/components/Switch/switch.tsx
@lunelson lunelson force-pushed the ln/fe-219-stub-park-ui-patterns branch from bcf3239 to 980f377 Compare April 29, 2026 16:19
@lunelson lunelson force-pushed the ln/ds-random-fixing branch from 4982a3f to ea67c84 Compare April 29, 2026 16:19
Comment thread libs/@hashintel/ds-components/src/components/Switch/switch.tsx
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 29, 2026

🤖 Augment PR Summary

Summary: This PR removes the @hashintel/refractive dependency from @hashintel/ds-components.

Changes:

  • Drops @hashintel/refractive from both dependencies and peerDependencies.
  • Replaces <refractive.div> usage in SegmentedControl, Slider, and Switch with plain <div> elements.
  • Implements replacement “glass”/thumb visuals using Panda CSS (e.g. backdropFilter, borders, gradients, shadows).

Technical Notes: This keeps the Ark UI structure intact while eliminating the refractive SVG-filter based effect and its dependency edge.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread libs/@hashintel/ds-components/src/components/Slider/slider.tsx
@lunelson lunelson force-pushed the ln/fe-219-stub-park-ui-patterns branch from 980f377 to 86889ff Compare April 29, 2026 20:05
@lunelson lunelson force-pushed the ln/ds-random-fixing branch from ea67c84 to 0d5eb4a Compare April 29, 2026 20:05
Comment thread libs/@hashintel/ds-components/src/components/Switch/switch.tsx
@lunelson lunelson marked this pull request as draft April 29, 2026 20:06
@lunelson lunelson changed the title Remove refractive from ds-components WIP removals, refinements Apr 29, 2026
Base automatically changed from ln/fe-219-stub-park-ui-patterns to main April 30, 2026 10:40
@github-actions github-actions Bot added the area/infra Relates to version control, CI, CD or IaC (area) label Apr 30, 2026
@lunelson lunelson force-pushed the ln/ds-random-fixing branch from 0722077 to 9a751ad Compare May 11, 2026 10:18
@github-actions github-actions Bot dismissed alex-e-leon’s stale review May 11, 2026 10:19

Latest approval commit 0722077 is not an ancestor of 9a751ad, indicating rewritten history after approval

Comment thread libs/@hashintel/ds-components/src/beta/carousel.tsx Outdated
alex-e-leon
alex-e-leon previously approved these changes May 11, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4046ab5. Configure here.

Comment thread libs/@hashintel/ds-components/src/beta/collapsible.recipe.ts
@lunelson lunelson added this pull request to the merge queue May 11, 2026
Merged via the queue into main with commit 5b3da5e May 11, 2026
49 of 53 checks passed
@lunelson lunelson deleted the ln/ds-random-fixing branch May 11, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

3 participants