[PR #136] [CLOSED] fix: deduplicate desktop release notifications #136

Closed
opened 2026-10-27 21:09:54 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/136
Author: @snomiao
Created: 1/8/2026
Status: ❌ Closed

Base: main ← Head: sno-dedup-desktop-release-notification


📝 Commits (10+)

  • c0bf042 feat: add ComfyPR Bot with Slack/Notion integration and fix event handling
  • aa81b39 chore: improve .gitignore for security and organization
  • 5734189 chore: add configuration placeholders to .env
  • 69288f2 docs: add bot architecture and TODO tracking documentation
  • b03c5cc feat: rewrite bot Dockerfile for Bun and Node.js runtime
  • 263113f docs: add unified CLI documentation to bot README
  • ce04d36 refactor: move notion-search.ts to bot/notion/search.ts
  • 45866ab feat: add ComfyUI registry search utility
  • b870e6c feat: add GitHub code utilities (pr-bot and issue-search)
  • c03e785 docs: add ComfyUI code search documentation

📊 Changes

53 files changed (+6535 additions, -257 deletions)

View changed files

➕ .claude/skills/code-search/SKILL.md (+65 -0)
➕ .claude/skills/github-issue-search/SKILL.md (+80 -0)
➕ .claude/skills/github-pr-bot/SKILL.md (+60 -0)
➕ .claude/skills/notion-search/SKILL.md (+49 -0)
➕ .claude/skills/pr-bot-cli/SKILL.md (+120 -0)
➕ .claude/skills/registry-search/SKILL.md (+83 -0)
➕ .claude/skills/slack-msg-update/SKILL.md (+38 -0)
➕ .claude/skills/slack-thread-reader/SKILL.md (+71 -0)
📝 .env (+5 -0)
➕ .env.dev (+28 -0)
📝 .gitignore (+11 -4)
📝 CLAUDE.md (+242 -2)
➕ app/api/webhook/github/README.md (+409 -0)
➕ app/api/webhook/github/USAGE_EXAMPLES.md (+495 -0)
➕ app/api/webhook/github/route.spec.ts (+216 -0)
➕ app/api/webhook/github/route.ts (+147 -0)
➕ app/api/webhook/github/setup-indexes.ts (+115 -0)
➕ app/api/webhook/github/test-webhook.ts (+119 -0)
➕ app/api/webhook/github/webhook-events.ts (+257 -0)
📝 app/tasks/gh-design/slackMessageUrlParse.ts (+4 -0)

...and 33 more files

📄 Description

🎯 Fixes Duplicate Release Notifications

This PR fixes two separate issues causing duplicate/spam Slack notifications for desktop releases.


🐛 Issue #1: Duplicate Stable Release Messages

Problem: Two identical \stable\ messages posted ~0.25 seconds apart

Example:
\\

Root Cause: Race condition - multiple concurrent task runs both created new messages when \ was undefined.

Fix: Changed logic from \ to \ to only send once, then update existing message.


🐛 Issue #2: Draft Release Spam

Problem: Multiple draft messages posted every time the draft is updated

Example:
\\

Root Cause: GitHub changes draft release URL with each update:

  • \ → \ → etc.

Since the database uses \ as the unique key, each draft update created a new database record with no , causing a new Slack message.

Fix:

  1. Added version index to find existing tasks by version
  2. Preserve \ URL across draft URL changes
  3. Pass existing URL to \ to update instead of create

✅ Result

Before:

  • Draft releases: 4+ spam messages
  • Stable releases: 2 duplicate messages

After:

  • Draft releases: ONE message that updates in place ✨
  • Stable releases: ONE message, no duplicates ✨
  • No more notification spam! 🎉

🧪 Testing

All test scenarios verified:

  • ✅ First draft release → CREATE new message
  • ✅ Draft URL changes → UPDATE existing message
  • ✅ Multiple draft updates → UPDATE same message
  • ✅ Becomes stable → CREATE new stable message
  • ✅ Concurrent runs → No duplicates

📝 Changes

Files Modified:

  • \

Key Changes:

  1. Added version index for efficient lookups
  2. Find existing tasks by version for draft releases
  3. Preserve Slack message URLs across draft URL changes
  4. Fixed stable message logic to prevent race conditions
  5. Pass existing URLs to \ for both draft and stable messages

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/Comfy-PR/pull/136 **Author:** [@snomiao](https://github.com/snomiao) **Created:** 1/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `sno-dedup-desktop-release-notification` --- ### 📝 Commits (10+) - [`c0bf042`](https://github.com/Comfy-Org/Comfy-PR/commit/c0bf042e73b24835ff3d1c86ab8d1353cfa2c9eb) feat: add ComfyPR Bot with Slack/Notion integration and fix event handling - [`aa81b39`](https://github.com/Comfy-Org/Comfy-PR/commit/aa81b391ce71ff7007fdd212711da1f4adf62e8f) chore: improve .gitignore for security and organization - [`5734189`](https://github.com/Comfy-Org/Comfy-PR/commit/5734189236715a0e822825d0611747a77c88a468) chore: add configuration placeholders to .env - [`69288f2`](https://github.com/Comfy-Org/Comfy-PR/commit/69288f2f3914fc7a45ea9435e5b0356369bd22cd) docs: add bot architecture and TODO tracking documentation - [`b03c5cc`](https://github.com/Comfy-Org/Comfy-PR/commit/b03c5cc6d61cc10d99c0bf47d4b1cc0e50ebc781) feat: rewrite bot Dockerfile for Bun and Node.js runtime - [`263113f`](https://github.com/Comfy-Org/Comfy-PR/commit/263113f2dbff55026d3b8470e2d8ffe332754c62) docs: add unified CLI documentation to bot README - [`ce04d36`](https://github.com/Comfy-Org/Comfy-PR/commit/ce04d365faca74a7f57c8223a70a0a58e60ddc87) refactor: move notion-search.ts to bot/notion/search.ts - [`45866ab`](https://github.com/Comfy-Org/Comfy-PR/commit/45866abd744347c0bca36426e223c86f017e8c27) feat: add ComfyUI registry search utility - [`b870e6c`](https://github.com/Comfy-Org/Comfy-PR/commit/b870e6c2cc286a5f2bb5017dbaf3fc0104ad2d08) feat: add GitHub code utilities (pr-bot and issue-search) - [`c03e785`](https://github.com/Comfy-Org/Comfy-PR/commit/c03e7850305669bfd3824e05296a136644908b87) docs: add ComfyUI code search documentation ### 📊 Changes **53 files changed** (+6535 additions, -257 deletions) <details> <summary>View changed files</summary> ➕ `.claude/skills/code-search/SKILL.md` (+65 -0) ➕ `.claude/skills/github-issue-search/SKILL.md` (+80 -0) ➕ `.claude/skills/github-pr-bot/SKILL.md` (+60 -0) ➕ `.claude/skills/notion-search/SKILL.md` (+49 -0) ➕ `.claude/skills/pr-bot-cli/SKILL.md` (+120 -0) ➕ `.claude/skills/registry-search/SKILL.md` (+83 -0) ➕ `.claude/skills/slack-msg-update/SKILL.md` (+38 -0) ➕ `.claude/skills/slack-thread-reader/SKILL.md` (+71 -0) 📝 `.env` (+5 -0) ➕ `.env.dev` (+28 -0) 📝 `.gitignore` (+11 -4) 📝 `CLAUDE.md` (+242 -2) ➕ `app/api/webhook/github/README.md` (+409 -0) ➕ `app/api/webhook/github/USAGE_EXAMPLES.md` (+495 -0) ➕ `app/api/webhook/github/route.spec.ts` (+216 -0) ➕ `app/api/webhook/github/route.ts` (+147 -0) ➕ `app/api/webhook/github/setup-indexes.ts` (+115 -0) ➕ `app/api/webhook/github/test-webhook.ts` (+119 -0) ➕ `app/api/webhook/github/webhook-events.ts` (+257 -0) 📝 `app/tasks/gh-design/slackMessageUrlParse.ts` (+4 -0) _...and 33 more files_ </details> ### 📄 Description ## 🎯 Fixes Duplicate Release Notifications This PR fixes **two separate issues** causing duplicate/spam Slack notifications for desktop releases. --- ### 🐛 Issue #1: Duplicate Stable Release Messages **Problem:** Two identical \stable\ messages posted ~0.25 seconds apart **Example:** \\\ **Root Cause:** Race condition - multiple concurrent task runs both created new messages when \ was undefined. **Fix:** Changed logic from \ to \ to only send once, then update existing message. --- ### 🐛 Issue #2: Draft Release Spam **Problem:** Multiple draft messages posted every time the draft is updated **Example:** \\\ **Root Cause:** GitHub changes draft release URL with each update: - \ → \ → etc. Since the database uses \ as the unique key, each draft update created a new database record with no \, causing a new Slack message. **Fix:** 1. Added version index to find existing tasks by version 2. Preserve \ URL across draft URL changes 3. Pass existing URL to \ to update instead of create --- ## ✅ Result **Before:** - Draft releases: 4+ spam messages - Stable releases: 2 duplicate messages **After:** - Draft releases: ONE message that updates in place ✨ - Stable releases: ONE message, no duplicates ✨ - No more notification spam! 🎉 --- ## 🧪 Testing All test scenarios verified: - ✅ First draft release → CREATE new message - ✅ Draft URL changes → UPDATE existing message - ✅ Multiple draft updates → UPDATE same message - ✅ Becomes stable → CREATE new stable message - ✅ Concurrent runs → No duplicates --- ## 📝 Changes **Files Modified:** - \ **Key Changes:** 1. Added version index for efficient lookups 2. Find existing tasks by version for draft releases 3. Preserve Slack message URLs across draft URL changes 4. Fixed stable message logic to prevent race conditions 5. Pass existing URLs to \ for both draft and stable messages --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 21:09:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/Comfy-PR#136
No description provided.