Skip to content

[Susan (Grok Bot)] Unpublish stale gallery exhibits during resume sync - #18

Merged
glindsay65 merged 1 commit into
developfrom
cursor/retire-stale-gallery-exhibits-5471
Nov 5, 2026
Merged

glindsay65 merged 1 commit into
developfrom
cursor/retire-stale-gallery-exhibits-5471

Conversation

@glindsay65

Copy link
Copy Markdown
Contributor

Authored by Susan (Grok Bot), not Grant.

Retirement policy

Sync soft-unpublishes gallery exhibit pages it owns. It does not delete rows.

A page is sync-owned only when parentSlug is gallery and the slug is an EXHIBIT_CATALOG page slug. That catalog is the managed-by marker. Static marketing pages (home, services, about, contact, legal, privacy, gallery, testimonials), seed-only sections, nav items, and gallery children outside the catalog are never retired.

The keep set is project ids in the current projection that also appear in EXHIBIT_CATALOG. A managed gallery page whose project is outside that set, and that is currently published, is set to isPublished = false. The page row stays: slug, title, meta description, exhibit section, and placements. The public route already 404s when isPublished is false, and the slug is still there if a redirect is added later. A later projection that includes the project republishes the page, because the gallery upsert sets isPublished back to true.

A second run does not write again for pages that are already unpublished. Each retirement is logged with id, slug, title, project id, exhibit slug, and path.

Testimonial sections are not retired. Sync upserts them, but they are shared with the static testimonials index and the home featured quote, and sections have no publish flag. Removing those placements would edit static pages. A retired exhibit keeps its quote placement on the unpublished page. A reference that leaves the projection is left in place and simply not re-upserted.

Dry run

No database writes and no ISR revalidation.

npm run sync:db -- --dry-run

or

POST /api/sync?dryRun=true
Authorization: Bearer <REVALIDATION_SECRET>

dryRun=1 is also accepted. The CLI and the JSON body list exhibits and testimonials that would be upserted, and gallery pages that would be unpublished. Log lines use would unpublish instead of unpublished.

Sitemap

src/app/sitemap.ts builds entries from published pages (isPublished: true), the same flag the gallery grid and page routes use. Unpublished exhibits are omitted, including gallery URLs such as /gallery/{slug}. The handler is force-dynamic with revalidate = 0, so a sync is visible without a rebuild. Sync and POST /api/revalidate also call revalidatePath("/sitemap.xml").

Open Graph

The image headline and subheading are the home hero (hero-home), shared through src/lib/site-copy.ts and seeded from that constant:

  • Listen carefully. Think deeply. Build deliberately.
  • We focus on solving your problems the right way.

Open Graph image using the home hero headline

Neon

This PR does not run against Neon. After the future resume-master re-vendor that applies the portfolio 10-year cutoff, run sync (dry-run first) to unpublish the exhibits that leave the projection. packages/resume-master is unchanged here.

Tests

npm run test:run — 9 files, 68 tests, all passing. Coverage includes: a catalog gallery page missing from the projection is unpublished; static pages, a non-catalog gallery child, and a nav page are left alone; a second run does not write again; dry-run reports the page and writes nothing; a returning project republishes the page; sitemap entries drop unpublished gallery URLs.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Teach sync to soft-retire catalog gallery pages missing from the
portfolio projection, keep the sitemap on published pages, and match
the Open Graph image to the home hero.

Co-authored-by: Grant Lindsay <glindsay65@users.noreply.github.com>
Authored-by: Susan (Grok Bot)
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
website Ready Ready Preview Nov 5, 2026 6:54pm UTC

Request Review

Comment thread src/lib/site-copy.ts
* tagline. Non-breaking spaces keep each imperative phrase on one line
* in the Open Graph card.
*/
export const HOME_HERO = {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for making this a shared constant.

@glindsay65
glindsay65 merged commit 219e408 into develop Nov 5, 2026
3 checks passed
@glindsay65
glindsay65 deleted the cursor/retire-stale-gallery-exhibits-5471 branch November 5, 2026 20:32

This branch was successfully deployed

1 active deployment
Preview — ba51abb1 Deployed Nov 5, 2026 by vercel[bot]
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