From a739abb288f39483d9e06ed8c89febb44083e87b Mon Sep 17 00:00:00 2001 From: huangruiteng <14976749+huangruiteng@users.noreply.github.com> Date: Sun, 20 Sep 2026 09:44:14 +0800 Subject: [PATCH] fix(todos): make priority explicit across CLI, reviewed edits and authority stores Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com> --- .../personal-workspace/context-drawer.tsx | 16 ++++ .../personal-workspace/goal-tasks-view.tsx | 2 +- .../src/features/personal-workspace/i18n.tsx | 6 ++ ...shared-goal-authority-state-provider-v0.md | 9 +++ ...-goal-authority-state-provider-v0.zh-CN.md | 7 ++ .../typescript-control-plane-migration-v0.md | 15 +++- ...script-control-plane-migration-v0.zh-CN.md | 12 ++- docs/project-agent-todo-contract.md | 39 +++++++++ .../typed-actions.mjs | 10 +++ .../project/project-agent-adoption-smoke.py | 1 + loopx/chat.py | 7 ++ loopx/chat_action_normalization.py | 15 +++- loopx/chat_actions.py | 3 + loopx/chat_todo_actions.py | 3 + loopx/cli_commands/todo.py | 3 + .../cli_commands/todo_argument_validation.py | 6 +- loopx/cli_commands/todo_registration.py | 2 + loopx/control_plane/agents/capability_gate.ts | 4 +- .../agents/management_projection.py | 16 +--- .../coordination_state_contract.generated.ts | 12 +++ .../coordination_state_contract_generated.py | 4 + .../coordination_state_contract_v0.json | 12 +++ .../control_plane/coordination/todo_create.ts | 17 ++-- .../coordination/todo_successor_derivation.ts | 19 +---- .../coordination/todo_update_intent.ts | 10 +++ .../control_plane/effect_runtime_handlers.ts | 2 + .../handoff/review_packet_context.py | 8 +- loopx/control_plane/todos/event_writeback.py | 5 +- loopx/control_plane/todos/field_update.ts | 5 +- loopx/control_plane/todos/line_update.py | 11 +++ .../control_plane/todos/native_update_plan.ts | 9 ++- loopx/control_plane/todos/next_action.ts | 19 ++--- loopx/control_plane/todos/priority.ts | 75 +++++++++++++++++ loopx/control_plane/todos/provider_create.py | 1 + loopx/control_plane/todos/text.py | 33 ++++---- loopx/control_plane/todos/todo_semantics.py | 48 ++++------- loopx/control_plane/todos/write_hint.py | 2 +- .../work_items/autonomous_candidates.py | 15 +--- .../governed_transition_proposal.py | 3 +- .../work_items/planning_horizon.ts | 6 +- loopx/control_plane/work_items/team_plan.ts | 14 ++-- .../lark/presentation/projection_rows.py | 8 +- loopx/todos.py | 22 ++++- loopx/web/chat/asset-retention.json | 4 +- .../{index-DYsCE57K.js => index-DXN3tqaA.js} | 12 +-- loopx/web/chat/index.html | 2 +- .../generate_coordination_state_contract.py | 11 ++- .../test_todo_next_action_settlement.py | 2 +- .../test_todo_priority_authoring.py | 80 +++++++++++++++++++ .../test_todo_semantic_kernel.py | 13 +++ .../test_todo_write_hint_contract.py | 13 +++ .../control_plane_ts/capability_gate.test.ts | 7 ++ ...gresql_authority_store.integration.test.ts | 37 +++++++++ tests/control_plane_ts/team_plan.test.ts | 10 +++ .../control_plane_ts/todo_next_action.test.ts | 11 +++ tests/control_plane_ts/todo_priority.test.ts | 63 +++++++++++++++ .../coordination_production_scale_v0.json | 40 ++++++++++ tests/test_chat_todo_priority.py | 34 ++++++++ 58 files changed, 710 insertions(+), 165 deletions(-) create mode 100644 loopx/control_plane/todos/priority.ts rename loopx/web/chat/assets/{index-DYsCE57K.js => index-DXN3tqaA.js} (73%) create mode 100644 tests/control_plane/test_todo_priority_authoring.py create mode 100644 tests/control_plane/test_todo_write_hint_contract.py create mode 100644 tests/control_plane_ts/todo_priority.test.ts create mode 100644 tests/test_chat_todo_priority.py diff --git a/apps/presentation/dashboard/src/features/personal-workspace/context-drawer.tsx b/apps/presentation/dashboard/src/features/personal-workspace/context-drawer.tsx index 7d230ead53..fee7252a68 100644 --- a/apps/presentation/dashboard/src/features/personal-workspace/context-drawer.tsx +++ b/apps/presentation/dashboard/src/features/personal-workspace/context-drawer.tsx @@ -138,6 +138,7 @@ export function ContextDrawer({ agents, attentionHistory = [], onSelectAttention const lastAuthoritativeSubagentConfigurationRef = useRef(null); const verifiedSubagentBaselineRef = useRef(null); const [todoAgentId, setTodoAgentId] = useState(agents.find((agent) => agent.available)?.agentId ?? "codex"); + const [todoPriority, setTodoPriority] = useState(""); const [todoResumeWhen, setTodoResumeWhen] = useState(""); const closeRef = useRef(null); const drawerRef = useRef(null); @@ -607,6 +608,21 @@ export function ContextDrawer({ agents, attentionHistory = [], onSelectAttention summary: t("drawer.reassignSummary", { task: selection.item.text }), })} type="button">{t("timeline.review")} + {t("drawer.taskDeferUntil")}