Repository navigation
test: pin drawText and drawButton behavior for an empty label - #54
Merged
Merged
Conversation
An empty string renders to a zero-width surface, so drawText paints nothing and drawButton draws a plain, still-clickable box. Nothing covered this, so a change that raised on "" or substituted placeholder text would have gone unnoticed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (one intrinsic pass, anchored on CI and local commands):
Judgment call flagged: Result: ready to merge. Only a test file changed, and none of the do-not-auto-merge paths are touched. This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
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.
Summary
Stage B (unit-test expansion) cycle for the text-rendering paths of
Graphik.drawText("")anddrawButton(..., text="", ...)had no coverage. pygame renders an empty string to a zero-width surface, so todaydrawTextpaints nothing anddrawButtondraws a plain box that is still clickable. Two characterization tests now pin that:test_draw_text_accepts_an_empty_string_and_paints_nothing— draws onto a green surface and requires every pixel to stay green.test_draw_button_with_an_empty_label_draws_a_plain_box— requires the whole box to becolorBox, no label ink, and the callback to still fire on an inside click."", or substituting placeholder text (e.g.text or " "rendered with an opaque background).graphik.pyis untouched, and no public API changes, so no consumer-impact check is needed.Skipped issues
All open issues were deferred because each needs a maintainer decision or touches a path excluded from autonomous change:
publish.ymltrigger: maintainer decision, touches.github/workflows/.test.ymlheader comment:.github/workflows/is excluded from autonomous change..github/workflows/is excluded from autonomous change.A Stage A documentation sweep (README, RELEASING.md, pyproject, docstrings) was run first. It found no drift that is not already tracked in #39/#46.
Test plan
python3 -m py_compile src/main/python/preponderous/graphik/graphik.pypython3 -m pytest -rA(headless via conftest): 66 passed (was 64), and both new tests are listed as PASSEDTestworkflow green on 3.9–3.13No tracking issue — gap found during triage.
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson