Feature 21 integration review remediation (#183)
CI / ci (push) Successful in 9m30s
CI / ci (pull_request) Successful in 9m38s

Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
This commit was merged in pull request #183.
This commit is contained in:
2026-10-10 19:17:32 -04:00
committed by approver_agent
parent 62f4f9eece
commit 80338dd176
22 changed files with 356 additions and 60 deletions
+11
View File
@@ -346,6 +346,17 @@ func (s *Service) Deck(ctx context.Context) (Deck, error) {
return deck, nil
}
// PendingCount is how many Side quests are pending on the deck. Unlike
// Deck it only reads: it does not fail orphaned batches, so a reader such
// as Home never writes.
func (s *Service) PendingCount(ctx context.Context) (int, error) {
rows, err := db.New(s.st.Reader).ListDeck(ctx)
if err != nil {
return 0, fmt.Errorf("suggest: list deck: %w", err)
}
return len(rows), nil
}
// Decision is a suggestion once decided, with the id of the replenish
// batch's job when the decision called for one: the batch it started, or
// the one already pending or running that it joined.