Skip to content

bug: WorkspaceParametersPage exhibits janky/flickering behavior when interacting with parameters #22028

Closed

Description

@blinkagent

Description

The WorkspaceParametersPage (specifically the experimental/dynamic parameters flow) exhibits a flickering/janky UI behavior when users interact with workspace parameters. The form inputs appear to visually reset or jump, creating a very poor user experience.

This was reported by a customer.

Expected Behavior

Parameter form inputs should update smoothly without any visible flickering, re-rendering, or input value jumping when a user changes a parameter value.

Actual Behavior

When interacting with parameters on the Workspace Parameters settings page, the UI flickers/jumps, likely causing form values to visually reset before settling. This makes the page feel broken and is a bad UX.

Root Cause Analysis

This is likely a React re-rendering issue in the dynamic parameters flow. The suspected area involves the interplay between:

  1. WebSocket-driven state updates — WorkspaceParametersPageExperimental opens a WebSocket connection to templateVersionDynamicParameters. Every parameter change triggers a WebSocket message, and every response calls setLatestResponse(), causing a full component re-render.

  2. useSyncFormParameters hook — This hook watches for changes in the parameters array (from WebSocket responses) and calls setFieldValue("rich_parameter_values", newParameterValues) to reconcile form state with server-side parameter state. This creates a render loop:

    • User changes a value → handleChange updates formik state and sends a WebSocket message
    • WebSocket responds with new parameters → setLatestResponse triggers re-render
    • useSyncFormParameters detects the parameter change → calls setFieldValue again → another re-render
    • The form briefly shows the server-reconciled value before settling
  3. enableReinitialize: false on Formik — While this prevents Formik from resetting on prop changes, the useSyncFormParameters hook effectively does a manual reinitialize on every WebSocket response, bypassing this protection.

Relevant Code

  • site/src/pages/WorkspaceSettingsPage/WorkspaceParametersPage/WorkspaceParametersPageExperimental.tsx
  • site/src/pages/WorkspaceSettingsPage/WorkspaceParametersPage/WorkspaceParametersPageViewExperimental.tsx
  • site/src/modules/hooks/useSyncFormParameters.ts

Suggested Fix

Potential approaches to investigate:

  • Debounce or batch WebSocket responses — Avoid re-rendering on every single WebSocket message. Only update state when the response is for the latest request ID.
  • Optimistic form updates — Don't overwrite the form value with the server response if the user just set it. The useSyncFormParameters hook should skip reconciliation for the parameter the user just changed.
  • Transition API / useTransition — Mark the WebSocket-driven state updates as non-urgent so React can keep the UI responsive during the reconciliation.
  • Compare before setting — In useSyncFormParameters, compare the user's current input (not just the ref) against the incoming server value to avoid unnecessary setFieldValue calls that cause flicker.

Reproduction

Navigate to a workspace's Settings → Parameters page (with dynamic parameters / non-classic parameter flow) and interact with parameter inputs.

Impact

This is a significant UX issue — the flickering makes the page feel broken and unreliable.


Created on behalf of @jakehwll

Activity

  1. self-assigned this
    on Feb 10, 2026
  2. added a commit that references this issue on Feb 10, 2026
    6ac0244
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions