Skip to content

Group Settings — Description & "Share with all users" Not Populated #304

Description

@imtiazqa

Steps to Reproduce

  1. Log in as a superuser account.
  2. In the left navigator, click Add → Add Cluster Group.
  3. Fill in:
  • Name: Hello
  • Description: My test group
  • Check Share with all users
  1. Click Save.
  2. Hover over the Hello group in the navigator → click the settings (gear) icon.
  3. The Group Settings: Hello dialog opens on the Details tab.

Expected:

Description field shows My test group
"Share with all users" checkbox is checked
Actual:

Description field is empty
"Share with all users" checkbox is unchecked

Verify via Database

SELECT id, name, description, is_shared
FROM cluster_groups
WHERE name = 'Hello';
description will be NULL and is_shared = false, confirming the save never sent those fields to the backend.

Root Cause
Three frontend bugs. The backend API is fully correct.

Bug 1 — GroupData interface missing fields
File: client/src/components/ClusterNavigator/GroupItem.tsx:119-128

interface GroupData {
id: string;
name: string;
auto_group_key?: string;
is_default?: boolean;
clusters?: ...
// description and is_shared are absent
}
description and is_shared are not declared, so TypeScript drops them at this boundary even if the API returned them.

Bug 2 — Edit dialog never loads saved values
File: client/src/components/ClusterNavigator/index.tsx:569-574

const handleConfigureGroup = (group: GroupData) => {
setEditingGroup(group); // ← group comes from topology tree
setGroupDialogMode('edit');
setGroupDialogOpen(true);
};
The group object comes from the topology API (GET /api/v1/clusters). That endpoint returns groups with only id, name, is_default, auto_group_key, and clusters — it does not include description or is_shared. So both fields are always undefined when the dialog opens, regardless of what is saved in the database.

Fix required: Call GET /api/v1/cluster-groups/{id} before opening the dialog to fetch the current saved values.

Bug 3 — Save discards description and is_shared
File: client/src/components/ClusterNavigator/index.tsx:546-554

const handleSaveGroup = async (groupData: { name: string; description?: string; is_shared?: boolean }) => {
if (groupDialogMode === 'create') {
await createGroup(groupData); // ← sends all fields ✓
} else {
await updateGroupName(editingGroup!.id, groupData.name); // ← name only ✗
}
};
File: client/src/contexts/ClusterActionsContext.tsx:63-86

const updateGroupName = useCallback(async (groupId: string, newName: string) => {
await apiPut(/api/v1/cluster-groups/${numericId}, { name: newName }); // ← name only
...
}, [...]);
description and is_shared from the form are silently discarded. No function exists that sends all three fields on update.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions