Repository navigation
feat(v1.55.0): add remove-bui-anchor-render-props codemod - #165
Merged
Merged
Conversation
schultzp2020
marked this pull request as draft
October 12, 2026 21:03
Contributor
Author
|
Review-blocked: imported component provenance currently matches JSX names by text, so a local |
schultzp2020
marked this pull request as ready for review
October 12, 2026 21:39
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 free
to 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.
Summary
Follow-up for #151 on top of
f2476ae:opening.findAll({ kind: 'jsx_attribute' })scans. Only inspect direct opening attributes so nestedrenderprops inside custom render trees are untouched.render={(<a />)}) as safe anchor render and remove them.Closes #151.
Evidence
Red/green fixtures
tests/nested-render-prop-todo/*(red on previous head): proved nested<RouterLink render={<a />} />was incorrectly counted asrender-prop-removedand mutated.tests/parenthesized-anchor-safe/*(red on previous head): provedrender={(<a />)}incorrectly emitted TODO.Validation @ HEAD
8553f3cyarn workspace @backstage/remove-bui-anchor-render-props test✅ (13 tests + workflow validate)yarn format:check✅yarn lint✅yarn test✅yarn check:changed✅Performance audit (JSSG guidance: no-op baseline vs real, same workflow entry path)
Corpus: synthetic mostly-inert TSX tree (1545 files: 1500 inert, 30
@backstage/uino-render, 10 safe renders, 5 custom nested renders).Ran
codemod workflow run -w workflow.yaml --target <corpus> --dry-run --no-interactive --allow-dirtyand equivalent no-op workflow 3x each:1931, 1900, 2006(median1931)1905, 1896, 1914(median1905)0.987x(within noise; no substantive slowdown)Idempotence / edit evidence on apply copy:
render-prop-removed(Link)=10,todo-manual-review(Link, custom-render-prop)=5render; 5/5 custom files gained TODO and preserved nestedrender={<RouterLink render={<a />} />}Approved clean-source QA (read-only)
0863f0349c63fa7475b89aed71b6fb8214791394: rc=0, no diff/TODO candidates emitted; snapshot remained clean.4c760a005dd582df1a61aec39ae50ad565f6dbbc: rc=0, no diff/TODO candidates emitted; snapshot remained clean. Original dirty checkout untouched.Full-suite fixture side effect (post-#164 integration)
yarn testpassed twice on the integrated branch, but both runs generated the same untracked 145-bytecodemods/v1.55.0/remove-relations-compatibility-config/tests/flow-inline-comment-preserved-when-catalog-emptied/metrics.json(blob42847c1): a pre-existing feat(v1.55.0): add remove-relations-compatibility-config codemod #162 fixture with no tracked metrics file. This is a known test side effect, not a claim that full test leaves the worktree clean.yarn check:changedand 13/13 package fixtures passed, and the shipped feat(v1.55.0): add remove-bui-anchor-render-props codemod #165 workflow's two-case output and rerun idempotence passed. A dedicated feat(v1.55.0): add remove-relations-compatibility-config codemod #162 fixture follow-up can track the missing metrics file.Merge Danger
Door: two-way
Codemod package can be reverted before publication; migration output still requires user review of TODO cases.
Blast Radius: BUI link render prop migration
Changes are constrained to direct opening attributes on imported target components; nested custom-render trees are now explicitly protected from accidental recursive attribute edits.