Uh oh!
There was an error while loading. Please reload this page.
fix(plugin-report): stop reading report.filter as an alias for runtimeFilter - #5224
Merged
Merged
Conversation
…timeFilter` The strict `ReportSchema` in `@objectstack/spec` already rejects `filter` and names the replacement itself, so honouring it in the renderer made the runtime looser than the published contract. Both alias reads go — the outer `report.runtimeFilter ?? report.filter` and the per-joined-block twin. Dropping the read alone would have been a silent narrowing (a stored document carrying `filter` renders unfiltered), so the key is reported instead of applied: a dev-mode warn-once that names the key, quotes the spec's own rename hint verbatim, and says no filter was applied. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-support-ai
marked this pull request as ready for review
August 18, 2026 16:05
Uh oh!
There was an error while loading. Please reload this page.
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.
Fixes#5137
DatasetReportRendererreadfilteras a lenient alias forruntimeFilter— a key the strictReportSchemain@objectstack/specalready rejects, and rejects while naming the replacement itself:So the producer side was unambiguous and even shipped the migration hint, while the consumer quietly accepted the rejected spelling anyway. Metadata that could not be authored through the validated path still rendered when it arrived by another route, which is the consumer-tolerance shape the declared=enforced doctrine retires. Triage ruled this needs no maintainer decision: the spec has already spoken.
What changed
Both alias reads are gone, in
packages/plugin-report/src/DatasetReportRenderer.tsx:report.runtimeFilter ?? report.filterblock.runtimeFilter ?? block.filterDatasetReportLike.filteralso stops being an undocumented equal-status alias. It stays declared, but now carries a doc comment saying it is not authorable, is never applied, and exists only so the renderer can notice it.The consequence, and why the key does not go quiet
Removing the read alone would have been a silent narrowing: a stored document still carrying
filternow renders unfiltered, which for a scoped report is worse than an error. Server-side permissions are unaffected and still apply, so this is not an access-control hole — it is a report showing rows its author meant to exclude, with nobody told.So the dropped key is reported rather than applied. When a document carrying
filterreaches the renderer, a dev-modeconsole.warnfires once per offending report or block, naming the key, quoting the spec's own rename hint verbatim, and stating that no filter was applied. It is a no-op underNODE_ENV=production, changes no types, and rejects nothing.The rename hint was copied from the spec rather than paraphrased — verified by running
ReportSchema.safeParseagainst the pinned@objectstack/spec17.0.0 and matching the exact substring, including its→(U+2192), which the issue body transcribed as ASCII->. A test pins the two strings together so an author meets one message, not two dialects of one message.Placement check, since the ruling asked for it:
console.warnis this repo's established dev channel for exactly this class of finding (@object-ui/corecolumn-identity conflicts, i18n missing keys,ObjectMap,actionKeys), so the warning does land somewhere a human sees it. Worth stating plainly, though: it reaches a developer or metadata author at the devtools console, not the end user looking at the report. Making the unfiltered render visible in the UI itself would be a larger behaviour change than the ruling authorises, so it was not attempted here.Tests
packages/plugin-report/src/__tests__/DatasetReportRenderer.rejectedFilterAlias.test.tsx— 9 tests pinning all three required facts:runtimeFilterstill applies, unchanged — report-level and per joined block, and the correct spelling stays silent.filterapplies nothing — asserted on the selection the renderer sends, not merely on the alias value's absence; also that the rejected value does not re-enter the selection under another name, that the report still renders, and that a storedfiltercannot shadow the host-suppliedruntimeFilterprop.UNFILTERED; it quotes the spec's own hint; it fires once per offending block and does not re-spam across re-renders; and it is silent underNODE_ENV=productionwhile still applying no filter.Reverse-verified in two legs from the committed fix, each isolating one fact:
runtimeFiltertests stayed green.Restored after each leg and confirmed byte-identical to the committed fix (
git diff HEADempty).Verification
Gate union run at
e9a7dfb36(final commit):pnpm exec vitest run packages/plugin-report/— 13 files, 149 tests passedpnpm --filter @object-ui/plugin-report type-check— clean (tsc --noEmit && tsc -p tsconfig.test.json)pnpm exec eslinton both changed sources — 0 errors (remaining warnings are pre-existing lines this PR does not touch)check:control-bytes,check:phantom-deps,check:self-import— greencheck-changeset-presence,check-changeset-no-major— greenTest scope was deliberately narrowed to
packages/plugin-report; the full farm is left to CI.check:published-distbuilds every published package and exceeded the local 10-minute cap, so it too is left to CI. The published surface is unchanged either way — the newresetReportFilterAliasWarningsexport (test-only, house precedent fromresetColumnIdentityWarnings) is not re-exported from the package barrel.Changeset
@object-ui/plugin-report:minor, with the break described in the body per AGENTS.md §版本号策略. Deliberately notmajor— that trips the fixed-group gate and versions all 39 packages.Scope
Three files: the renderer, its new test, the changeset. Nothing in
content/docs(#5047 is the docs half and is docs-only). The rest of the lenient-alias family — #5116, #5120, #5067 and #5068 — is untouched here; those are separate cards with separate consumers and remain open.Generated by Claude Code