Skip to content

feat(changelog): add display date override for published entries#288

Merged
mortondev merged 3 commits into
QuackbackIO:mainfrom
Maruan-Alush-21:feat/changelog-display-date
Jun 29, 2026
Merged

feat(changelog): add display date override for published entries#288
mortondev merged 3 commits into
QuackbackIO:mainfrom
Maruan-Alush-21:feat/changelog-display-date

Conversation

@Maruan-Alush-21

Copy link
Copy Markdown
Contributor

First off, this is a really great tool and it's solved exactly the problem I have without breaking the bank! Thank you for making it open source and self hostable!

I was migrating all my changelogs from my custom docs page to Quackback and realised that all the dates now show the same day which is a bit annoying, I also realised this is a requested feature from other people too so I decided to help out and build it myself.

This PR adds an optional display date for published changelog entries. The real publishedAt stays untouched (scheduling, lifecycle, events). What visitors see on /changelog uses displayDate when set, otherwise falls back to publishedAt.

What's changed:

  • Database: nullable display_date column on changelog_entries (migration 0119, no backfill)
  • Server: validation (published entries only, can't be in the future); stores null when the display date is the same calendar day as publishedAt so we don't accumulate pointless overrides
  • Public reads: list, detail, embeds, RSS feed, and sitemap all sort/display by the effective date (COALESCE(display_date, published_at))
  • Admin UI: date-only picker on published entries (with clear button); works in create and edit flows
  • Admin list: shows a "Showing as Jan 15, 2026" hint when an override is active
  • API & MCP: displayDate exposed on admin GET/PATCH/list; MCP docs clarify that backdating display is displayDate, not publishedAt
  • DateTimePicker: dateOnly, maxDate, and inline clear support (used by the display date field)
  • Tests: service validation + normalization, public detail coalescing, schema column check, E2E for admin > portal display

Test plan:

  • Publish an entry > set a past display date > confirm list and detail show the override
  • Clear display date > portal reverts to the publish date
  • Admin list shows "Showing as …" when override is set
  • Scheduled publish picker still works (datetime mode unchanged)

Screenshots:

1. Creating a published entry with a display date image
2. Editing a published entry - display date picker image
3. Admin list - "Showing as …" hint image
4. Public changelog - effective display date on list image

Add optional display_date separate from publish lifecycle. Portal list, detail, feed, and sitemap use the effective date; admin can set or clear a date-only override on published entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
@CLAassistant

CLAassistant commented Jun 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

listPublicChangelogs moved from db.query.findMany to db.select().from().where().orderBy().limit(), but the soft-delete test mock chain still resolved at .where(), so .orderBy() was undefined and two tests failed. Add an entriesListChain mock and assert cursor pagination against the effective (coalesced) date instead of publishedAt.
Rename the admin control from Display date to Published date so it matches how visitors read the date, with an info tooltip clarifying it is presentation-only (won't send notifications). The displayDate column is unchanged. Update the e2e label assertions to match.
@mortondev

Copy link
Copy Markdown
Member

Hey @Maruan-Alush-21,

Thanks for this, I agree with the approach.

I pushed two commits to the branch (maintainer-edit): a test fix where the listPublicChangelogs switch to db.select().orderBy().limit() had outrun the mock in changelog-soft-delete.test.ts (what was failing the CI test job), and a relabel of "Display date" to "Published date" with a tooltip, since to visitors that date is effectively the publish date.

@mortondev mortondev merged commit f02ff10 into QuackbackIO:main Jun 29, 2026
3 checks passed
@Maruan-Alush-21 Maruan-Alush-21 deleted the feat/changelog-display-date branch June 29, 2026 09:06
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.

3 participants