From 551b7947f20a66a86cbc78badc182bc098e3ef01 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Tue, 1 Apr 2025 17:15:59 +0100 Subject: [PATCH] New waitpoint token docs page + updates the URL and description for the waitpoint blank state in the app (#1860) * Delete old wait-for pages & create new wait-for-token page * Link to new wait-for-token page and update description * Adds an upgrade to v4 coming soon docs page * Removes unncessary property from Note component --- apps/webapp/app/components/BlankStatePanels.tsx | 10 ++++------ docs/docs.json | 2 +- docs/upgrade-to-v4.mdx | 8 ++++++++ docs/wait-for-event.mdx | 8 -------- docs/wait-for-request.mdx | 8 -------- docs/wait-for-token.mdx | 10 ++++++++++ docs/wait.mdx | 7 +++---- 7 files changed, 26 insertions(+), 27 deletions(-) create mode 100644 docs/upgrade-to-v4.mdx delete mode 100644 docs/wait-for-event.mdx delete mode 100644 docs/wait-for-request.mdx create mode 100644 docs/wait-for-token.mdx diff --git a/apps/webapp/app/components/BlankStatePanels.tsx b/apps/webapp/app/components/BlankStatePanels.tsx index 55c984b95..b03959387 100644 --- a/apps/webapp/app/components/BlankStatePanels.tsx +++ b/apps/webapp/app/components/BlankStatePanels.tsx @@ -419,17 +419,15 @@ export function NoWaitpointTokens() { iconClassName="text-sky-500" panelClassName="max-w-md" accessory={ - + Waitpoint docs } > - Waitpoint tokens are used to pause runs until you complete the token so the run can - continue. - - - You can build approval workflows using them, as well as other use cases. + Waitpoint tokens pause task runs until you complete the token. They're commonly used for + approval workflows and other scenarios where you need to wait for external confirmation, + such as human-in-the-loop processes. ); diff --git a/docs/docs.json b/docs/docs.json index 86392bbad..14bd127e8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -40,7 +40,7 @@ "errors-retrying", { "group": "Wait", - "pages": ["wait", "wait-for", "wait-until", "wait-for-event", "wait-for-request"] + "pages": ["wait", "wait-for", "wait-until", "wait-for-token"] }, "queue-concurrency", "versioning", diff --git a/docs/upgrade-to-v4.mdx b/docs/upgrade-to-v4.mdx new file mode 100644 index 000000000..5c23b360b --- /dev/null +++ b/docs/upgrade-to-v4.mdx @@ -0,0 +1,8 @@ +--- +title: "Upgrading to v4" +description: "How to upgrade to v4." +--- + + + Upgrading to v4 docs are coming soon. + diff --git a/docs/wait-for-event.mdx b/docs/wait-for-event.mdx deleted file mode 100644 index 2e2b67c02..000000000 --- a/docs/wait-for-event.mdx +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Wait for event" -description: "Wait until an event has been received, then continue execution." ---- - -import ComingSoon from "/snippets/coming-soon-in-review.mdx" - - diff --git a/docs/wait-for-request.mdx b/docs/wait-for-request.mdx deleted file mode 100644 index 59008eb0f..000000000 --- a/docs/wait-for-request.mdx +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Wait for request" -description: "Wait until a `Request` has been received at the provided URL, then continue execution." ---- - -import ComingSoon from "/snippets/coming-soon-in-review.mdx" - - diff --git a/docs/wait-for-token.mdx b/docs/wait-for-token.mdx new file mode 100644 index 000000000..2370e1285 --- /dev/null +++ b/docs/wait-for-token.mdx @@ -0,0 +1,10 @@ +--- +title: "Wait for token" +description: "Wait until a token is completed." +--- + +import ComingSoon from "/snippets/coming-soon-generic.mdx" + +Waitpoint tokens pause task runs until you complete the token. They're commonly used for approval workflows and other scenarios where you need to wait for external confirmation, such as human-in-the-loop processes. + + diff --git a/docs/wait.mdx b/docs/wait.mdx index 373812456..af80c8cf0 100644 --- a/docs/wait.mdx +++ b/docs/wait.mdx @@ -10,9 +10,8 @@ Waiting allows you to write complex tasks as a set of async code, without having -| Function | What it does | -| ----------------------------------------- | ----------------------------------------------------------------------------------------- | +| Function | What it does | +| :--------------------------------------| :---------------------------------------------------------------------------------------- | | [wait.for()](/wait-for) | Waits for a specific period of time, e.g. 1 day. | | [wait.until()](/wait-until) | Waits until the provided `Date`. | -| [wait.forRequest()](/wait-for-request) | Waits until a matching HTTP request is received, and gives you the data to continue with. | -| [waitForEvent()](/wait-for-event) | Waits for a matching event, like in the example above. | +| [wait.forToken()](/wait-for-token) | Pauses task runs until a token is completed. |