Skip to content

test(plugin-dashboard): close DatasetWidget's dimension-metadata network escape - #5300

Merged
os-support-ai merged 3 commits into
mainfrom
claude/issue-5280-dataset-widget-network-escape
Aug 19, 2026
Merged

test(plugin-dashboard): close DatasetWidget's dimension-metadata network escape#5300
os-support-ai merged 3 commits into
mainfrom
claude/issue-5280-dataset-widget-network-escape

Conversation

@os-support-ai

@os-support-ai os-support-ai commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Fixes #5280

What

DatasetWidget.test.tsx's dimension-metadata probe — useDatasetDimensionMeta's apiFetch ?? fetch fallback (packages/react/src/hooks/useDatasetDimensionLabels.ts), reached whenever a mocked queryDataset result carries object — escaped to the real network under happy-dom (default document URL http://localhost:3000). Same root cause as #5225 (packages/plugin-report), confirmed by re-tracing the call chain in this package rather than assumed: DatasetWidgetuseDatasetDimensionMetaloadDimensionFieldMetaGET /api/v1/meta/object/{object name}.

Ports the exact fix shape #5225's reference PR (#5283, DatasetReportRenderer.test.tsx) established: a recording double answers the metadata route with an option-free payload (byte-identical to what the failed read used to produce, so no pre-existing assertion changes meaning), records every URL, and afterEach fails on any non-metadata escape instead of silently swallowing it — not a blanket network stub. cleanup() runs before vi.unstubAllGlobals() in the same afterEach, avoiding the reverse-registration-order flake #5225 measured (1 leaked attempt in 6 runs from vitest's LIFO afterEach ordering).

File surface: packages/plugin-dashboard/src/__tests__/DatasetWidget.test.tsx only, plus a changeset. No product code changed.

Measured — my own numbers, re-derived on current origin/main per the dispatch note (the package moved minutes before this card started, PR #5207)

Before (baseline run at branch point, 95cf24168):

Test Files  1 passed (1)
     Tests  52 passed (52)
ECONNREFUSED lines: 10   (5 real connection attempts: 3x GET .../meta/object/showcase_task, 2x .../showcase_deal)

No invoices request came from this file — that line in the issue's original capture does not reproduce from DatasetWidget.test.tsx; filed separately as #5299 (see below).

After (post-merge HEAD 6c4c090e6, 8 consecutive isolated runs + re-confirmed at the final head):

Test Files  1 passed (1)
     Tests  55 passed (55)
ECONNREFUSED lines: 0   (0/8 runs)

All 52 pre-existing tests pass, unchanged in behaviour — none of them depended on the swallowed failure. 3 new tests pin the probe's own request shape (which object, exactly once, over the metadata route; no probe when no object; the resolved document actually reaching a rendered cell — a success path that had never once executed while the request always failed).

Reverse verification

Predicted: reverting the test file to its pre-fix (origin/main) content restores the 5-attempt/10-line escape and drops the pin tests (55 to 52), with the pre-existing 52 staying green throughout (this defect class swallows a side effect, not an assertion — the observables are the connection count and the pins' presence, not red/green).

Observed (committed the fix first, then git checkout origin/main -- {path}, ran, then git checkout HEAD -- {path} to restore):

Test Files  1 passed (1)
     Tests  52 passed (52)
ECONNREFUSED lines: 10

Matches the prediction exactly.

An adjacent finding, filed separately — not fixed here

Running the whole package (pnpm exec vitest run packages/plugin-dashboard) after this fix still shows an intermittent 1-attempt residual, confirmed independent of this file (present/absent with DatasetWidget.test.tsx removed from the directory entirely). Bisected to DashboardGridLayout.datasetPath.test.tsx, which reproduces 3/3 in isolation and most likely explains the stray "invoices" request in #5280's original capture. Out of this card's file surface (and #5264 is in flight in this same package) — filed as #5299.

Verification

  • pnpm --filter '@object-ui/plugin-dashboard' type-check — pass (re-run at post-merge HEAD)
  • pnpm --filter '@object-ui/plugin-dashboard' lint — pass, 0 errors (317 pre-existing warnings, none in the touched file's new lines)
  • node scripts/check-control-bytes.mjs — pass
  • node scripts/check-changeset-presence.mjs — pass (empty-frontmatter changeset declared)
  • pnpm exec vitest run packages/plugin-dashboard/src/__tests__/DatasetWidget.test.tsx (repo root) — 8 consecutive clean runs, 0 ECONNREFUSED, 55/55 passed
  • pnpm exec vitest run packages/plugin-dashboard (whole package, repo root) — 64 files / 581 tests passed

Merged origin/main (7260a1ed4, unrelated eslint-rules commit) before opening this PR — no conflicts. Final head: 6c4c090e6.

Generated by Claude Code

claude added 2 commits August 19, 2026 07:22
…ork escape (#5280)

DatasetWidget.test.tsx's dimension-metadata probe (useDatasetDimensionMeta's
apiFetch ?? fetch fallback) escaped to the real network — 5 live connection
attempts per run, best-effort-swallowed so all 52 tests stayed green. Same
root cause as #5225 (packages/plugin-report); ports the same fix shape from
its reference PR #5283: a recording double answers the metadata route with
an option-free payload, afterEach fails on any non-metadata escape, and
three new tests pin the probe's own request shape. cleanup() runs before
vi.unstubAllGlobals() in the same afterEach to avoid the reverse-registration
flake #5225 measured (1/6 leaked attempts).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 25.3 KB 350 KB
Entry file index-rutq2Tr4.js
Status PASS

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 9.83KB 3.70KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 8.92KB 3.41KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 29.33KB 7.05KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.13KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.64KB 2.21KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.79KB
auth (createAuthenticatedFetch.js) 6.34KB 2.43KB
auth (index.js) 2.71KB 1.22KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.02KB 0.88KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 26.07KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.65KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 506.27KB 113.31KB
core (index.js) 4.11KB 1.62KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 159.80KB 44.34KB
fields (index.js) 237.07KB 59.46KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.42KB 1.39KB
i18n (pickLocalized.js) 3.69KB 1.73KB
i18n (provider.js) 23.13KB 7.63KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 29.43KB 7.15KB
i18n (useSafeTranslation.js) 7.77KB 3.13KB
layout (index.js) 39.16KB 10.97KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.74KB
mobile (index.js) 1.50KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 9.35KB 3.31KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 4.42KB 1.42KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.81KB 0.83KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 46.62KB 12.83KB
plugin-charts (index.js) 64.75KB 18.37KB
plugin-chatbot (index.js) 181.21KB 43.14KB
plugin-dashboard (index.js) 127.97KB 32.84KB
plugin-designer (index.js) 212.39KB 42.83KB
plugin-detail (index.js) 241.46KB 60.56KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 123.77KB 30.07KB
plugin-gantt (index.js) 164.10KB 39.87KB
plugin-grid (index.js) 198.22KB 53.27KB
plugin-kanban (index.js) 52.93KB 14.60KB
plugin-list (index.js) 111.66KB 27.13KB
plugin-map (index.js) 19.96KB 6.56KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 42.84KB 11.77KB
plugin-timeline (index.js) 26.68KB 7.66KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 84.34KB 20.61KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 36.10KB 12.26KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.33KB 0.69KB
react (schema-input.js) 1.45KB 0.83KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (index.js) 4.77KB 2.16KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 10.76KB 3.17KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 6.92KB 2.40KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.87KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-retry.js) 4.32KB 2.02KB
types (index.js) 3.08KB 1.53KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 25.3 KB 350 KB
Entry file index-rutq2Tr4.js
Status PASS

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 9.83KB 3.70KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 8.92KB 3.41KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 29.33KB 7.05KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.13KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.64KB 2.21KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.79KB
auth (createAuthenticatedFetch.js) 6.34KB 2.43KB
auth (index.js) 2.71KB 1.22KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.02KB 0.88KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 26.07KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.65KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 506.27KB 113.31KB
core (index.js) 4.11KB 1.62KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 159.80KB 44.34KB
fields (index.js) 237.07KB 59.46KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.42KB 1.39KB
i18n (pickLocalized.js) 3.69KB 1.73KB
i18n (provider.js) 23.13KB 7.63KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 29.43KB 7.15KB
i18n (useSafeTranslation.js) 7.77KB 3.13KB
layout (index.js) 39.16KB 10.97KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.74KB
mobile (index.js) 1.50KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 9.35KB 3.31KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 4.42KB 1.42KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.81KB 0.83KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 46.62KB 12.83KB
plugin-charts (index.js) 64.75KB 18.37KB
plugin-chatbot (index.js) 181.21KB 43.14KB
plugin-dashboard (index.js) 127.97KB 32.84KB
plugin-designer (index.js) 212.39KB 42.83KB
plugin-detail (index.js) 241.46KB 60.56KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 123.77KB 30.07KB
plugin-gantt (index.js) 164.10KB 39.87KB
plugin-grid (index.js) 198.22KB 53.27KB
plugin-kanban (index.js) 52.93KB 14.60KB
plugin-list (index.js) 111.66KB 27.13KB
plugin-map (index.js) 19.96KB 6.56KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 42.84KB 11.77KB
plugin-timeline (index.js) 26.68KB 7.66KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 84.34KB 20.61KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 36.10KB 12.26KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.33KB 0.69KB
react (schema-input.js) 1.45KB 0.83KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (index.js) 4.77KB 2.16KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 10.76KB 3.17KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 6.92KB 2.40KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.87KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-retry.js) 4.32KB 2.02KB
types (index.js) 3.08KB 1.53KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@os-support-ai
os-support-ai marked this pull request as ready for review August 19, 2026 12:10
@os-support-ai
os-support-ai added this pull request to the merge queue Aug 19, 2026
Merged via the queue into main with commit 703b616 Aug 19, 2026
22 checks passed
@os-support-ai
os-support-ai deleted the claude/issue-5280-dataset-widget-network-escape branch August 19, 2026 12:11
os-support-ai pushed a commit that referenced this pull request Aug 19, 2026
…data network escape (#5299)

DashboardGridLayout.datasetPath.test.tsx's 'options.data provider widget'
negative-control test made a real network call — ECONNREFUSED on port 3000,
1 attempt per isolated run, best-effort-swallowed so all 13 tests stayed
green. `-t` bisected across all 13 cases in isolation: only this one test
escapes (3/3); the two #4613 legacy-retired-widget candidates the card named
do NOT escape alone (0/1 each), so useDatasetDimensionMeta's `!object` guard
was never the site, as the card's own re-derived reading suspected.

Root cause: the options.data.provider:'object' widget maps to component type
`object-chart`, whose ObjectChart.tsx still carries its own inline
`apiFetch ?? fetch` category-color probe (the ORIGINAL #4106 defect site,
never migrated to the useDatasetDimensionMeta hook #4389 extracted for the
dataset-bound path). With no SchemaRendererProvider in this file's render
tree, that probe degrades to the real global `fetch`.

Ports the same fix shape #5225's reference PR #5283 established and #5280
(PR #5300) ported: a recording double answers the metadata route, afterEach
fails on any non-metadata escape, and cleanup() runs before
vi.unstubAllGlobals() in the same afterEach to avoid the reverse-registration
flake #5280 measured. One new pin test asserts the probe's own request shape
— exactly one call to /api/v1/meta/object/invoices.

Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
os-support-ai pushed a commit that referenced this pull request Aug 19, 2026
…t-only (#5299)

Empty-frontmatter changeset, matching #5280's port (#5300) — no published
behaviour changes.

Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugin-dashboard: DatasetWidget.test.tsx escapes to the real network on the dimension-metadata probe (same root cause as #5225)

2 participants