Gate hide-personal-workspaces envs on the same conditions as the checkbox#704
Merged
Conversation
…kbox The Hide Personal Workspaces checkbox is shown only when the default org and auto-add-users are both enabled, but KOTS keeps a hidden item's stored value. Unchecking auto-add (or disabling the default org) after hiding was enabled left the checkbox invisible in the config UI while its stored value kept rendering HIDE_PERSONAL_WORKSPACES=true: personal workspaces stayed hidden with no auto-membership to land new users in, driven by a setting the admin could no longer see. The env templates now repeat the checkbox's when-gating, so the rendered value can never disagree with the visible config state.
jlav
approved these changes
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Hide Personal Workspaces checkbox is shown only when the default org and auto-add-users are both enabled (
whengating), encoding the invariant: never hide personal workspaces unless auto-membership guarantees users an org to land in.KOTS
whenonly controls visibility — a hidden item's stored value persists. So this sequence produced a bad end state:"1".HIDE_PERSONAL_WORKSPACES=truekept being set: personal workspaces hidden, no auto-membership for new users, and the setting causing it invisible to the admin.Fix
The two env templates (
OH_WEB_CLIENT_FEATURE_FLAGS_HIDE_PERSONAL_WORKSPACESfor the web client,HIDE_PERSONAL_WORKSPACESfor the server-side bootstrap) now repeat the checkbox'swhenconditions —andof org-enabled, auto-add, and the checkbox itself — so the rendered value can never disagree with the visible config state. Unchecking auto-add or disabling the org feature now switches hiding off automatically.Testing
make lint(replicated release lint) passes — only pre-existing info-level notices.Empirical verification (replicated-03, 2026-06-11)
Confirmed both failure paths live on a real embedded-cluster install (config-change deploy, then restored):
default_openhands_org_enabled="0"and deleted the stored value ofdefault_openhands_org_auto_add_users(default"1", hidden by itswhenonce the feature is off). Rendered deployment env came backOPENHANDS_DEFAULT_ORG_AUTO_ADD_USERS='true'— KOTS falls back to an item's default even when the item is hidden and has no stored value. On the current config spec, wheredefault_openhands_org_hide_personal_workspacesdefaults to"1", this means a never-touched install rendersHIDE_PERSONAL_WORKSPACES=truewith the org feature completely disabled.HIDE_PERSONAL_WORKSPACES='true'rendered whileOPENHANDS_DEFAULT_ORG_ENABLED='false'— the hidden checkbox's persisted"1"driving the env (the turn-on → turn-off path).The
and-gating in this PR makes both impossible: the envs can't render true while the org feature or auto-add is off, regardless of stored values or defaults.