Skip to content

refresh plugins#6099

Merged
c121914yu merged 4 commits intolabring:mainfrom
c121914yu:4.14.4-dev
Dec 16, 2025
Merged

refresh plugins#6099
c121914yu merged 4 commits intolabring:mainfrom
c121914yu:4.14.4-dev

Conversation

@c121914yu
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings December 16, 2025 03:09
@gru-agent
Copy link
Copy Markdown
Contributor

gru-agent bot commented Dec 16, 2025

⏳ Processing in progress

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 16, 2025

Preview mcp_server Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_mcp_server_9648d977ae77aa50e1e40f193b1dfeb2f4be3047

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 16, 2025

Preview sandbox Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_sandbox_9648d977ae77aa50e1e40f193b1dfeb2f4be3047

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 16, 2025

Docs Preview:


🚀 FastGPT Document Preview Ready!

🔗 👀 Click here to visit preview

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 16, 2025

Preview fastgpt Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_9648d977ae77aa50e1e40f193b1dfeb2f4be3047

Copy link
Copy Markdown
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 makes several improvements to plugin refresh timing and migration behavior. The main changes ensure that plugin lists are refreshed at the correct point in the operation lifecycle and converts a slow migration function to run asynchronously.

  • Moves refreshInstalledPlugins() calls to execute before cleanup operations in the finally block, ensuring fresh data is available before resetting operation state
  • Removes unused useReducer import from marketplace component
  • Converts migrateFeedbackFlags() to run asynchronously (fire-and-forget) since it's a slow operation that shouldn't block the API response
  • Updates documentation to explain the asynchronous migration behavior and adds a zIndex property to a button

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
projects/app/src/pages/config/tool/marketplace.tsx Repositions refreshInstalledPlugins() calls before cleanup operations in install/update/delete handlers, removes unused useReducer import, and adds zIndex to back button
projects/app/src/pages/api/admin/initv4144.ts Changes migrateFeedbackFlags() to fire-and-forget pattern (removes await) for async execution
projects/app/src/pages/api/admin/initFeedbackFlags.ts Updates log message from "Migration completed!" to "Migration feedback completed!" for clarity
document/data/doc-last-modified.json Updates timestamps for various documentation files
document/content/docs/upgrading/4-14/4144.mdx Adds documentation explaining the async migration behavior and what log message to look for

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


// 重新统计每一个 chat 的反馈情况
await migrateFeedbackFlags();
migrateFeedbackFlags();
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

The fire-and-forget pattern (calling an async function without await) means that if migrateFeedbackFlags() throws an unhandled error after the handler returns, it could result in an unhandled promise rejection. Consider wrapping the call in a .catch() handler to ensure errors are logged even if they occur after the response is sent. For example: migrateFeedbackFlags().catch(err => addLog.error('Migration failed:', err));

Suggested change
migrateFeedbackFlags();
migrateFeedbackFlags().catch(err => addLog.error('Migration failed:', err));

Copilot uses AI. Check for mistakes.
@pull-request-size pull-request-size bot added size/M and removed size/S labels Dec 16, 2025
@c121914yu c121914yu merged commit 0e36765 into labring:main Dec 16, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants