Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(control-ui): r1-h2 refresh team name after rename
Josué7cbb10e56957
diff --git a/control-ui/app/profile-admin/teams/[teamId]/page.tsx b/control-ui/app/profile-admin/teams/[teamId]/page.tsxindex 8b3f0093c..cad17863f 100644--- a/control-ui/app/profile-admin/teams/[teamId]/page.tsx+++ b/control-ui/app/profile-admin/teams/[teamId]/page.tsx@@ -342,6 +342,19 @@ export default function TeamDetailsPage() {try {await renameAdminTeam(teamId, trimmed)setTeamName(trimmed)+ try {+ const authoritative = await getAdminTeam(teamId)+ setTeamName(authoritative.name || trimmed)+ } catch (refreshError) {+ const message =+ refreshError instanceof Error+ ? `Team renamed, but the latest team could not be reloaded: ${refreshError.message}`+ : 'Team renamed, but the latest team could not be reloaded.'+ setRenameOpen(false)+ setError(message)+ showToast(message, { tone: 'error' })+ return+ }setRenameOpen(false)showToast('Team renamed.', { tone: 'success' })} catch (e) {diff --git a/control-ui/components/__tests__/ProfileAdminAgentCompatibility.test.tsx b/control-ui/components/__tests__/ProfileAdminAgentCompatibility.test.tsxindex f96646b4f..ba5362305 100644--- a/control-ui/components/__tests__/ProfileAdminAgentCompatibility.test.tsx+++ b/control-ui/components/__tests__/ProfileAdminAgentCompatibility.test.tsx@@ -146,6 +146,9 @@ afterEach(() => {describe('profile-admin agent compatibility access', () => {it('renames a team through the scalar edit dialog and retains failures', async () => {+ vi.mocked(api.getAdminTeam)+ .mockResolvedValueOnce({ id: 'team-1', name: 'Platform' })+ .mockResolvedValueOnce({ id: 'team-1', name: 'Platform Engineering (canonical)' })vi.mocked(api.getAdminTeamContexts).mockResolvedValue({ teamId: 'team-1', contextIds: [] })vi.mocked(api.getAdminTeamAgents).mockResolvedValue({teamId: 'team-1',@@ -171,7 +174,11 @@ describe('profile-admin agent compatibility access', () => {expect(input).toHaveValue('Platform Engineering')fireEvent.click(within(dialog).getByRole('button', { name: 'Rename team' }))await waitFor(() => expect(api.renameAdminTeam).toHaveBeenCalledTimes(2))+ await waitFor(() => expect(api.getAdminTeam).toHaveBeenCalledTimes(2))await waitFor(() => expect(screen.queryByRole('dialog')).toBeNull())+ expect(+ screen.getByRole('heading', { name: 'Platform Engineering (canonical)' })+ ).toBeInTheDocument()expect(screen.getByText('Team renamed.')).toBeInTheDocument()})diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 8dc78587e..f86739981 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.626",+ "version": "0.1.627","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.626",+ "version": "0.1.627","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/frontend-components": "file:../packages/frontend-components",diff --git a/control-ui/package.json b/control-ui/package.jsonindex 318df15d4..1c40a4a97 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.626",+ "version": "0.1.627","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",