mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-14 03:30:19 +00:00
♻️ refactor: replace per-item Editing components with singleton EditingPopover (#12327)
* ♻️ refactor: replace per-item Editing components with singleton EditingPopover Eliminate 3 duplicate Editing components (AgentItem, AgentGroupItem, Group) in favor of a single imperative EditingPopover using @lobehub/ui Popover atoms. Anchor elements are passed via React state (useState + callback ref) instead of DOM queries. Removes agentRenamingId/groupRenamingId from homeStore. * fix: edit group agent avaar Signed-off-by: Innei <tukon479@gmail.com> * ✅ test(e2e): update rename popover selectors and allow console in tests Support both antd Popover and @lobehub/ui Popover atoms selectors. Use save button click instead of click-outside for non-Enter rename flow. Disable no-console rule for e2e and test files. * ✅ test(e2e): fix rename popover input detection with data-testid Add data-testid="editing-popover" to PopoverPopup. Simplify inputNewName to use single combined selector instead of sequential try-catch loop that caused 8s+ timeout. Support both @lobehub/ui and antd Popover. --------- Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -92,4 +92,11 @@ export default eslint(
|
||||
'unicorn/prefer-top-level-await': 0,
|
||||
},
|
||||
},
|
||||
// E2E and test files - allow console.log for debugging
|
||||
{
|
||||
files: ['e2e/**/*', '**/*.test.ts', '**/*.test.tsx'],
|
||||
rules: {
|
||||
'no-console': 0,
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user