Uh oh!
There was an error while loading. Please reload this page.
test(plugin-view): install the record-level explain-probe double in ObjectView split-mode suites - #4698
Merged
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This was referenced Aug 15, 2026
yinlianghui
marked this pull request as ready for review
August 15, 2026 10:49
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4688 — this PR closes the
plugin-viewportion (96 → 0 ECONNREFUSED lines); theapp-shell+plugin-designerportion of #4688 does NOT come from the same probe and is filed separately (see below), so this PR alone does not close#4688.What this does
ObjectView.overlayTitleI18n.test.tsxandObjectView.overlayTitleNoProviderFallback.test.tsxrender a realObjectGrid(viaplugin-view'sObjectView,navigation.mode: 'split') withobjectName: 'contacts'and an id-carrying row, with no hostapiFetch.ObjectGridbatches the record-level write-verdict probe (POST /api/v1/security/explain, #4296), which falls back to the globalfetchand escapes to the real network under happy-dom —connect ECONNREFUSED 127.0.0.1:3000, same class as #3339 / PR #4105.Per #4105's convention (a per-package copy, not a cross-package test-dir import — no repo convention for the latter, confirmed by grep), added
packages/plugin-view/src/__tests__/explainDouble.ts(a copy ofplugin-grid/src/__tests__/explainDouble.ts) and wiredinstallExplainDouble()inbeforeEach/vi.unstubAllGlobals()inafterEachin both files. The double answersvisible: truefor every id — byte-identical to what the failing network call produced, since the hook fails open — so no existing assertion changes meaning, and it records every URL it's handed so an escape to some other endpoint stays observable rather than vanishing.Verification
main(b4bccc794, post PR fix(plugin-grid): row kebab ANDs the record-level write verdict, batched per page (#4296) #4689 merge):packages/plugin-view/baseline reproduced the issue's exact numbers — 11 files / 111 tests pass, 96 ECONNREFUSED lines.3acab7458, then reverted withgit checkoutback to the parent commit for the two test files, re-run, then restored): confirmed the predicted direction — ECONNREFUSED returned to exactly 96 with the fix removed, all 111 tests still green throughout (the escape is noise, not a test failure, in both directions).pnpm --filter @object-ui/plugin-view type-check: green.pnpm exec eslint --quieton the three changed files: clean.node scripts/check-changeset-presence.mjs: green (empty-frontmatter changeset declared, test-only precedent per test(app-shell): pin relation-field header-action predicates on the console record page #4641/test(app-shell): pin the built-in header Edit under a session-user relation predicate (objectstack#8499) #4666/test(parity): adapt the spec parity gates to 17.0.0 GA (ruled items 1-5); fork the four-block exemption #4671).node scripts/check-control-bytes.mjs: green.2341cd309.Why this PR does not also fix the
app-shell+plugin-designer180-line row#4688 attributes all three packages' ECONNREFUSED noise to the same grid explain probe ("the same escape lands in the consumer packages"). That holds for
plugin-view(verified above) but not forapp-shell/plugin-designer: bisecting the fullapp-shell+plugin-designersuite down to individual files (isolated single-file runs, since a batched run undercounts — some in-flight rejections don't settle before the process exits) landed all 180 lines in exactly 9 files underpackages/app-shell/src/views/metadata-admin/inspectors/(ConditionBuilder/PageBlockInspector/HookDefaultInspector/ActionDefaultInspector/ViewVariantInspectorsuites), summing to exactly 180. None of them renderObjectGrid. Instrumenting the actual fetch call site (vi.stubGlobal('fetch', …)insidevitest.setup.base.ts, output viaprocess.stderr.writesinceconsole.erroris swallowed by vitest for passing tests) showed the real URLs:GET /api/v1/meta/objectandGET /api/v1/meta/object/contact— the metadata-admin engine'suseObjectFields/useObjectOptionshooks (object-picker / field-list config for page-block inspectors), reached throughuseMetadataClient()→createConsoleMetadataClient()→createAuthenticatedFetch()→ the bare globalfetch. Unrelated toObjectGrid/useRecordCrudVerdicts/#4296.Per #4688's own acceptance criteria ("a remainder from a DIFFERENT probe is a new finding, not this card's"), filed separately as #4697, evidence and suggested remedy (the same recorded-double shape, for the metadata client) included there.
plugin-designerneeded no change — it contributes 0 lines either way.Generated by Claude Code