Skip to content

feat: reactivate api key, close #1735#1745

Merged
looplj merged 1 commit into
unstablefrom
dev-tmp
May 29, 2026
Merged

feat: reactivate api key, close #1735#1745
looplj merged 1 commit into
unstablefrom
dev-tmp

Conversation

@looplj

@looplj looplj commented May 29, 2026

Copy link
Copy Markdown
Owner

@greptile-apps

greptile-apps Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds the ability to reactivate (restore) archived API keys by reusing the existing archive dialog with isArchived-based branching. Both the dialog and row-actions dropdown now switch their icon, title, description, and confirm button text based on whether the selected key is archived.

  • apikeys-archive-dialog.tsx: Derives isArchived from the selected key's status, then conditionally toggles between archive/restore UI strings and sets the mutation target to 'enabled' or 'archived' accordingly.
  • data-table-row-actions.tsx: Removes the status !== 'archived' guard on the archive menu item so archived keys now show a "Restore" entry with IconCheck and green styling.
  • Locale files (en, zh-CN): Add restoreTitle, restoreDescription, and restoreInfo keys to support the new restore dialog copy.

Confidence Score: 5/5

Safe to merge — purely additive UI changes with no logic regressions in the archive/restore flow.

The change is a straightforward extension of the existing archive dialog. The isArchived branch is correctly derived, both locale files are fully updated, the mutation target status flips correctly, and the previously flagged icon inconsistency has been resolved. No data-mutating paths are left unguarded.

No files require special attention.

Important Files Changed

Filename Overview
frontend/src/features/apikeys/components/apikeys-archive-dialog.tsx Dialog reused for both archive and restore via isArchived flag; toggles icon, title, description, and confirm button correctly.
frontend/src/features/apikeys/components/data-table-row-actions.tsx Archive/restore row action now always visible, switching icon and label based on apiKey.status. Previously flagged icon inconsistency resolved.
frontend/src/locales/en/apikeys.json Three new locale keys added for the restore dialog; wording is clear and consistent.
frontend/src/locales/zh-CN/apikeys.json Chinese translations added for all three new restore keys; accurate and matching the English intent.

Reviews (2): Last reviewed commit: "feat: reactivate api key, close #1735" | Re-trigger Greptile

Comment thread frontend/src/features/apikeys/components/data-table-row-actions.tsx

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@looplj looplj merged commit 47f2604 into unstable May 29, 2026
4 checks passed
junjiangao pushed a commit to junjiangao/axonhub that referenced this pull request May 30, 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.

1 participant