Repository navigation
feat(issues): add issue flow and backlog health analytics - #1
Merged
Merged
Conversation
Cycle time by era, weekly arrivals vs resolutions, open backlog, age buckets, stale issues, and linked-PR share (U1). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Fetch open, recently closed, and baseline-era issues fail-soft, cache them in the raw bundle, and return an issues payload from compute_flow_metrics (U2, U3). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add an Issue Backlog block to the chat system prompt when issue metrics exist and a quick-question chip for it (U4). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
KPI cards, arrivals-vs-resolutions chart with open backlog, age distribution, and a stale-issues table, hidden when issue data is absent (U5). Issues now use their own 52-week window and a closed-date-bounded query, and are fetched in parallel with the PR queries. Reusing the CFD weekly bins capped the window at 9 weeks on a busy repo, and the sequential fetch added 46s. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Parse issue rows once instead of id()-keyed side dicts, expose net_8w from the payload so the UI and chat prompt stop recomputing it, and release the issue fetch pool right after submit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Requirements and implementation plan the issues analytics feature was built from. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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
Analyzing a repo now also shows whether its issue backlog is healthy: how fast issues get resolved, whether arrivals outrun resolutions, how old the open backlog is, which issues have gone stale, and how many closed issues ever got a PR. Until now issues appeared only when a merged PR closed them, so demand that never got resolved was invisible.
The new "Issue Flow & Backlog Health" section sits below the existing charts in the web app. It adds five KPI cards, an arrivals-vs-resolutions chart with the open backlog overlaid, an open-issue age chart, and a stale-issues table (no comment for 90+ days). The AI coach can answer questions about it. The legacy
dashboard.htmlis untouched. Issue data is fetched alongside the PR queries and fails soft: if it can't be fetched, the section is hidden and the PR analysis is unaffected.Session-settled decisions carried from planning: issue flow and backlog health as the first scope (user-directed, over responsiveness, issue mix/AI impact, and issue-to-PR linkage); live web app only (user-directed, over also updating
dashboard.html). Plan:docs/plans/2026-10-06-0619-feat-issues-analytics-plan.md.Implementation deviation from the plan
On
sveltejs/sveltethe plan's KTD3 (reuse the CFD weekly bins) capped the issue window at 9 weekly points, because 600 merged PRs cover only ~10 weeks there. That missed the plan's goal of at least 20 weekly points, and the sequential issue fetch added ~46s to analyze. Changes made in1329c4a:closed:>=52 weeks ago) with the cap raised from 600 to 1000.sveltejs/svelte: analyze takes 56s (PR-only is ~48s), with 52 weekly points and no null fields.The plan file was not edited during execution, so its KTD2 (600 cap,
updatedAt-based window) and KTD3 text are stale relative to the code.Validation
pytest tests -q: 20 passed. This adds the repo's first test suite: metrics (AE1-AE3 each have a named test), collection paging and truncation, the analyze payload, and the chat prompt.POST /api/analyzeforsveltejs/svelte: 938 open issues, 549 closed in the window, 52 weekly points.issuesis null. Legacypython analyze.pystill regeneratesdashboard.html.Unapplied review findings
im.n > 0as well asib.n > 0). Confirmed by validator.Not applied because each had confidence 75 from a single reviewer with no cross-reviewer agreement, and one is classified manual. Review run:
20261006-063821-c19f8be2(artifacts in/tmp/compound-engineering-501/ce-code-review/20261006-063821-c19f8be2).Also worth a human look (residual risks, not proven defects):
hasNextPage=falseat the cap, so the truncation flags would never fire.sveltejs/svelte).ghissue searches have no timeout (same as the existing PR calls), and a failed fetch is silent in the UI.net_8wslice and the modern-window filter lack tests.🤖 Generated with Claude Code