Files
windmill/frontend/src/lib/components/custom_ui.ts
T
edece035f8 feat: job debouncing (#6878)
* feat(EE): job debouncing

Signed-off-by: pyranota <pyra@duck.com>

* remove 'script' file

Signed-off-by: pyranota <pyra@duck.com>

* more work

Signed-off-by: pyranota <pyra@duck.com>

* properly gate it behind enterprise

Signed-off-by: pyranota <pyra@duck.com>

* update ee repo ref

Signed-off-by: pyranota <pyra@duck.com>

* change ee repo ref again

Signed-off-by: pyranota <pyra@duck.com>

* remove unused variable

Signed-off-by: pyranota <pyra@duck.com>

* feat(EE): implement TODOs and enhance tracing for job debouncing

- Add database index on script(workspace_id, debounce_key) for efficient lookups
- Update minimum version requirement to 1.564.0 throughout codebase
- Add tracing warnings when debouncing is disabled due to worker version mismatch
- Fix all documentation links from TODO placeholders to proper URLs
- Replace Gauge icon with Timer icon for debouncing UI elements
- Update placeholder text and tooltips with clear descriptions

Co-authored-by: Pyra <pyranota@users.noreply.github.com>

* create -> crate

Signed-off-by: pyranota <pyra@duck.com>

* remove index

Signed-off-by: pyranota <pyra@duck.com>

* some updates

Signed-off-by: pyranota <pyra@duck.com>

* fix once more

Signed-off-by: pyranota <pyra@duck.com>

* fix it once more

Signed-off-by: pyranota <pyra@duck.com>

* Remove flow step debouncing, keep top-level flow debouncing

- Remove debounce fields from RawScript and FlowScript FlowModuleValue variants
- Remove debounce fields from JobPayload::FlowScript and RawCode
- Update raw_script_to_payload function signature
- Remove debouncing UI from flow step runtime settings
- Remove debouncing toggle handler and indicator badge
- Preserve top-level flow debouncing in FlowSettings

Co-authored-by: Pyra <pyranota@users.noreply.github.com>

* cleanup

Signed-off-by: pyranota <pyra@duck.com>

* fixup claude's work

Signed-off-by: pyranota <pyra@duck.com>

* cleanup: remove dbg! statements, update min version to 1.566.0, add comprehensive comments

- Removed all dbg! macro calls from production code
- Updated MIN_VERSION_SUPPORTS_DEBOUNCING from 1.564.0 to 1.566.0
- Added comprehensive documentation comments explaining:
  - Debouncing feature purpose and mechanics
  - Database schema for debounce_key and debounce_stale_data tables
  - Version check logic and guard functions
- Improved code clarity and maintainability

Co-authored-by: Pyra <pyranota@users.noreply.github.com>

* improve fallback

Signed-off-by: pyranota <pyra@duck.com>

* remove comments from old migration

Signed-off-by: pyranota <pyra@duck.com>

* fix pull

Signed-off-by: pyranota <pyra@duck.com>

* fix once more

Signed-off-by: pyranota <pyra@duck.com>

* Update frontend/src/lib/components/ScriptBuilder.svelte

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* add sqlx cache

Signed-off-by: pyranota <pyra@duck.com>

* fix: frontend CI - fix debounce field names and remove leftover flow step debouncing

- Fix ScriptBuilder.svelte: change custom_debounce_key to debounce_key
- Add debounce_key and debounce_delay_s fields to NewScript schema in openapi.yaml
- Regenerate frontend types from OpenAPI spec
- Remove leftover flow step debouncing code from FlowModuleComponent.svelte
- Remove debounce fields from RawScript in openflow.openapi.yaml
- Remove unused Timer import from FlowModuleHeader.svelte

All frontend checks now passing (0 errors, 0 warnings)

Co-authored-by: Pyra <pyranota@users.noreply.github.com>

* fix ci

Signed-off-by: pyranota <pyra@duck.com>

* remove unused import

Signed-off-by: pyranota <pyra@duck.com>

* fix ci again

Signed-off-by: pyranota <pyra@duck.com>

* udpate ee repo ref

Signed-off-by: pyranota <pyra@duck.com>

* CI doesn't want to be fixed but I still try

Signed-off-by: pyranota <pyra@duck.com>

* nits

Signed-off-by: pyranota <pyra@duck.com>

* ci...

Signed-off-by: pyranota <pyra@duck.com>

* Update ee-repo-ref.txt

* safer migration

Signed-off-by: pyranota <pyra@duck.com>

* reduce noise in logs

Signed-off-by: pyranota <pyra@duck.com>

* fix cli for scripts

Signed-off-by: pyranota <pyra@duck.com>

* nit

Signed-off-by: pyranota <pyra@duck.com>

---------

Signed-off-by: pyranota <pyra@duck.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Pyra <pyranota@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
2025-10-23 20:18:08 +00:00

125 lines
2.7 KiB
TypeScript

import type { SupportedLanguage } from '$lib/common'
export type FlowBuilderWhitelabelCustomUi = {
topBar?: {
path?: boolean
export?: boolean
history?: boolean
aiBuilder?: boolean
tutorials?: boolean
diff?: boolean
extraDeployOptions?: boolean
editableSummary?: boolean
settings?: boolean
}
settingsPanel?: boolean
settingsTabs?: {
schedule?: boolean
sharedDiretory?: boolean
earlyStop?: boolean
earlyReturn?: boolean
workerGroup?: boolean
concurrency?: boolean
debouncing?: boolean
cache?: boolean
}
triggers?: boolean
flowNode?: boolean
hub?: boolean
hubCode?: boolean
graph?: { aiBuilder?: boolean; dataflow?: boolean }
stepInputs?: { ai?: boolean }
stepAdvancedSettings?: boolean
languages?: (SupportedLanguage | 'docker' | 'bunnative')[]
scriptFork?: boolean
scriptEdit?: boolean
tagEdit?: boolean
editorBar?: EditorBarUi
downloadLogs?: boolean
tagSelectPlaceholder?: string
tagSelectNoLabel?: boolean
tagLabel?: string
aiAgent?: boolean
}
export type DisplayResultUi = {
disableAiFix?: boolean
disableDownload?: boolean
}
export type PreviewPanelUi = {
disableHistory?: boolean
disableTriggerCaptures?: boolean
disableTriggerButton?: boolean
displayResult?: DisplayResultUi
disableVariablePicker?: boolean
disableDownload?: boolean
tagLabel?: string
}
export type EditorBarUi = {
contextVar?: boolean
variable?: boolean
resource?: boolean
reset?: boolean
type?: boolean
assistants?: boolean
multiplayer?: boolean
autoformatting?: boolean
editorSettings?: boolean
vimMode?: boolean
relativeLineNumbers?: boolean
aiGen?: boolean
aiCompletion?: boolean
library?: boolean
useVsCode?: boolean
diffMode?: boolean
s3object?: boolean
database?: boolean
ducklake?: boolean
}
export type EditableSchemaFormUi = {
jsonOnly?: boolean
disableVariablePicker?: boolean
}
export type SettingsPanelMetadataUi = {
languages?: SupportedLanguage[]
disableScriptKind?: boolean
editableSchemaForm?: EditableSchemaFormUi
disableMute?: boolean
disableAiFilling?: boolean
}
export type SettingsPanelUi = {
metadata?: SettingsPanelMetadataUi
disableMetadata?: boolean
disableRuntime?: boolean
disableGeneratedUi?: boolean
disableTriggers?: boolean
}
export type ScriptEditorWhitelabelCustomUi = {
editorBar?: EditorBarUi
previewPanel?: PreviewPanelUi
disableTooltips?: boolean
}
export type ScriptBuilderWhitelabelCustomUi = {
topBar?: {
path?: boolean
editablePath?: boolean
settings?: boolean
extraDeployOptions?: boolean
editableSummary?: boolean
diff?: boolean
tagEdit?: boolean
}
settingsPanel?: SettingsPanelUi
disableTooltips?: boolean
editorBar?: EditorBarUi
previewPanel?: PreviewPanelUi
tagSelectPlaceholder?: string
}