Skip to content

feat(hub)!: catalog blocks derive client-side from stock definitions; drop the route (CL-8160) - #784

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-8160-catalog-blocks-client
Sep 17, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-8160-catalog-blocks-client

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • The hub mounts only stock @intx/hub-api routes plus a fixed set of Corbits libraries; the on-demand catalog-block deploy mount (POST /api/tenants/:tenantId/catalog-blocks/:assetName/deploy) was hub-local product logic building workflow JSON from workflows/* packages and writing an asset directly from apps/hub, which the ruling forbids.
  • Deletes apps/hub/src/catalog-blocks/* (module, routes, tests) and the mount plus its inline deployWorkflowSource/workflowDeployer wiring in apps/hub/src/index.ts.
  • The Routines page's "Available" section had no stock replacement for the on-demand Add action, so the Add button and deployCatalogBlock client call are removed; the section stays a read-only list until a deploy path lands on stock rails. The separate GET /workflows/available listing (packages/workflows) already derives its display data from stock reads and is untouched.
  • No DB tables or scripts/checks/no-product-tenancy.ts allowlist entries were owned by this module, so nothing to forward-drop there.

Deleted tests

  • apps/hub/src/catalog-blocks/catalog-block-routes.test.ts — route deleted
  • apps/hub/src/catalog-blocks/catalog-blocks.test.ts — module deleted
  • apps/web/test/routines-available-section.test.tsx: "Add posts to the catalog-blocks deploy route and the entry disappears from Available" — deploy route deleted, no replacement in this slice. The disabled-Add-button assertions in the missing-connection test were folded into a read-only reason+link check.

Test plan

  • bun run typecheck
  • bun run lint
  • bun run check:structural
  • bun --cwd apps/hub test (156 pass, DB-gated suites skip locally per AGENTS.md)
  • bun --cwd apps/web test (798 pass)

The hub mounts only stock routes plus Corbits libraries; the on-demand
catalog-block deploy route (POST /api/tenants/:tenantId/catalog-blocks/
:assetName/deploy) built workflow JSON from workflow packages and wrote
an asset directly from apps/hub, which is hub-local product logic the
owner ruling forbids.

Deletes apps/hub/src/catalog-blocks/* (module, routes, and their tests)
and the mount + its inline deployWorkflowSource/workflowDeployer wiring
in apps/hub/src/index.ts. The Available section's on-demand Add action
has no stock replacement yet, so it is removed along with the client's
deployCatalogBlock call; the section is read-only until a deploy path
lands on stock rails. The separate GET /workflows/available listing
(packages/workflows) is untouched.

Deleted tests:
- apps/hub/src/catalog-blocks/catalog-block-routes.test.ts
- apps/hub/src/catalog-blocks/catalog-blocks.test.ts
- apps/web/test/routines-available-section.test.tsx: "Add posts to the
  catalog-blocks deploy route and the entry disappears from Available"
  (route deleted); the disabled-Add-button assertions in the missing-
  connection test were folded into a read-only reason+link check.
@linear-code

linear-code Bot commented Sep 17, 2026

Copy link
Copy Markdown

CL-8160

@TheGreatAxios
TheGreatAxios merged commit e255d58 into main Sep 17, 2026
5 of 22 checks passed
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