Repository navigation
Decision mode: the thread's question card, drafts, and Send only when pressed - #4016
Merged
Merged
Conversation
…d only when pressed, on by default - Each question in the focused dialog is drawn by the thread's card (MessageBody, one question only through a new Viewer onlyQuestionKey seam): Before/After, Where, Shows, Stakes, Why, Pros/Cons, picture choices, Try prototype, multi and text questions, Other, notes and Skip. - Answers save as the thread's drafts through the picks route (typed words after a pause); action items are staged. - No auto-send: the 5 s Hold is gone. A Send button is always in the dialog and sends what is answered; closing keeps every answer as a draft. - Pictures open in the dialog's viewer, prototypes in the prototype window over the dialog; an attached file or a named file opens beside the thread and the dialog comes back when it closes. - Decision mode leaves Experimental: on by default, switch in Settings > Capabilities (inboxDecisionMode).
Owner
Author
|
Still to do before this is ready:
|
…e dialog, docs - decisionMode.test.tsx rewritten: on by default, nothing sends without a press, Send sends only the answered questions, closing keeps every answer as a draft and asks nothing, the switch off hides the way in. - A picture the store never captured opens in the dialog's own viewer, not the page lightbox behind it (MessageBody onOpenUncapturedImage), with a test that fails without it. - inbox-decision-mode.spec.ts rewritten as the whole-window proof (1440x900 light and dark, 390x844 light), asserting nothing is sent before Send, Send carries only answered questions, drafts stay after leaving. - Other e2e specs moved to the thread card, the always-there Send and the close that asks nothing. - Docs: decision mode is no longer experimental; new sending; settings and decisions API rows; onlyQuestionKey.
… the staged Done and the first-letter save - A run of saves that only changed typed words reads nothing again with decision mode on (its cards draw from the held thread now, not the decisions), so pickSaveReads' guard holds with the new default. - decisionMode.test.tsx: the first letter of Other saves at once, the rest once after the pause; an action item's Done is staged in the draft and Undo takes it back past the old window. - The linked computers' capabilities answer may carry decision_mode.
…son sees; drop decision mode leftovers The DOM test waited for a read of the open thread, which only came while the server had not resolved the project's repo yet. Decision mode, now on by default, reads every decision at load and so resolves each project's repo; the thread read then says repo_known, and a later agent message is taken into the held thread in place with no read of it (openThreadReads.ts, as designed and unit-tested). The test now checks that the message shows in the open thread and the list is read while the save is still out. Also drop the unused DECISION_ACTION_UNDO_MS, the unused .ib-dm-tiles and .ib-dm-pics rules, and the keyboard world's old experimental switch (decision mode is on by default).
The conflict loop (save again over another window's answer, or draw the Inbox's) and the pagehide/visibilitychange listener move out of Thread.tsx into pickConflict.ts and pageLeave.ts, so decision mode can run the same machinery. Thread.tsx shrinks; its ceiling follows.
The dialog saves answers with the thread's machinery (decisions/saves.ts): typed words after their pause, one save at a time, conflicts saved over quietly, a refused save kept on the card and owed, Send saving first and sending nothing when it cannot, a reload refused while anything is unsaved, a keepalive save as the page goes, and the answers still on their way put on the thread card when the dialog closes or tucks away. The Can't do it reason is a draft too (decisions/reasonDrafts.ts, kept in the thread's comment drafts), restored on the card and on reopening; its button says Save, since it stages the mark. A failure while the dialog is closed goes to onAway for the window's toast.
App passes onAway to decision mode: a Send or a save that fails once the dialog is closed or tucked away shows the window's toast with the existing line and Open the thread. The doc comments and declarations joined onto one line in api.ts and the two props joined in App.tsx go back to normal formatting. To stay under the ceilings, the tuck handler moves to app/decideTuck.ts and InboxLaunchSettings to launchSettingsModel.ts; both ceilings are lowered to the new counts.
…ode-modern-cards # Conflicts: # apps/mobile/contract/parity/ledger.json # docs/agent-guides/environment.md # docs/agent-guides/inbox-machines.md # docs/agent-guides/server-and-storage.md # packages/inbox/capabilities.test.ts # packages/inbox/capabilities.ts # packages/inbox/eventFrames.ts # packages/server/inbox.ts
One slow or failed read of the sitting's thread left the card on "Reading the question…" for good. The read now goes again twice, later each time (decisions/readRetry.ts), and only then the card says it could not read the question, with Try again.
A project whose own name holds " · " was named again for every decision on the end screen and the chips: the chip's projects are now compared whole. A group whose replies went in part reads "1 of 2 replies sent" instead of "Not sent".
…ws them Every record batch in every window read GET /api/inbox/decisions, a scan of all open decisions. Now a batch reads it only when it touched a thread whose decisions the window draws (a pane's Decide these N, the sitting's thread) or named no thread; a thread asked for the first time reads it once, so its count stays current.
…; quiet reason clear; no reason drafts for a far thread - A Send waiting on a save that fails after the dialog closed tells the save notice once, not the send notice; a Send that finds a reply draft tells it once away. - A reason's failed save has its own toast line. - Emptying a reason after its mark saved never tells a failure or stops a reload; it is tried again quietly. - One reason's writes go one after another, the newest words last. - A thread on a linked computer reads and writes no reason draft (comment drafts are not forwarded). - DOM tests for the failed pick save, the save failing after close, and the reason draft round trip.
…by default); a phone leaves the file by Back to the thread
…ox-decision-mode-modern-cards # Conflicts: # apps/mobile/contract/parity/ledger.json
…ox-decision-mode-modern-cards # Conflicts: # tests/inbox-size-ceilings.json
backnotprop
marked this pull request as ready for review
November 25, 2026 19:16
backnotprop
added a commit
that referenced
this pull request
Nov 27, 2026
Inbox: hold only the watched threads' decisions (memory soak growth doubled by #4016)
yermakoffivan
pushed a commit
to yermakoffivan/plannotator
that referenced
this pull request
Nov 27, 2026
Decision mode turned on by default (backnotprop#4016), so every window read GET /api/inbox/decisions, which lists every open decision in the store, and kept the whole list in state. On the memory soak's store that is 2,610 decisions, 4.25 MB of JSON: the heap at open rose 4.7 MB and the soak's growth went from 4 to 13 MB, for people who never open decision mode. The window draws decisions only for the threads it watches (a pane's "Decide these N", the sitting's thread). A read now keeps those threads' decisions and a count for every thread, so a thread just opened still shows its count at once.
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.
Decision mode keeps its focused dialog over the dimmed Inbox ("Decide", "1 of 5", one question at a time, same way in and out). What changes inside it:
MessageBody, only that question's card, through a new uiViewerproponlyQuestionKey; key and number still come from the whole message). Before/After with the change marked, Where, Shows, Stakes, Why, Holds up, Stopped, Pros/Cons, picture choices, Try prototype, pick-any and text questions, Other, notes and Skip all work. Action items keep decision mode's own card.inboxDecisionMode; an olderexperimental.decisionModechoice is kept;PLANNOTATOR_EXPERIMENTAL=-decision-modestill turns it off). It is declared in the standard capability switch list.Draft: work remains (see the comments that follow).