Skip to content

feat(accounts): Epic 4 — the Needs-me Queue (Stories 4.1–4.2)#1420

Open
srtab wants to merge 2 commits into
feat/epic-3-throughput-herofrom
feat/epic-4-needs-me-queue
Open

feat(accounts): Epic 4 — the Needs-me Queue (Stories 4.1–4.2)#1420
srtab wants to merge 2 commits into
feat/epic-3-throughput-herofrom
feat/epic-4-needs-me-queue

Conversation

@srtab

@srtab srtab commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Epic 4 — the Needs-me Queue (Stories 4.1–4.2)

Stacked on feat/epic-3-throughput-hero (→ Epic 2 → main). This PR delivers Stories 4.1–4.2: the base Needs-me Queue, plus impact-based ordering and the passive-decay chip.

What it does

One personal, prioritized "you have N" Needs-me Queue in the review console: the user's still-actionable terminal runs across three signal classes — failed runs, DAIV-opened open MRs, and classifier-flagged (found-issues / needs-attention) runs — each confirmed by Epic 3's shared still_actionable predicate, so the count, Queue, Feed, and bell badge cannot diverge.

  • Presentation-only read over existing Run/RunEnvelope rows plus the Epic-3 cached live MR-state read — no new model, no migration.
  • Single teal count pill (recolored status-clear green at zero) with a collapsed click-through reusing _clickthrough.html; per-status queue rows with exactly one navigate-only action slot (in-console actions arrive in Epic 5).
  • First-class "nothing needs you." zero-state seal (never-ran vs audited-clean) with an honest, real-event-time audit line.
  • Impact-based ordering (Story 4.2) behind one isolated sort seam, with a passive-decay chip so stale items visibly age.
  • Personal scope via literal session__user; en + pt (pt-PT) strings.

Scope boundaries (v1)

  • View + click-through only — no in-console actions (Epic 5).
  • The someone-else-blocked, mergeable-but-broken, and agent-idle (FR-12) classes stay empty by design.

Review notes

Produced via the unattended dev loop, which caught and fixed several correctness issues over multiple review passes (terminal gate for in-flight runs; full-set reconciliation so the zero-state seal can't be a false negative; is_retryable-guarded RETRY; honest audit meta). An independent follow-up review is recommended given the turbulent history and the trust-surface nature of a couple of the fixes.

Four items were consciously deferred (tracked in _bmad-output/implementation-artifacts/deferred-work.md): the full-scan live-MR-read cost / real batching; the session__user vs run.user cross-surface scope question; a two-runs-one-MR over-count; and aria-live announce-on-swap for the count.

… 4.1)

Render one personal, prioritized "you have N" Needs-me Queue in the review
console: the user's still-actionable terminal runs across three signal
classes — failed runs, DAIV-opened open MRs, and classifier-flagged
(found-issues / needs-attention) runs — each confirmed by the shared
still_actionable predicate, so the count, Queue, and Feed cannot diverge.

- Presentation-only read over existing Run/RunEnvelope rows plus the Epic-3
  cached live MR-state read; no new model, no migration.
- Single teal "you have N" count pill (recolored status-clear green at zero)
  with a collapsed click-through reusing _clickthrough.html; per-status queue
  rows with a navigate-only action slot (in-console actions arrive in Epic 5).
- First-class "nothing needs you." zero-state seal (never-ran vs
  audited-clean) with an honest, real-event-time audit line.
- Personal scope via literal session__user; pt (pt-PT) translations; unit
  tests in the same commit.
@srtab srtab self-assigned this Jul 21, 2026
… (Story 4.2)

Re-sequence the Needs-me Queue by impact class then age instead of the
4.1 newest-first placeholder, and surface a passive-decay "stale · Nd"
impact chip. Extract the queue logic into a new sessions/queue.py:

- QueueImpactClass IntEnum reserves the four impact ranks; v1 emits only
  PASSIVE_DECAY (the three blocking classes need signals DAIV does not
  yet collect, so impact_class() never fabricates them — NFR1).
- order_queue() is a pure, stable, read-only re-sequence over the
  already-built items — membership and queue_count are untouched (AC6),
  no extra query or live read (AC8).
- Age clock is finished_at or created_at, shared by the sort key and the
  staleness threshold so a row's position can never contradict its chip.

Templates render rows in order_queue sequence (DOM == visual == tab
order), show the age the sort uses, add the "caught up" zero-pill suffix,
and guard the zero-state audit meta against an all-empty line.
@srtab srtab changed the title feat(accounts): Epic 4 — the Needs-me Queue (Story 4.1) feat(accounts): Epic 4 — the Needs-me Queue (Stories 4.1–4.2) Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant