[PR #201] [MERGED] perf: performance fixes, bugcop 404 handling, and createIndex docs #202

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

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/201
Author: @snomiao
Created: 4/18/2026
Status: ✅ Merged
Merged: 4/18/2026
Merged by: @snomiao

Base: main ← Head: sno-perf


📝 Commits (8)

  • 0df5721 perf: fix client bundle, caching, polling, queries, and deps
  • e53a26e docs: document top-level await createIndex as intentional security pattern
  • dc8e14c fix(bugcop): handle 404 for deleted/transferred issues
  • 0ad5b77 fix: address codex review findings
  • 88babd2 fix: address copilot review + remove zx dependency
  • d91f9ae fix: address codex review round 2
  • db26290 fix(build): replace bun shell import with execa in contributor analyze
  • 9160392 fix: address copilot review round 2

📊 Changes

34 files changed (+990 additions, -98 deletions)

View changed files

➕ AGENTS.md (+1 -0)
📝 CLAUDE.md (+12 -0)
📝 app/(dashboard)/PullsStatusTable.tsx (+1 -1)
📝 app/(dashboard)/TotalsBlock.tsx (+2 -2)
➕ app/(dashboard)/TotalsChartLazy.tsx (+9 -0)
📝 app/(dashboard)/details/page.tsx (+2 -2)
📝 app/(dashboard)/page.tsx (+1 -2)
📝 app/(dashboard)/totals/page.tsx (+1 -3)
📝 app/api/(dump)/router.ts (+1 -1)
📝 app/api/router.ts (+1 -1)
📝 app/auth/login/page.tsx (+3 -4)
📝 app/tasks/gh-design/page.tsx (+0 -1)
📝 app/tasks/github-contributor-analyze/githubContributorAnalyze.ts (+4 -5)
📝 app/tasks/github-contributor-analyze/page.tsx (+2 -2)
📝 app/tasks/github-contributor-analyze/summaryGithubContributorAnalyzeTask.ts (+3 -3)
📝 app/tasks/page.tsx (+0 -1)
📝 bun.lock (+77 -24)
📝 components/CodeEditor.tsx (+0 -5)
➕ docs/perf/README.md (+23 -0)
➕ docs/perf/build-and-typecheck.md (+88 -0)

...and 14 more files

📄 Description

Summary

Performance improvements, CI fix, and documentation updates.

Commits

  1. perf: fix client bundle, caching, polling, queries, and deps

    • Replace d3 → d3-dsv (smaller client bundle)
    • Replace react-icons → lucide-react (already a dep)
    • Lazy-load TotalsChart with next/dynamic (SSR: false)
    • Remove eager monaco self-hosting in CodeEditor
    • Increase revalidate intervals from 60s → 300s
    • Increase refreshInterval from 1s → 300s (was hammering server)
    • Add default limit=50 to tRPC pulls-status route
    • Add .limit(500) to contributor task API
    • Move faker, prettier to devDependencies
    • Add .next/types to tsconfig includes
  2. docs: document top-level await createIndex as intentional security pattern

    • Added security note to CLAUDE.md explaining why await createIndex() at module scope is deliberate
    • Created AGENTS.md symlink → CLAUDE.md
  3. fix(bugcop): handle 404 for deleted/transferred issues

    • ghc.issues.get() on deleted/transferred issues (e.g. #9366) throws unhandled 404
    • This crashes the entire bugcop task, causing every 5-min CI run to fail
    • Now skips 404 issues with a warning log instead of crashing
  4. fix: address codex review findings

    • Revert analyzePullsStatus default limit to 0 (unbounded) — internal callers need full results
    • Move zx back to runtime deps (imported from runtime entrypoints)
    • Add .sort({updatedAt: -1}) to contributor task API for deterministic results

CI Impact

  • Fixes all failing 5-minute scheduled CI runs (bugcop 404 crash)
  • Reduces server load from aggressive polling/revalidation

🔄 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/201 **Author:** [@snomiao](https://github.com/snomiao) **Created:** 4/18/2026 **Status:** ✅ Merged **Merged:** 4/18/2026 **Merged by:** [@snomiao](https://github.com/snomiao) **Base:** `main` ← **Head:** `sno-perf` --- ### 📝 Commits (8) - [`0df5721`](https://github.com/Comfy-Org/Comfy-PR/commit/0df57214575ed06c86cc581c9af793561592caf2) perf: fix client bundle, caching, polling, queries, and deps - [`e53a26e`](https://github.com/Comfy-Org/Comfy-PR/commit/e53a26e8a5c48480269689faa44f1b8f780e4025) docs: document top-level await createIndex as intentional security pattern - [`dc8e14c`](https://github.com/Comfy-Org/Comfy-PR/commit/dc8e14cc6503499c47069293f1ce4b29e3998025) fix(bugcop): handle 404 for deleted/transferred issues - [`0ad5b77`](https://github.com/Comfy-Org/Comfy-PR/commit/0ad5b77729a96989ef3b1ee3be43dbc68230d23c) fix: address codex review findings - [`88babd2`](https://github.com/Comfy-Org/Comfy-PR/commit/88babd2a243740ede502de9e7c01903ad3bdf4bb) fix: address copilot review + remove zx dependency - [`d91f9ae`](https://github.com/Comfy-Org/Comfy-PR/commit/d91f9aeb1577cbf65cc5dfa9a0dacddf9ef40585) fix: address codex review round 2 - [`db26290`](https://github.com/Comfy-Org/Comfy-PR/commit/db262909273b55da9969e25bbb40319cd831f834) fix(build): replace bun shell import with execa in contributor analyze - [`9160392`](https://github.com/Comfy-Org/Comfy-PR/commit/9160392414724b544164cc3df2f4f92cdaaae3e3) fix: address copilot review round 2 ### 📊 Changes **34 files changed** (+990 additions, -98 deletions) <details> <summary>View changed files</summary> ➕ `AGENTS.md` (+1 -0) 📝 `CLAUDE.md` (+12 -0) 📝 `app/(dashboard)/PullsStatusTable.tsx` (+1 -1) 📝 `app/(dashboard)/TotalsBlock.tsx` (+2 -2) ➕ `app/(dashboard)/TotalsChartLazy.tsx` (+9 -0) 📝 `app/(dashboard)/details/page.tsx` (+2 -2) 📝 `app/(dashboard)/page.tsx` (+1 -2) 📝 `app/(dashboard)/totals/page.tsx` (+1 -3) 📝 `app/api/(dump)/router.ts` (+1 -1) 📝 `app/api/router.ts` (+1 -1) 📝 `app/auth/login/page.tsx` (+3 -4) 📝 `app/tasks/gh-design/page.tsx` (+0 -1) 📝 `app/tasks/github-contributor-analyze/githubContributorAnalyze.ts` (+4 -5) 📝 `app/tasks/github-contributor-analyze/page.tsx` (+2 -2) 📝 `app/tasks/github-contributor-analyze/summaryGithubContributorAnalyzeTask.ts` (+3 -3) 📝 `app/tasks/page.tsx` (+0 -1) 📝 `bun.lock` (+77 -24) 📝 `components/CodeEditor.tsx` (+0 -5) ➕ `docs/perf/README.md` (+23 -0) ➕ `docs/perf/build-and-typecheck.md` (+88 -0) _...and 14 more files_ </details> ### 📄 Description ## Summary Performance improvements, CI fix, and documentation updates. ### Commits 1. **perf: fix client bundle, caching, polling, queries, and deps** - Replace `d3` → `d3-dsv` (smaller client bundle) - Replace `react-icons` → `lucide-react` (already a dep) - Lazy-load TotalsChart with `next/dynamic` (SSR: false) - Remove eager monaco self-hosting in CodeEditor - Increase `revalidate` intervals from 60s → 300s - Increase `refreshInterval` from 1s → 300s (was hammering server) - Add default `limit=50` to tRPC pulls-status route - Add `.limit(500)` to contributor task API - Move `faker`, `prettier` to devDependencies - Add `.next/types` to tsconfig includes 2. **docs: document top-level await createIndex as intentional security pattern** - Added security note to CLAUDE.md explaining why `await createIndex()` at module scope is deliberate - Created AGENTS.md symlink → CLAUDE.md 3. **fix(bugcop): handle 404 for deleted/transferred issues** - `ghc.issues.get()` on deleted/transferred issues (e.g. #9366) throws unhandled 404 - This crashes the entire bugcop task, causing **every 5-min CI run to fail** - Now skips 404 issues with a warning log instead of crashing 4. **fix: address codex review findings** - Revert `analyzePullsStatus` default limit to 0 (unbounded) — internal callers need full results - Move `zx` back to runtime deps (imported from runtime entrypoints) - Add `.sort({updatedAt: -1})` to contributor task API for deterministic results ### CI Impact - Fixes all failing 5-minute scheduled CI runs (bugcop 404 crash) - Reduces server load from aggressive polling/revalidation --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 21:10:34 +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#202
No description provided.