Skip to content

Persist pull request identity and sidebar status#20

Open
jln13x wants to merge 3 commits into
personalfrom
t3code/pr-discovery-polling
Open

Persist pull request identity and sidebar status#20
jln13x wants to merge 3 commits into
personalfrom
t3code/pr-discovery-polling

Conversation

@jln13x

@jln13x jln13x commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Persist canonical pull request associations on threads created from or updated with a known pull request.
  • Refresh explicit associations by provider, repository-qualified URL, and pull request number, while retaining last-known status as stale when provider refreshes fail.
  • Keep explicit PR status visible when a thread has no branch or local repository; inferred PRs still require an exact checked-out branch match.
  • Share explicit refreshes by canonical PR identity across worktrees instead of polling independently per checkout.
  • Protect background provider polling with a sustained 30-request/minute budget, a 10-request burst, and at most four concurrent provider calls.
  • Cache open PR state for one minute, closed state for five minutes, and merged state for fifteen minutes; provider failures back off exponentially up to fifteen minutes.
  • Keep the compact sidebar treatment: open is green, merged is purple, closed is muted gray, and threads without a known pull request have no icon.
  • Cover persistence, projection, migration, refresh fallback, web, and mobile flows behind the durable change-request-status feature flag.

Sidebar preview

Sidebar pull request states

Regression review

  • Feature-flag-off behavior remains branch-bound and does not render persisted associations.
  • GitHub durable refreshes derive the repository from the canonical PR URL, so an unrelated checkout with the same PR number cannot populate the shared entry.
  • Provider errors and exhausted polling budgets retain last-known state as stale instead of clearing the icon.
  • Stale inferred results are keyed to the branch that produced them, so switching branches cannot carry the old PR icon forward.
  • Multi-selector branch discovery reserves its worst-case GitHub API cost, including repository-context resolution.
  • Persisted provider terminology remains correct while live provider metadata is unavailable or unrelated.
  • Visible rows share one web hook and subscription policy; branchless threads without repository context render stored state without starting a poller.

Validation

  • 116 focused tests across shared resolution, polling policy, GitHub lookup, Git manager, and broadcaster behavior
  • vp check
  • vp run typecheck
  • vp run lint:mobile

@github-actions github-actions Bot added size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 22, 2026
@github-actions github-actions Bot added size:XXL and removed size:XL labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant