Repository navigation
Conversation
The status pill on every Settings → Integrations card is built from bare string literals inside the JSX call, so it stays English with a language pack active while the description right beside it is translated. stablyai#11826 fixed the CLI source-control cards; these are the ones it did not reach. - task trackers (Linear and friends): Connected, Not connected - Jira: Connected, Not connected - token-configured hosts (Bitbucket, Azure DevOps, Gitea): Connected, Configured, Unavailable, Not configured, Optional setup, Auth failed The three token-provider cards carried near-identical ternaries, so their copy moved into `tokenProviderStatusLabel()` — one source for states they share, and it keeps the file under the 400-line gate. Gitea passes `optional: true` because it works read-only without a token, which is why its unconfigured state reads "Optional setup" rather than "Not configured". Same blind spot as before: the coverage audit inspects JSX attributes and object properties, not conditional expressions handed to a prop, so `verify:localization-coverage` stays green while the strings ship untranslated.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughIntegration cards now localize connection-status labels. Token-based source-control cards use a shared helper for configured, unavailable, optional, required, and authentication-failure states. English locale entries were added for Jira and Bitbucket, and the Jira credential description was updated. Vitest coverage verifies the required English labels. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/renderer/src/components/settings/token-source-control-status.ts (1)
9-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider a stricter type for
statusinstead ofstring.The
statusfield accepts any string. Each of the three callers (Bitbucket, Azure DevOps, Gitea) supplies a status value from its own preflight-status hook. A stricter union type here would let the compiler catch a mismatched or misspelled status literal at any call site, instead of silently falling through to the "Auth failed" default.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a9ae4dce-c4ef-48cb-9ab9-d94a2cf7fb33
📒 Files selected for processing (6)
src/renderer/src/components/settings/jira-integration-card.tsxsrc/renderer/src/components/settings/task-tracker-integration-cards.tsxsrc/renderer/src/components/settings/token-source-control-integration-cards.tsxsrc/renderer/src/components/settings/token-source-control-status.tssrc/renderer/src/i18n/integration-card-status-localization.test.tssrc/renderer/src/i18n/locales/en.json
Greptile SummaryThis PR localizes the status pill labels (
Confidence Score: 5/5Safe to merge — purely a string-localization fix with no behavioural changes to card logic, credentials, or network paths. All conditional branches in Files Needing Attention: No files require special attention. The most complex file is
|
| Filename | Overview |
|---|---|
| src/renderer/src/components/settings/token-source-control-status.ts | New helper that consolidates Bitbucket/Azure DevOps/Gitea status label logic; correctly preserves all prior conditional branches including Gitea's optional-setup path via the explicit optional flag. |
| src/renderer/src/components/settings/token-source-control-integration-cards.tsx | Replaces three inline ternary chains with calls to tokenProviderStatusLabel(); behavioral parity is preserved for all three cards including hasAccount/Boolean() wrapping for Azure DevOps and Gitea. |
| src/renderer/src/components/settings/jira-integration-card.tsx | Wraps the two-branch connected ternary with catalog-keyed translate() calls; no logic changes. |
| src/renderer/src/components/settings/task-tracker-integration-cards.tsx | Same two-branch connected ternary localized with catalog keys under the task.tracker.integration.cards namespace; no logic changes. |
| src/renderer/src/i18n/integration-card-status-localization.test.ts | New catalog-integrity test covering all 10 added keys; the dot-split lookup() traversal is correct for the nested JSON structure used by the i18n catalog. |
| src/renderer/src/i18n/locales/en.json | Adds 10 semantic keys (statusConnected, statusNotConnected, etc.) at the correct JSON paths matching the namespaces used in code; no existing keys modified. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[tokenProviderStatusLabel] --> B{configured?}
B -- yes --> C{hasAccount === false?}
C -- yes --> D["translate(statusConfigured) → 'Configured'"]
C -- no/undefined --> E["translate(statusConnected) → 'Connected'"]
B -- no --> F{status === 'unavailable'?}
F -- yes --> G["translate(statusUnavailable) → 'Unavailable'"]
F -- no --> H{status === 'not-configured'?}
H -- yes --> I{optional?}
I -- yes --> J["translate(statusOptionalSetup) → 'Optional setup'"]
I -- no --> K["translate(statusNotConfigured) → 'Not configured'"]
H -- no --> L["translate(statusAuthFailed) → 'Auth failed'"]
subgraph Callers
M[Bitbucket: configured=connected, no hasAccount]
N[Azure DevOps: configured, hasAccount=Boolean-account]
O[Gitea: configured, hasAccount=Boolean-account, optional=true]
end
M --> A
N --> A
O --> A
Reviews (1): Last reviewed commit: "fix(i18n): localize the integration card..." | Re-trigger Greptile
…ring Review follow-up. The helper accepted `status: string`, which let any value through and gave no signal when a provider gains a state. It now takes the union the pane actually produces — each provider's own status plus `'unavailable'`, which the cards substitute when the runtime cannot report at all.
Every card under Settings -> Integrations built its status pill from bare literals inside the JSX call, so the pill stayed English beside a translated description. audit-localization-coverage.mjs inspects JSX attributes and object properties, not conditional expressions handed to a prop, so the gate stayed green while the strings shipped untranslated. The three token-configured cards share tokenProviderStatusLabel(); Gitea passes optional: true because it works read-only without a token, which is why its unconfigured state reads Optional setup rather than Not configured. Co-authored-by: Evgenii <kumiro@me.com>
|
Merged into Closing this in favour of that. Thank you for the fix, and sorry it took as long as it did to get through. |
Every card under Settings -> Integrations built its status pill from bare literals inside the JSX call, so the pill stayed English beside a translated description. audit-localization-coverage.mjs inspects JSX attributes and object properties, not conditional expressions handed to a prop, so the gate stayed green while the strings shipped untranslated. The three token-configured cards share tokenProviderStatusLabel(); Gitea passes optional: true because it works read-only without a token, which is why its unconfigured state reads Optional setup rather than Not configured. Co-authored-by: Evgenii <kumiro@me.com>
Summary
Every card under Settings → Integrations builds its status pill from bare string literals inside the JSX call, so the pill stays English with a language pack active while the description right beside it is translated.
#11826 fixed the CLI source-control cards. These are the ones it did not reach:
Connected,Not connectedConnected,Not connectedConnected,Configured,Unavailable,Not configured,Optional setup,Auth failedSame blind spot as before:
audit-localization-coverage.mjsinspects JSX attributes and object properties, not conditional expressions handed to a prop, sopnpm verify:localization-coveragestays green while the strings ship untranslated.Shared helper for the token providers
The three token-configured cards carried near-identical ternaries. Their copy moved into
tokenProviderStatusLabel():One source for states they share, and it keeps
token-source-control-integration-cards.tsxunder the 400-line gate. Gitea passesoptional: truebecause it works read-only without a token — that is why its unconfigured state reads Optional setup rather than Not configured, and the distinction is now explicit instead of duplicated.10 keys added by
sync:localization-catalog; no existing key was removed or reworded.Screenshots
No visual change in English — every string keeps its exact wording.
With a Russian language pack on current
main, the pills readNot connected,Not configuredandOptional setupwhile everything around them is translated:Note the second screenshot:
GitHubalready readsПодключеноandGitLabreadsНе установлено— those came from #11826 — whileBitbucket,Azure DevOpsandGiteabelow them are still English. This PR closes that gap.Testing
pnpm lintpnpm typecheckpnpm testpnpm buildsrc/renderer/src/i18n/integration-card-status-localization.test.ts— 10 assertions pinning the catalog contract, so a card that goes back to a bare literal drops its key fromen.jsonand fails here.pnpm test: 44 085 passed, 79 skipped. Three files fail on this machine —ssh-posix-command-wrapper(3),agent-exec-handler(2) andupdater(1). All three fail identically on a cleanmainwith this branch stashed, so they are pre-existing environment failures.AI Review Report
Reviewed with Claude Opus 5.
Account scopedetails block below each pill is untouched.optionalflag rather than being flattened into the shared path — worth a look during review, since that is the one place where the three cards genuinely differ.verify:localization-catalogandverify:localization-extractionpass.Security Audit
Reviewed with Claude Opus 5. No new input handling, command execution, path handling, auth, secrets, dependency, or IPC surface. The diff converts literals into catalog lookups; no credential or token value reaches the changed code — the cards receive only booleans and a status string. No follow-up needed.
Notes
Found while maintaining a full Russian language pack — smwbev/orca-russian, 11 721 strings, 98.2 % of
en.json. Translating the whole catalog is what surfaces strings that never reach it.Related: #11826 (merged, same class of defect), #12105 (open, date formatting), #12106 (open, plural forms).
X: @silentmegawatt · GitHub: @smwbev