Skip to content

fix(i18n): localize API key failure messages - #1235

Merged
scttbnsn merged 2 commits into
dev/v1.8from
fix/v1.8-api-key-error-locales
Sep 16, 2026
Merged

scttbnsn merged 2 commits into
dev/v1.8from
fix/v1.8-api-key-error-locales

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Fix

API-key failures could bypass the translated Settings messages because the service returned hardcoded English errors. Empty server errors could also leave the screen without useful feedback.

Reuse the existing load/create/revoke translations and fall back to them plus HTTP status for blank, missing or unreadable server errors. Keep nonblank server diagnostics unchanged. No changes to authentication, scopes, requests, headers, confirmation or credential revelation.

Verification

  • 92 regression assertions failed before the fix; 159 focused tests pass afterward, including real component/service integration in French and Arabic and fallback checks across all 17 locales.
  • Vue typecheck and focused Biome checks pass.
  • Full normal pre-push gate passed in 358.49 seconds: backend/UI coverage, both builds, Biome, Knip, Qlty, script/workflow/website tests and Zizmor. The changelog-only refresh at eb78409 passed the normal gate again in 347.76 seconds, with source/tests unchanged and clean merge forecasts against countdown, image ages and uptime. Docker build remains a hosted CI check.

No browser or production deployment claim. Standard CodeRabbit review; no sensitive authentication or permission behavior changes requiring a second reviewer.

Changelog

  • ✨ Added localized fallback messages for API-key load, create, and revoke failures.
  • 🔧 Changed fallback handling to use i18n.global.t(...).
  • 🐛 Fixed fallback handling for missing, blank, non-string, or unreadable error fields.
  • 🧪 Added service and component regression tests for localized errors, server diagnostics, pagination, create failures, revoke failures, confirmations, and request headers.
  • 🧪 Updated existing error expectations to use Could not load API keys.

Concerns

  • Review findings: unavailable from the supplied evidence.
  • Test execution status: unavailable from the supplied evidence.
  • Completion status: unavailable from the supplied evidence.

@vercel

vercel Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
drydock-website Ready Ready Preview Sep 16, 2026 6:50pm UTC
drydockdemo-website Ready Ready Preview Sep 16, 2026 6:50pm UTC

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e1489e5a-24a3-4dd0-bec1-e00bb6dc929f

📥 Commits

Reviewing files that changed from the base of the PR and between 212d5a4 and eb78409.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md
📒 Files selected for processing (4)
  • ui/src/services/api-key.ts
  • ui/tests/components/ConfigApiKeysTab.errors.spec.ts
  • ui/tests/services/api-key-errors.spec.ts
  • ui/tests/services/api-key.spec.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The API-key service now uses localized fallback messages for load, create, and revoke failures. It ignores missing, non-string, and blank server error values and includes the HTTP status in fallback messages. New service and component tests cover supported locales, malformed responses, network failures, pagination, creation, revocation, confirmation, retained rows, and request headers.

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to eb784

The localized fallback handling and its covered error paths do not show a concrete unresolved regression. The change is ready to merge.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/v1.8-api-key-error-locales

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@scttbnsn

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

Please review head eb78409. This is frontend error-message localization only. Authentication, permissions, credential handling, request headers and endpoints are unchanged. Check fallback handling, preservation of server diagnostics, locale selection and the service/component regression tests. The full local gate passed on this exact head; hosted coverage has a failure under investigation.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

@scttbnsn I will perform a full review of #1235 at eb78409e2d369da90babf100dcd0f04a4f3c9215. I will check fallback handling, server diagnostic preservation, locale selection, and service/component regression coverage.

✅ Action performed

Full review finished.

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed the exact head after CodeRabbit completed its source review with no actionable findings. The local gate and hosted Playwright passed. Required CI is rerunning after the runner shutdown.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttbnsn
scttbnsn enabled auto-merge (squash) September 16, 2026 19:28
@scttbnsn
scttbnsn merged commit b73fb7b into dev/v1.8 Sep 16, 2026
54 of 56 checks passed
@scttbnsn
scttbnsn deleted the fix/v1.8-api-key-error-locales branch September 16, 2026 19:39
scttbnsn added a commit that referenced this pull request Nov 2, 2026