Skip to content

Conversation

@hallo123wert
Copy link
Contributor

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Dec 16, 2025

📝 Walkthrough

Walkthrough

Replaces use of the global url() helper with Storage::disk('public')->url() when returning icon image URLs in model code for eggs and servers.

Changes

Cohort / File(s) Summary
Storage URL refactor — models
app/Models/Egg.php, app/Models/Server.php
Replaced url($path) with Storage::disk('public')->url($path) when an icon file exists to generate public URLs via the storage disk.

Possibly related PRs

  • pelican-dev/panel PR 1993: similar changes in app/Models/Egg.php and app/Models/Server.php replacing url() with Storage::disk('public')->url() to use file-backed/public storage for icons.

Pre-merge checks

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author. While a description would be helpful, the title and code changes are sufficiently descriptive about the purpose of the fix. Consider adding a brief description explaining why the URL generation method needed to change and any relevant context about the issue.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main fix: addressing an issue with egg images not loading. It directly relates to the primary changes in both Egg.php and Server.php models.

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be9a46f and 9688bac.

📒 Files selected for processing (1)
  • app/Models/Server.php (1 hunks)
🔇 Additional comments (1)
app/Models/Server.php (1)

536-546: LGTM! Correct fix for icon URL generation.

The change from url($path) to Storage::disk('public')->url($path) properly aligns URL generation with the storage disk abstraction used for the existence check on line 540. This ensures the generated URL respects the public disk's configuration, which should resolve the icon loading issue.


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.

@Boy132
Copy link
Member

Boy132 commented Dec 16, 2025

Could you also update the server model?

return url($path);

I swear the icons did work in local dev environment...

Copy link
Member

@Boy132 Boy132 left a comment

Choose a reason for hiding this comment

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

Thanks!

@rmartinoscar rmartinoscar merged commit be55e75 into pelican-dev:main Dec 17, 2025
25 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2025
@hallo123wert hallo123wert deleted the fix-egg-images branch December 17, 2025 10:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants