Skip to content

feat(client): solving two skeleton effect on app card#1427

Merged
johbaxter merged 3 commits intodevfrom
solving-two-skeleton-effect-on-app-card
Jul 17, 2025
Merged

feat(client): solving two skeleton effect on app card#1427
johbaxter merged 3 commits intodevfrom
solving-two-skeleton-effect-on-app-card

Conversation

@AJMADHAB
Copy link
Copy Markdown
Contributor

@AJMADHAB AJMADHAB commented Jul 3, 2025

Description

Previously two skeleton effects were loading. Now it is resolved

Changes Made

1.Modified AppCatalogPage.tsx

How to Test

  1. Steps to reproduce/test the behavior
    Go to App Landing Page -> reload the page -> You will see two skeleton effect before loading.
  2. Expected outcomes
    You will be able to see only the correct skeleton effect before loading.

Notes

@AJMADHAB AJMADHAB requested a review from anurag91jain July 3, 2025 12:40
@AJMADHAB AJMADHAB self-assigned this Jul 3, 2025
@AJMADHAB AJMADHAB requested a review from a team as a code owner July 3, 2025 12:40
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 3, 2025

@CodiumAI-Agent /describe

@QodoAI-Agent
Copy link
Copy Markdown

Title

feat(client): solving two skeleton effect on app card


User description

Description

Previously two skeleton effects were loading. Now it is resolved

Changes Made

1.Modified AppCatalogPage.tsx

How to Test

  1. Steps to reproduce/test the behavior
    Go to App Landing Page -> reload the page -> You will see two skeleton effect before loading.
  2. Expected outcomes
    You will be able to see only the correct skeleton effect before loading.

Notes


PR Type

Bug fix, Enhancement


Description

  • Remove skeleton loading placeholders

  • Simplify favorited apps section render

  • Update app tile navigation href logic

  • Add isDiscoverable prop to AppTileCard


Changes walkthrough 📝

Relevant files
Bug fix
AppCatalogPage.tsx
Simplify favorited apps rendering                                               

packages/client/src/pages/app/AppCatalogPage.tsx

  • Removed Skeleton import and AppTileSkeleton styled component
  • Replaced loading branch with direct favoritedApps mapping
  • Updated href paths to omit /view for non-discoverable apps
  • Added isDiscoverable prop to AppTileCard
  • +37/-68 

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @github-actions
    Copy link
    Copy Markdown

    github-actions bot commented Jul 3, 2025

    @CodiumAI-Agent /review

    @github-actions
    Copy link
    Copy Markdown

    github-actions bot commented Jul 3, 2025

    @CodiumAI-Agent /improve

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Missing loading indicator

    The loading skeleton for favorited apps was removed, resulting in no placeholder while data is fetching. Consider adding a single skeleton or spinner to indicate loading.

    {mode != 'System' && favoritedApps.length > 0 ? (
        <StyledSection>
            {favoritedApps.map((app, i) => {
                return (
                    <AppTileCard
                        key={i}
                        app={app}
                        systemApp={false}
                        href={
                            mode === 'Discoverable'
                                ? `#/app/${app.project_id}/detail`
                                : `#/app/${app.project_id}`
                        }
                        onAction={() => {
                            if (mode === 'Discoverable') {
                                navigate(
                                    `/app/${app.project_id}/detail`,
                                );
                            } else {
                                navigate(
                                    `/app/${app.project_id}`,
                                );
                            }
                        }}
                        appType={app.project_type}
                        isFavorite={isFavorited(
                            app.project_id,
                        )}
                        favorite={() => {
                            favoriteApp(app);
                        }}
                        isDiscoverable={mode !== 'Mine'}
                    />
                );
            })}
        </StyledSection>
    ) : null}
    Use of array index as key

    The map callback uses the array index as the key prop, which may cause rendering issues. Use a unique identifier like app.project_id instead.

    {favoritedApps.map((app, i) => {
        return (
            <AppTileCard
                key={i}
    Inconsistent route paths

    The href and navigation paths for non-discoverable apps removed the /view suffix used elsewhere. Verify that the new path without /view is correct.

    href={
        mode === 'Discoverable'
            ? `#/app/${app.project_id}/detail`
            : `#/app/${app.project_id}`
    }
    onAction={() => {
        if (mode === 'Discoverable') {

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Restore missing /view routes

    The non-discoverable route was changed from /view to the root path, which may break
    the view page. Restore /view in both href and navigate calls to match the original
    behavior.

    packages/client/src/pages/app/AppCatalogPage.tsx [390-405]

     href={
         mode === 'Discoverable'
             ? `#/app/${app.project_id}/detail`
    -        : `#/app/${app.project_id}`
    +        : `#/app/${app.project_id}/view`
     }
     onAction={() => {
         if (mode === 'Discoverable') {
             navigate(`/app/${app.project_id}/detail`);
         } else {
    -        navigate(`/app/${app.project_id}`);
    +        navigate(`/app/${app.project_id}/view`);
         }
     }}
    Suggestion importance[1-10]: 8

    __

    Why: The change drops the /view path for non-discoverable routes, potentially breaking navigation; restoring /view preserves existing behavior.

    Medium
    Use stable unique keys

    Replace the array index used in key with a stable unique identifier to avoid
    rendering glitches when the list changes. Using app.project_id ensures each card has
    a consistent key across renders.

    packages/client/src/pages/app/AppCatalogPage.tsx [387]

    -key={i}
    +key={app.project_id}
    Suggestion importance[1-10]: 7

    __

    Why: Using the array index (key={i}) can cause rendering glitches when the list changes; app.project_id is a stable unique key.

    Medium

    @anurag91jain anurag91jain linked an issue Jul 4, 2025 that may be closed by this pull request
    3 tasks
    @AJMADHAB AJMADHAB requested a review from johbaxter July 4, 2025 12:01
    @johbaxter johbaxter merged commit c1f65e9 into dev Jul 17, 2025
    3 checks passed
    @johbaxter johbaxter deleted the solving-two-skeleton-effect-on-app-card branch July 17, 2025 17:57
    @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /update_changelog

    @QodoAI-Agent
    Copy link
    Copy Markdown

    Changelog updates: 🔄

    2025-07-17 *

    Fixed

    • Resolved duplicate skeleton loading effect on app catalog page

    to commit the new content to the CHANGELOG.md file, please type:
    '/update_changelog --pr_update_changelog.push_changelog_changes=true'

    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.

    Duplicate skeletons showing up when app page is loading

    3 participants