Task pool board card: browse the pool and grab a task by hand - #278
Conversation
Until now a hire could only claim a starter task through the buddy. The board now offers the whole live pool in a dialog: ranked by fit, with the same reasons the buddy reads, searchable and filterable by type and by whether somebody is already on it. A task is grabbed with a two-press confirm that names the task it replaces. The buddy stays one press away: "Help me choose" at the top of the dialog and on the empty current-task card, "Is this a good fit?" on every task. Uses the existing GET /me/matches and POST /me/goal; no backend change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the browse dialog with a TASK_POOL card rendered from the
board's own read: the whole pool best fit first, search, type filter,
"hide taken", grab with a two-press confirm, and the buddy one press
away ("Help me choose", "Is this a good fit?").
The current-task and suggested-tasks cards point at the pool card
rather than opening anything. Grabbing re-reads the board only; the
separate /me/matches read is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dismissing a card is sticky on the server, and neither the hire nor the buddy can bring one back. For the pool - the one way to grab a task without the buddy - that made a single stray press permanent. Its X now only hides it (with an undo toast), and a switch in the board's rail brings it back. Kept in local storage, like the path strip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It only navigated to /buddy with no question attached. Every card that has something to ask the buddy already does so with its own prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Read the diff at CI: the 1. A 409 on grab leaves the stale task in the pool
Small wording point in the same place: 409 means "not 2. Focus is lost on the first pressPressing "Grab this" replaces the button with the confirm group, so the focused element is unmounted and keyboard focus falls back to 3. The rail switch shows even when there's no pool cardThe new Related to merge order: #264 is still open. The card just doesn't appear without it, which is fine, but "Good next tasks" now claims through 4. Two sources for "what am I on"In 5. Small things
6. Tests
What's good here
Nice PR overall. I'd like 1 and 2 settled before merge and #264 to go in first; 3 is quick, the rest can be follow-ups. |
- Re-read the project's board after every grab attempt (onSettled via useInvalidateBoard), so a task that turned out not to be open leaves the pool under the toast saying so. 409 copy no longer claims the task "closed where it lives" — it covers retired/removed too. - Move focus to "Yes, grab it" when the confirm appears (described by the question) and back to "Grab this" on cancel or failure. - Render the rail switch only on a board that has a TASK_POOL card. - The pool card hands the current task's title to its grab buttons, so "Swap ... for this?" agrees with "You're on this one" even without a current-task card on the board. - AskTheBuddy takes a className; the pool card uses it instead of calling openAiBuddy directly. Reasons keyed by position. Straight quotes in toast and confirm copy. - Tests: taskPoolShown storage; BoardPage X hides without dismissing, Undo, rail switch, no switch without a pool card; focus handling; 409 re-reads the board. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the thorough review. All of it is addressed in 1. Stale task after a 409: 2. Focus: when the confirm appears, focus moves to Yes, grab it. That button is 3. Rail switch: it's only rendered when 4. Two sources: the pool card now passes the current task's title (from its own 5. Small things:
6. Tests:
Full routine is green: lint, prettier on changed files, build, 393 files / 3328 tests. On the 🤖 Generated with Claude Code |
BabuPlk
left a comment
There was a problem hiding this comment.
Checked bcbd3182. Everything from the review is addressed, and the way it's done reads well:
- 409:
onSettledwithuseInvalidateBoard(projectId)covers both success and the stale case, and the new copy is right for every non-LIVEstate. - Focus: moving focus to "Yes, grab it" with
aria-describedbyon the question is exactly the fix. ThewasConfirmingref keeps the first render from stealing focus. - Rail switch: now only rendered when there's a
TASK_POOLcard. - One source for "what am I on":
currentTitlecomes from the pool's owncurrentTaskId, and the cached card is only a fallback. Together with backend#264 now reviving a dismissedCURRENT_TASKon a grab, the case I described can't happen anymore. - Tests:
taskPoolShown.test.tsandBoardPageTaskPool.test.tsxcover exactly the parts that were missing, including "dismissCardis never called, even past the undo window".
I ran it on a fresh npm ci at bcbd3182: tsc -b, npm run lint and npm run build are clean, and npm run unit passed 338 files / 3255 tests, plus BoardPage.a11y. Prettier passes on all changed files.
One small thing, not blocking: after a successful grab, focus goes back to "Grab this", but once the board re-read lands that button is replaced by "You're on this one", so focus falls to <body> again. Making that marker focusable (tabIndex={-1}) and focusing it on success would close the loop. Fine as a follow-up.
Approving. Merge after backend#264, as agreed.
Summary
Until now a hire could only claim a starter task through the buddy. This adds a "Task pool" card to the board: the whole live pool, best fit first, grabbable directly — with the buddy one press away for anyone who wants help choosing.
Depends on SprintStartProject/sprintstart-backend#264 (new
TASK_POOLcard kind, andPOST /me/goalpinning the current-task card). Without it the card simply does not appear.The card (
board/components/TaskPoolCard.tsx)task-pool/GrabTaskButton) with a two-press confirm that names what it replaces ("Swap 'X' for this?") →POST /me/goal→ board re-read. The task the hire is on shows You're on this one instead.Switch instead of dismissal
Dismissing a card is sticky on the server — neither the hire nor the buddy can bring it back. For the one surface that lets somebody grab without the buddy, a single stray press would have been permanent. So the pool card works like the path strip: its X only hides it (with undo), and a new switch in the board's right rail brings it back. Stored in local storage per board (
layout/taskPoolShown.ts), like the path strip.Other cards
/buddywith no question attached.Verification
dev;tsc -b,npm run lint,npm run build,npm run test(391 files / 3316 tests) all green. Changed files passprettier --check.TaskPoolCard.test.tsx(rank order, filters, two-press grab, current task marked, buddy hand-off, empty pool). UpdatedCurrentTaskCard,BoardGridandBoardSubmenustests for the new wording and the grab button.🤖 Generated with Claude Code