feat(accounts): Epic 4 — the Needs-me Queue (Stories 4.1–4.2)#1420
Open
srtab wants to merge 2 commits into
Open
feat(accounts): Epic 4 — the Needs-me Queue (Stories 4.1–4.2)#1420srtab wants to merge 2 commits into
srtab wants to merge 2 commits into
Conversation
… 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.
… (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.
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.
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 sharedstill_actionablepredicate, so the count, Queue, Feed, and bell badge cannot diverge.Run/RunEnveloperows plus the Epic-3 cached live MR-state read — no new model, no migration.status-cleargreen 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).never-ranvsaudited-clean) with an honest, real-event-time audit line.session__user; en + pt (pt-PT) strings.Scope boundaries (v1)
someone-else-blocked,mergeable-but-broken, andagent-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; thesession__uservsrun.usercross-surface scope question; a two-runs-one-MR over-count; and aria-live announce-on-swap for the count.