Skip to content

feat: add app import preview flow#239

Merged
kklldog merged 1 commit into
dotnetcore:masterfrom
super-niuma-001:feat/issue-235-import-flow
May 21, 2026
Merged

feat: add app import preview flow#239
kklldog merged 1 commit into
dotnetcore:masterfrom
super-niuma-001:feat/issue-235-import-flow

Conversation

@super-niuma-001
Copy link
Copy Markdown
Contributor

Closes #235

Summary

  • add app import preview and import endpoints for exported app JSON files
  • validate duplicate ids/names, missing parent apps, and cyclic inheritance before import
  • import apps in topological order and add a UI modal for upload + preview

Testing

  • dotnet test test/ApiSiteTests/ApiSiteTests.csproj --filter TestAppController
  • NODE_OPTIONS=--openssl-legacy-provider npm run build

Copy link
Copy Markdown

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds an “app import” workflow that lets users upload an exported apps JSON file, preview validation results, and then import apps/configs in dependency order.

Changes:

  • Added API endpoints to preview and import exported app JSON files, including validation (duplicates/missing parents/cycles) and topological ordering.
  • Added UI import modal flow (upload → preview table → import) and supporting request/types/i18n.
  • Added API tests covering preview validation and import ordering/config creation.

Reviewed changes

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

Show a summary per file
File Description
test/ApiSiteTests/TestAppController.cs Adds tests for preview validation errors and import ordering/config creation.
src/AgileConfig.Server.UI/react-ui-antd/src/pages/Apps/service.ts Adds client API calls for preview-import (multipart upload) and import (JSON body).
src/AgileConfig.Server.UI/react-ui-antd/src/pages/Apps/index.tsx Adds “Import” button and toggles the import modal.
src/AgileConfig.Server.UI/react-ui-antd/src/pages/Apps/data.d.ts Defines types for import file schema and preview response payload.
src/AgileConfig.Server.UI/react-ui-antd/src/pages/Apps/comps/AppImport.tsx Implements the upload/preview/import modal UX.
src/AgileConfig.Server.UI/react-ui-antd/src/locales/zh-CN/pages.ts Adds zh-CN strings for import flow UI.
src/AgileConfig.Server.UI/react-ui-antd/src/locales/en-US/pages.ts Adds en-US strings for import flow UI.
src/AgileConfig.Server.Apisite/Models/AppExportVM.cs Adds import request model and preview view models.
src/AgileConfig.Server.Apisite/Controllers/AppController.cs Implements PreviewImport/Import endpoints, validation, and topological sort.

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

Comment thread src/AgileConfig.Server.Apisite/Controllers/AppController.cs
Comment thread src/AgileConfig.Server.Apisite/Controllers/AppController.cs
Comment thread src/AgileConfig.Server.Apisite/Controllers/AppController.cs
Comment thread src/AgileConfig.Server.Apisite/Controllers/AppController.cs
Comment thread src/AgileConfig.Server.Apisite/Controllers/AppController.cs
Comment thread src/AgileConfig.Server.Apisite/Controllers/AppController.cs
Comment thread src/AgileConfig.Server.UI/react-ui-antd/src/pages/Apps/service.ts
Comment thread src/AgileConfig.Server.Apisite/Controllers/AppController.cs
@kklldog kklldog merged commit c1dc90b into dotnetcore:master May 21, 2026
5 of 6 checks passed
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.

完整的导入导出功能

3 participants