diff --git a/pkg/arvo/ted/graph/create.hoon b/pkg/arvo/ted/graph/create.hoon index 0f41b67c57..0ea4dee886 100644 --- a/pkg/arvo/ted/graph/create.hoon +++ b/pkg/arvo/ted/graph/create.hoon @@ -73,6 +73,7 @@ creator our.bowl config [%graph module.action] preview %.n + hidden %.n == =/ met-action=action:met [%add group graph+rid.action metadatum] diff --git a/pkg/interface/src/logic/api/metadata.ts b/pkg/interface/src/logic/api/metadata.ts index cae4fc6d68..c769df1a66 100644 --- a/pkg/interface/src/logic/api/metadata.ts +++ b/pkg/interface/src/logic/api/metadata.ts @@ -20,8 +20,9 @@ export default class MetadataApi extends BaseApi { color, 'date-created': dateCreated, creator, - 'module': moduleName, + config: { graph: moduleName }, picture: '', + hidden: false, preview: false, vip: '' } diff --git a/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx b/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx index dc0479eb35..4e7e19c510 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx @@ -55,7 +55,7 @@ export function SidebarList(props: { const assoc = associations[a]; if (workspace?.type === 'messages') { return ( - !(assoc.group in props.associations.groups) && + !(assoc.group in associationState.groups) && 'graph' in assoc.metadata.config && assoc.metadata.config.graph === 'chat' ); @@ -64,7 +64,6 @@ export function SidebarList(props: { assoc.group === group && !assoc.metadata.hidden ) : ( - !(assoc.group in props.associations.groups) && 'graph' in assoc.metadata.config && assoc.metadata.config.graph !== 'chat' && !assoc.metadata.hidden diff --git a/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx b/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx index 225ec90d98..3ff0885234 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx @@ -44,8 +44,10 @@ export function SidebarListHeader(props: { const groupPath = getGroupFromWorkspace(props.workspace); const role = groupPath && groups?.[groupPath] ? roleForShip(groups[groupPath], window.ship) : undefined; const associations = useMetadataState(state => state.associations); + + const metadata = associations?.groups?.[groupPath]?.metadata; const memberMetadata = - groupPath ? associations.groups?.[groupPath].metadata.vip === 'member-metadata' : false; + groupPath ? metadata.vip === 'member-metadata' : false; const isAdmin = memberMetadata || (role === 'admin') || (props.workspace?.type === 'home') || (props.workspace?.type === 'messages');