Repository navigation
Conversation
The harness sends a planner decision the user can switch as a plan-card row with choice_id decision:<slot>. The ledger groups those rows under "Choices the plan made", apart from the scope rows under "Counted as", and a decision switch shows "Replanning" until the harness answers, since it runs a planner replan. switch_failed and Stop take the scope switch's paths.
This branch has not been deployed
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.
The Studio harness now sends planner decisions the user can switch (for example reading "major donors" as DAC countries' total or as the top 10 donors) as plan-card rows with
choice_iddecision:<slot>and one option per label, the same shape as scope rows. The existingChoiceRowcontrols already render and post them; this change makes the card read right for them.src/lib/studio/plan.tsledgerSectionssplits the ledger into scope rows under "Counted as" and planner rows under "Choices the plan made", each shown only when it has rows. A decision switch runs a planner replan of tens of seconds, so its option shows "Replanning" and the chat line "Replanning with " until the harness answers (switchLine,switchPendingText); the page sets no deadline of its own. A refused or stopped decision switch reads "The plan keeps ."switch_failedand Stop go through the scope switch's paths unchanged. Thewire.tscomments describe bothchoice_idshapes.What a reviewer should weigh: the logic lives in pure functions in
plan.tswith node tests, since the repo has no component test runner, soPlanLedger.tsxrendering is untested; approved plans list every choice under "Counted as", becausePlanApproved.choicescarries nochoice_id. Merge after the harness change ships (DevelopmentFinanceObservatory/ai#95); before it, nodecision:rows arrive and the card is unchanged.Testing:
node --test src/lib/studio/test/*.test.ts(617 passed),pnpm exec tsc --noEmit, eslint, prettier and stylelint on the touched files.