Uh oh!
There was an error while loading. Please reload this page.
chore(lint): clear baseline lint errors in plugin-detail (#2713 Wave 3.2) - #2740
Merged
Conversation
…13 Wave 3) Nine react-hooks errors: the record renderers called hooks after conditional early returns (a real fragility). Restructured so hooks run unconditionally while rendered output is identical; no behavior change. - record-reference-rail: hoist useState above the empty-entries early return - record-related-list: move the !objectName placeholder return below the 4 hooks (pure context/memo reads); read-gate ordering unchanged - record-quick-actions: move the requiredPermissions gate below useActionEngine - record-highlights: useId + useRegisterHighlightFields unconditional; gate enforced after; register [] when denied (== not registering, no body-field hiding for highlights we don't render) - RelatedList SectionIcon (static-components): stable resolveIconComponent lookup -> scoped disable Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Wave 3 of the #2713 lint-gate restoration (Waves 1–2 in #2730 / #2737; #2738 landed plugin-dashboard).
@object-ui/plugin-detailwas red at baseline onmain. Errors only; rendered output unchanged.All nine are
react-hookserrors. Eight are the same real fragility: the record renderers called hooks after a conditional early return — React throws "rendered more/fewer hooks" if that guard toggles between renders. Each is restructured so hooks run unconditionally while the rendered output stays identical. I verified each hook's side-effect profile first (pureuseContext/useMemovs. effect-bearing) and picked the technique accordingly:record-reference-rail—useState(false)hoisted above the empty-entries early return (no dependency on it). Trivially safe.record-related-list— the!objectNameplaceholder return moved below the four hooks (usePermissions,useFieldPermissions,useRelatedRecordActions,useMemo). Those are pure context/memo reads (useFieldPermissionsisusePermissions+useMemo, no fetch), safe with an empty object name (objectName || ''). The object-level read-gate ordering is unchanged — covered byRecordRelatedListRenderer.readgate.test.record-quick-actions— therequiredPermissionsgate moved belowuseActionEngine(a pureuseContext+useMemoengine builder, no subscribe effect).record-highlights—useId+useRegisterHighlightFieldsnow run unconditionally; the permission gate is enforced after them.useRegisterHighlightFieldshas a register/unregister effect, so when the gate denies it is passed[]— equivalent to not registering, soRecordDetailsRenderernever hides a body field for highlights that aren't rendered.RelatedListSectionIcon(react-hooks/static-components) —resolveIconComponentis a stable registry lookup, not a component created during render → justified scoped disable.No lint config was loosened.
Verification
eslint→ 0 errors (9 at baseline).turbo run build→ 11/11 tasks green (confirms theobjectNamenarrowing changes type-check).plugin-detailsuite green — 249 passed / 28 files, including the dedicatedRecordRelatedListRenderer.readgate/.hostactions/.speclimittests that exercise the restructured read gate.Refs #2713 · follows #2730, #2737, #2738 · pattern from #2709
🤖 Generated with Claude Code