Skip to content

Revert "remove unecessary log"#1542

Merged
guitavano merged 1 commit intomainfrom
revert-1541-tavano/remove-log
Mar 2, 2026
Merged

Revert "remove unecessary log"#1542
guitavano merged 1 commit intomainfrom
revert-1541-tavano/remove-log

Conversation

@guitavano
Copy link
Contributor

@guitavano guitavano commented Mar 2, 2026

Reverts #1541


Summary by cubic

Restore the server-side console warning in Image.tsx when an image requires automatic optimization but it’s disabled. The warning is skipped in the browser and on Deno Deploy, and only fires for non‑Supabase images.

Written for commit d522d21. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • Added console warnings to alert developers when image optimization is unavailable in specific deployment environments. Warnings are selectively applied to image sources from non-excluded storage locations, helping identify optimization issues.

@guitavano guitavano merged commit 669ba45 into main Mar 2, 2026
1 of 2 checks passed
@guitavano guitavano deleted the revert-1541-tavano/remove-log branch March 2, 2026 16:56
guitavano added a commit that referenced this pull request Mar 2, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 523f06d and d522d21.

📒 Files selected for processing (1)
  • website/components/Image.tsx

📝 Walkthrough

Walkthrough

The change introduces a canShowWarning helper function to determine when to emit console warnings about disabled image optimization, then adds a conditional warning block to the getOptimizedMediaUrl function that triggers in non-browser, non-deployment environments for non-excluded image sources.

Changes

Cohort / File(s) Summary
Image Optimization Warning
website/components/Image.tsx
Adds canShowWarning helper to gate warnings to non-browser, non-deployment contexts, and introduces a warning block in getOptimizedMediaUrl that alerts users when image optimization is disabled for non-excluded sources.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • mcandeia
  • aka-sacci-ccr

Poem

🐰 A warning hops through the code today,
Where images optimization takes its way,
When servers dance without their browser friend,
Our fluffy helper warns them to the end! 🌟

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-1541-tavano/remove-log

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.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 0.137.3 update
  • 🎉 for Minor 0.138.0 update
  • 🚀 for Major 1.0.0 update

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

guitavano added a commit that referenced this pull request Mar 2, 2026
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