Fix: live-wrap matches a capitalised component to its rendered tag (#875) - #914
Open
abdulwahabone wants to merge 1 commit into
Open
abdulwahabone wants to merge 1 commit into
abdulwahabone wants to merge 1 commit into
Conversation
) The browser reports the rendered tag lowercased (`input`), and find_opener_line compared it to the source opener (`Input`) with ==, so live-wrap and live-insert reported "could not locate element" for any same-named component. The comparison now ignores ASCII case. The closing-line overshoot on multi-line self-closing tags is #852 and is not touched here. AI assistance: Claude Code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Collaborator
Author
This branch has not been deployed
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.
find_opener_linecompared the browser's lowercased rendered tag (input) to the source opener (Input) with==, solive-wrapandlive-insertreported "could not locate element" for any same-named component. The comparison now ignores ASCII case; the contract sentence, a unit test, and one oracle case cover it.Refs #875 (the opener half of Bug A). Merge after or with the #852 fix: with the opener now found, a multi-line or
=>-in-prop self-closing component still gets an overshot closing line fromfind_closing_line, where it used to fail cleanly. Bug B is not reproduced and not touched.Validation:
cargo test -p impeccable-live, release build,IMPECCABLE_BIN=<branch build> bun run test(oracle and framework fixtures green).AI assistance: Claude Code.
🤖 Generated with Claude Code
Note
Low Risk
Narrow change to tag comparison during source search; slightly broader matching for similarly named tags with different casing only.
Overview
live-wrap / live-insert element location now treats
--tagand the source opener as a match when they differ only by ASCII case (e.g. browserinputvs source<Input>), instead of failing with "could not locate element."find_opener_lineinwrap_common.rsuseseq_ignore_ascii_caseon both the match line and the ≤10-line backwalk path. CLI-CONTRACT.md documents this behavior. Coverage adds a Rust unit test and an oracle case (live-wrap-tsx-component-tag-case) for wrapping a capitalized JSX component with a lowercased--tag.Reviewed by Cursor Bugbot for commit 6993631. Bugbot is set up for automated code reviews on this repo. Configure here.