Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Module boundaries follow-ups: storybook element order, dead window-bridge rule (#79803)

Romeo Van Snicke7de47b60835
diff --git a/frontend/lint/module-boundaries.mjs b/frontend/lint/module-boundaries.mjs
index 6f10f2a934f..b684247f596 100644
--- a/frontend/lint/module-boundaries.mjs
+++ b/frontend/lint/module-boundaries.mjs
@@ -159,8 +159,8 @@ const elements = [
pattern: "enterprise/frontend/src/embedding-sdk-package/**",
}),
// Window-global bridges between the SDK bundle and the npm package. They
- // stay shared tier (both artifacts compile them in), but their payload
- // types are owned by the bundle, hence the type-only allow rule below.
+ // stay shared tier (both artifacts compile them in) and carry their payloads
+ // as opaque types; each artifact pins the concrete bundle types on its side.
...[
"frontend/src/embedding-sdk-shared/lib/ensure-metabase-provider-props-store.ts",
"frontend/src/embedding-sdk-shared/lib/metabot-state-channel.ts",
@@ -172,6 +172,17 @@ const elements = [
mode: "full",
}),
),
+ // Storybook config is a composition root: preview wires app-tier decorators.
+ // Needs its own pattern because ** doesn't match dot-folders in the lint,
+ // and must come before shared/embedding-sdk-shared: the affected-tests
+ // tooling matches with `dot: true` and first-element-wins, so a later
+ // position would hand these files to the shared module in the test graph.
+ createElement({
+ type: "app",
+ name: "misc",
+ pattern: "frontend/src/embedding-sdk-shared/.storybook/**",
+ mode: "full",
+ }),
createElement({
type: "shared",
name: "embedding-sdk-shared",
@@ -339,9 +350,6 @@ const elements = [
// GraalJS) - like app.tsx, it composes OSS + EE code for a build artifact.
// Full-mode entries match before folder patterns, whatever the order.
"frontend/src/metabase/static-viz/index.tsx",
- // Storybook config is a composition root: preview wires app-tier decorators.
- // Needs its own pattern because ** doesn't match dot-folders.
- "frontend/src/embedding-sdk-shared/.storybook/**",
].map((path) =>
createElement({
type: "app",
@@ -438,13 +446,6 @@ const baseRules = [
},
// Whitelisted cross-tier edges. Keep this list short; every entry should
// eventually be removed.
- // Window-bridge ABI: the payload shapes are owned by the bundle.
- // TODO(embedding-modules): decouple with shared contracts.
- {
- from: ["shared/embedding-sdk-window-bridge"],
- allow: ["app/embedding-sdk-bundle"],
- importKind: "type",
- },
// The admin routes lazy-mount the app-tier theme editor. Remove once the
// route is registered from the app tier instead.
{