Xyq/refactor card - #4014
Merged
Merged
Xyq/refactor card#4014
Conversation
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
xuyaqist
requested review from
Dallas98,
Jasonxia007,
WMC001,
YehongPan,
hhhhsc701 and
jeffwu-1999
as code owners
September 24, 2026 06:57
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
Contributor
There was a problem hiding this comment.
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
Open (8)
Conflicting tests disagree on missing catalog name fallback · New Fallback resource IDs conflict with expected empty mappings · New Removing icon field breaks existing request compatibility tests · New Pagination occurs after expensive full-list enrichment · New Mixed-tenant results lose version metadata for asset-owner agents · New Stable icon URL serves stale cached images after replacement · New Avatar URLs lack cache busting after icon uploads · New Legacy agent query cache key omits tenant ID · New
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.
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 Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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
approved these changes
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Uh oh!
There was an error while loading. Please reload this page.