fix(web-ui-info): stop clipping the address, and document every setting - #382
Open
ChuckBuilds wants to merge 2 commits into
Open
fix(web-ui-info): stop clipping the address, and document every setting#382ChuckBuilds wants to merge 2 commits into
ChuckBuilds wants to merge 2 commits into
Conversation
On a 64x32 panel -- the most common size -- "at ledmatrix:5000" is 68px of 4x6 text in 64px of panel, and PIL clips silently at draw time, so it rendered as "t ledmatrix:500" with both ends sliced off. The render harness passes this: it measures the bounding box it was asked to draw, not the pixels that survived. The address line now shortens in stages instead -- drop the "at " prefix, then wrap the address -- and the block is centred vertically rather than pinned 5px from the top, which left the text stranded at the top of a tall panel. The README gains real rendered screenshots for the panel-size and hostname-length behaviour, the hostname/IP alternation the old README never mentioned, the five-step IP detection order, and a note that the three transition.* settings are read by nothing (#381). The docs renderer can now pin socket.gethostname, so these images render identically on any machine instead of baking in whoever ran them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 7 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Both sides added an independent option to the documentation renderer, so the resolution keeps both: attrs (from #386, runtime state for event-driven plugins) and hostname (this branch, pinning socket.gethostname so a panel that prints the device name renders the same on any machine). Verified after resolving: --check reproduces this branch's four hostname-pinned images and on-air's four attrs-driven ones byte-identically, so neither seam was lost in the merge. Also added both options to the shot-key docstring, which listed neither. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The bug
On a 64x32 panel — the most common size —
at ledmatrix:5000is 68px of 4x6 text in 64px of panel. PIL clips silently at draw time, so it rendered with both ends sliced off:check_plugin.pypasses this onmain(8/8). The harness measures the bounding box of the text it was asked to draw, not the pixels that survived the draw — so clipping is invisible to it. I only caught it by looking at the rendered image.The fix
The address line now shortens in stages rather than being cut:
at <address>:5000— the normal form<address>:5000— theatprefix is dropped when it stops fittingThe block is also centred vertically instead of pinned 5px from the top, which left the text stranded against the top edge of a tall panel (the harness's fill warnings on 64x64/128x64/128x96 were pointing at this).
t ledmatrix:500on 64x32ledmatrix:5000, in fullHarness: 8/8 pass after the change.
The README
Rewritten with real rendered screenshots, and covering three things the old one did not mention at all:
display_duration(the timer is wall-clock, so consecutive turns in the rotation alternate even at the default duration).hostname -I,ip -4 addr show, a UDP socket to 8.8.8.8, thengethostbyname.transition.enabled/.type/.speeddo nothing — three of this plugin's five settings.manager.pynever reads them and the core implements no display transitions. Marked non-functional and cross-referenced to Transition settings are declared in five plugin schemas and read by none of them #381.All five schema leaves are documented; the config-token audit against the old README drops nothing but a placeholder URL.
Tooling
render_docs_assets.pygained ahostnameshot option that pinssocket.gethostname(). Without it these images would bake in whoever ran the renderer, and--checkwould fail on every other machine.--checknow reproduces all four images byte-identically.Version 1.0.2 → 1.1.0 (layout behaviour changes).
🤖 Generated with Claude Code