Repository navigation
feat(firstmate): walk everything that needs you as one ranked queue - #4
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
main's Check and Test jobs have been red since the upstream sync: - The sync merge put back `msgpackr-extract` in apps/server, which upstream removed in d547e3b. knip reports it unused, and the CLI bundle closure test flags its native loader's `detect-libc` as bundled away. - With knip passing, its export pass ran for the first time and found twelve fork-only exports used only in their own file. They are no longer exported; the two Effect service constructors keep `@public` like the other reactors. - `vp check` then ran and rejected the raw `GitPullRequestIcon` in the FirstMate topics panel; it now uses the shared `PullRequestGlyph`. - The 902 migration test listed every migration after 52, so adding 905 broke it. It now checks only what it is about. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A turn-review card was only cancelled when the next turn ended, so a topic kept saying "Waiting for you" through the whole run that answered it. The panel also derived "Waiting for you" (all PRs merged) or "Blocked" (a PR with action-required or failing checks) while the thread was visibly working. - Starting a turn now cancels that thread's pending turn-review cards in the same event batch. - The topics panel ignores turn-review cards and PR-derived status while the thread runs; each PR line keeps its own status. A completed topic whose thread runs again reads as working. - Every icon button in a topic row has a tooltip and an aria-label. - Threads the FirstMate panel already lists (supervisor chat and delegated topic threads) no longer repeat as active cards in the sessions list; the panel marks the one on screen instead. Pins, shelves and search still reach them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The Decisions panel listed pending cards only, so a failed run, a red or action-required PR, or a request without a card still meant opening threads one by one. It now builds one queue per project from all of them and shows one item at a time with the topic goal, the last round summary, the question or agent tail, PR and thread links, the options, and a reply box. - Priority: a paused agent, then turn reviews by the judge's outcome and confidence, supervisor questions, failed runs, PR checks, and reviews where the judge leaned towards acting alone; newer first on ties. The turn review card now stores the judge's verdict so the ranking can use it. - The item on screen is pinned: new or more urgent items only reorder the list behind it. Answering, "Later" or "Next" moves to the top of the queue. - A reply is queued on the thread after the current turn and closes the card it answered. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
thiagown1
force-pushed
the
feat/firstmate-decision-queue
branch
from
September 24, 2026 21:42
56e79ae to
8860ba2
Compare
2 of 4 tasks
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.
What Changed
The FirstMate chat's Decisions panel is now a queue of everything in the project that needs the user, shown one item at a time:
after-current-turn(starts now on an idle thread, never interrupts a running one). The card it answered is closed (turn review → "I'll answer in the thread", supervisor question → cancelled). Provider requests have no reply box; they are answered through their options.source.verdict: outcome, confidence, in-scope) so the queue can rank by it. It is optional, so older cards still decode.Priority formula (
firstMateQueuePriority)blockedneeds_userdone/continue(judge leaned towards acting alone)Ties go to the newer item. A turn review stored without a verdict ranks as
needs_userat 0 confidence when blocking, otherwise 30. Also indocs/internals/firstmate-domain.md.Why
The user wants to read and decide everything in sequence without opening thread after thread. Before, the panel only listed cards, so a failed run or red checks never reached it (on the real data below it said "Nothing to decide" while six items needed attention), and a list that reorders while you read it makes you lose your place.
Clearing an answered item uses the same mechanism as #3: starting the thread's next turn cancels its turn-review card, and a running thread's items leave the queue.
UI Changes
Worktree dev server seeded with a VACUUM INTO copy of the real FirstMate database, 1440×950.
After Later: the failed run moved to the back and the next item (checks failed on pingdotgg#2202) took its place:
Not exercised in the browser: Send. On the copied database it would start a real provider turn in a real worktree. The reply wiring was checked by typecheck and the queue/cursor tests; no Jev card was pending in the copied data, so the verdict line was only covered by tests.
Checklist
Tests
FirstMateDecisionQueue.logic.test.ts(new): priority order and the no-verdict fallback; queue building from every source with context; turn review and PR items leave while the thread runs; no duplicate for a provider request that has a card, and no reply on it; newer first on ties; the item being read stays pinned while a more urgent one arrives; a resolved-elsewhere item stays until "Next"; Later/handled ordering.FirstMateTurnReviewReactor.test.ts: the opened card now carries the verdict.vp test runon the FirstMate web components, the turn-review and delivery reactors, andpackages/contracts: 37 files, 550 tests, all passing.tsc --noEmit: apps/web, apps/server, packages/contracts, packages/shared clean.main.Done by Claude Opus 5.5 (Claude Code, via T3 Code).
🤖 Generated with Claude Code