Skip to content

Add subgroups and assets list component#708

Open
refoo0 wants to merge 13 commits intomainfrom
add-subgroups-and-assets-list-component
Open

Add subgroups and assets list component#708
refoo0 wants to merge 13 commits intomainfrom
add-subgroups-and-assets-list-component

Conversation

@refoo0
Copy link
Copy Markdown
Member

@refoo0 refoo0 commented Apr 29, 2026

No description provided.

refoo0 added 4 commits April 29, 2026 15:32
Signed-off-by: rafi <refaei.shikho@hotmail.com>
Signed-off-by: rafi <refaei.shikho@hotmail.com>
…nd assets

Signed-off-by: rafi <refaei.shikho@hotmail.com>
…hing for subgroups and assets

Signed-off-by: rafi <refaei.shikho@hotmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a reusable UI component to render nested subgroups and assets, and updates organization/project pages to use it with lazy-loading of subgroup contents.

Changes:

  • Introduces SubgroupsAndAssetsList (recursive list UI with expand/collapse) and wires it into org/project pages.
  • Extends ProjectDTO with subGroupsAndAsset to hold nested resources.
  • Updates AssetOverviewListItem to support linking with an explicit projectSlug.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/types/api/api.ts Adds subGroupsAndAsset to ProjectDTO and imports a UI-defined type.
src/components/SubgroupsAndAssetsList.tsx New recursive subgroup/asset list component with expand/collapse and lazy fetch hook-in.
src/components/AssetOverviewListItem.tsx Allows passing a projectSlug override for correct asset links in nested views.
src/app/(loading-group)/[organizationSlug]/projects/[projectSlug]/page.tsx Replaces inline list rendering with SubgroupsAndAssetsList and adds SWR mutation-based lazy loading.
src/app/(loading-group)/[organizationSlug]/page.tsx Updates org home list rendering to use SubgroupsAndAssetsList and adds lazy loading for subgroup contents.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/types/api/api.ts Outdated
Comment thread src/components/SubgroupsAndAssetsList.tsx Outdated
Comment thread src/components/SubgroupsAndAssetsList.tsx Outdated
Comment thread src/components/SubgroupsAndAssetsList.tsx Outdated
Comment thread src/app/(loading-group)/[organizationSlug]/projects/[projectSlug]/page.tsx Outdated
refoo0 added 5 commits April 29, 2026 16:30
…nagement and update type definitions for subgroups and assets

Signed-off-by: rafi <refaei.shikho@hotmail.com>
Signed-off-by: rafi <refaei.shikho@hotmail.com>
…Page

Signed-off-by: rafi <refaei.shikho@hotmail.com>
…toriesPage

Signed-off-by: rafi <refaei.shikho@hotmail.com>
…ge to indicate minimum character requirement

Signed-off-by: rafi <refaei.shikho@hotmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.

Comments suppressed due to low confidence (1)

src/app/(loading-group)/[organizationSlug]/projects/[projectSlug]/page.tsx:86

  • The page no longer passes SWR’s loading state into the list. SubgroupsAndAssetsList only shows loading when lazily expanding a subgroup, so the initial /resources fetch can render as an empty area until data arrives. Consider plumbing SWR’s isLoading/isValidating into SubgroupsAndAssetsList (or wrapping it with ListRenderer) so initial load shows a skeleton/placeholder.
  const {
    data: subgroupsWithAssets,
    error,
    mutate,
  } = useSWR<Paged<SubGroupsAndAsset>>(() => {
    if (!isOrganization(organization.organization)) return null;
    const base = `/organizations/${decodeURIComponent(organization.organization.slug)}/projects/${decodeURIComponent(project.slug)}/resources?parentId=${project?.id}`;
    const query = queryWithState.toString();
    return query ? `${base}&${query}` : base;
  }, fetcher);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/SubgroupsAndAssetsList.tsx Outdated
Comment thread src/components/SubgroupsAndAssetsList.tsx
Comment thread src/components/SubgroupsAndAssetsList.tsx
Comment thread src/components/AssetOverviewListItem.tsx
Comment thread src/app/(loading-group)/[organizationSlug]/page.tsx Outdated
Comment thread src/app/(loading-group)/[organizationSlug]/page.tsx
Comment thread src/app/(loading-group)/[organizationSlug]/page.tsx Outdated
refoo0 added 2 commits May 4, 2026 16:42
…sPage to improve query handling and state management

Signed-off-by: rafi <refaei.shikho@hotmail.com>
…tsList and RepositoriesPage

Signed-off-by: rafi <refaei.shikho@hotmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/app/(loading-group)/[organizationSlug]/projects/[projectSlug]/page.tsx Outdated
Comment thread src/app/(loading-group)/[organizationSlug]/page.tsx Outdated
Comment thread src/components/SubgroupsAndAssetsList.tsx
Comment thread src/types/api/api.ts
@refoo0 refoo0 marked this pull request as ready for review May 5, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants