From 19ab7e2e418e63b3aa99501442d1d235e199bf49 Mon Sep 17 00:00:00 2001
From: tristantr
Date: Mon, 25 May 2026 12:14:52 +0200
Subject: [PATCH] Simplify publish drawer to show workspace-wide rate limit
only
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Drop per-app rate limit fields (req/min, burst, per-IP) — none of these
are supported by the backend. The drawer now shows the existing
workspace-level rate limit read-only with a link to edit it in
Workspace settings → Apps.
Co-Authored-By: Claude Opus 4.7 (1M context)
---
.../workspaceSettings/DeployToHub.svelte | 107 +++++-------------
1 file changed, 31 insertions(+), 76 deletions(-)
diff --git a/frontend/src/lib/components/workspaceSettings/DeployToHub.svelte b/frontend/src/lib/components/workspaceSettings/DeployToHub.svelte
index 77e2ec0f42..6439f8b870 100644
--- a/frontend/src/lib/components/workspaceSettings/DeployToHub.svelte
+++ b/frontend/src/lib/components/workspaceSettings/DeployToHub.svelte
@@ -7,7 +7,6 @@
import { Badge, Button, Drawer, DrawerContent } from '$lib/components/common'
import WorkspaceDeployLayout from '$lib/components/WorkspaceDeployLayout.svelte'
import SchemaForm from '$lib/components/SchemaForm.svelte'
- import Toggle from '$lib/components/Toggle.svelte'
import Tooltip from '$lib/components/Tooltip.svelte'
import { sendUserToast } from '$lib/toast'
import {
@@ -33,22 +32,10 @@
rec: RecStatus
published?: boolean
publicUrl?: string
- rateLimit?: RateLimitConfig
[k: string]: unknown
}
- interface RateLimitConfig {
- enabled: boolean
- perMinute: number
- burst: number
- perIp: boolean
- }
- const DEFAULT_RATE_LIMIT: RateLimitConfig = {
- enabled: true,
- perMinute: 60,
- burst: 10,
- perIp: true
- }
- const WORKSPACE_DEFAULT_RATE_LIMIT = { perMinute: 120, burst: 20 }
+ // MOCK: would be fetched via WorkspaceService.getSettings().public_app_execution_limit_per_minute
+ let workspaceRateLimit = $state(120)
const canRecord = (k: Kind) => k === 'script' || k === 'flow'
const canPublishApp = (k: Kind) => k === 'app' || k === 'raw_app'
@@ -139,7 +126,6 @@
let publishDrawer = $state()
let publishTarget = $state()
let publishing = $state(false)
- let publishRateLimit = $state({ ...DEFAULT_RATE_LIMIT })
const mockPublicUrl = (path: string) => `https://app.windmill.dev/public/${hubSlug}/${path}`
@@ -188,7 +174,6 @@
function openPublish(it: DeployItem) {
publishTarget = it
- publishRateLimit = { ...(it.rateLimit ?? DEFAULT_RATE_LIMIT) }
publishDrawer?.openDrawer()
}
async function confirmPublish() {
@@ -197,17 +182,10 @@
publishing = true
try {
await delay(500)
- const rl = { ...publishRateLimit }
items = items.map((i) =>
- i.key === it.key
- ? { ...i, published: true, publicUrl: mockPublicUrl(i.path), rateLimit: rl }
- : i
- )
- sendUserToast(
- rl.enabled
- ? `${it.path} is now public (${rl.perMinute} req/min, burst ${rl.burst})`
- : `${it.path} is now public (no rate limit)`
+ i.key === it.key ? { ...i, published: true, publicUrl: mockPublicUrl(i.path) } : i
)
+ sendUserToast(`${it.path} is now public`)
publishDrawer?.closeDrawer()
} finally {
publishing = false
@@ -401,61 +379,38 @@