fix(web): hide upgrade controls for csghub sandbox#137
Conversation
| currentUserID: displayData.current_user_id, | ||
| usersById: conversation.usersById, | ||
| collapsedWorkspaceGroups, | ||
| hideUpgradeControls: String(bootstrapConfig?.sandbox_provider ?? "").trim().toLowerCase() === "csghub", |
There was a problem hiding this comment.
This hard-codes upgrade visibility to sandbox_provider == "csghub".
That couples a user-facing product decision to the runtime backend, so CSGHub users can never opt in and non-CSGHub users can never opt out. Consider exposing a dedicated config.toml flag instead, for example [server].show_upgrade = true by default, and let the UI follow that setting.
da11c7b to
bc2c936
Compare
| AdvertiseBaseURL string | ||
| AccessToken string | ||
| NoAuth bool | ||
| HideUpgrade bool |
There was a problem hiding this comment.
The public config key and API field are both show_upgrade, but the internal Go field is HideUpgrade, so the meaning flips when reading call sites like !cfg.Server.HideUpgrade.
This works, but it adds avoidable cognitive overhead. Consider renaming the internal field to ShowUpgrade as well, so the config, API, frontend, and Go model all use the same positive direction.
|
What does the UI look like when upgrade actions are hidden? For example, does the settings menu still show a version section with only the current version, or is the whole version-and-updates area removed? A screenshot in the PR would help confirm the intended UX. |
bc2c936 to
80fe54f
Compare
80fe54f to
315e9cc
Compare
| AdvertiseBaseURL string | ||
| AccessToken string | ||
| NoAuth bool | ||
| ShowUpgrade *bool |
There was a problem hiding this comment.
Why does this need to be a pointer bool? Would a plain bool be enough here?
315e9cc to
de7e464
Compare

[server].show_upgradeto control whether the Web UI shows upgrade actions, defaulting to enabled.show_upgrade = falsefor managed deployments that cannot self-upgrade.