Skip to content

chore(file-architecture): 🤖 split mono-repository into libs and packages#944

Open
punkbit wants to merge 9 commits intochore/monorepo-assets-as-packagefrom
chore/monorepo-semantic-distinction-libs-packages-split
Open

chore(file-architecture): 🤖 split mono-repository into libs and packages#944
punkbit wants to merge 9 commits intochore/monorepo-assets-as-packagefrom
chore/monorepo-semantic-distinction-libs-packages-split

Conversation

@punkbit
Copy link
Collaborator

@punkbit punkbit commented Mar 24, 2026

Why?

The monorepo had no clear structural distinction between the core Click UI (we ship) and the packages we build with. The PR makes "packages/" the ingredients and "libs/" the core component library we ship!

Alternatively, the project could become a Design System. But since the goal is Click UI, we're mainly ensuring that the main component library is the core of this whole setup, e.g. lib/click-ui or lib/core or packages/core, something that determines its goal!

⚠️ Depends on #938 and https://github.com/ClickHouse/click-ui/tree/chore/monorepo-assets-as-package that should be merged first

How?

  • Moved click-ui into libs/ as the core thing the monorepo delivers
  • Kept icons in packages/, it exists to support Click UI, but can also be consumed independently by other consumers
  • Rewrite documentation, e.g. create a new README.md and datap libs/click-ui/README.md

Preview?

N/A

@changeset-bot
Copy link

changeset-bot bot commented Mar 24, 2026

⚠️ No Changeset found

Latest commit: cce0b21

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link

github-actions bot commented Mar 24, 2026

Claude finished @punkbit's task in 42s —— View job


PR Review

Looks great! This is a clean structural reorganization.

The PR correctly:

  • Moves click-ui from packages/click-uilibs/click-ui
  • Updates all 9 workflow files consistently with the new path
  • The root package.json already has "libs/*" in workspaces, so no changes needed there
  • All scripts in libs/click-ui/.scripts/bash/ are present and accounted for

No bugs, regressions, or missing path updates found. The changeset bot warning is expected — this is a pure infrastructure change with no version bump needed.

Nice work on the clear separation of intent between "what we ship" (libs/) and "ingredients" (packages/). 🙌

@punkbit punkbit marked this pull request as ready for review March 24, 2026 12:54
@github-actions
Copy link

github-actions bot commented Mar 24, 2026

Claude finished @punkbit's task in 1m 3s —— View job


PR Review

  • Gather context
  • Review changed files
  • Post findings

Looks great! Clean structural reorganization — no issues found.

This PR does exactly what it says: moves click-ui from packages/ into libs/ to semantically distinguish "what we ship" from "build ingredients." The scope is purely path updates — no component logic changed.

Checked:

  • All 9 workflow files consistently updated packages/click-uilibs/click-ui
  • Root package.json workspaces already includes "libs/*" (no change needed)
  • No stray packages/click-ui references remain anywhere in the repo
  • libs/click-ui/package.json name and exports are unchanged (no public API impact)
  • New root README.md accurately reflects the updated structure with correct paths in the table and examples

The changeset bot warning is expected — pure infrastructure move, no version bump needed. 🙌

@punkbit punkbit force-pushed the chore/monorepo-semantic-distinction-libs-packages-split branch from 7acd2aa to 84d4cfc Compare March 24, 2026 14:22
@ClickHouse ClickHouse deleted a comment from github-actions bot Mar 24, 2026
@ClickHouse ClickHouse deleted a comment from github-actions bot Mar 24, 2026
@ClickHouse ClickHouse deleted a comment from github-actions bot Mar 24, 2026
@github-actions
Copy link

github-actions bot commented Mar 24, 2026

Claude finished @punkbit's task in 1m 7s —— View job


PR Review

  • Gather context
  • Review changed files
  • Post findings

Clean structural reorganization — looking good!

Pure path migration: packages/click-uilibs/click-ui. No component logic, types, or public API touched. The duplicate TOC entry from previous review rounds has been fixed. Zero remaining packages/click-ui references anywhere in the repo.

💡 Suggestion (non-blocking, docs only)

  • README.md line 51: The Packages table lists icons as "Internal icon generation tooling", but packages/icons/package.json shows it's @clickhouse/icons — a scoped, published package with files, exports, and types configured. The description is misleading for contributors. Suggest either updating the description to reflect it's a publishable shared package, or renaming it in the table to @clickhouse/icons to match reality. Fix this →

Otherwise the PR is good to go! 🙌

@ClickHouse ClickHouse deleted a comment from github-actions bot Mar 24, 2026
@ClickHouse ClickHouse deleted a comment from github-actions bot Mar 24, 2026
@github-actions
Copy link

github-actions bot commented Mar 24, 2026

Claude finished @punkbit's task in 1m 17s —— View job


PR Review

  • Gather context
  • Review changed files
  • Post findings

Clean structural reorganization — looking good!

Pure path migration: packages/click-uilibs/click-ui. No component logic, types, or public API touched. All 9 workflow files consistently updated. Zero remaining packages/click-ui references.


💡 Suggestions (non-blocking, docs only)

  • README.md line 51 — Packages table: icons is listed as icons with description "Internal icon generation tooling", but packages/icons/package.json shows it's @clickhouse/icons — a scoped, published package. The name and description are both misleading.

    • Change name from icons@clickhouse/icons
    • Change description from "Internal icon generation tooling""ClickHouse SVG icons, logos, flags, and payment icons" (matches the package's own description)
    • Fix this →
  • README.md line 103 — "Creating a New Internal Package": The guide says "Initialize with a package.json (no npm scope needed)" — but @clickhouse/icons has a scope. Consider updating this to reflect that packages can be scoped if they're intended for publication.

Otherwise the PR is in great shape! 🙌

@workflow-authentication-public
Copy link
Contributor

📚 Storybook Preview Deployed

✅ Preview URL: https://click-2vgpmpzg3-clickhouse.vercel.app

Built from commit: 5407fb6faf94a70c440372dc0e8dbb76fbdc721f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant