Skip to content

Commit 016e3c0

Browse files
committed
fix(emcn): restore embedded surfaces, drag regions and Docs keyboard focus
- Pass embedded from the host Surface, so organization views keep their focus outline and stay transparent without canvas. - Restore the Electron drag region for headers marked data-desktop-drag in the Platform bootstrap. - Give Docs a keyboard focus outline outside text fields, and keep NeutralBadge at its intrinsic width in column layouts. - Keep EMCN out of the packaged desktop dependencies: the renderer bundles it. - Trigger the Platform and Auth workflows on the legacy package and the hairline plugin; name the legacy package in the CI notes. - Wait for the reopened workspace picker before pressing Escape in the Auth browser check.
1 parent 9c361c3 commit 016e3c0

12 files changed

Lines changed: 28 additions & 10 deletions

File tree

‎.claude/rules/sim-imports.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ paths:
1313

1414
```typescript
1515
// ✓ Good
16-
import { Chip } from '@sim/emcn-legacy'
16+
import { Chip } from '@sim/emcn/button'
1717
import { useWorkflowStore } from '@/stores/workflows/workflow/store'
1818

1919
// ✗ Bad

‎.cursor/rules/sim-imports.mdc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ globs: ["apps/sim/**/*.ts","apps/sim/**/*.tsx"]
1313

1414
```typescript
1515
// ✓ Good
16-
import { Chip } from '@sim/emcn-legacy'
16+
import { Chip } from '@sim/emcn/button'
1717
import { useWorkflowStore } from '@/stores/workflows/workflow/store'
1818

1919
// ✗ Bad

‎.github/CI.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ WebKit acceptance on Blacksmith uses the matching, digest-pinned Playwright brow
4040

4141
HTTP and docs browser installation first asks the pinned Playwright driver to simulate its OS dependency installation. When the simulation requires no package changes, the runner avoids an apt update; missing dependencies, proposed upgrades, or an unsuccessful simulation use the normal dependency installer. Browser selection and downloads still use the pinned driver, including full native Chromium for extension acceptance.
4242

43-
`app/o` bundles `platform/embedded` and the EMCN packages (`packages/emcn`, `packages/emcn-platform`), so both are build and `ci:shared` inputs: an edit to either changes the build hash and selects every boundary. The Platform zone (`platform/{app,lib,fixtures,checks,docs,preview,public}` and its own configs) is a separate Next app that the embedded tree may not import, reached only through the `/org` rewrite, and is excluded by name so that a new `platform/` folder stays an input until it is declared zone-only. A zone-only edit selects `platform-design.yml` and the app's unit tests, and no main-app build or acceptance job.
43+
`app/o` bundles `platform/embedded` and the EMCN packages (`packages/emcn`, `packages/emcn-platform`, `packages/emcn-legacy`), so both are build and `ci:shared` inputs: an edit to either changes the build hash and selects every boundary. The Platform zone (`platform/{app,lib,fixtures,checks,docs,preview,public}` and its own configs) is a separate Next app that the embedded tree may not import, reached only through the `/org` rewrite, and is excluded by name so that a new `platform/` folder stays an input until it is declared zone-only. A zone-only edit selects `platform-design.yml` and the app's unit tests, and no main-app build or acceptance job.
4444

4545
Every HTTP and browser group consumes the same production build in an isolated job/database. Electron also uses that build and skips its development-route warm-up. Local HTTP and Electron development runs retain their dev-server behavior. Build inputs exclude test-only files so a harness edit can reuse an unchanged production build.
4646

‎.github/workflows/auth-ui.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- 'apps/sim/scripts/test-auth-ui-e2e.ts'
1111
- 'apps/sim/package.json'
1212
- 'apps/sim/postcss.config.mjs'
13+
- 'apps/sim/lib/postcss/hairline-border-width.cjs'
1314
- 'packages/emcn/**'
1415
- 'packages/emcn-auth/**'
1516
- 'bun.lock'

‎.github/workflows/platform-design.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ on:
3030
- 'apps/realtime/**'
3131
- 'packages/emcn/**'
3232
- 'packages/emcn-platform/**'
33+
- 'packages/emcn-legacy/**'
3334
- 'scripts/emcn-packages.ts'
3435
- 'apps/sim/lib/postcss/platform-embed.cjs'
3536
- 'scripts/check-platform-design*'

‎apps/desktop/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
"micromatch": "4.0.8",
4646
"safe-regex2": "5.1.2",
4747
"tldts": "7.4.18",
48-
"pdf-lib": "1.17.1",
49-
"@sim/emcn-auth": "workspace:*",
50-
"@sim/emcn": "workspace:*"
48+
"pdf-lib": "1.17.1"
5149
},
5250
"devDependencies": {
5351
"@electron/fuses": "1.8.0",
5452
"@playwright/test": "1.64.1",
53+
"@sim/emcn": "workspace:*",
54+
"@sim/emcn-auth": "workspace:*",
5555
"@sim/emcn-legacy": "workspace:*",
5656
"@sim/tsconfig": "workspace:*",
5757
"@types/micromatch": "4.0.10",

‎apps/sim/platform/styles/bootstrap.css‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,11 @@
66

77
@source "../../../../packages/emcn/src/components";
88
@source "../../../../packages/emcn-platform/src/components";
9+
10+
/* Electron moves the window from these headers; their controls stay clickable. */
11+
[data-sim-desktop-title-bar] [data-desktop-drag] {
12+
-webkit-app-region: drag;
13+
}
14+
[data-sim-desktop-title-bar] [data-desktop-drag] :is(button, a, input, textarea, [role="tab"]) {
15+
-webkit-app-region: no-drag;
16+
}

‎apps/sim/scripts/test-auth-ui-e2e.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ async function run() {
231231
await page.keyboard.press('Enter')
232232
await expect(workspace).toContainText('Design')
233233
await workspace.click()
234+
await expect(page.getByRole('listbox')).toBeVisible()
234235
await page.keyboard.press('Escape')
235236
await expect(workspace).toBeFocused()
236237
await expect(page.getByRole('listbox')).toBeHidden()

‎bun.lock‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/emcn-docs/src/components/badge/badge.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ interface NeutralBadgeProps {
4040

4141
export function NeutralBadge({ children }: NeutralBadgeProps) {
4242
return (
43-
<span className='inline-flex items-center rounded-md bg-[var(--docs-surface)] px-2 py-0.5 font-mono text-[var(--docs-muted)] text-docs-caption'>
43+
<span className='inline-flex w-fit items-center rounded-md bg-[var(--docs-surface)] px-2 py-0.5 font-mono text-[var(--docs-muted)] text-docs-caption'>
4444
{children}
4545
</span>
4646
)

0 commit comments

Comments
 (0)