Repository navigation
Conversation
Copied unchanged from claude/form-preset-entity-kinds so this branch, which is based on #2461, can load a word list. Drops out of the diff once the preset stack merges.
The texts that mean nothing is chosen yet ("-- Select --", "Choose one",
...) are English UI vocabulary. reconciler._DEFAULT_PLACEHOLDERS and the
default of FieldBindingSpec.placeholder_values now both load
form_tx/presets/words/placeholders.json. Both are equal to the old
literals; a test reads those from history and compares.
|
From: Gemini (gemini-3.1-pro-preview), round 1 Sent the full diff of this PR's own files, those files in full, and any earlier findings. The PR successfully extracts the hardcoded placeholder texts into a JSON word list without altering the values, ensuring behavior remains strictly identical. No fail-open paths are introduced. Here are the findings: SHOULD-FIX (Generality Rule Violation)
NIT
Gate-Direction Question
APPROVE WITH NITS |
|
From: Claude Author declaration. I wrote this change and checked it at the head above. Everything here is synthetic; no real app was run.
|
FormPack.placeholder_values (optional) replaces the engine's default placeholder list for controls no binding names; a binding already sets its own. None keeps the default from presets/words. An unset override is left out of the pack digest, so existing packs keep their digests.
…ord list too codecs.resolve_unique_option kept a third copy of the placeholder texts. Its default now loads the same presets/words/placeholders.json; a test reads the old default from 1ddd697 and compares.
…rol scan From review: _scan_unbound_controls and the popup return checks still used the default list, so a pack that does not count "-- Select --" as a placeholder could have an unbound control holding it treated as empty. They now use the pack's list. A test runs the scan with and without the override and fails without this fix.
|
From: Gemini (gemini-3.1-pro-preview), round 2 Sent the full diff of this PR's own files, those files in full, and any earlier findings. This PR successfully implements the digest exclusion for unset overrides and wires the JSON word list into the option resolver. However, the core feature—applying the pack's placeholder override to unbound controls—is missing from the function that actually scans unbound controls, introducing a fail-open path. Additionally, the earlier findings were not addressed. Here is the review: BLOCKER (Fail-Open / Correctness Bug)
SHOULD-FIX (Test Gap)
SHOULD-FIX (Generality Rule Violation)
NIT
REQUEST CHANGES |
|
From: Gemini (gemini-3.1-pro-preview), round 3 Sent the full diff of this PR's own files, those files in full, and any earlier findings. The blocker and test gap from the previous round have been successfully addressed. The fail-open path in There is nothing above a nit remaining. NIT
APPROVE WITH NITS |
|
From: Claude Author declaration at the head above. Synthetic tests only; no real app was run.
|
What this does
Fifth of the form_tx preset moves. It is based on #2461 (
claude/form-tx-rework), because #2461 lengthened the placeholder list from 4 entries to 10, so main's list differs.The option texts that mean nothing is chosen yet ("-- Select --", "Choose one" and so on) are English UI vocabulary. Two copies are replaced by one file,
form_tx/presets/words/placeholders.json:reconciler._DEFAULT_PLACEHOLDERS;FieldBindingSpec.placeholder_values.Includes a carried file. The first commit carries
form_tx/presets/__init__.pyunchanged from the preset stack (#2503 to #2506), so this branch can load a word list. Review only the second commit. The carried file drops out once the stack merges.No behaviour change
tests/test_form_tx_placeholder_words.pyreads both old tuple literals from1ddd69712withastand checks that each default is equal to the old one and comes from the one word list.Tests
tests/test_form_tx_placeholder_words.py: 3 passed.ruff checkis clean.ruff format --checkflags one line inreconciler.pythat this PR doesn't touch. fix(form-tx): re-check after a sign-in, watch unbound controls, name every stop #2461 has the same flag.Since opening
FormPack.placeholder_valuesis optional and applies to controls that no binding covers. A binding already sets its own. The unbound-control scan and the popup return checks use the pack's list.codecs.resolve_unique_option's default, now loads the same file. The old default is read from1ddd69712.FormPack.digest()change conflicts with refactor(form-tx): move the primary entity kinds to a JSON word list #2505; see that PR.