You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the browser settings Session & Cookies → Import Cookies dropdown, the per-browser entries rendered with no space between "From" and the browser name — e.g. FromGoogle Chrome and FromSafari. Only the browser entries were affected; From File… was correct because it is a single literal string.
Root cause: the label was built from two adjacent JSX expressions, {translate(…, 'From')}{browser.label}. JSX collapses the whitespace between sibling expressions, so the rendered text had no separator.
Fix
Switch both import menus to the interpolation pattern already used by the other two import-cookies menus in the app (browser-toolbar-menu-dropdown.tsx, BrowserImportHintButton.tsx):
This keeps the label a single translatable unit and renders From Google Chrome with the correct space. Catalog keys were generated with the repo's own pnpm sync:localization-catalog. The new key is localized in es/ja/ko/zh to match the existing catalog style — and interpolation also fixes a latent word-order bug: ja/ko render "from" as a postposition (から / 에서) that belongs after the browser name, which the old 'From' + label concatenation placed before it.
Files changed:
src/renderer/src/components/settings/BrowserProfileRow.tsx — the menu in the screenshot (2 call sites)
src/renderer/src/components/settings/BrowserUseCookieImportStep.tsx — same latent bug (2 call sites)
src/renderer/src/i18n/locales/{en,es,ja,ko,zh}.json — new interpolated keys via the sync script
Tests
Added src/renderer/src/components/settings/browser-cookie-import-label.test.ts, which asserts the label keeps the space (From Google Chrome / From Safari) and that the catalog entry retains the {{value0}} placeholder, so the label can't silently regress to the concatenated form.
Verification
pnpm typecheck — clean
pnpm lint (incl. localization catalog + coverage) — clean; one pre-existing unrelated warning in src/renderer/src/components/right-sidebar/useGitStatusPolling.ts:161 (untouched file)
New regression test — passes
pnpm test — the cookie/settings/i18n tests pass. 25 failures in 7 unrelated sidebar test files (@vitest-environment happy-dom, window.localStorage undefined) reproduce identically on a clean tree with this change stashed, so they are pre-existing and unrelated — a local-toolchain artifact of running on Node 26 (repo pins Node 24).
Code review summary
Cross-platform: No platform-specific code; pure string/i18n change. Safe on macOS/Linux/Windows.
Browser cookie import labels now use interpolated translation strings with value0 for browser names and source labels in both settings components. Locale files add or update matching From {{value0}} and Last imported from {{value0}} entries across supported languages. A new Vitest file checks translated output spacing and verifies the English catalog stores interpolation templates.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
⚠️ Warning
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name
Status
Explanation
Title check
✅ Passed
The title clearly summarizes the main fix: correcting missing spacing in import-cookies browser labels.
Description check
✅ Passed
The description covers summary, screenshots, testing, and review notes, but lacks explicit Security Audit and Notes sections.
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.
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.
The Import Cookies dropdown rendered browser entries as "FromGoogle Chrome"
and "FromSafari" — JSX collapses whitespace between the adjacent
{translate(…, 'From')}{browser.label} expressions.
Switch both settings menus to the 'From {{value0}}' interpolation pattern
already used by the other import-cookies menus, so the label is a single
translatable unit and renders with the correct space. Interpolation also lets
each locale position the browser name correctly: ja/ko use postpositions
("から"/"에서") that belong after the name, which the old concatenation placed
before it. Localized the new key in es/ja/ko/zh to match the existing catalog
style. Adds a regression test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In the browser settings Session & Cookies → Import Cookies dropdown, the per-browser entries rendered with no space between "From" and the browser name — e.g.
FromGoogle ChromeandFromSafari. Only the browser entries were affected;From File…was correct because it is a single literal string.Root cause: the label was built from two adjacent JSX expressions,
{translate(…, 'From')}{browser.label}. JSX collapses the whitespace between sibling expressions, so the rendered text had no separator.Fix
Switch both import menus to the interpolation pattern already used by the other two import-cookies menus in the app (
browser-toolbar-menu-dropdown.tsx,BrowserImportHintButton.tsx):This keeps the label a single translatable unit and renders
From Google Chromewith the correct space. Catalog keys were generated with the repo's ownpnpm sync:localization-catalog. The new key is localized ines/ja/ko/zhto match the existing catalog style — and interpolation also fixes a latent word-order bug:ja/korender "from" as a postposition (から/에서) that belongs after the browser name, which the old'From' + labelconcatenation placed before it.Files changed:
src/renderer/src/components/settings/BrowserProfileRow.tsx— the menu in the screenshot (2 call sites)src/renderer/src/components/settings/BrowserUseCookieImportStep.tsx— same latent bug (2 call sites)src/renderer/src/i18n/locales/{en,es,ja,ko,zh}.json— new interpolated keys via the sync scriptTests
Added
src/renderer/src/components/settings/browser-cookie-import-label.test.ts, which asserts the label keeps the space (From Google Chrome/From Safari) and that the catalog entry retains the{{value0}}placeholder, so the label can't silently regress to the concatenated form.Verification
pnpm typecheck— cleanpnpm lint(incl. localization catalog + coverage) — clean; one pre-existing unrelated warning insrc/renderer/src/components/right-sidebar/useGitStatusPolling.ts:161(untouched file)pnpm test— the cookie/settings/i18n tests pass. 25 failures in 7 unrelated sidebar test files (@vitest-environment happy-dom,window.localStorageundefined) reproduce identically on a clean tree with this change stashed, so they are pre-existing and unrelated — a local-toolchain artifact of running on Node 26 (repo pins Node 24).Code review summary
translatecalls, no new work in any hot path.browser.labelwas already rendered.Screenshots
Before:
After: