feat(pinballmap): weekly sync report to Discord (PP-5qwx) - #2323
Draft
timothyfroehlich wants to merge 5 commits into
Draft
timothyfroehlich wants to merge 5 commits into
timothyfroehlich wants to merge 5 commits into
Conversation
Posts the lineup page's review state to a configured Discord channel every Monday at 6 PM Central (pinballmap-sync-report spec). - Migration 0098: pinballmap_state gains the sync report channel, its status, last post time, and the claimed report week. - /api/cron/pinballmap-sync-report runs at 23:00 UTC Monday and 00:00 UTC Tuesday; only the run that is 6 PM in America/Chicago posts, and it claims the week first so the other slot and duplicate deliveries are no-ops. - Reads stored data through loadLineupData(), so its counts match /m/pinball-map and the /m badge; never calls Pinball Map (CORE-PBM-001). - Admin Integrations > Pinball Map gets a Sync report channel field with the region-alert channel's save check, test message, and status readout. The Discord channel check and test send move into shared helpers both channels use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Keep the attribution footer when the length fallback trims the body. - Share DISCORD_MAX_MESSAGE_LENGTH and truncateDiscordLabel from ~/lib/discord/messages instead of copying them per formatter. - Channel-generic names for the shared admin types (DiscordChannelStatus, SaveDiscordChannelActionResult, SendDiscordChannelTestActionResult). - Check the schedule before reading state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent (PP-5qwx) Region alert and sync report saves ran as two concurrent transitions that each set the shared announcement, so a success on one could overwrite a failure on the other. One transition now saves whichever changed and reports the combined outcome. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements
docs/feature-specs/pinballmap-sync-report.md(spec merged in #2317).src/lib/discord/channel-check.ts,sendChannelTest)./api/cron/pinballmap-sync-reportis scheduled at0 23 * * 1and0 0 * * 2(UTC). Only the run that reads Monday 18:xx in America/Chicago posts, so the report lands at 6 PM Central year-round (§3.1). The run claims the week (sync_report_last_week) before posting, so the other slot and Vercel's occasional duplicate delivery are no-ops (§3.3); a failed post is not retried (§3.4).loadLineupData()— the loader/m/pinball-mapand the/mbadge use — so counts always match; no Pinball Map calls (§4.1, CORE-PBM-001). Message copy is the version Tim approved in-session (recorded on PP-5qwx). Link previews suppressed; attribution links the tracked location (§4.8).pinballmap_stateplus a status CHECK. Additive only.Screenshots
To follow (desktop / 430 / 320) — awaiting Tim's UI sign-off.
Test plan
pnpm run checkpnpm run preflight(2985 passed)🤖 Generated with Claude Code