fix: use a new function for adding notice for SSL issue and already o…#61
fix: use a new function for adding notice for SSL issue and already o…#61Arukuen wants to merge 2 commits into
Conversation
|
Warning Review limit reached
More reviews will be available in 45 minutes and 33 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a transient upload-notice flow: converter results can carry notices, optimization handlers cache them by normalized filename, and media sidebar views read and render those notices. It also adds notice styling and fixes a CSS closing brace in the admin stylesheet. ChangesUpload Notice Capture and Sidebar Rendering
Sequence Diagram(s)sequenceDiagram
participant Uploader
participant Converter
participant NoticeCache
participant DetailsPanel
participant SidebarDom
Uploader->>Converter: optimize(file)
Converter-->>Uploader: result with notice
Uploader->>NoticeCache: cacheConverterNotice(result)
DetailsPanel->>NoticeCache: getCachedUploadNotice(filename)
NoticeCache-->>DetailsPanel: notice
DetailsPanel->>SidebarDom: inject and display notice
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
🤖 Pull request artifacts
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/shared/upload-notice-cache.js`:
- Around line 41-74: Add early guards in getCachedUploadNotice and
setCachedUploadNotice to ensure filename is truthy before calling getCacheKey;
if filename is falsy (null/undefined/empty) immediately return null (for
getters) or no-op (for setters). Locate uses of getCacheKey inside
getCachedUploadNotice and setCachedUploadNotice and short-circuit before
computing cacheKey/baseFileKey so you never read/write the "undefined" key in
window.cimoUploadNoticeCache.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 52760490-8e8b-40f6-8651-4eea4b503bcf
📒 Files selected for processing (6)
src/admin/css/index.csssrc/admin/js/media-manager/drop-zone.jssrc/admin/js/media-manager/select-files.jssrc/admin/js/media-manager/sidebar-info.jssrc/shared/converters/image-converter.jssrc/shared/upload-notice-cache.js
…ptimized media
fixes #48
fixes #49
fixes #54
Summary by CodeRabbit
New Features
Bug Fixes