Skip to content

Preserve and recover venues hidden by Luma calendar placeholders - #24

Merged
esthor merged 1 commit into
mainfrom
esthor/preserve-luma-venues
Sep 16, 2026
Merged

esthor merged 1 commit into
mainfrom
esthor/preserve-luma-venues

Conversation

@esthor

@esthor esthor commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Problem

Production verification of #23 confirmed all 31 public Luma events are now published, with four additional historical records preserved. It also exposed an iCal edge case: five events use a Luma event-page URL as their LOCATION. The first sync replaced four useful historical venues with those placeholders.

Change

  • Treat Luma event-page LOCATION URLs as missing venue information, retaining actual physical addresses and online meeting URLs.
  • Recover the four affected venues from the public pre-sync snapshot. Recovery applies only to stored placeholder fields, preserves later manual edits, and yields to genuine incoming Luma venue data. An unknown placeholder is cleared without inventing an address.
  • Keep synchronization atomic and repeatable, and show “Location details on Luma” when the venue is unavailable.

This is a focused follow-up based on merged main, with no schema migration. The small venue archive is recovery data captured before the first sync, not an alternative event catalog.

Validation

  • 15 Postgres-backed/parser tests pass, with 71 assertions.
  • TypeScript, formatting, and diff checks pass.
  • Coverage includes placeholder aliases, real online venues, preservation of known locations, conditional historical recovery, repeat runs, later manual edits, genuine Luma updates, and unknown venues.

Rollout

After deployment, the next authenticated hourly sync restores the four venues and removes the fifth unrecoverable placeholder. Verify the public API against the saved pre-sync snapshot, and confirm all 35 published events remain available. A follow-up monitor is already active for production verification.

Production deployment and main CI passed for merge commit 343a86e3fb48fed26bc6efc083c21817c3a79ad6. Recovery verification remains scheduled after the 03:00 UTC cron.

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
allthingsweb Ready Ready Preview Sep 16, 2026 2:14am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: db7befda-5aa0-410d-8a48-a43c5805e980

📥 Commits

Reviewing files that changed from the base of the PR and between 4d6f63f and f8c4d3f.

📒 Files selected for processing (6)
  • app/src/components/event-details.tsx
  • app/src/lib/luma/public-calendar.ts
  • app/src/lib/luma/sync.ts
  • app/src/lib/luma/venue-archive.json
  • app/src/lib/luma/venue-recovery.ts
  • app/tests/luma-sync.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (6)
Use bun test and write tests using bun:test (import { test, expect } from "bun:test")

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Files:

  • app/tests/luma-sync.test.ts
Do not use Bun-specific APIs in production code; ensure compatibility with Node.js runtime

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Files:

  • app/src/components/event-details.tsx
  • app/src/lib/luma/sync.ts
  • app/src/lib/luma/public-calendar.ts
  • app/src/lib/luma/venue-recovery.ts
  • app/tests/luma-sync.test.ts
Use pre-built Stack UI components (e.g., , , ) when building auth UI In Client Components, retrieve the current user via useUser(); use useUser({ or: "redirect" }) for protected pages In Server Components, use...

📄 CodeRabbit inference engine (.cursor/rules/neon-auth.mdc)

Files:

  • app/src/components/event-details.tsx
  • app/src/lib/luma/sync.ts
  • app/src/lib/luma/public-calendar.ts
  • app/src/lib/luma/venue-recovery.ts
  • app/tests/luma-sync.test.ts
Define TanStack DB collections using createCollection with the appropriate options creator (e.g., queryCollectionOptions, electricCollectionOptions, localOnlyCollectionOptions, liveQueryCollectionOptions) rather than ad-hoc stores Always pr...

📄 CodeRabbit inference engine (.cursor/rules/electric-sql-tanstack-db.mdc)

Files:

  • app/src/components/event-details.tsx
  • app/src/lib/luma/sync.ts
  • app/src/lib/luma/public-calendar.ts
  • app/src/lib/luma/venue-recovery.ts
  • app/tests/luma-sync.test.ts
In mutationFn implementations, ensure server writes have synced back before returning (e.g., await collection.refetch() or equivalent) so optimistic state can be safely discarded When creating a collection, prefer supplying a Standard Schem...

📄 CodeRabbit inference engine (.cursor/rules/tanstack-db.mdc)

Files:

  • app/src/components/event-details.tsx
  • app/src/lib/luma/sync.ts
  • app/src/lib/luma/public-calendar.ts
  • app/src/lib/luma/venue-recovery.ts
  • app/tests/luma-sync.test.ts
In React components, use the useLiveQuery hook to bind live query results to component state

📄 CodeRabbit inference engine (.cursor/rules/tanstack-db.mdc)

Files:

  • app/src/components/event-details.tsx
🪛 ast-grep (0.45.3)
app/src/lib/luma/public-calendar.ts

[warning] 7-7: Regular expression constructed from variable input detected. This can lead to Regular Expression Denial of Service (ReDoS) attacks if the variable contains malicious patterns. Use libraries like 'recheck' to validate regex safety or use static patterns.
Context: new RegExp(LUMA_LOCATION_PLACEHOLDER_PATTERN, "i")
Note: [CWE-1333] Inefficient Regular Expression Complexity

(regexp-from-variable)


[warning] 7-7: Do not use variable for regular expressions
Context: new RegExp(LUMA_LOCATION_PLACEHOLDER_PATTERN, "i")
Note: [CWE-1333] Inefficient Regular Expression Complexity. Security best practice.

(regexp-non-literal-typescript)

🔇 Additional comments (6)
app/src/lib/luma/public-calendar.ts (1)

6-8: LGTM!

Also applies to: 95-98

app/tests/luma-sync.test.ts (1)

95-112: LGTM!

Also applies to: 363-387, 389-426, 428-452

app/src/components/event-details.tsx (1)

243-243: LGTM!

app/src/lib/luma/venue-archive.json (1)

1-26: LGTM!

app/src/lib/luma/venue-recovery.ts (1)

1-22: LGTM!

app/src/lib/luma/sync.ts (1)

6-6: LGTM!

Also applies to: 56-64


📝 Walkthrough

Walkthrough

The changes identify Luma event-page URLs as placeholder locations, add a fallback location label, archive four venue records, and apply venue recovery during public-calendar synchronization. Tests cover parsing, preservation, recovery, manual edits, genuine updates, and null results.

Changes

Luma venue recovery

Layer / File(s) Summary
Placeholder location handling
app/src/lib/luma/public-calendar.ts, app/src/components/event-details.tsx, app/tests/luma-sync.test.ts
Luma event-page URLs now parse as null locations. The event details heading falls back to "Location details on Luma". Parser tests cover placeholder and online venue URLs.
Archived venue recovery
app/src/lib/luma/venue-archive.json, app/src/lib/luma/venue-recovery.ts
Four archived venue records support SQL recovery for streetAddress, shortLocation, and fullAddress when stored fields contain Luma placeholders.
Synchronization integration and validation
app/src/lib/luma/sync.ts, app/tests/luma-sync.test.ts
Conflict updates use mergeVenueField for all three venue fields. Sync tests cover preservation, one-time archive recovery, manual edits, genuine feed updates, and clearing unrecoverable placeholders.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f8c4d

The venue recovery and placeholder handling are ready to merge; no concrete current-head risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 5 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preserving and recovering venue data affected by Luma calendar placeholders.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 5 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch esthor/preserve-luma-venues

Comment @coderabbitai help to get the list of available commands.

@esthor
esthor merged commit 343a86e into main Sep 16, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview f8c4d3fa Deployed Sep 16, 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.

1 participant