From 986ea5a518a23dc42d7524ca99d3c70838eba887 Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Tue, 25 Aug 2026 22:36:49 -0700 Subject: [PATCH] feat(config): add form-view-enabled feature flag, default off Introduces gui.workflow-workspace.form-view-enabled (default false) plumbed through GuiConfig and ConfigResource to the frontend GuiConfig type and mock, guarded by a GuiConfigSpec assertion. Co-Authored-By: Claude Opus 4.8 --- common/config/src/main/resources/gui.conf | 4 ++++ .../scala/org/apache/texera/common/config/GuiConfig.scala | 2 ++ .../scala/org/apache/texera/common/config/GuiConfigSpec.scala | 4 ++++ .../org/apache/texera/service/resource/ConfigResource.scala | 1 + frontend/src/app/common/service/gui-config.service.mock.ts | 1 + frontend/src/app/common/type/gui-config.ts | 1 + 6 files changed, 13 insertions(+) diff --git a/common/config/src/main/resources/gui.conf b/common/config/src/main/resources/gui.conf index d0f9f2e8cba..f1365695933 100644 --- a/common/config/src/main/resources/gui.conf +++ b/common/config/src/main/resources/gui.conf @@ -78,6 +78,10 @@ gui { timetravel-enabled = false timetravel-enabled = ${?GUI_WORKFLOW_WORKSPACE_TIMETRAVEL_ENABLED} + # whether the Form View (a second, form-based view of a workflow) is enabled + form-view-enabled = false + form-view-enabled = ${?GUI_WORKFLOW_WORKSPACE_FORM_VIEW_ENABLED} + # Whether to connect to local or production shared editing server. Set to true if you have # reverse proxy set up for y-websocket. production-shared-editing-server = false diff --git a/common/config/src/main/scala/org/apache/texera/common/config/GuiConfig.scala b/common/config/src/main/scala/org/apache/texera/common/config/GuiConfig.scala index 9968d97c3bf..f4e07d2abf0 100644 --- a/common/config/src/main/scala/org/apache/texera/common/config/GuiConfig.scala +++ b/common/config/src/main/scala/org/apache/texera/common/config/GuiConfig.scala @@ -55,6 +55,8 @@ object GuiConfig { conf.getBoolean("gui.workflow-workspace.async-rendering-enabled") val guiWorkflowWorkspaceTimetravelEnabled: Boolean = conf.getBoolean("gui.workflow-workspace.timetravel-enabled") + val guiWorkflowWorkspaceFormViewEnabled: Boolean = + conf.getBoolean("gui.workflow-workspace.form-view-enabled") val guiWorkflowWorkspaceProductionSharedEditingServer: Boolean = conf.getBoolean("gui.workflow-workspace.production-shared-editing-server") val guiWorkflowWorkspacePythonLanguageServerPort: String = diff --git a/common/config/src/test/scala/org/apache/texera/common/config/GuiConfigSpec.scala b/common/config/src/test/scala/org/apache/texera/common/config/GuiConfigSpec.scala index e121a7cc6cd..68f47b0c144 100644 --- a/common/config/src/test/scala/org/apache/texera/common/config/GuiConfigSpec.scala +++ b/common/config/src/test/scala/org/apache/texera/common/config/GuiConfigSpec.scala @@ -56,6 +56,10 @@ class GuiConfigSpec extends AnyFlatSpec with Matchers { ifUnset("GUI_WORKFLOW_WORKSPACE_TIMETRAVEL_ENABLED")( GuiConfig.guiWorkflowWorkspaceTimetravelEnabled shouldBe false ) + // Form View ships disabled so merging the feature never turns it on; the final PR flips it. + ifUnset("GUI_WORKFLOW_WORKSPACE_FORM_VIEW_ENABLED")( + GuiConfig.guiWorkflowWorkspaceFormViewEnabled shouldBe false + ) ifUnset("GUI_WORKFLOW_WORKSPACE_PRODUCTION_SHARED_EDITING_SERVER")( GuiConfig.guiWorkflowWorkspaceProductionSharedEditingServer shouldBe false ) diff --git a/config-service/src/main/scala/org/apache/texera/service/resource/ConfigResource.scala b/config-service/src/main/scala/org/apache/texera/service/resource/ConfigResource.scala index 18a35edc0a6..ae415b4a953 100644 --- a/config-service/src/main/scala/org/apache/texera/service/resource/ConfigResource.scala +++ b/config-service/src/main/scala/org/apache/texera/service/resource/ConfigResource.scala @@ -85,6 +85,7 @@ class ConfigResource { "linkBreakpointEnabled" -> GuiConfig.guiWorkflowWorkspaceLinkBreakpointEnabled, "asyncRenderingEnabled" -> GuiConfig.guiWorkflowWorkspaceAsyncRenderingEnabled, "timetravelEnabled" -> GuiConfig.guiWorkflowWorkspaceTimetravelEnabled, + "formViewEnabled" -> GuiConfig.guiWorkflowWorkspaceFormViewEnabled, "productionSharedEditingServer" -> GuiConfig.guiWorkflowWorkspaceProductionSharedEditingServer, "defaultExecutionMode" -> GuiConfig.guiWorkflowWorkspaceDefaultExecutionMode, "workflowEmailNotificationEnabled" -> GuiConfig.guiWorkflowWorkspaceWorkflowEmailNotificationEnabled, diff --git a/frontend/src/app/common/service/gui-config.service.mock.ts b/frontend/src/app/common/service/gui-config.service.mock.ts index 667a774743b..e1196c75660 100644 --- a/frontend/src/app/common/service/gui-config.service.mock.ts +++ b/frontend/src/app/common/service/gui-config.service.mock.ts @@ -39,6 +39,7 @@ export class MockGuiConfigService { linkBreakpointEnabled: false, asyncRenderingEnabled: false, timetravelEnabled: false, + formViewEnabled: false, productionSharedEditingServer: false, pythonLanguageServerPort: "3000", defaultDataTransferBatchSize: 100, diff --git a/frontend/src/app/common/type/gui-config.ts b/frontend/src/app/common/type/gui-config.ts index d9750d7d3b1..ca9a40eb7f6 100644 --- a/frontend/src/app/common/type/gui-config.ts +++ b/frontend/src/app/common/type/gui-config.ts @@ -30,6 +30,7 @@ export interface GuiConfig { linkBreakpointEnabled: boolean; asyncRenderingEnabled: boolean; timetravelEnabled: boolean; + formViewEnabled: boolean; productionSharedEditingServer: boolean; pythonLanguageServerPort: string; defaultDataTransferBatchSize: number;