[Changelog] Updates to US date format, adds images. #1143
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughUpdates changelog handling to accept US date format (M/D/YY), read local CHANGELOG.md in development, allow GitHub-hosted images, switch version comparison to US dates, and add a portal-based image preview lightbox in the dashboard changelog widget. Changes
Sequence Diagram(s)mermaid Client->>API: GET /api/latest/changelog Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 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 |
Greptile OverviewGreptile SummaryThis PR updates the changelog system to use US date format (M/D/YY) instead of CalVer (YYYY.MM.DD) and adds support for images in changelog entries with a clickable lightbox preview. Key Changes
Critical Issues
Recommendations
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ChangelogWidget
participant API as Backend API
participant FS as File System
participant Remote as Remote GitHub
User->>ChangelogWidget: Opens changelog panel
ChangelogWidget->>API: GET /api/latest/internal/changelog
alt Development Mode
API->>FS: Read local CHANGELOG.md
FS-->>API: Return file content
API->>API: parseRootChangelog()
API->>API: Validate US date format (M/D/YY)
API-->>ChangelogWidget: Return entries
else Production Mode
API->>Remote: Fetch from STACK_CHANGELOG_URL
Remote-->>API: Return markdown content
API->>API: parseRootChangelog()
API->>API: Validate US date format (M/D/YY)
API-->>ChangelogWidget: Return entries
end
ChangelogWidget->>ChangelogWidget: Render markdown with images
User->>ChangelogWidget: Click on image
ChangelogWidget->>User: Show lightbox modal with full-size image
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@apps/dashboard/src/components/stack-companion/changelog-widget.tsx`:
- Around line 263-295: The overlay's onKeyDown won't fire because the div isn't
focusable; add a document-level keyboard handler in the component (e.g., in
ChangelogWidget or wherever previewImage/setPreviewImage are defined) using
useEffect: when previewImage is truthy attach
document.addEventListener('keydown', ...) that closes the preview on Escape
(calls setPreviewImage(null)) and remove the listener in cleanup (and ensure the
effect depends on previewImage); keep the existing portal click handlers but
remove reliance on the div's onKeyDown.
- Around line 64-119: The img renderer inside markdownComponents currently uses
transition-opacity and hover:opacity-90 which cause hover-enter animations;
remove the transition and hover:opacity classes from the Image wrapper and Image
element in the img renderer to eliminate hover-enter transitions, and likewise
remove any hover-enter transition/animation classes from the preview close
button (the button that calls setPreviewImage to clear the preview) so that only
hover-exit behavior remains; locate these by the markdownComponents constant and
the setPreviewImage usage to update their className strings.
In `@CHANGELOG.md`:
- Around line 9-20: The changelog contains empty markdown image tags '![]()'
that will render as broken images; update each occurrence by either inserting
the final asset URL into the image markdown or remove/replace the image tag with
descriptive plain text (e.g., "Screenshot: Payments Onboarding") until the
assets are available—look for the '![]()' instances (e.g., the ones following
"Payments Onboarding", "Create Product", "Payments Setting", and "Past Payments
Invoices") and fix them accordingly.
…e to create a PR to fix it
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/dashboard/src/components/stack-companion.tsx (1)
18-40:⚠️ Potential issue | 🟡 MinorAvoid lexicographic fallback for US date strings.
For M/D/YY, string comparison is not chronological, so a parse failure can mis-order versions (e.g.,
2/15/25vs10/1/25). Consider failing safe and surfacing the bad format instead.🛠️ Suggested fix (fail-safe on parse failure)
- if (!date1 || !date2) { - // Fallback to string comparison if parsing fails - return version1 > version2; - } + if (!date1 || !date2) { + console.warn('Unexpected changelog version format. Expected M/D/YY.', { version1, version2 }); + return false; + }
Full image view support:

Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.