Repository navigation
Inbox: decision mode (experimental) - #2141
Merged
Merged
Conversation
…erson rule and GET /api/inbox/decisions
…ental switch, tests and docs
- A Hold starts only for a group the person touched in this sitting; a group ready before it (Keep as a draft) waits as Held · Send, and a thread with a reply draft never sends from here (checked again right before a send). - A follow-up answered after a group's reply goes round again; each send records what it carried and renews its key when the answers change. - Holds pause while decision mode is tucked; a pick restarts the 5 s; the countdown never shows more than 5 (it read 10 s for a frame). - The close question names what is left (half answered, waiting to send, failed, a draft reply, typed words); a failed Send never closes. - An action item's Undo only inside its window, reopened only once the server confirms; refusals shown. Only question_superseded is quiet. - Escape in a box with words lets go of it first; Previous draws a sent card read only; a committed swipe keeps moving from where the finger left it. - Notifications pass their question id and move an open sitting to it; focus returns to the Decide button; the pill clears the thread's foot. - The list counts unknown question kinds again (inboxQuestionWaitsForList, differential test against the pre-PR summarize); the notifier uses it. - A waiting Re-ask note leaves out what it lists, per note; the projection's model test follows. - saveConfig merges experimental only as a plain object; the settings POST answers 409 experimental_env_decides while PLANNOTATOR_EXPERIMENTAL decides. Co-Authored-By: Claude <[email protected]>
# Conflicts: # packages/inbox/App.tsx # packages/inbox/components/Sidebar.tsx # tests/e2e/playwright.config.ts
- H1: a Hold waits behind the close question (and while one of its cards is being edited, and while tucked); the close question reads its reasons live; Keep as a draft waits for a reply on its way and says if it failed. - H2: a group's cards are read only while its reply is on its way, and its picks go with unsent_only, which the picks route refuses with question_already_sent once the question was sent (opt-in: the thread-state model keeps a sent question re-pickable for every other caller). A reply key is renewed when an answer's revision changed. - Touches are counted per decision, and Undo takes one off: a Hold whose only touched answer is undone gives way to Held · Send. - The draft state follows the latest row or a fresh read made since it; comments waiting count as a draft; a draft read that fails sends nothing; leaving the draft state keeps a Hold the person pressed. - A reply still sending is a close reason; a failure is never silent. - A failed group with nothing left to send is waiting; a session that ended mid-Hold says the reply waits for the next agent; a notification never drops typed words (a banner, and words are kept per card); a replacement on its way counts as left; an action item's Done is a pending pick, and its Undo clears gone. - The stamp's timer and a projection read never move the queue off a card the person went to on purpose. - Re-ask exclusion: per note as list rule 2a reads it, and only while the session it went to is still there. Co-Authored-By: Claude <[email protected]>
backnotprop
added a commit
that referenced
this pull request
Oct 25, 2026
…-lines Decision mode: the agent contract lines on the Queue card, and #2141's review follow-ups
1 task
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.
Builds decision mode for the Plannotator Inbox as an experimental feature, off by default. The approval record is
.product/approved/inbox-decision-mode/(approval.md, BRIEF.md §7 and §10, prototype.html?direction=queue). That folder is not in this repo.What it does
experimental: { decisionMode }throughPOST /api/inbox/settings{ experimental: { decision_mode } }.PLANNOTATOR_EXPERIMENTAL=decision-modeturns it on and-decision-modeturns it off; while the env var decides, the switch is locked.resolveExperimental(config, name)lives inpackages/shared/config.tswith a small name-to-key table.saveConfigmergesexperimentalkey by key, so switching one flag keeps the others. With the gate off, nothing of decision mode renders andGET /api/inbox/decisionsanswers 404. There is no telemetry.inboxQuestionWaitsOnPersonin core is read bysummarizeInboxQuestions(so the list's sections), bythreadOpenQuestions(the thread's popover) and by the projection.inboxUrgencyOfis shared betweeninboxSectionOfand the queue's order. A fast-check property test runs histories of sends, picks, replies, Mark read, archive, supersede, Re-ask and action marks. After every step it asserts that the Decide count equals the list's count (open + picked of the rows in Stopped, Holding and Waiting, plus "Answered, not sent"), and that each thread's decisions equal its popover's questions.GET /api/inbox/decisions. A read-only projection (store.openDecisions()) with no new records. Each item has the question as the thread route serves it (revision included), a message excerpt, picture and attachment refs, the thread, and the session. The order is brief §7's: each session's decisions together, a thread at a time, the most blocked session first, Stopped first. The route has the window guards (another site is refused) and is served to the owner over the tailnet like other read routes. The event stream keeps it live.sendTargetsOf: one reply per agent session per thread, with the skip and supersede rules unchanged. Afterwards the chip moves through Queued/Saved, Delivered, Working and Replied. Closing with a session half answered asks "Send what you answered / Keep as a draft". A question replaced while it is on screen swaps in under a banner.title) are all covered.cardFactsinDecisionCard.tsxis where they will be read, and the card already has a place for each.Choices where the brief left room
decisionsis still the removed Decisions route, and an existing test pins it as refused. An older phone app might call it expecting the old records, so I left the door alone. A row can be added later under another name.Tests
packages/shared/inbox/store-decisions.test.ts: order, the drop-outs, the property test.packages/server/inbox-decisions.test.ts: the gate, the env override both ways, Settings keeping other experimental keys, guards, order, picks and Send through the existing routes, the door refusing the route.packages/shared/config.test.ts: experimental features.packages/inbox/decisionsModel.test.ts: the pure queue.packages/inbox/decisionMode.test.tsx, added to test.yml's DOM list: the gate off, walking the queue, a pick saving, the per-agent Send after Hold, Undo and Previous, Later, a replaced question, close with Keep as a draft, Open the thread and Resume.tests/e2e/inbox-decision-mode.spec.tson the compiled binary: Chromium desktop and WebKit iPhone 15, light and dark. The agent's ownwait_for_replyreceives the one reply with both answers.