Repository navigation
fix(work-view): decide the refresh text language once from the owner's asks (#5660) - #5669
Conversation
…s when the text-language setting is empty With CLAUDE_MEM_WORK_VIEW_TEXT_LANGUAGE unset, resolveTextLanguage returned null and no refresh question named a language, so each step guessed the owner's language from the slice of asks its own question holds. A focus batch could guess a different language than the reviews did: on an en-US system all six suggested focus areas came out in Spanish (thedotmack#5660). resolveTextLanguage now falls back to the system locale's language, named through the runtime's own locale data (Intl), still never detected by a model and still costing no extra agent call. The setting keeps priority, an invalid value is never used, and when neither names a language the skills' own Language rule applies as before. The goals step is unchanged.
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
…he locale Rework for landing (CS-2026-11-10). The system locale misnames the language for anyone whose asks differ from their OS locale, and a launchd/systemd daemon often has no LANG at all, so it traded one wrong-language bug for another. The request-progress skill's rule is "the language most of the owner's asks are written in, decided once". - The grouping answer gains a "language" field. The grouping question already reads the asks, so this costs no extra model call. - With CLAUDE_MEM_WORK_VIEW_TEXT_LANGUAGE empty, the first valid grouping answer (checked against LANGUAGE_NAME) becomes the run's language and is named in every later review, focus and story question; the setting still wins. It is recorded in work-view/text-language.json, so a run with nothing to group reuses it. With neither, the skill's own rule applies. - The locale fallback is gone; docs, the settings comment and SKILL.md describe the new rule. - Tests: the grouping language reaches every later question (fails on main), the setting beats it, a non-language value is never used, and a recorded language is reused. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019FbY8dn1wxYSP3vpxpSTnS
|
Thanks @0xABCD01, you found the right root cause: with the setting empty, each grouping, review, focus and story question guessed the language from its own slice, so a focus batch could land in Spanish. I pushed a rework to your branch instead of the locale fallback, because the system locale misnames the language for anyone whose asks don't match their OS (a de-DE machine with English asks), and a launchd/systemd daemon often has no
I'll merge once CI is green. |
|
Thanks — "decided once from the owner's asks" is a better rule than my locale fallback, and the daemon-with-no-LANG case is a fair point I hadn't weighed properly. Appreciate you pushing the rework straight onto the branch; I'll leave it as is from here. |
|
Merged, thank you @0xABCD01! With |
Fixes #5660.
On an en-US system with no
CLAUDE_MEM_WORK_VIEW_TEXT_LANGUAGEset, all six suggested focus areas came out in Spanish while the run's other text was in English.Cause:
resolveTextLanguagereturnednullwhen the setting was empty, so no refresh question named a language. Grouping, review, focus and story run as separate agents that each see only their own input — a focus step sees one batch of requests, or only the Other bucket — so each step guessed the owner's language from its own slice, and the focus steps guessed Spanish. The comment on the setting already names this risk: steps "left to the skill's rule … could each pick a different language". The setting was the only remedy.Change: when the setting does not name a language,
resolveTextLanguagenow falls back to the system locale's language, named from the runtime's own locale data (Intl.Locale/Intl.DisplayNames, e.g. es-ES → "Spanish"). The existing rule sentence then names that language in every grouping, review, focus and story question, so one run writes in one language. Nothing is detected by a model and no extra agent call is made; the question count is unchanged. A valid setting still wins, an invalid value is still never used, the goals step still keeps the skill's own rule, and when neither the setting nor the locale names a language the previous behavior (skills pick) is unchanged.Notes:
CLAUDE_MEM_WORK_VIEW_TEXT_LANGUAGE, which overrides the locale.tests/work-view/plus the agent-runner extraction tests pass (310), typecheck is clean. Two existing language tests were updated to the new default and new cases cover the locale naming.