Skip to content

Xyq/refactor card - #4014

Merged
WMC001 merged 140 commits into
developfrom
xyq/refactor_card
Sep 28, 2026
Merged

WMC001 merged 140 commits into
developfrom
xyq/refactor_card

Conversation

@xuyaqist

@xuyaqist xuyaqist commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor
  1. 优化智能体配置页面,当用户点击“智能体配置”,会先进入列表选择:
image 2. 当点击一个智能体之后,会展示详情.() image 3. 进入智能体编辑页面时,删除上面的header-selector image 4. 修改上架Agent的时候,只能选择图标,无法上传自定义图标的问题。目前相关的功能已经和智能体编辑页面保持一致 image 6. 统一Agent列表接口,避免在Agent列表中交叉查询Agent仓库信息,优化接口查询效率,。 7. 统一Agent仓库、Agent相关的详情卡片,以及MCP详情卡片和Skill详情卡片。 8. 令MCP连接状态在卡片中渲染,而非通过message渲染。

xuyaqist and others added 30 commits September 17, 2026 10:17
Use the shared resource grid and card shell for Agent, MCP, and Skill repository listings while preserving their existing search, filtering, pagination, and actions.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Route Agent, MCP, and Skill create-card entry points through the shared CreateResourceCard and use the shared grid for Agent and Skill mine lists.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Apply the shared ResourceCard shell to Agent, MCP, and Skill mine-resource cards while retaining their existing content and actions.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Use the shared card's stacked footer layout for Agent, MCP, and Skill repository listings so metadata and actions remain consistent across resource types.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Move repository, my-agent, and review-center tab content behind same-level components and expand the card grids to four desktop columns.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5
Place the complete my-agent view beside the route page and preserve its resource-card grid behavior.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5
Update relative component imports after moving the my-agent view and keep layout regression coverage aligned.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5
Delete duplicate repository and review tab implementations after moving them into dedicated components.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5
Move repository copy and detail dialogs into the repository tab and version detail into the my-agent tab.\n\nCo-authored-by: Codex <noreply@openai.com>\nGenerated-by: gpt-5
Move list, filter, pagination, detail, and mutation state into each tab view. Keep tab counts on the page and preserve filters across tab switches while disabling inactive queries.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-5
Render repository listings with ResourceCard and delegate server pagination to ResourceCardGrid. Rename the view to space.tsx and remove the unused agent card adapter and pagination controls.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-5
Open repository details from the card, move copying into the action menu, show versions as title badges, and place authors in the card footer.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-5
Use Ant Design breakpoints and measured card-region height to select the server page size. Constrain ResourceCardGrid rows to the available viewport space.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-5
Reduce repository-card description lines as card rows shrink and make the shared card description overflow-safe.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-5
Remove duplicate tab spacing and reserve the responsive page bottom padding when sizing the card grid.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Use the shared card minimum height when calculating responsive rows so cards and pagination remain within the viewport.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Move copying to the card footer and show download counts beside repository names.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Keep repository cards in three columns through xl and use four columns only at the xxl breakpoint.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Limit the repository grid to two columns through lg, then use three columns at xl and four at xxl.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Start the two-column resource grid at 576px so CSS matches Ant Design responsive state and pagination capacity.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Use a bordered default button for copying repository agents from the card footer.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Increase the copy action size and use the primary button treatment for a clear visual affordance.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Remove redundant import and create-agent toolbar actions, align tag filtering with search, and reuse the shared resource pagination component.

Co-authored-by: Cursor <noreply@cursor.com>

Generated-by: gpt-5.6-sol
Move evaluation into the card overflow menu and keep editing in the lower-right action area. Reposition version, lifecycle status, repository status, and creation date for clearer scanning.

Co-authored-by: Cursor <noreply@cursor.com>

Generated-by: gpt-5.6-sol
Show the listed version status beside the agent name and remove the redundant Hub badge.

Co-authored-by: Cursor <noreply@cursor.com>

Generated-by: gpt-5.6-sol
Match the listed repository status badge to the former Hub blue styling.

Co-authored-by: Cursor <noreply@cursor.com>

Generated-by: gpt-5.6-sol
Change the agent card version label to Current Version and add a primary color indicator for the active version.

Co-authored-by: Cursor <noreply@cursor.com>

Generated-by: gpt-5.6-sol
Place the published or draft badge beside the card menu so both share the top-right header alignment.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Stack the published or draft badge below the top-right menu to match the card header layout.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-5
Rename the MCP detail component to the singular form and replace repository Skill detail dialogs with a shared component matching the Agent and MCP layout. Preserve review and repository loading states.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-6
Move Agent and Skill detail components into their existing singular directories and update all page imports. Remove the now empty plural directories.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-6
Merge the latest origin/develop into xyq/refactor_card, preserve the resource detail refactor, and carry forward model parameter and skill tag fixes.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-6
Remove the agent card editor plan from the feature branch so the PR contains only the intended implementation changes.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-6
Remove the two browser specs added only on xyq/refactor_card before opening the develop PR.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-6
Remove the ten frontend test files added only on xyq/refactor_card before opening the develop PR.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-6

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Multiple unresolved correctness, compatibility, persistence, caching, and test failures remain.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity · 6 Medium severity

Open (8)
What changed in this PR

Refactors agent/resource cards and detail flows, adds uploaded icons, and introduces paginated agent listings.

Changes:

  • Adds icon upload, validation, storage APIs, and migration.
  • Refactors agent, Skill, and MCP detail views and routing.
  • Updates pagination, filtering, localization, types, and tests.
File Summary
test/​backend/​services/​test_icon_storage.py Tests icon validation.
test/​backend/​services/​test_agent_repository_service.py Tests repository icon behavior.
test/​backend/​services/​test_agent_model_attempt_persistence.py Formatting cleanup.
test/​backend/​database/​test_agent_repository_db.py Updates icon persistence tests.
test/​backend/​app/​test_agent_repository_app.py Tests icon routes.
test/​backend/​app/​test_agent_app.py Tests paginated agent listing.
sdk/​nexent/​core/​agents/​output_protocol.py Formatting cleanup.
frontend/​types/​agentRepository.ts Adds repository metadata types.
frontend/​types/​agentConfig.ts Adds agent metadata types.
frontend/​tests/​skillRepositoryDetail.test.mjs Tests Skill detail mapping.
frontend/​tests/​repositoryMcpDetail.test.mjs Tests MCP detail mapping.
frontend/​tests/​repositoryCardFooterHover.test.ts Tests footer styling.
frontend/​tests/​nl2SkillAttemptRollback.test.ts Updates component path.
frontend/​tests/​myAgentDetail.test.mjs Tests agent detail mapping.
frontend/​tests/​modelPriority.test.ts Updates prompt path.
frontend/​tests/​collaborativeAgentVersionNameLabel.test.ts Updates selector path.
frontend/​tests/​agentVersionSwitchGuard.test.ts Updates route path.
frontend/​tests/​agentVersionRefresh.test.ts Updates route path.
frontend/​tests/​agentSelectorSwitchOrder.test.ts Removes obsolete test.
frontend/​tests/​agentsCardLayout.test.ts Tests agent card layout.
frontend/​tests/​agentRouteStructure.test.ts Tests agent routes.
frontend/​tests/​agentRepositoryListingTags.test.mjs Tests listing tags.
frontend/​tests/​agentIconUtils.test.mjs Tests icon utilities.
frontend/​tests/​agentConfigPresentation.test.ts Tests agent presentation.
frontend/​tests/​agentCardDeletePermission.test.ts Tests delete permissions.
frontend/​services/​api.ts Adds listing and icon endpoints.
frontend/​services/​agentVersionService.ts Extends version types.
frontend/​services/​agentConfigService.ts Adds paginated listing mapping.
frontend/​public/​locales/​zh/​common.json Updates Chinese translations.
frontend/​public/​locales/​en/​common.json Updates English translations.
frontend/​lib/​skillRepositoryDetail.ts Adds Skill detail mapping.
frontend/​lib/​repositoryMcpDetail.ts Adds MCP detail helpers.
frontend/​lib/​myAgentDetail.ts Adds agent detail mapping.
frontend/​lib/​myAgentDetail.test.mjs Tests agent detail mapping.
frontend/​lib/​chat/​agentIconUtils.ts Adds icon helpers.
frontend/​lib/​agentRepositoryMine.ts Updates listing helpers.
frontend/​lib/​agentRepositoryIcon.ts Removes emoji validation.
frontend/​lib/​agentRepositoryDetail.ts Removes obsolete mapper.
frontend/​hooks/​agentRepository/​useRepositoryAgentDetail.ts Loads repository details.
frontend/​hooks/​agent/​useAgentList.ts Adds paginated queries.
frontend/​e2e/​mcp-card-connection-status.spec.ts Tests MCP status.
frontend/​e2e/​agent-review-count.spec.ts Tests review counts.
frontend/​const/​agentRepository.ts Removes icon presets.
frontend/​components/​skill/​skill-detail.tsx Adds Skill detail UI.
frontend/​components/​resource/​ResourceDetail.tsx Adds shared detail UI.
frontend/​components/​resource/​CreateResourceCard.tsx Supports custom card styling.
frontend/​components/​mcp/​mcp-detail.tsx Adds MCP detail UI.
frontend/​app/​[locale]/​skill-space/​skill-space.tsx Integrates shared Skill UI.
frontend/​app/​[locale]/​skill-space/​review-center.tsx Integrates shared Skill UI.
frontend/​app/​[locale]/​skill-space/​my-skill.tsx Updates capability imports.
frontend/​app/​[locale]/​skill-space/​components/​SkillRepositoryDetailModal.tsx Removes obsolete modal.
frontend/​app/​[locale]/​skill-space/​components/​RepositoryView.tsx Updates footer styling.
frontend/​app/​[locale]/​skill-space/​components/​MineSkillsView.tsx Updates footer styling.
frontend/​app/​[locale]/​newchat/​ui/​skill-file-card.tsx Updates preview imports.
frontend/​app/​[locale]/​newchat/​ui/​installed-resource-binding-card.tsx Updates capability imports.
frontend/​app/​[locale]/​mcp-space/​my-mcp.tsx Tracks connection status.
frontend/​app/​[locale]/​mcp-space/​components/​RepositoryMcpDetailModal.tsx Removes obsolete modal.
frontend/​app/​[locale]/​mcp-space/​components/​RepositoryMcpCard.tsx Updates card styling.
frontend/​app/​[locale]/​mcp-space/​components/​MineMcpServiceCard.tsx Displays connection status.
frontend/​app/​[locale]/​mcp-space/​agent-space.tsx Integrates shared MCP UI.
frontend/​app/​[locale]/​agents/​versions/​DebugMessageList.tsx Adds debug message rendering.
frontend/​app/​[locale]/​agents/​versions/​AgentVersionCompareModal.tsx Updates debug imports.
frontend/​app/​[locale]/​agents/​components/​capability/​tool/​utils.ts Adds shared tool helpers.
frontend/​app/​[locale]/​agents/​components/​capability/​skillPreviewPolicy.ts Adds preview policy.
frontend/​app/​[locale]/​agents/​components/​capability/​skillFileLanguage.ts Adds language resolution.
frontend/​app/​[locale]/​agents/​components/​capability/​SkillDetailModal.tsx Adds Skill file modal.
frontend/​app/​[locale]/​agents/​components/​capability/​SkillCodePreview.tsx Adds code preview.
frontend/​app/​[locale]/​agents/​components/​agentInfo/​DebugPromptCompareModal.tsx Removes obsolete modal.
frontend/​app/​[locale]/​agents/​components/​agentInfo/​DebugOptimizeModal.tsx Removes obsolete modal.
frontend/​app/​[locale]/​agents/​components/​agent-avatar.tsx Adds avatar rendering.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​debug/​agent-debug.tsx Updates debug imports.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​capability/​ToolManagement.tsx Uses shared tool helpers.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​capability/​tool/​useMergedToolParams.ts Updates helper imports.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​capability/​tool/​SelectToolsDialog.tsx Updates tool imports.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​capability/​tool/​LabelManagementModal.tsx Adds label management.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​capability/​skill/​utils.ts Adds Skill helpers.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​capability/​skill/​SkillTagManagementModal.tsx Adds tag management.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​capability/​skill/​SkillRowContent.tsx Adds Skill row rendering.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​capability/​skill/​SelectSkillsDialog.tsx Updates Skill imports.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​capability/​SelectedSkillManagement.tsx Updates Skill imports.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​agent-run-policy.tsx Adds run policy controls.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​agent-prompt.tsx Updates model imports.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​agent-info.tsx Adds icon handling.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​agent-guide.tsx Adds guide controls.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​agent-deployment.tsx Adds deployment controls.
frontend/​app/​[locale]/​agents/​[agentId]/​components/​agent-capability.tsx Reorganizes capabilities.
frontend/​app/​[locale]/​agents/​[agentId]/​agent-config.tsx Updates version imports.
frontend/​app/​[locale]/​agent-space/​review-center.tsx Integrates shared agent UI.
frontend/​app/​[locale]/​agent-space/​page.tsx Adds agent counts.
frontend/​app/​[locale]/​agent-space/​components/​ReviewAgentList.tsx Adds repository icons.
frontend/​app/​[locale]/​agent-space/​components/​RepositoryAgentIcon.tsx Adds repository icon rendering.
frontend/​app/​[locale]/​agent-space/​components/​MyAgentIcon.tsx Adds editable agent icons.
frontend/​app/​[locale]/​agent-space/​agent-space.tsx Integrates shared agent UI.
docs/​plans/​2026-09-22-agents-card-editor-design.md Documents editor architecture.
deploy/​sql/​migrations/​v2.6.0_z_agent_repository_icon_url.sql Migrates repository icons.
deploy/​env/​.env.example Formatting cleanup.
backend/​services/​agent_repository_service.py Adds icon storage and mappings.
backend/​management/​services/​agent/​service.py Reuses icon storage.
backend/​management/​services/​agent/​management.py Adds paginated agent listing.
backend/​management/​services/​agent/​icon_storage.py Adds image validation/storage.
backend/​database/​db_models.py Renames icon column.
backend/​database/​agent_version_db.py Returns version timestamps.
backend/​database/​agent_repository_db.py Updates icon persistence.
backend/​consts/​model.py Updates repository models.
backend/​apps/​agent_repository_app.py Adds icon routes.
backend/​apps/​agent_app.py Adds paginated agent endpoint.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread frontend/lib/myAgentDetail.test.mjs Outdated
Comment thread frontend/lib/myAgentDetail.ts
Comment thread backend/consts/model.py
Comment thread backend/management/services/agent/management.py Outdated
Comment thread backend/management/services/agent/management.py
Comment thread frontend/app/[locale]/agent-space/components/MyAgentIcon.tsx Outdated
Comment thread frontend/app/[locale]/agents/components/agent-avatar.tsx
Comment thread frontend/hooks/agent/useAgentList.ts Outdated
xuyaqist and others added 7 commits September 24, 2026 15:14
Remove the branch-only myAgentDetail test under frontend/lib so neither same-named test remains in the develop PR.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-6
Update the stale request model test to use icon_url and assert that the field survives model serialization for the listing endpoint. Refs #4014.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-6
Load lightweight agent candidates for visibility, filters, and counts, then resolve model and tool availability only for the selected page. Preserve duplicate warnings across pages and show unavailable reasons on My Agent cards.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-6
Store a new icon revision on every upload and include it in agent icon requests so cards and list views bypass stale browser cache while unchanged icons retain the existing cache policy.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-6
Include the legacy tenant input in the React Query key so tenant switches fetch and display the correct agent list.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-6
Assert the version creation time returned by the existing query and include the agent icon storage service in the architecture inventory.

Co-authored-by: Codex <noreply@openai.com>

Generated-by: gpt-6-astra
Merge origin/develop and preserve both Agent list and Workbench behavior.
Retain system Agent icon restrictions and normalize agent tags.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-6-astra
@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.26592% with 34 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/management/services/agent/management.py 83.76% 13 Missing and 6 partials ⚠️
backend/services/agent_repository_service.py 73.33% 8 Missing and 4 partials ⚠️
backend/apps/agent_repository_app.py 86.95% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

xuyaqist and others added 5 commits September 28, 2026 10:49
Verify JPEG, GIF, and WebP detection plus upload and read success and failure paths.
Keep storage interactions isolated with in-memory test doubles.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-6-astra
Verify selected columns, filters, ordering, and result mapping for agent list candidates.
Cover empty and populated ID lookups without database access.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-6-astra
Merge current develop into refactor card while retaining tenant quota feedback during Agent copy.
Preserve both database test suites and verify merged frontend and backend behavior.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-6-astra
Verify creator and asset owner tenant forwarding plus paged list 400 and 500 responses.
Cover repository icon upload validation and authorization errors.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-6-astra
Merge the latest develop changes while preserving card-based agent pages,
repository icon routes, and their tests. Move tenant-switch cleanup to the
relocated agent editor and isolate official sync tests during collection.

Co-authored-by: Codex <noreply@openai.com>
Generated-by: gpt-6-astra
@WMC001
WMC001 merged commit 3a378d5 into develop Sep 28, 2026
14 of 16 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