mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-12 16:05:43 +00:00
feat: add a minimal skin for the approval page and slack/teams (#11061)
* feat: add an approval skin to the approval page and slack/teams messages Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK2Ye4PizykReZVuMEm3m9 * chore: point ee-repo-ref at the teams approval skin commit Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK2Ye4PizykReZVuMEm3m9 * fix: resolve the approval skin from the step awaiting approval Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK2Ye4PizykReZVuMEm3m9 * fix: shorten the slack approval message to fit the button value limit Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK2Ye4PizykReZVuMEm3m9 * fix: rename skins to detailed/minimal and keep long slack messages Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK2Ye4PizykReZVuMEm3m9 * feat: title the minimal approval page from the step and flow summaries Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK2Ye4PizykReZVuMEm3m9 * feat: let wait_for_approval set the description approvers see Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK2Ye4PizykReZVuMEm3m9 * fix: keep a finished workflow's approval description, still gated Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK2Ye4PizykReZVuMEm3m9 * fix: keep a login-required approval locked after the run moves on Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK2Ye4PizykReZVuMEm3m9 * feat: hide the windmill version on the approval page Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK2Ye4PizykReZVuMEm3m9 * chore: update ee-repo-ref to e92abc9d1fba3ba898640df0cfeb0af8a50849b4 This commit updates the EE repository reference after PR #786 was merged in windmill-ee-private. Previous ee-repo-ref: bf1766ff49458f62d3f11746f1a06893ae3c2325 New ee-repo-ref: e92abc9d1fba3ba898640df0cfeb0af8a50849b4 Automated by sync-ee-ref workflow. --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude Opus 5
windmill-internal-app[bot]
parent
e62bfdcd8c
commit
63cb46d7bb
@@ -3085,6 +3085,8 @@ class WorkflowCtx:
|
||||
form: dict | None = None,
|
||||
self_approval: bool = True,
|
||||
key: str | None = None,
|
||||
skin: str | None = None,
|
||||
description: str | dict | None = None,
|
||||
):
|
||||
if key is not None:
|
||||
_assert_usable_step_key(key, "wait_for_approval key")
|
||||
@@ -3113,6 +3115,8 @@ class WorkflowCtx:
|
||||
"timeout": timeout,
|
||||
"form": form,
|
||||
"self_approval_disabled": not self_approval,
|
||||
"skin": skin,
|
||||
"description": description,
|
||||
"steps": [],
|
||||
})
|
||||
|
||||
@@ -3559,6 +3563,8 @@ async def wait_for_approval(
|
||||
form: dict | None = None,
|
||||
self_approval: bool = True,
|
||||
key: str | None = None,
|
||||
skin: Literal["detailed", "minimal"] | None = None,
|
||||
description: str | dict | None = None,
|
||||
) -> dict:
|
||||
"""Suspend the workflow and wait for an external approval.
|
||||
|
||||
@@ -3573,6 +3579,10 @@ async def wait_for_approval(
|
||||
form: Optional form schema for the approval page.
|
||||
self_approval: Whether the user who triggered the flow can approve it (default True).
|
||||
key: Optional checkpoint key naming this approval step.
|
||||
skin: ``"minimal"`` shows approvers only the request (form and approve/reject)
|
||||
instead of the detailed page with the workflow's details.
|
||||
description: Shown to approvers above the form: a string, or a rich value such as
|
||||
``{"markdown": "..."}``.
|
||||
|
||||
Example::
|
||||
|
||||
@@ -3583,7 +3593,12 @@ async def wait_for_approval(
|
||||
ctx: WorkflowCtx | None = _workflow_ctx.get(None)
|
||||
if ctx is not None:
|
||||
return await ctx._wait_for_approval(
|
||||
timeout=timeout, form=form, self_approval=self_approval, key=key
|
||||
timeout=timeout,
|
||||
form=form,
|
||||
self_approval=self_approval,
|
||||
key=key,
|
||||
skin=skin,
|
||||
description=description,
|
||||
)
|
||||
raise RuntimeError("wait_for_approval can only be called inside a @workflow")
|
||||
|
||||
@@ -3653,6 +3668,8 @@ async def _run_workflow_async(func, checkpoint: dict, input_args: dict):
|
||||
"key": info["key"],
|
||||
"timeout": info.get("timeout"),
|
||||
"form": info.get("form"),
|
||||
"skin": info.get("skin"),
|
||||
"description": info.get("description"),
|
||||
}
|
||||
if mode == "sleep":
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user