mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 00:02:30 +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
@@ -1962,6 +1962,8 @@ export class WorkflowCtx {
|
||||
form?: object;
|
||||
selfApproval?: boolean;
|
||||
key?: string;
|
||||
skin?: "detailed" | "minimal";
|
||||
description?: string | object;
|
||||
}): PromiseLike<{ value: any; approver: string; approved: boolean }> {
|
||||
this._rethrowSwallowed();
|
||||
if (options?.key !== undefined) assertUsableStepKey(options.key, "waitForApproval key");
|
||||
@@ -1996,6 +1998,8 @@ export class WorkflowCtx {
|
||||
timeout: options?.timeout ?? 1800,
|
||||
form: options?.form,
|
||||
self_approval_disabled: !(options?.selfApproval ?? true),
|
||||
skin: options?.skin,
|
||||
description: options?.description,
|
||||
steps: [],
|
||||
});
|
||||
}
|
||||
@@ -2459,6 +2463,10 @@ export function workflow<T>(fn: (...args: any[]) => Promise<T>) {
|
||||
* resume exactly this approval — route them through your own channel. Without a
|
||||
* key the steps are named `approval`, `approval_2`, ...
|
||||
*
|
||||
* `skin: "minimal"` shows approvers only the request (form and approve/reject)
|
||||
* instead of the detailed page with the workflow's details. `description` is
|
||||
* shown above the form: a string, or a rich value such as `{ markdown: "..." }`.
|
||||
*
|
||||
* @example
|
||||
* const urls = await step("urls", () => getApprovalUrls("manager"));
|
||||
* await step("notify", () => sendEmail(urls.resume, urls.cancel));
|
||||
@@ -2469,6 +2477,8 @@ export function waitForApproval(options?: {
|
||||
form?: object;
|
||||
selfApproval?: boolean;
|
||||
key?: string;
|
||||
skin?: "detailed" | "minimal";
|
||||
description?: string | object;
|
||||
}): PromiseLike<{ value: any; approver: string; approved: boolean }> {
|
||||
const ctx: WorkflowCtx | null = _workflowCtx ?? Reflect.get(globalThis, "__wmill_wf_ctx");
|
||||
if (!ctx) {
|
||||
|
||||
Reference in New Issue
Block a user