♻️ 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:
Innei
2026-02-16 18:17:59 +08:00
committed by GitHub
parent abbf53feda
commit b3e87f6cd4
21 changed files with 441 additions and 1061 deletions
+7
View File
@@ -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,
},
},
);