Skip to content

[Changelog] Updates to US date format, adds images. #1143

Merged
madster456 merged 9 commits intodevfrom
changelog/fix-dates
Feb 2, 2026
Merged

[Changelog] Updates to US date format, adds images. #1143
madster456 merged 9 commits intodevfrom
changelog/fix-dates

Conversation

@madster456
Copy link
Collaborator

@madster456 madster456 commented Jan 30, 2026

image

Full image view support:
image

Summary by CodeRabbit

  • New Features

    • Added interactive fullscreen image preview for changelog entries with keyboard and click-to-close controls.
  • Improvements

    • Unified changelog date format to US M/D/YY for consistent display.
    • Broadened external image loading so changelog images from common hosts display reliably.
    • Inserted image badge placeholders to enhance changelog visuals.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stack-backend Ready Ready Preview, Comment Jan 30, 2026 8:26pm
stack-dashboard Ready Ready Preview, Comment Jan 30, 2026 8:26pm
stack-demo Ready Ready Preview, Comment Jan 30, 2026 8:26pm
stack-docs Ready Ready Preview, Comment Jan 30, 2026 8:26pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

Updates 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

Cohort / File(s) Summary
Changelog File & Backend
CHANGELOG.md, apps/backend/src/app/api/latest/internal/changelog/route.tsx
Date headers reformatted to M/D/YY; backend now validates US date regex and, in dev mode, reads ../../CHANGELOG.md via fs/promises+path and returns up to 8 entries. Removed semver/calver checks in favor of US date matching.
Dashboard Config
apps/dashboard/next.config.mjs
Added images.remotePatterns allowing https://raw.githubusercontent.com so images served from GitHub raw can be loaded.
Version Comparison
apps/dashboard/src/components/stack-companion.tsx
Renamed isNewerCalVerisNewerVersion; parser changed from CalVer (YYYY.MM.DD) to US M/D/YY with two-digit-year conversion (70–99→1970–1999, 00–69→2000–2069) and preserved fallback string compare.
Changelog Widget (UI)
apps/dashboard/src/components/stack-companion/changelog-widget.tsx
Added portal-based image preview lightbox: images rendered as interactive buttons that open a fullscreen overlay with close button; added previewImage state, createPortal, XIcon, keyboard (Esc) and backdrop close handling, and memoized markdown component overrides.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Client as Dashboard UI
participant API as Backend /changelog route
participant Local as Local FS (dev)
participant Remote as Remote changelog host
participant GitHub as raw.githubusercontent.com

Client->>API: GET /api/latest/changelog
alt Dev mode
API->>Local: read ../../CHANGELOG.md
Local-->>API: parsed entries (up to 8)
else Prod mode
API->>Remote: fetch remote changelog URL
Remote-->>API: changelog entries
end
API-->>Client: filtered entries (US-date validated)
Client->>GitHub: request image URL (raw.githubusercontent.com)
GitHub-->>Client: image bytes
Client->>Client: open portal lightbox on image click
Client-->>Client: close on Esc / backdrop click / close button

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • N2D4

Poem

🐰
Dates hop from long to spry—M/D/YY,
Images peep through a portal sky,
Local reads when devs are nigh,
Versions compare with a two-digit wink,
A rabbit cheers—lightbox and changelog in sync! 🥕✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description is largely visual-focused and lacks structured context about the changelog updates, such as motivation, technical approach, or testing information. Add a brief description of the changes beyond images—explain why the date format was changed, what files were modified, and any testing performed. Consider using the template structure from CONTRIBUTING.md.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: updating changelog to US date format and adding image support.

✏️ 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
  • Commit unit tests in branch changelog/fix-dates

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.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 30, 2026

Greptile Overview

Greptile Summary

This 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

  • Converted all date formats from YYYY.MM.DD to M/D/YY format in CHANGELOG.md
  • Updated version parsing regex in backend API route to match US date format
  • Added local file reading in development mode for faster testing
  • Implemented clickable image preview with modal lightbox in changelog widget
  • Added raw.githubusercontent.com to Next.js image remote patterns
  • Moved markdown component definitions to useMemo for performance optimization

Critical Issues

  • All 4 image markdown entries in CHANGELOG.md have empty URLs - images won't display until URLs are populated
  • Year conversion logic assumes all 2-digit years are in the 2000s, which may incorrectly parse dates like 1/1/99 as 2099

Recommendations

  • Fill in the image URLs in CHANGELOG.md with proper paths (e.g., /changelog/payments-onboarding.png)
  • Consider adding a safeguard for 2-digit year parsing to handle edge cases more robustly

Confidence Score: 2/5

  • This PR has critical issues that will prevent images from displaying - all image URLs in CHANGELOG.md are empty
  • Score reflects that while the date format conversion logic is mostly correct, the CHANGELOG.md has 4 empty image URLs that will cause broken images in production. Additionally, the year conversion logic has a hardcoded assumption that could cause issues with certain dates.
  • CHANGELOG.md requires immediate attention - all 4 image markdown entries have empty URLs

Important Files Changed

Filename Overview
CHANGELOG.md Converted date format from YYYY.MM.DD to M/D/YY and added image placeholders - all 4 image URLs are empty and need to be filled
apps/backend/src/app/api/latest/internal/changelog/route.tsx Updated version regex from CalVer to US date format, added development mode file reading for local testing
apps/dashboard/src/components/stack-companion.tsx Renamed version comparison function and updated date parsing from CalVer to US date format - has hardcoded 2000s century assumption
apps/dashboard/src/components/stack-companion/changelog-widget.tsx Added clickable image preview with lightbox modal, moved markdown components to useMemo, removed v prefix from version display

Sequence Diagram

sequenceDiagram
    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
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

4 files reviewed, 5 comments

Edit Code Review Agent Settings | Greptile

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: 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.

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: 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 | 🟡 Minor

Avoid 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/25 vs 10/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;
+  }

@madster456 madster456 merged commit 231b493 into dev Feb 2, 2026
31 checks passed
@madster456 madster456 deleted the changelog/fix-dates branch February 2, 2026 17:21
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.

2 participants