Skip to content

Remove legacy apps directory and consolidate into extensions#5926

Closed
lkostrowski wants to merge 12 commits intomainfrom
remove-dead-code-7
Closed

Remove legacy apps directory and consolidate into extensions#5926
lkostrowski wants to merge 12 commits intomainfrom
remove-dead-code-7

Conversation

@lkostrowski
Copy link
Member

@lkostrowski lkostrowski commented Oct 2, 2025

Summary

This PR removes the legacy src/apps/ directory and consolidates all app-related functionality into the src/extensions/ directory, eliminating code duplication and improving codebase organization.

Changes

  • Removed entire src/apps/ directory (~4,800 lines of deleted code)
  • Moved reusable components from apps/ to extensions/components/:
    • App alerts and webhook-related components
    • App avatar component
  • Consolidated GraphQL queries, mutations, and types into src/extensions/
  • Migrated utility functions (getPermissionsDiff.ts, isUrlAbsolute.ts) to extensions directory
  • Updated all import paths across the codebase to reference the consolidated extension module
  • Removed duplicate type definitions and fixtures

Impact

  • Net reduction of ~4,700 lines of code
  • Clearer separation between legacy "apps" concept and modern "extensions" architecture
  • Simplified maintenance with single source of truth for app/extension functionality
  • All existing functionality preserved through consolidation

Testing

  • Tests updated and passing
  • Import paths updated across affected files
  • GraphQL types regenerated

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings October 2, 2025 08:23
@changeset-bot
Copy link

changeset-bot bot commented Oct 2, 2025

⚠️ No Changeset found

Latest commit: 1832207

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
saleor-dashboard-storybook Ignored Ignored Preview Oct 2, 2025 0:31am

Copy link
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

This PR consolidates app-related functionality by removing the standalone apps directory and reorganizing its code into the extensions directory. The change simplifies the codebase structure by merging similar functionality under a unified extensions system.

Key Changes:

  • Migrated app-related components, mutations, queries, and utilities from /apps to /extensions
  • Updated all imports to reflect the new file structure
  • Consolidated app URL handling and types into the extensions module
  • Removed various legacy components and utilities that are no longer needed

Reviewed Changes

Copilot reviewed 179 out of 203 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Various import updates across multiple files Updated import paths from @dashboard/apps/ to @dashboard/extensions/
src/extensions/mutations.ts Added app-related mutations (create, delete, update, tokens, etc.)
src/extensions/queries.ts Added app-related queries (list, details, installations)
src/extensions/urls.ts Consolidated app URL definitions and utilities
src/extensions/utils.ts Added utility functions for app handling
src/extensions/types.ts Added AppLogo interface
src/index.tsx Updated redirect paths to use hardcoded strings instead of constants

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 2, 2025 08:30
Copy link
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 94 out of 115 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lkostrowski lkostrowski added the skip changeset Use if your changes doesn't need entry in changelog label Oct 2, 2025
@github-actions github-actions bot temporarily deployed to pr-5926 October 2, 2025 08:37 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5926 October 2, 2025 09:16 Destroyed
@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 75.75758% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.42%. Comparing base (d450f6a) to head (1832207).
⚠️ Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
src/extensions/urls.ts 63.15% 7 Missing ⚠️
src/extensions/index.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5926      +/-   ##
==========================================
- Coverage   40.04%   39.42%   -0.63%     
==========================================
  Files        2472     2431      -41     
  Lines       40153    39463     -690     
  Branches     8814     8682     -132     
==========================================
- Hits        16080    15558     -522     
+ Misses      24046    23879     -167     
+ Partials       27       26       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lkostrowski lkostrowski changed the title Remove apps dir Remove legacy apps directory and consolidate into extensions Oct 2, 2025
Copilot AI review requested due to automatic review settings October 2, 2025 12:30
Copy link
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 96 out of 117 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lkostrowski lkostrowski marked this pull request as ready for review October 2, 2025 12:30
@lkostrowski lkostrowski requested a review from a team as a code owner October 2, 2025 12:30
Copilot AI review requested due to automatic review settings October 2, 2025 12:30
Copy link
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 96 out of 117 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@witoszekdev witoszekdev left a comment

Choose a reason for hiding this comment

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

appInstallPath: urlJoin(AppSections.appsSection, "install"),
};

export const AppUrls = {
Copy link
Member

Choose a reason for hiding this comment

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

issue: I think we have to remove this old AppUrls since it uses old routes, which are no longer rendered in our index.tsx. Imho we should get rid of these methods altogether and use ones from ExtensionsUrls

@lkostrowski lkostrowski marked this pull request as draft October 14, 2025 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changeset Use if your changes doesn't need entry in changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants