Skip to content

refactor(emcn): split the Platform design system into packages - #9764

Open
emir-karabeg wants to merge 1 commit into
improvement/platform-core-chatfrom
improvement/platform-preview
Open

emir-karabeg wants to merge 1 commit into
improvement/platform-core-chatfrom
improvement/platform-preview

Conversation

@emir-karabeg

Copy link
Copy Markdown
Collaborator

Summary

Moves the Platform design system out of apps/sim/platform/design-system into workspace packages, on top of the integration center (#9725) and the latest platform-core-chat:

  • packages/emcn holds shared controls, tokens, fonts and recipes; packages/emcn-platform holds Platform compositions; packages/emcn-auth and packages/emcn-docs hold the Auth and Docs surfaces. The old package is now @sim/emcn-legacy, so @sim/emcn means the modern package everywhere.
  • The zone, embedded/, shared/ and app/o import public family subpaths (@sim/emcn/<family>, @sim/emcn-platform/<family>). Package code uses its private #emcn / #platform aliases.
  • check:platform-design, check:platform-css and check:boundaries combine package ownership with the embedded/shared/convergence rules. Their tests and the CI change fixture model the packages.

For the embedded/ owner

These change what the organization views render or import, following the zone:

  • Quiet Selects became ChoiceMenu. Quiet MultiSelect / SearchableSelect use variant='text'. Pickers have no quiet variant, and Select has no block.
  • ActivityRow uses textMetadata (paired with people). DataTable columns take share for a percentage share; width keeps compact / regular.
  • Hydrated moved to app/o/[organizationId]/components/hydrated.tsx: hydration belongs to the host, not a UI package.
  • An embedded surface paints its canvas only with canvas, and the host bridge names the EMCN Geist family.

Verification

Run locally on the merge commit 5f2fc54e6b, before the docs-only commit on top:

  • Lint: 30/30 tasks. Types: 32/32 workspaces, including every EMCN package. Audits: 68/68. Block registry passes against origin/staging.
  • Platform production build passes. The main app production build passes with CI's environment (1,708 pages).
  • Platform browser suite: 118/118, fixtures on and off. The Electron renderer check passes.
  • Full test suite: 40,122 app tests pass. Three network tests (gateway.server, egress-end-to-end.server, processing-recovery-queue-transport) fail under the local Node 23.10, as they do before this change, and pass under Node 24.19.
  • Not run: the live suite (checks/live), which needs a running app and database.

Details and the decisions above are in apps/sim/platform/docs/consolidation-checkpoint.md.

🤖 Generated with Claude Code

@emir-karabeg
emir-karabeg requested a review from a team as a code owner November 7, 2026 02:42
@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Nov 7, 2026 9:30pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[High impact] The package split reaches UI across the main app, Platform, Auth, Docs, and embedded views.

The PR appears safe to merge with two non-blocking UI regressions to fix.

Findings

  1. P2 Desktop headers stop dragging windows ▶

Summary

Splits the design system into shared EMCN and Auth, Docs and Platform packages, while moving existing controls to @sim/emcn-legacy.

  • Shared EMCN controls and data displays live in their own package.
  • Platform surfaces load their styles and shared assets from the new packages.
  • Embedded views use the new picker and table control options.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Shared["@sim/emcn: controls, tokens, fonts"]
  Auth["@sim/emcn-auth"]
  Docs["@sim/emcn-docs"]
  Platform["@sim/emcn-platform"]
  Legacy["@sim/emcn-legacy"]
  Shared --> Auth
  Shared --> Docs
  Shared --> Platform
  Auth --> AuthHosts["Auth routes and desktop"]
  Docs --> DocsApp["Docs app"]
  Platform --> Zone["Platform zone"]
  Platform --> Embedded["Organization views"]
  Legacy --> Existing["Unreplaced application routes"]
Loading

Reviews (1) · Last reviewed commit: "docs(platform): record the platform-core..." · Reviewed by Greptile

Comment thread apps/sim/platform/app/layout.tsx Resolved
@greptile-apps

greptile-apps Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff

These findings could not be posted inline.

  • P2 Embedded surfaces lose host styles packages/emcn-platform/src/components/surface/surface.tsx:25 ▶

    Surface never passes embedded to PlatformSurface, so organization views never receive data-embedded. The new stylesheet requires that marker to preserve keyboard focus outlines and keep surfaces without canvas transparent. Embedded buttons and links therefore lose their focus outline, and previously transparent islands paint a canvas background. Pass embedded from the host-facing Surface wrapper.

        <PlatformSurface theme='system' embedded canvas={canvas} detached={detached}>
    

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 2709 files

Confidence score: 4/5

  • In api-reference.tsx, the NeutralBadge stretches across the column, so the “Deprecated operation” pill no longer fits its content. Keep the badge aligned to its content width.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/docs/components/docs/api-reference/api-reference.tsx">

<violation number="1" location="apps/docs/components/docs/api-reference/api-reference.tsx:102">
P3: Switching this container to `flex flex-col` makes the direct child `NeutralBadge` (an `inline-flex` span) stretch to full width, so the "Deprecated operation" pill now spans the whole column. The previous `space-y-8` block layout kept it shrink-wrapped; either revert this className or add `self-start` to the badge.</violation>
</file>

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/platform-design.yml Resolved
Comment thread .claude/rules/sim-imports.md Resolved
Comment thread apps/docs/app/global.css Resolved
Comment thread .github/CI.md Resolved
Comment thread apps/desktop/package.json Resolved
Comment thread .github/workflows/auth-ui.yml Resolved
@blacksmith-sh

This comment has been minimized.

waleedlatif1 added a commit that referenced this pull request Nov 7, 2026
Resolves the staging merge for #9725 and #9764: keeps both proxy test suites, drops the
legacy integration detail page staging edited, points the new Higgsfield docs page at
@sim/emcn-docs, adds Atlassian sites to the home model fixtures, and syncs the
permission catalog for the Higgsfield block.
- Credential rows on an app's page wear that app's mark, so a shared
  Google credential no longer shows Gmail under Google BigQuery.
- The MCP glyph is an interface icon and takes the shared icon ink, like
  the skill and key glyphs. Integration marks keep their own paint.
- The integration center renders its heading, and app details their Back
  link, from the same nuqs state that picks the view. Going back no longer
  flashes the previous view's chrome for a few frames.
- Sidebar, Home and Integrations paint nothing while loading: no route
  loading.tsx, no widget skeletons, no loading copy. The shell's unkeyed
  Suspense keeps the current page through a navigation, and a page load
  paints the sidebar first. The calendar keeps its hour grid while a day
  loads. The rule is recorded in apps/sim/platform/AGENTS.md.
@emir-karabeg
emir-karabeg changed the base branch from improvement/integration-center to improvement/platform-core-chat November 7, 2026 21:26

This branch was successfully deployed

1 active deployment
Preview — 6b3a3208 Deployed Nov 7, 2026 by vercel[bot]
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