Repository navigation
Generate sharper gallery thumbnails by default - #292
Merged
Merged
Conversation
TheWitness
requested review from
TheWitness
and
a balanced review from Copilot
and removed request for
Copilot
October 9, 2026 15:11
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The regression test does not exercise the changed absent and non-positive initialization behavior.
2 open findings
What changed in this PR
Raises the default gallery thumbnail size from 250 to 1000 pixels for sharper previews while preserving positive configured values.
Changes:
- Updates the registered and initialization defaults to 1000 pixels.
- Adds a regression test and changelog entry.
| File | Description |
|---|---|
setup.php |
Registers the new default. |
includes/database.php |
Initializes absent or non-positive values to 1000. |
tests/Unit/ThumbnailDefaultTest.php |
Tests metadata and preservation of 250. |
CHANGELOG.md |
Documents the feature. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
alcatron
pushed a commit
to alcatron/plugin_weathermap
that referenced
this pull request
Oct 9, 2026
alcatron
force-pushed
the
feat/sharp-thumbnail-default
branch
from
October 9, 2026 23:41
aab9264 to
e4b9b9a
Compare
TheWitness
approved these changes
Oct 10, 2026
This was referenced Oct 10, 2026
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.


Large gallery cards can upscale the old 250-pixel thumbnails. Increase the default to 1000 pixels and initialize absent, zero or negative settings to that value. Existing positive preferences remain unchanged; the existing poller regenerates previews.
Validation: 227 PHP 8.3 tests passed in an isolated fixture layout. Tests execute weathermap_setup_table() for absent, zero, negative and positive values, alongside the settings-default check. Syntax, whitespace and manifest checks passed. Changed-line coverage passed at 100% of measured lines; schema initialization retains its existing coverage exemption. Higher resolution increases image size and rendering cost. Full running-installation integration remains unverified for this revision.
Latest review follow-up
Moved invalid thumbnail-size normalization outside the schema/version guard. Tests now cover fresh and current-version installations with existing tables, including unchanged positive values and no schema queries on the current-version path. Latest local validation: 227 PHP tests (5429 assertions); measured changed-line coverage 1/1. includes/database.php is outside the configured coverage source set, so its regression is verified through direct execution rather than that gate.
These follow-up checks use isolated local fixtures, not a running Cacti installation. PHP 8.3 syntax, whitespace, manifest and translation-template checks passed. GitHub CI must still confirm the revised commits.