Answer the decision with Druks gate controls - #8
Merged
czpython merged 1 commit intoSep 27, 2026
Conversation
The decision page drew its own outcome form and posted it to Panel's record_outcome route, which answered the RecordDecision gate. Druks now draws the controls for a subject's parked gate from the gate itself, so Panel asks for the call in-app and shows ui.GateControls. - RecordDecision parks with an in_app ask. Druks offers the three DecisionAction values as controls and a note box, because the gate declares both. The ask shows the run's latest artifact, the moderator's synthesis. - The decision page shows ui.GateControls(decision) in "The call" until an outcome is recorded. The page no longer reads the run status. - The record_outcome route and DecisionOutcomeRequest go. The operator's answer reaches the workflow through the Druks gate route.
czpython
deleted the
commonzenpython/answer-decisions-with-gate-controls
branch
September 27, 2026 20:41
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.
Stacked on #7. Merge that first, then retarget this PR to
main.Summary
The decision page drew its own outcome form: an app-owned
ui.Formthat posted to Panel'srecord_outcomeroute, which calledRecordDecision.answer(). Druks now draws the controls for a subject's parked gate from the gate itself (czpython/druks#744). Panel asks for the call in-app and showsui.GateControls(decision).RecordDecisionparks with{"presentation": "in_app", "label": "Record the decision"}. Druks offers the threeDecisionActionvalues as controls. It shows a note box because the gate declaresnote. The ask also shows the run's latest artifact, which is the moderator's "Panel synthesis".ui.GateControls(decision)until an outcome is recorded. The controls show nothing while the run is not parked. The page no longer reads the run status.record_outcomeroute andDecisionOutcomeRequestare deleted. The answer reaches the workflow through the Druks gate route (POST /api/gates/{run}/answer), which holds the control to the offered values.The Dashboard still sends the operator to the decision page: for an in-app ask, it opens the subject's page. The Druks subject page also shows the same controls.
Trade-offs
proceed,revise, andpass. The Druks shell has labels only for its own controls.Verification
Ran in a fresh environment with editable installs of Druks main (
beed0baa) and this branch:ruff check,ruff format --check,pyright, anddruks check-app panel: cleanrecord_decisionwith the ask Druks builds from Panel's in-app request. It covered these cases:gate_controlsfor the decision. Its status is empty before the park andparkedonrecord_decisionafter it.GET /api/gates/{run}returns the label,controls: ["proceed", "revise", "pass"], andreply_fields: ["action", "note"]maybewithINVALID_GATE_ANSWERrevisewith a note sends a payload on therecord_decisiontopic that validates as aRecordDecisionreplyPOST /api/panel/decisions/{id}/outcomeno longer exists