Skip to content

DT-3564 - migrate schedules form to superforms#3159

Merged
rossedfort merged 5 commits intomainfrom
DT-3564-schedules-form-superform
Feb 13, 2026
Merged

DT-3564 - migrate schedules form to superforms#3159
rossedfort merged 5 commits intomainfrom
DT-3564-schedules-form-superform

Conversation

@rossedfort
Copy link
Copy Markdown
Contributor

@rossedfort rossedfort commented Feb 12, 2026

Description & motivation 💭

Screenshots (if applicable) 📸

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

  • Go to the schedules page and click "Create Schedule" in the empty state.
  • Ensure the form submit button is enabled.
  • Hit the "create" button, ensure field errors are displayed
  • Fill out all required fields, hit the "create" button, ensure schedule is created.
  • Go to the edit page for that schedule
  • Ensure same functionality as above

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

Docs

Any docs updates needed?

@rossedfort rossedfort requested a review from a team as a code owner February 12, 2026 20:42
@rossedfort rossedfort requested review from KATIETOLER and removed request for a team February 12, 2026 20:42
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Feb 12, 2026 9:16pm

Request Review

const action: ScheduleActionParameters = {
identity,
namespace,
namespace: page.params.namespace,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

identity,
namespace,
namespace: page.params.namespace,
name,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

namespace,
namespace: page.params.namespace,
name,
workflowType,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

namespace: page.params.namespace,
name,
workflowType,
workflowId,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

const action: ScheduleActionParameters = {
identity,
namespace,
namespace: page.params.namespace,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

identity,
namespace,
namespace: page.params.namespace,
name,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

namespace,
namespace: page.params.namespace,
name,
workflowType,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

namespace: page.params.namespace,
name,
workflowType,
workflowId,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

@temporal-cicd
Copy link
Copy Markdown
Contributor

temporal-cicd bot commented Feb 12, 2026

Warnings
⚠️

📊 Strict Mode: 59 errors in 8 files (5.3% of 1122 total)

src/lib/services/workflow-service.ts (24)
  • L196:6: Type 'ErrorCallback' is not assignable to type '(error: unknown, toasts?: Toaster, errors?: Writable<NetworkError | null>, isBrowser?: boolean) => void'.
  • L258:4: Type 'ErrorCallback' is not assignable to type '(error: unknown, toasts?: Toaster, errors?: Writable<NetworkError | null>, isBrowser?: boolean) => void'.
  • L297:45: Argument of type 'unknown' is not assignable to parameter of type 'WorkflowExecutionAPIResponse | undefined'.
  • L430:28: No overload matches this call.
  • L646:4: Type 'ErrorCallback' is not assignable to type '(error: unknown, toasts?: Toaster, errors?: Writable<NetworkError | null>, isBrowser?: boolean) => void'.
  • L647:10: Argument of type '(response?: WorkflowExecutionAPIResponse) => WorkflowExecution' is not assignable to parameter of type '(value: unknown) => WorkflowExecution | PromiseLike'.
  • L677:4: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'ISearchAttributes'.
  • L753:37: Argument of type 'SearchAttributeInput[]' is not assignable to parameter of type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; }[]'.
  • L816:8: Type 'ErrorCallback' is not assignable to type '(error: unknown, toasts?: Toaster, errors?: Writable<NetworkError | null>, isBrowser?: boolean) => void'.
  • L835:6: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
  • L841:8: 'workflow' is possibly 'undefined'.
  • L843:8: 'workflow' is possibly 'undefined'.
  • L851:8: 'workflow' is possibly 'undefined'.
  • L853:8: 'workflow' is possibly 'undefined'.
  • L860:28: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'.
  • L865:8: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'.
  • L867:10: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'.
  • L870:8: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'.
  • L1017:20: Argument of type 'WorkflowExecution | undefined' is not assignable to parameter of type 'WorkflowExecution'.
  • L1056:28: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
  • L1084:10: Property 'executions' does not exist on type 'WithoutNextPageToken'.
  • L1084:41: Argument of type '(token: string) => Promise' is not assignable to parameter of type '(token?: NextPageToken | undefined) => Promise'.
  • L1128:6: Type 'ErrorCallback' is not assignable to type '(error: unknown, toasts?: Toaster, errors?: Writable<NetworkError | null>, isBrowser?: boolean) => void'.
  • L1157:6: Type 'ErrorCallback' is not assignable to type '(error: unknown, toasts?: Toaster, errors?: Writable<NetworkError | null>, isBrowser?: boolean) => void'.
src/lib/components/schedule/schedule-form/schedule-input-payload.svelte (2)
  • L43:13: 'payloads.payloads' is possibly 'null' or 'undefined'.
  • L45:31: 'payloads.payloads' is possibly 'null' or 'undefined'.
src/lib/components/schedule/schedule-form/schedules-calendar-view.svelte (1)
  • L116:10: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
src/lib/components/workflow/search-attribute-input/index.svelte (1)
  • L61:13: Type 'string | false | 0 | undefined' is not assignable to type 'string | undefined'.
src/lib/components/workflow/add-search-attributes.svelte (2)
  • L30:6: Type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; } | { label: null; value: null; type: "Unspecified"; }' is not assignable to type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; }'.
  • L31:8: Type 'null' is not assignable to type 'string'.
src/lib/components/schedule/schedule-form/form.svelte (5)
  • L122:10: Type '{ encoding: "json/plain" | "json/protobuf"; messageType: string | undefined; hour: string; minute: string; second: string; phase: string; cronString: string; daysOfWeek: string[]; daysOfMonth: number[]; ... 8 more ...; taskQueue: string; }' is missing the following properties from type '{ name: string; days: string; encoding: "json/plain" | "json/protobuf"; workflowId: string; workflowType: string; taskQueue: string; searchAttributes: { type: "Unspecified" | "Keyword" | ... 5 more ... | "Datetime"; label: string; value?: any; }[]; ... 12 more ...; messageType?: string | undefined; }': editInput, timezoneName
  • L143:32: Argument of type 'ISchedule | null' is not assignable to parameter of type 'ISchedule | undefined'.
  • L212:15: Type 'string | undefined' is not assignable to type 'string'.
  • L215:15: Type 'string | undefined' is not assignable to type 'string'.
  • L216:10: Type 'IPayloads | null | undefined' is not assignable to type 'IPayloads'.
src/lib/pages/schedule-edit.svelte (13)
  • L57:6: Type 'string | undefined' is not assignable to type 'string'.
  • L58:6: Type 'string | undefined' is not assignable to type 'string'.
  • L59:6: Type 'string | undefined' is not assignable to type 'string'.
  • L60:6: Type 'string | undefined' is not assignable to type 'string'.
  • L61:6: Type 'string | undefined' is not assignable to type 'string'.
  • L62:6: Type '"json/plain" | "json/protobuf" | undefined' is not assignable to type '"json/plain" | "json/protobuf"'.
  • L64:6: Type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; }[] | undefined' is not assignable to type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; }[]'.
  • L76:6: Type 'string[] | undefined' is not assignable to type 'string[]'.
  • L77:6: Type 'number[] | undefined' is not assignable to type 'number[]'.
  • L78:6: Type 'string[] | undefined' is not assignable to type 'string[]'.
  • L79:6: Type 'string | undefined' is not assignable to type 'string'.
  • L93:20: Type '(preset: SchedulePreset, args: Partial, schedule: FullSchedule) => void' is not assignable to type '(preset: SchedulePreset, formData: { name: string; days: string; encoding: "json/plain" | "json/protobuf"; workflowId: string; workflowType: string; taskQueue: string; searchAttributes: { ...; }[]; ... 12 more ...; messageType?: string | undefined; }, schedule?: ISchedule | undefined) => void'.
  • L93:55: Type 'ISearchAttributes | null | undefined' is not assignable to type 'ISearchAttributes | undefined'.
src/lib/pages/schedules-create.svelte (11)
  • L44:6: Type 'string | undefined' is not assignable to type 'string'.
  • L45:6: Type 'string | undefined' is not assignable to type 'string'.
  • L46:6: Type 'string | undefined' is not assignable to type 'string'.
  • L47:6: Type 'string | undefined' is not assignable to type 'string'.
  • L48:6: Type 'string | undefined' is not assignable to type 'string'.
  • L49:6: Type '"json/plain" | "json/protobuf" | undefined' is not assignable to type '"json/plain" | "json/protobuf"'.
  • L51:6: Type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; }[] | undefined' is not assignable to type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; }[]'.
  • L63:6: Type 'string[] | undefined' is not assignable to type 'string[]'.
  • L64:6: Type 'number[] | undefined' is not assignable to type 'number[]'.
  • L65:6: Type 'string[] | undefined' is not assignable to type 'string[]'.
  • L66:6: Type 'string | undefined' is not assignable to type 'string'.

Generated by 🚫 dangerJS against b093b05

searchAttributes: form.searchAttributes,
workflowSearchAttributes: form.workflowSearchAttributes,
};

Copy link
Copy Markdown
Contributor

@temporal-cicd temporal-cicd bot Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Argument of type 'ISchedule | null' is not assignable to parameter of type 'ISchedule | undefined'.

{...$constraints.taskQueue}
required
/>
<ScheduleInputPayload
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

<ScheduleInputPayload
bind:input={$form.input}
bind:editInput={$form.editInput}
{encoding}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

bind:input={$form.input}
bind:editInput={$form.editInput}
{encoding}
bind:messageType={$form.messageType}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'IPayloads | null | undefined' is not assignable to type 'IPayloads'.

}: Props = $props();

const addSearchAttribute = () => {
attributesToAdd = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; } | { label: null; value: null; type: "Unspecified"; }' is not assignable to type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; }'.

'workflowSearchAttributes',
);

const handleConfirm = (form: ScheduleFormData) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type '{ encoding: "json/plain" | "json/protobuf"; messageType: string | undefined; hour: string; minute: string; second: string; phase: string; cronString: string; daysOfWeek: string[]; daysOfMonth: number[]; ... 8 more ...; taskQueue: string; }' is missing the following properties from type '{ name: string; days: string; encoding: "json/plain" | "json/protobuf"; workflowId: string; workflowType: string; taskQueue: string; searchAttributes: { type: "Unspecified" | "Keyword" | ... 5 more ... | "Datetime"; label: string; value?: any; }[]; ... 12 more ...; messageType?: string | undefined; }': editInput, timezoneName

Copy link
Copy Markdown
Contributor

@andrewzamojc andrewzamojc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

const scheduleId = $derived(page.params.schedule);

const title = $derived(
translate(schedule ? 'schedules.edit' : 'schedules.create'),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice prop :)

}),
);

// initialValues is reactive but we only need its initial value
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initial value of initialValue, love it. I thought about this too when I used superForms. Seems weird from a reactivity or lifecycle perspective.

const createSchedule = page.getByRole('button', {
name: 'Create Schedule',
});
await expect(createSchedule).toBeDisabled();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice to be always enabled

@rossedfort rossedfort merged commit f160628 into main Feb 13, 2026
22 checks passed
@rossedfort rossedfort deleted the DT-3564-schedules-form-superform branch February 13, 2026 16:32
temporal-cicd bot pushed a commit that referenced this pull request Feb 23, 2026
Auto-generated version bump from 2.45.3 to 2.45.4

Bump type: patch

Changes included:
- [`02b30a6e`](02b30a6) Use CountSchedules for counting schedules (#3100)
- [`90dfec88`](90dfec8) Add fallbacks for activities routes (#3154)
- [`f160628c`](f160628) DT-3564 - migrate schedules form to superforms (#3159)
- [`50d7bdf3`](50d7bdf) small css changes to nav components for better responsiveness (#3162)
- [`e3b4028b`](e3b4028) UI Copy Updates (#3165)
- [`3638919c`](3638919) add snippet for pre-release badge on standalone activities page (#3166)
- [`1ee50fcb`](1ee50fc) fix standalone activity routes and prep for release (#3168)
- [`7553e5b4`](7553e5b) Event history legend (#3160)
- [`562067a8`](562067a) Environment variable audit (#3163)
- [`51bdfd75`](51bdfd7) Card typography fixes (#3169)
- [`dfc6b453`](dfc6b45) fix schedule edit form infinite effect loop (#3172)
- [`07995e61`](07995e6) fix infinite effect bug when editing schedule with large input payload (#3174)
rossedfort added a commit that referenced this pull request Feb 23, 2026
Auto-generated version bump from 2.45.3 to 2.45.4

Bump type: patch

Changes included:
- [`02b30a6e`](02b30a6) Use CountSchedules for counting schedules (#3100)
- [`90dfec88`](90dfec8) Add fallbacks for activities routes (#3154)
- [`f160628c`](f160628) DT-3564 - migrate schedules form to superforms (#3159)
- [`50d7bdf3`](50d7bdf) small css changes to nav components for better responsiveness (#3162)
- [`e3b4028b`](e3b4028) UI Copy Updates (#3165)
- [`3638919c`](3638919) add snippet for pre-release badge on standalone activities page (#3166)
- [`1ee50fcb`](1ee50fc) fix standalone activity routes and prep for release (#3168)
- [`7553e5b4`](7553e5b) Event history legend (#3160)
- [`562067a8`](562067a) Environment variable audit (#3163)
- [`51bdfd75`](51bdfd7) Card typography fixes (#3169)
- [`dfc6b453`](dfc6b45) fix schedule edit form infinite effect loop (#3172)
- [`07995e61`](07995e6) fix infinite effect bug when editing schedule with large input payload (#3174)

Co-authored-by: rossedfort <11775628+rossedfort@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants