Repository navigation
Read the add-option action's corner as the shared Button radius - #401
Conversation
#389 gave every ordinary action the 6px Button corner, including the add field's submit, but this nightly case still asserted the 50% circle the action wore before. Read the shared corner and pin the claim the docstring makes by comparing it against the option mark, which keeps its circle.
leaf-agent
left a comment
There was a problem hiding this comment.
The radius fix itself is right — .lf-compose-submit::before reads border-radius: var(--r) and --r is 6px, so 6px is what the action now draws.
The new sibling comparison reads the wrong mark, though. option is #job-camera, an option of #jobs, and #jobs is declared multiple in render_cases_interaction.py. Under lf-options[multiple] > lf-option > .lf-pick::before { border-radius: 3px; } that mark is a 3px rounded square — the corner #389's theme comment is explicit about ("A multiple group was drawing the same circles a single-pick one draws"). Measured on ASK_PAGE: #job-camera reads 3px, #br-steel reads 50%.
So face["radius"] != mark_radius passes as 6px != 3px, a difference between two rounded squares, while the docstring says the action "submits on the shared Button corner rather than borrowing the selection mark's circle" and the PR body says "the single-choice mark keeps its 50% circle". Neither is what the assertion reads. It would also stay green if the single-choice mark stopped being a circle, which is the case the sentence exists to catch.
#bracket is the single-choice group, and the test already reaches into it for card_words. Pinning its mark at 50% first is what makes the inequality mean the thing the docstring names.
Verified with uv run pytest tests/test_render_options_addition.py -q -n0 — 5 passed with the suggestion applied.
The comparison read #job-camera, an option of the multiple group #jobs, whose mark is the 3px rounded square rather than a circle. Read #br-steel in the single-choice group #bracket instead, and pin it at 50% first, so the inequality states what the docstring names.
## Problem `ci` is red on `main` at bc373f0. The nightly suite's `tests/test_render_options_addition.py::test_the_add_field_previews_the_option_it_will_make` fails deterministically with `AssertionError: assert '6px' == '50%'` ([run 34121206216](https://github.com/max-sixty/leaf/actions/runs/34121206216), 1 failed / 2128 passed). #389 gave every ordinary action the shared 6px Button corner, and `.lf-compose-submit::before` moved from `border-radius: 50%` to `var(--r)` along with it. That PR updated the radius readings in the modules it touched — `test_render_anchors.py`, `test_render_conversations.py`, `test_render_reactions.py` — but this case lives in a nightly module the PR did not touch, so neither the everyday suite nor the PR's touched-module nightly run reached it. It first ran after main moved. ## Solution Read the add action's fill at the shared Button corner. The docstring's claim is that the action submits "rather than borrowing the selection mark's circle", so the fix also reads the single-choice group's mark — `#br-steel` in `#bracket`, which keeps its 50% circle under #389's rule that circles remain only where the geometry has its own meaning — pins it at `50%`, and asserts the action's corner differs from it. The claim is now pinned by the distinction it names rather than by a literal that goes stale the next time the shared token moves, and the docstring says which corner the action takes. The evaluate block's local name for the pseudo-element changes from `circle` to `fill`, since it is no longer a circle. The other `"50%"` readings in the suite are the margin Button family and circular status markers, which #389 deliberately kept round; they passed in the same run. ## Testing - `uv run pytest tests/test_render_options_addition.py -q -n0` — 5 passed (the failure reproduced on `main` first, at the same assertion). - `uv run pre-commit run --files tests/test_render_options_addition.py` — passed. --- Automated fix for [failed run](https://github.com/max-sixty/leaf/actions/runs/34121206216) --------- Co-authored-by: leaf-agent <[email protected]>
Problem
ciis red onmainat bc373f0. The nightly suite'stests/test_render_options_addition.py::test_the_add_field_previews_the_option_it_will_makefails deterministically withAssertionError: assert '6px' == '50%'(run 34121206216, 1 failed / 2128 passed).#389 gave every ordinary action the shared 6px Button corner, and
.lf-compose-submit::beforemoved fromborder-radius: 50%tovar(--r)along with it. That PR updated the radius readings in the modules it touched —test_render_anchors.py,test_render_conversations.py,test_render_reactions.py— but this case lives in a nightly module the PR did not touch, so neither the everyday suite nor the PR's touched-module nightly run reached it. It first ran after main moved.Solution
Read the add action's fill at the shared Button corner. The docstring's claim is that the action submits "rather than borrowing the selection mark's circle", so the fix also reads the single-choice group's mark —
#br-steelin#bracket, which keeps its 50% circle under #389's rule that circles remain only where the geometry has its own meaning — pins it at50%, and asserts the action's corner differs from it. The claim is now pinned by the distinction it names rather than by a literal that goes stale the next time the shared token moves, and the docstring says which corner the action takes.The evaluate block's local name for the pseudo-element changes from
circletofill, since it is no longer a circle.The other
"50%"readings in the suite are the margin Button family and circular status markers, which #389 deliberately kept round; they passed in the same run.Testing
uv run pytest tests/test_render_options_addition.py -q -n0— 5 passed (the failure reproduced onmainfirst, at the same assertion).uv run pre-commit run --files tests/test_render_options_addition.py— passed.Automated fix for failed run