Skip to content

Read the add-option action's corner as the shared Button radius - #401

Merged
max-sixty merged 2 commits into
mainfrom
fix/ci-34121206216
Sep 7, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fix/ci-34121206216

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

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, 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

#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 leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/test_render_options_addition.py Resolved
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.
@max-sixty
max-sixty merged commit d616a4f into main Sep 7, 2026
7 checks passed
@max-sixty
max-sixty deleted the fix/ci-34121206216 branch September 7, 2026 13:21
max-sixty pushed a commit that referenced this pull request Sep 7, 2026
## 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants