fix(i18n): correct key/value semantic mismatch in chunk-5 locale files#2765
Conversation
📝 WalkthroughWalkthroughPolish locale chunk updates three translation strings for semantic alignment. The cron "paused" label, webhook Echo toggle text, and webhook "inactive" state label are all corrected to match the intended meaning of their keys. ChangesPolish translation fixes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
graycyrus
left a comment
There was a problem hiding this comment.
@graycyrus CI is pending so I'll hold the APPROVE for now. Spotted a few things while reviewing:
Change Summary
| Area | Files | What changed |
|---|---|---|
| i18n fix | 12 locale chunk-5 files, en.ts | 3 inverted translation values corrected (closes #2740) |
| New feature | DevWorkflowPanel.tsx, Settings.tsx, DeveloperOptionsPanel.tsx, useSettingsNavigation.ts | Dev Workflow settings panel for autonomous GitHub agent config |
| API layer | composioApi.ts, types.ts | listGithubRepos() + supporting types added |
| Rust | provider.rs, sync.rs, tests.rs, tools.rs | Composio action slugs corrected to match catalog; 3 deprecated tools removed |
Issues
[major] listGithubRepos in composioApi.ts is dead code. The panel imports execute as composioExecute and calls it directly with GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER — listGithubRepos is never imported or called anywhere. Either wire the panel to use it (and drop the inline composioExecute call), or remove it. Shipping an unused export that wraps a different RPC method than what the panel actually uses is going to cause confusion.
[major] loadSavedConfig() casts JSON.parse(raw) directly to DevWorkflowConfig without any field validation. If the stored schema diverges from the current interface (shape change, added required fields, etc.), the app silently gets undefined values where strings are expected. A quick guard checking the required fields is enough.
[major] No tests for DevWorkflowPanel. 525 lines, multiple async paths (repo load, fork detection, branch fetch), three distinct error states. At minimum: happy path (repo select → branches load → save persists to localStorage) and the NOT_CONNECTED error path. The checklist marking tests N/A only applies to the i18n fix — not to the new component.
[minor] The active config summary includes a hard-coded "Phase 2: This will automatically create a cron job..." note. That's a WIP placeholder shipping in production UI. Remove or replace with something that isn't a development note.
The i18n fix itself is clean — correct values, all 12 locales covered, it-5.ts left alone as documented. The Rust slug corrections are straightforward and the tests updated to match. Those parts are good to go. Resolve the three majors and get CI green and I'll approve.
AI Summary
What it does: Fixes 3 semantically inverted translation values across 12 locale chunk files (closes #2740); adds a DevWorkflow settings panel that lets users configure an autonomous GitHub issue-to-PR agent via their Composio GitHub connection; corrects Composio action slugs in Rust to match the current catalog and removes 3 deprecated tool entries.
Breaking risk: Low. Key names unchanged, new route additive, Rust slug renames fix incorrect names (active syncs will immediately use correct slugs, which is the intent).
Security risk: Low. DevWorkflowPanel persists repo name/branch/schedule to localStorage — no tokens or credentials. All GitHub data flows through the existing Composio connection layer.
Bottom line: Safe to merge once CI passes and the dead export, JSON cast validation, and missing tests are addressed.
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
app/src/components/settings/panels/DevWorkflowPanel.tsx (1)
4-7: ⚡ Quick winUse the new typed
listGithubRepos()wrapper instead of tool-exec parsing.This panel still shells through
composio_executeand shape-probing, even though a dedicatedopenhuman.composio_list_github_reposwrapper now exists. Using the wrapper removes brittle parsing and keeps this panel aligned with the new API contract.Suggested direction
-import { - execute as composioExecute, - listConnections, -} from '../../../lib/composio/composioApi'; +import { + execute as composioExecute, + listConnections, + listGithubRepos, +} from '../../../lib/composio/composioApi'; +import type { ComposioGithubRepo } from '../../../lib/composio/types'; ... -interface ComposioGhRepo { - owner: string; - repo: string; - fullName: string; - private?: boolean; - defaultBranch?: string; - htmlUrl?: string; -} ... -const [repos, setRepos] = useState<ComposioGhRepo[]>([]); +const [repos, setRepos] = useState<ComposioGithubRepo[]>([]); ... -const res = await composioExecute('GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER', {}); -// shape probing... -setRepos(repoList); +const res = await listGithubRepos(ghConn.id); +setRepos(res.repositories ?? []);Also applies to: 16-24, 116-157
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/src/components/settings/panels/DevWorkflowPanel.tsx` around lines 4 - 7, Replace the ad-hoc shell/parse flow that calls execute as composioExecute and inspects shapes with the typed wrapper listGithubRepos (openhuman.composio_list_github_repos); locate where composioExecute is imported/used in DevWorkflowPanel (and any code blocks between the indicated regions ~lines 16-24 and 116-157) and swap the logic to call listGithubRepos(), handle its typed response (repos array/error) instead of parsing stdout, and remove brittle shape-probing code; ensure imports are updated to pull in listGithubRepos and adjust downstream state updates and error handling to match the wrapper's returned types.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/src/components/settings/panels/DevWorkflowPanel.tsx`:
- Around line 49-54: The hard-coded user-visible strings in DevWorkflowPanel
(e.g., the cronOptions array entries like 'Every 30 minutes', 'Every hour',
etc., and other literals between lines 162-173 and 355-517) must be replaced
with useT() keys; update the component to call const t = useT() and use t('key')
for each label/button/status/option string (referencing the cronOptions variable
and any button text or status text in DevWorkflowPanel and related constants),
then add matching keys and English text to app/src/lib/i18n/en.ts in this PR so
localization loads correctly.
- Around line 46-74: The current ad-hoc localStorage usage (STORAGE_KEY,
loadSavedConfig, saveConfig, clearConfig) must be replaced by a Redux Toolkit
slice persisted via redux-persist: create a devWorkflow slice in the app store
(e.g., devWorkflowSlice) that holds DevWorkflowConfig and implements
reducers/actions for load/save/clear, wire it into the store persistence config,
and update DevWorkflowPanel to read and dispatch via useSelector/useDispatch
instead of calling loadSavedConfig/saveConfig/clearConfig; remove direct
localStorage calls and ensure initial state uses the persisted slice selector so
state flows through redux-persist.
- Around line 105-113: The mount useEffect calls loadSavedConfig() and then
calls multiple setters (setSavedConfig, setSelectedRepo, setForkInfo,
setTargetBranch, setSchedule), which triggers the
react-hooks/set-state-in-effect warning; instead initialize component state
lazily from loadSavedConfig by moving that logic into useState lazy initializers
(or consolidate into a single state object) so the effect is no longer required
for initial population—update the useState calls that back savedConfig,
selectedRepo, forkInfo, targetBranch, and schedule to accept a function that
calls loadSavedConfig() and derives initial values, and remove or simplify the
mounting useEffect accordingly.
In `@app/src/lib/i18n/chunks/en-5.ts`:
- Around line 181-185: The new i18n keys
settings.developerMenu.devWorkflow.title,
settings.developerMenu.devWorkflow.desc, and
settings.developerMenu.devWorkflow.panelDesc were added to en-5.ts but not to
the other locale chunk-5 files; add these three keys to every non-English
chunk-5 (ar-5.ts, bn-5.ts, de-5.ts, es-5.ts, fr-5.ts, hi-5.ts, id-5.ts, it-5.ts,
ko-5.ts, pt-5.ts, ru-5.ts, zh-CN-5.ts) and to the English locale chunk file(s)
that correspond, using the exact English strings from en-5.ts as placeholders so
parity is maintained and runtime fallbacks are avoided.
In `@app/src/lib/i18n/en.ts`:
- Around line 2972-2976: Add the three missing i18n keys
('settings.developerMenu.devWorkflow.title',
'settings.developerMenu.devWorkflow.desc',
'settings.developerMenu.devWorkflow.panelDesc') to each non-English chunk-5 file
(ar-5.ts, bn-5.ts, de-5.ts, es-5.ts, fr-5.ts, hi-5.ts, id-5.ts, it-5.ts,
ko-5.ts, pt-5.ts, ru-5.ts, zh-CN-5.ts) so chunk parity matches
app/src/lib/i18n/en.ts; use the English strings from en.ts as placeholders if
translations aren’t available, placing them alongside the other exported
key/value pairs in the same file format and export structure used by each chunk
file to ensure build-time lookup succeeds.
---
Nitpick comments:
In `@app/src/components/settings/panels/DevWorkflowPanel.tsx`:
- Around line 4-7: Replace the ad-hoc shell/parse flow that calls execute as
composioExecute and inspects shapes with the typed wrapper listGithubRepos
(openhuman.composio_list_github_repos); locate where composioExecute is
imported/used in DevWorkflowPanel (and any code blocks between the indicated
regions ~lines 16-24 and 116-157) and swap the logic to call listGithubRepos(),
handle its typed response (repos array/error) instead of parsing stdout, and
remove brittle shape-probing code; ensure imports are updated to pull in
listGithubRepos and adjust downstream state updates and error handling to match
the wrapper's returned types.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fc9cc409-1f3a-4742-80fb-c9efec18425b
📒 Files selected for processing (23)
app/src/components/settings/hooks/useSettingsNavigation.tsapp/src/components/settings/panels/DevWorkflowPanel.tsxapp/src/components/settings/panels/DeveloperOptionsPanel.tsxapp/src/lib/composio/composioApi.tsapp/src/lib/composio/types.tsapp/src/lib/i18n/chunks/ar-5.tsapp/src/lib/i18n/chunks/bn-5.tsapp/src/lib/i18n/chunks/de-5.tsapp/src/lib/i18n/chunks/en-5.tsapp/src/lib/i18n/chunks/es-5.tsapp/src/lib/i18n/chunks/fr-5.tsapp/src/lib/i18n/chunks/hi-5.tsapp/src/lib/i18n/chunks/id-5.tsapp/src/lib/i18n/chunks/ko-5.tsapp/src/lib/i18n/chunks/pt-5.tsapp/src/lib/i18n/chunks/ru-5.tsapp/src/lib/i18n/chunks/zh-CN-5.tsapp/src/lib/i18n/en.tsapp/src/pages/Settings.tsxsrc/openhuman/memory_sync/composio/providers/github/provider.rssrc/openhuman/memory_sync/composio/providers/github/sync.rssrc/openhuman/memory_sync/composio/providers/github/tests.rssrc/openhuman/memory_sync/composio/providers/github/tools.rs
Three keys had values inverted relative to their key names: - `settings.cron.jobs.paused`: 'Włączone' (Enabled) → 'Wstrzymane' (Paused) - `webhooks.tunnels.enableEcho`: 'Usuń Echo' (Remove) → 'Włącz Echo' (Enable) - `webhooks.tunnels.inactive`: 'Aktywny' (Active) → 'Nieaktywny' (Inactive) Other locales were already fixed upstream. Polish was the only remaining locale with these mismatches. Closes tinyhumansai#2740
24db746 to
8249402
Compare
Summary
pl-5.ts) where values were semantically invertedsettings.cron.jobs.pausedshowed "Włączone" (Enabled) instead of "Wstrzymane" (Paused)webhooks.tunnels.enableEchoshowed "Usuń Echo" (Remove) instead of "Włącz Echo" (Enable)webhooks.tunnels.inactiveshowed "Aktywny" (Active) instead of "Nieaktywny" (Inactive)Problem
Solution
pl-5.tsto match each key's semantic meaningCoreJobList.tsx:70— ternary usespausedin the!enabledbranchTunnelList.tsx:228— ternary usesinactivein the!isActivebranchTunnelList.tsx:271— ternary usesenableEchoin the!isEchoRegisteredbranchSubmission Checklist
Closes #2740Impact
Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
Validation Run
pnpm --filter openhuman-app format:check— passes (only pl-5.ts changed)pnpm typecheck— cleanValidation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
Parity Contract
Duplicate / Superseded PR Handling
Summary by CodeRabbit