Skip to content

fix(web-ui-info): stop clipping the address, and document every setting - #382

Open
ChuckBuilds wants to merge 2 commits into
mainfrom
docs/web-ui-info-readme
Open

fix(web-ui-info): stop clipping the address, and document every setting#382
ChuckBuilds wants to merge 2 commits into
mainfrom
docs/web-ui-info-readme

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

The bug

On a 64x32 panel — the most common size — at ledmatrix:5000 is 68px of 4x6 text in 64px of panel. PIL clips silently at draw time, so it rendered with both ends sliced off:

t ledmatrix:500

check_plugin.py passes this on main (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:

  1. at <address>:5000 — the normal form
  2. <address>:5000 — the at prefix is dropped when it stops fitting
  3. the address wraps onto extra lines when even that is too wide

The 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).

Before After
t ledmatrix:500 on 64x32 ledmatrix:5000, in full
text at the top of a 128x64 panel text in the middle

Harness: 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:

  • the hostname/IP alternation — the panel swaps address every 10 seconds, which the old README never said. Documented along with how it interacts with display_duration (the timer is wall-clock, so consecutive turns in the rotation alternate even at the default duration).
  • the five-step IP detection order — AP-mode check, hostname -I, ip -4 addr show, a UDP socket to 8.8.8.8, then gethostbyname.
  • transition.enabled / .type / .speed do nothing — three of this plugin's five settings. manager.py never 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.py gained a hostname shot option that pins socket.gethostname(). Without it these images would bake in whoever ran the renderer, and --check would fail on every other machine. --check now reproduces all four images byte-identically.

Version 1.0.2 → 1.1.0 (layout behaviour changes).

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 2b598836-759b-49b0-bd2b-46cf95c16c3d


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 7 complexity

Metric Results
Complexity 7

View in Codacy

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

1 participant