Skip to content

#886 Localisation: Session Chat screen and timeline text - #955

Closed
ivanfenenko wants to merge 1 commit into
feature/886-l10n-filesfrom
feature/886-l10n-sessionchat
Closed

ivanfenenko wants to merge 1 commit into
feature/886-l10n-filesfrom
feature/886-l10n-sessionchat

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stage 2 extraction slice for #886 (Localisation): Session Chat screen and timeline text now comes from the string files on both platforms. Part of an unmerged stack: #933 → #952 → this pull request. Not compiled yet: verification happens once for the whole stack.

  • Scope: the Session Chat overflow menu and top bar, the delete, rename and fork dialogs, the fork result dialog, the attachment-source sheet, the Commands tiles and sheet titles, composer suggestion empty states and labels, the timeline loading, empty and error states, the activity, overflow and scroll-to-end pills, the background work pill, the retry countdown, the provider-response Copy button, and message accessibility hints.
  • Keys: 122 new keys under session_chat.* and timeline.*, in one block per file. Reused common.cancel. No new common.* keys. Placeholders are positional and counts use plurals. Server content stays an argument (session titles, agent names, server error text, the retry link label).
  • English is unchanged. Where the two apps already say different things, each wording gets its own key, so every key has the same English on both platforms. These are the fork result text ("“X” is ready." / "Forked as “X”.", "Stay here" / "Stay") and the collapsed activity pill's accessibility label. A few keys are used on only one platform today.
  • Android Screen Models: SessionChatBackgroundWorkPill now holds labelText and accessibilityText as UiText. label and accessibilityLabel remain as @Composable getters, so the background work sheet (another slice) still compiles unchanged. forkErrorMessage and the slash suggestion badge are UiText; server errors use UiText.verbatim. SessionChatActivityPillCopy and SessionChatNavigationCopy return UiText; layout() takes a UiTextLookup. The file suggestion subtitle ("File") is now added by the view.
  • iOS: dialogs, menus, sheets and states use catalog keys or OpenCodeText(LocalizedStringResource(key, defaultValue:)). Pill copy, background work, navigation pill, tool-result file counts and the fork empty-title error use String(localized:defaultValue:), because those components take String. The retry link label is now .verbatim (server content).
  • Commands tiles: labels and descriptions are mapped in the view on both platforms. ClientSlashAction in the domain is unchanged.

Checks

  • node scripts/check-string-keys.mjs: pass (235 shared keys).
  • xmllint --noout on strings.xml and python3 -m json.tool on the catalog: pass. Key order and formatting in the catalog match what Xcode writes.
  • xcrun swiftc -parse on every changed Swift file: pass.
  • node scripts/check-hardcoded-text.mjs: total 928 → 820. What is left in the files in scope is listed under Risks.
  • Tests updated: the Android background-work, pill-slot, hidden-request and ViewModel tests compare resolved English through EnglishStrings. New test-only helpers are in BackgroundWorkPillText.kt. A new pill-text test was added on each platform.
  • No Gradle or Xcode build, and no unit tests run (as agreed).

Evidence

Verified once for the whole stack.

Issue

#886

Risks / Follow-ups

  • Not compiled. Spots to watch at integration:
    • Android @Composable property getters on SessionChatBackgroundWorkPill.
    • SessionChatActivityPillCopy.layout(item, lookup) callers.
    • forkErrorMessage: UiText? flowing through SessionChatViewModel.
    • iOS SessionChatMessageActionsGestureModifier.accessibilityLabel is now a LocalizedStringResource.
    • iOS Text(LocalizedStringResource) in the retry card and the fallback bubble.
  • Left hardcoded:
    • Timeline projector (SessionChatTimelineBlocks on both platforms): tool card titles (Shell, Patch, Plan, LSP…), step labels and Explored counts. These build String fields used in many files and about 100 test assertions. Converting them needs UiText in the block models; that should be its own slice. The same applies to SessionChatActivityCard, SessionChatNoticeCopy, SessionCompactChrome and SessionMessageSyncChrome. On iOS this includes SessionChatToolGroupView's title/subtitle.
    • "Couldn't commit revert." travels as SessionError.Http.message into the send failure. It needs the failure path to carry UiText.
    • iOS .unlocalized in SessionChatView whose text comes from other areas:
      • attachment drop summary
      • composer model notice
      • side-question unsupported notice
      • rename error from SessionInfo
      • Move to worktree copy
    • Dictation: "Microphone access is off" is shared with the feedback sheet and an Android design-system component.
    • Todos pill: the iOS "\(completed)/\(total)" label is numbers only; the check flags it by mistake.
    • Android ToolResultPresentation.kt file counts: the timeline.tool_result.files_* keys exist but are only used on iOS so far.
  • Key parity: some keys are present on both platforms but used on one, because the English already differed per platform or the other side is out of scope.
  • gitleaks is not installed locally; the Secret Scan workflow covers it.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@ivanfenenko
ivanfenenko force-pushed the feature/886-l10n-sessionchat branch from 9d6dd70 to fdb3f86 Compare November 2, 2026 16:14
@ivanfenenko
ivanfenenko changed the base branch from feature/886-l10n-connection to feature/886-l10n-files November 2, 2026 16:15
@ivanfenenko ivanfenenko mentioned this pull request Nov 3, 2026
14 tasks done
@ivanfenenko
ivanfenenko marked this pull request as ready for review November 3, 2026 15:59

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review: no finding that 2+ of 3 passes agreed on.

opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.099 · 1 pass(es) stopped early

@ivanfenenko ivanfenenko mentioned this pull request Nov 3, 2026
@ivanfenenko

Copy link
Copy Markdown
Collaborator Author

Superseded by #975, which combines the whole #886 localisation stack into one pull request against main. Review and merge happen there.

@ivanfenenko ivanfenenko closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant