Repository navigation
V05.2: keep typed move coordinates on a re-selection and pre-fill in round-trip form - #107
Merged
Blogbotana merged 1 commit intoOct 20, 2026
Conversation
…round-trip form Selecting the already selected element again rewrote the move form with the snapshot's placement, silently discarding what the user had typed. And the pre-fill used Display formatting, so a placement with float noise (for example 5.551115123125783e-17) printed as a 34-character decimal string and failed the number field's own 32-character cap on an untouched form. The pre-fill now uses the shortest round-trip (Debug) form, which parses back and always fits the cap, and a re-selection of the same element leaves the typed coordinates alone. (cherry picked from commit 934ccaf)
axisrow
commented
Oct 20, 2026
axisrow
left a comment
Collaborator
Author
There was a problem hiding this comment.
Verdict: approved
Promotion of the V05.2 edit-prefill fix; the diff is one behaviour change in Editor::select plus tests.
Checked in detail:
- The re-selection guard compares
ElementInfoby value, so it is identity-correct: the same unchanged element keeps the typed coordinates, while a genuinely moved element (different reported translation) pre-fills the new one. A stalestagedpreview is still dropped unconditionally, which is the safe direction — the user re-previews instead of committing a stale snapshot, and the doc comment states the typed-text versus staged-edit distinction accurately. format!("{v:?}")(shortest round-trip) is the right prefill form: it stays under the 32-character number-field cap for every finite f64 (worst case-1.7976931348623157e308, 22 chars) whereDisplaywould print tiny values as a digit string that overflows the cap, and the CLI float parser accepts exponent notation, which the new test exercises end to end throughprepare.- The new test covers all three behaviours (round-trip prefill with float noise and exponents, re-click keeps typing, another selection pre-fills its own translation), and the two updated assertions (
"0"to"0.0") are the only Display-to-Debug cosmetic fallout. - No production code outside
selectis touched; the fork has run this exact behaviour since its V05.2 fix.
3 of 4 tasks
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.
What this changes
Mirror of the fork's #37 (
axisrow/BeamCraft), rebased onto upstreammaster73c3597.One commit, verbatim:
(
934ccaf).The V05.2 edit panel's Move form was re-created empty on every re-selection, so typed but
uncommitted coordinates vanished when the user clicked another element and back; the pre-fill
also showed internal
f64display instead of the round-trip form the CLI accepts. The formnow keeps what was typed across a re-selection and pre-fills from the element in the exact
round-trip representation. Pure UI-side change on the V05.2 edit panel; the engine and the
CLI are untouched.
How you verified it
cargo clippy -p beamcraft-ui --all-targets -- -D warningscargo test -p beamcraft-ui --test edit_tools— 7 tests, 0 failed (the suite drivesthe edit state machines against the real CLI; the change's round-trip pre-fill is
covered by the move-form assertions)
Provenance (clean-room)
🤖 Generated with Claude Code
Verified final integration status
Earlier preparation/draft notes in this historical description are superseded by GitHub's final state: merged into master on 2026-10-20T13:07:30Z. Independently fetched integration commit 6ccfd5b: Merge pull request #107 from axisrow/ao/task-next-fork/promotion/v052-edit-prefill. This records delivery of this PR's limited slice, not completion of open acceptance gates.
Issue tracking
Fixes #350