Repository navigation
Board: batch Ask lead button (5 a click, shows waiting count) - #35
Merged
Merged
Conversation
Ask lead was one click per row only because each row has one primary
button; /items/reanalyze already takes up to 20 keys in one Lead turn
and refuses a second send while the first is in flight. So the batch
needs no new route and no core change.
/needs gains ask_lead {keys, total, in_flight}: the open, unhandled,
investigated bug reports and feature requests with no draft, no
hand-off, no dispatch and no reanalyze_requested_at (needs.awaits_lead),
oldest-posted first, keys capped at ASK_LEAD_BATCH = 5. A sent item is
stamped and never joins the batch again; a refused send clears the
stamp, so it comes back.
The Needs-you header shows "Ask Lead (5 of 23 waiting)". One click posts
/items/reanalyze once with those keys through the same controller as
Re-analyze, so it reads "Lead thinking…" and stays disabled while
either is in flight; with nothing left it reads "Nothing waiting for
Lead". The row's own Ask lead stays.
Tests: tests/test_ask_lead_batch.py (oldest first, at most N, none sent
twice, count goes down, in-flight hold, route 409 on a second send).
Screenshot harness: a DOM check for the button and ask-lead-batch.png.
README (both halves) and CONTRACT updated; app 0.9.9.
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
On the Board, asking the Radar Lead about investigated items was one click per row. This adds one batch button in the Needs-you header: Ask Lead (5 of 23 waiting). Each click hands the Lead the next 5 oldest waiting items in one turn; click again until it reads Nothing waiting for Lead. The per-row Ask lead stays.
Why it was per-item: no deliberate reason. Each row has one primary button, so the row sent its own key. The route behind it,
/items/reanalyze, already takes 1–20 keys in ONE Lead turn and refuses a second send (409reanalyze_in_flight) while an earlier ask has not moved. So no new route and no KiroCrew core change.backend/needs.py:/needsgainsask_lead {keys, total, in_flight}.awaits_lead= open, unhandled, investigatedbug-report/feature-request, no draft, no hand-off, no dispatch, never asked (reanalyze_requested_atunset). Oldest-posted first, capped atASK_LEAD_BATCH = 5. A sent item is stamped and never joins the batch again; a refused send clears the stamp, so it comes back.ui/src/App.tsx: the header button shares the Re-analyze controller, so it reads Lead thinking… and is disabled while either is busy or in flight (no double-send). Errors show inline with Try again.desk/CONTRACT.md, app 0.9.9.Tested
tests/test_ask_lead_batch.py(new, 5 tests): oldest first and at most 5; only waiting items count; repeated clicks send 12 → 7 → 2 → 0 with no item twice; the batch is held while the Lead has not moved; the route sends one batch and answers 409 on a second send while in flight. Revert check: dropping the never-asked rule fails 4 of the 5.pytest tests/test_ask_lead_batch.py tests/test_row_actions.py tests/test_stale_drafts.py tests/test_needs.py tests/test_agents.py: 68 passed.npm run build: committedui/distmatches the source (HEAD source rebuilds to HEAD dist).ask-lead-batchpasses (labelAsk Lead (5 of 23 waiting), one post with the 5 oldest keys, thenLead thinking…, disabled, second click sends nothing); all existing checks pass.