mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-09-25 14:06:18 +00:00
* feat(authz): gate composer send on runs:create (Phase 4 follow-up, #4063) Mirrors #5294's stop gating on the send side: both chat routes pass canCreateRuns (from PERMISSIONS.RUNS_CREATE, lockstep with the backend enum) into the shared composer. The gate sits at the top of submitThreadMessage — the single choke point every composer entry (submit button, Enter, goal-set-triggered run) funnels through — and denies with a toast plus a rejected promise so PromptInput keeps the text. The idle submit button is disabled and explains the boundary via conditionally-spread aria-label/title (startTurnUnavailable, en/zh); while streaming the button stays the runs:cancel stop affordance. Also removes the unreachable kind === "stop" branch in handleSubmit (flagged during #5294's review): the Enter path early-returns with the streaming toast before the classifier runs. * fix(frontend): reject denied goal starts before saving state --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com>