Skip to content

feat(weather): restore full moon-phase names on the almanac page - #159

Closed
rpierce99 wants to merge 1 commit into
ChuckBuilds:mainfrom
rpierce99:feat/almanac-full-moon-names
Closed

feat(weather): restore full moon-phase names on the almanac page#159
rpierce99 wants to merge 1 commit into
ChuckBuilds:mainfrom
rpierce99:feat/almanac-full-moon-names

Conversation

@rpierce99

@rpierce99 rpierce99 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

What

The almanac page abbreviated four of the eight moon-phase names ("Wax Crescent", "Wax Gibbous", "Wan Gibbous", "Wan Crescent") to survive the old fixed layout. The v2.4.0 redesign (capped moon icon + adaptive title font) freed up the horizontal room those abbreviations were working around, so this restores the full names:

  • _get_moon_phase_name now returns Waxing/Waning Crescent and Waxing/Waning Gibbous.
  • _almanac_layout shows the full name where it fits, falls back to the abbreviation when the column is tight, and only trims characters as a last resort — so no panel ever shows a mid-word cut where a whole word would fit.

Screenshots

Rendered from the committed golden fixture (Dallas, 2026-06-14 — a day astral resolves cleanly, so the page shows a real moonrise/moonset; moon phase 0.97 → "Waning Crescent", the longest restored name). Upscaled 6× for legibility.

Size Almanac page
256×32 256x32
128×32 128x32
128×64 128x64
64×32 64x32

The three roomy panels show the full "Waning Crescent"; the cramped 64×32 panel degrades to a clean "Wan" rather than a mid-word trim.

Tests

  • Extended test_almanac_layout.py: asserts the full names are returned, that they render intact on a wide panel, and that the fitted title is always a clean variant (full or abbreviation) whenever the abbreviation fits — never a mid-word trim.
  • Added a deterministic harness fixture (test/harness.json + real cached Open-Meteo/astral data) and golden images for the almanac page at every supported size to guard against future drift.
  • Plugin safety harness passes (functional + bounds) across all sizes; golden comparison passes.

Version bumped to 2.5.1.

Note: the in-flight moonset-recovery PR also bumps this plugin to 2.5.1 — whichever lands second will need a 2.5.2 bump.

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@rpierce99, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 55 minutes. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 325b645e-52c5-4721-acf1-bdeb4f857a55

📥 Commits

Reviewing files that changed from the base of the PR and between 22409dd and 1abfd0b.

⛔ Files ignored due to path filters (4)
  • plugins/ledmatrix-weather/test/golden/128x32/almanac.png is excluded by !**/*.png
  • plugins/ledmatrix-weather/test/golden/128x64/almanac.png is excluded by !**/*.png
  • plugins/ledmatrix-weather/test/golden/256x32/almanac.png is excluded by !**/*.png
  • plugins/ledmatrix-weather/test/golden/64x32/almanac.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • plugins.json
  • plugins/ledmatrix-weather/manager.py
  • plugins/ledmatrix-weather/manifest.json
  • plugins/ledmatrix-weather/test/fixtures/mock.json
  • plugins/ledmatrix-weather/test/harness.json
  • plugins/ledmatrix-weather/test_almanac_layout.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@codacy-production

codacy-production Bot commented Jun 13, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 9 complexity

Metric Results
Complexity 9

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.

The v2.4.0 almanac redesign (capped moon icon + adaptive title font)
freed up horizontal room that the old fixed layout didn't have, so the
phase names no longer need to be abbreviated to fit.

_get_moon_phase_name now returns the full "Waxing/Waning Crescent" and
"Waxing/Waning Gibbous" names instead of the clipped "Wax/Wan" forms.
_almanac_layout shows the full name where it fits and falls back to the
abbreviation before trimming characters, so wide panels (128x32, 256x32,
128x64) show the full name and the cramped 64x32 panel degrades to a
clean abbreviation rather than a mid-word cut.

Adds a deterministic harness fixture (real Open-Meteo + astral data,
frozen instant) and golden images for the almanac page at every
supported size so the rendered text is guarded against future drift.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rpierce99

Copy link
Copy Markdown
Contributor Author

Superseded by #163, which combines this with #157 into a single 2.5.1 release (both PRs bumped to 2.5.1, so they couldn't both land).

@rpierce99 rpierce99 closed this Jun 14, 2026
ChuckBuilds pushed a commit that referenced this pull request Jun 15, 2026
…mes (2.5.1) (#163)

Combines the two open almanac (moon) page PRs into a single 2.5.1 release so
they don't both claim the same version. Supersedes #157 and #159.

- Recover missing moonset: astral only searches a single calendar day, so once
  a month the event straddles midnight and it raises "Moon never sets on this
  date" (sffjunkie/astral #88, #105). Fall back to scanning the moon's
  elevation across the day and bisecting the horizon crossing. Same fallback
  covers moonrise.
- Show true illumination: the "%" next to the phase name showed cycle progress
  (so a waning crescent read 86% instead of ~13% lit); it now converts phase to
  the true illuminated fraction.
- Restore full moon-phase names ("Waxing/Waning Crescent", "Waxing/Waning
  Gibbous") now that the redesigned layout has room: full name where it fits,
  abbreviation when tight, character trim only as a last resort.

Tests: test_almanac_moon_data.py, extended test_almanac_layout.py (incl. the
full-name assertions), and test_geocode_cache.py all pass. Almanac golden
images regenerated for the combined output and the plugin safety harness passes
at every supported size.

Co-authored-by: Claude Opus 4.8 <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