Skip to content

[McLogCleaner] Release 1.1.2#108

Open
JuggleGaming wants to merge 1 commit intopelican-dev:mainfrom
JuggleGaming:mclogcleaner
Open

[McLogCleaner] Release 1.1.2#108
JuggleGaming wants to merge 1 commit intopelican-dev:mainfrom
JuggleGaming:mclogcleaner

Conversation

@JuggleGaming
Copy link
Contributor

@JuggleGaming JuggleGaming commented Feb 16, 2026

Release 1.1.2

Added the update-system to automatically check for new updates.
Added a setting to enable/ disable the text in the delete-logs button.

Summary by CodeRabbit

  • New Features

    • Added a configurable settings interface with a toggle to control text display in the log cleaner action button.
    • Enabled automatic plugin update detection and installation support via a remote manifest.
  • Chores

    • Upgraded plugin version to 1.1.2.

Added a setting to enable/ disable the text in the delete-logs button.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 16, 2026

📝 Walkthrough

Walkthrough

The changes add configuration and settings management to the McLogCleaner plugin. A new configuration file manages text display through environment variables. The plugin now implements a settings interface with a toggle form for managing the feature. The updater infrastructure is configured to support automatic plugin updates.

Changes

Cohort / File(s) Summary
Configuration & Updater Infrastructure
mclogcleaner/config/mclogcleaner.php, mclogcleaner/updater.json, mclogcleaner/plugin.json
New configuration file reads environment variable with boolean validation; updater.json manifest added for auto-update support; plugin.json version bumped to 1.1.2 with update URL configured.
Plugin Settings Implementation
mclogcleaner/src/McLogCleanerPlugin.php
Class now implements HasPluginSettings interface, adds EnvironmentWriterTrait, and introduces getSettingsForm() and saveSettings() methods for managing mclogcleaner_text_enabled setting.
Action Component Updates
mclogcleaner/src/Filament/Components/Actions/McLogCleanAction.php
Dynamic label generation based on config setting; minor path and string concatenation formatting normalizations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • Boy132

Poem

🐰 A config hops into place,
Settings toggle with grace,
Updates now fly through the air,
The cleaner works everywhere,
Log trails vanish without a trace! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[McLogCleaner] Release 1.1.2' directly and clearly describes the main purpose of the pull request, which is to release version 1.1.2 of the McLogCleaner plugin.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@mclogcleaner/plugin.json`:
- Around line 5-9: The plugin's update_url currently points to a personal repo;
change the "update_url" key in the plugin.json to null to match the repository
pattern (i.e., set "update_url": null) and ensure the JSON remains valid (remove
any trailing comma after the last property if present); the field to edit is
"update_url" in the plugin.json containing the existing
"https://raw.githubusercontent.com/JuggleGaming/mclogcleaner/..." value.
🧹 Nitpick comments (1)
mclogcleaner/config/mclogcleaner.php (1)

3-4: Redundant prefix in config key name.

Since this config file is mclogcleaner.php, the key is accessed as config('mclogcleaner.mclogcleaner_text_enabled'). Consider simplifying to text_enabled so it reads as config('mclogcleaner.text_enabled').

♻️ Suggested simplification
 return [
-    'mclogcleaner_text_enabled' => filter_var(env('MCLOGCLEANER_TEXT_ENABLED', true), FILTER_VALIDATE_BOOL),
+    'text_enabled' => filter_var(env('MCLOGCLEANER_TEXT_ENABLED', true), FILTER_VALIDATE_BOOL),
 ];

This would require updating references in McLogCleanerPlugin.php and McLogCleanAction.php accordingly.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60cb9e3 and fa4ce66.

📒 Files selected for processing (5)
  • mclogcleaner/config/mclogcleaner.php
  • mclogcleaner/plugin.json
  • mclogcleaner/src/Filament/Components/Actions/McLogCleanAction.php
  • mclogcleaner/src/McLogCleanerPlugin.php
  • mclogcleaner/updater.json
🔇 Additional comments (5)
mclogcleaner/updater.json (1)

1-6: LGTM — updater manifest looks correct.

The structure with a wildcard "*" entry, version, and download URL follows the expected pattern for plugin update manifests.

mclogcleaner/src/McLogCleanerPlugin.php (2)

31-38: LGTM — settings form is well-structured.

The Toggle with a dynamic default from config correctly pre-populates the form with the current setting value.


40-51: No actionable issue found. The config cache pattern applies uniformly across all plugins in the codebase, suggesting it's handled at the framework level or the EnvironmentWriterTrait implementation.

mclogcleaner/src/Filament/Components/Actions/McLogCleanAction.php (2)

70-140: Action logic is solid.

The file listing, date-based filtering, deletion flow, and error handling look correct. The extractLogDate method properly guards against unparseable filenames.


38-40: No action required; config is properly registered by the Pelican framework.

The plugin config is automatically loaded by Pelican's plugin system when the plugin is installed. Plugin configs placed in plugin-name/config/ directories are auto-discovered and merged—no explicit mergeConfigFrom() call is needed. Additionally, the code includes fallback defaults: both config('mclogcleaner.mclogcleaner_text_enabled', true) (line 39) and the environment variable env('MCLOGCLEANER_TEXT_ENABLED', true) ensure the setting defaults to true even if config loading were interrupted.

Likely an incorrect or invalid review comment.

Comment on lines +5 to +9
"version": "1.1.2",
"description": "Clean your Minecraft-logs with ease",
"category": "plugin",
"url": "https://github.com/pelican-dev/plugins/tree/main/mclogcleaner",
"update_url": null,
"update_url": "https://raw.githubusercontent.com/JuggleGaming/mclogcleaner/refs/heads/main/updater.json",
Copy link
Contributor

@coderabbitai coderabbitai bot Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check all update_url entries across plugin.json files
fd plugin.json | xargs rg '"update_url"' -B1 -A1

Repository: pelican-dev/plugins

Length of output: 5829


Update URL points to a personal repository, inconsistent with repository pattern.

All other plugins in pelican-dev/plugins have update_url set to null. This plugin alone points to JuggleGaming/mclogcleaner for updates, allowing changes to be deployed without going through the pelican-dev review process. Either align with the repository pattern by setting update_url to null, or confirm this exception is intentional.

🤖 Prompt for AI Agents
In `@mclogcleaner/plugin.json` around lines 5 - 9, The plugin's update_url
currently points to a personal repo; change the "update_url" key in the
plugin.json to null to match the repository pattern (i.e., set "update_url":
null) and ensure the JSON remains valid (remove any trailing comma after the
last property if present); the field to edit is "update_url" in the plugin.json
containing the existing
"https://raw.githubusercontent.com/JuggleGaming/mclogcleaner/..." value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change that. Because the download must lead to my personal repo as well for the download i set the update_url to my repo as well. @Boy132 do you want me to change this or could this stay as it is? Before you ask. The moment this PR gets merged i will update my repo to be identical with this McLogCleaner-Release and create a new release there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise i can remove the update-system for my plugin in this repo - but in my oppinion it should keep existing.

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