Skip to content

feat(api-keys): add rename support in API key modal - #1796

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.7.6from
andrewmunsell:emdash/rename-api-keys-45un3
Apr 30, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.7.6from
andrewmunsell:emdash/rename-api-keys-45un3

Conversation

@andrewmunsell

Copy link
Copy Markdown
Contributor

Sumary

Add an editable key name field at the top of the permissions modal, allowing users to rename API keys alongside existing permission settings.

The backend already supported name updates via PATCH /api/keys/:id — this wires the UI to send the name field and refreshes the key list on success.

Changes:

  • Add keyName state and text input to PermissionsModal
  • Update handleUpdatePermissions to validate and send name in PATCH body

Tests Added Or Updated

  • Add integration test for rename via PATCH (valid, empty, too-long names)
  • Update E2E mock to handle PATCH requests

@andrewmunsell andrewmunsell changed the title feat(api-keys): add rename support in permissions modal feat(api-keys): add rename support in API key modal Apr 30, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the ability to rename API keys directly within the permissions modal. Key changes include updating the handleUpdatePermissions function to include the new name in the PATCH request, adding a name input field to the PermissionsModal UI, and implementing corresponding E2E and integration tests. Feedback focuses on improving the validation flow by checking the raw input before sanitization, adding a maxLength attribute to the UI input for better user experience, and resolving the inconsistency between the frontend (100 characters) and backend (200 characters) name length limits.

Comment thread src/app/(dashboard)/dashboard/api-manager/ApiManagerPageClient.tsx Outdated
Comment thread src/app/(dashboard)/dashboard/api-manager/ApiManagerPageClient.tsx
Comment thread tests/integration/api-keys.test.ts
Add an editable key name field at the top of the permissions modal,
allowing users to rename API keys alongside existing permission settings.

The backend already supported name updates via PATCH /api/keys/:id — this
wires the UI to send the name field and refreshes the key list on success.

Changes:
- Add keyName state and text input to PermissionsModal
- Update handleUpdatePermissions to validate and send name in PATCH body
- Add integration test for rename via PATCH (valid, empty, too-long names)
- Update E2E mock to handle PATCH requests
@andrewmunsell
andrewmunsell force-pushed the emdash/rename-api-keys-45un3 branch from c581aa7 to c86c43f Compare April 30, 2026 00:30
@diegosouzapw diegosouzapw mentioned this pull request Apr 30, 2026
@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.7.6 April 30, 2026 04:54
@diegosouzapw
diegosouzapw merged commit f4bd7f9 into diegosouzapw:release/v3.7.6 Apr 30, 2026
2 checks passed
This was referenced Apr 30, 2026
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants