Skip to content

#886 Localisation: Session Chat timeline and tool text - #969

Closed
ivanfenenko wants to merge 1 commit into
feature/886-l10n-changesfrom
feature/886-l10n-timeline
Closed

ivanfenenko wants to merge 1 commit into
feature/886-l10n-changesfrom
feature/886-l10n-timeline

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

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

  • Scope:
    • The timeline projector: tool card titles and subtitles, tool group titles, step titles and details, Explored labels and counts, chip error lines, receiving-arguments placeholders, Declined and Stopped.
    • Activity card summaries, idle text and sheet captions.
    • Timeline notices, the compaction marker, the Syncing pill and the tool-result sheet (titles, tool labels, file counts, line ranges).
    • Failure captions and the failure action labels in the tool detail sheet.
    • The shell status line and the stop-failed message.
    • Revert and fork-rename messages, and "Couldn't commit revert.".
    • On iOS also: the dictation "Microphone access is off" message and the todos pill.
  • Keys: 127 new keys under tool.*, timeline.* and session_chat.*, in one block per file. No new common.* keys.
    • Reused: session_chat_sheet.activity.tools_so_far, session_chat_sheet.activity.stopped, timeline.failure.copy, timeline.step.no_commentary, timeline.tool_result.files_* (now used on Android too) and feedback.dictation.microphone_off.
    • Counts are plurals, so "1 files" is gone ("first 1 lines" now reads "first 1 line").
    • Lists use the timeline.list_separator / timeline.list_comma patterns instead of concatenation.
  • Android Screen Models: block, step, chip, activity, notice and tool-result models hold UiText. Server content (tool names, paths, commands, agent and model names, output, server errors) is UiText.verbatim. The Session Chat snackbar, actionErrorMessage / actionSuccessMessage, syncingIndicatorLabel and the shell stopError are UiText. The tool group route saves UiText through a new UiTextSerializer.
  • iOS: OpenCodeText is main-actor isolated, and the projector builds blocks off the main actor. So timeline models hold a new nonisolated TimelineText (.localized(LocalizedStringResource) / .verbatim(String), with .resolved and a main-actor .openCode). Snackbar and shell copy that is still String uses String(localized:defaultValue:).
  • One wording per key:
    • Bare step verbs follow iOS: "Reading…", "Running…", "Loading skill…" (Android said "Reading", "Running", "Loading skill").
    • A settled shell step with no command reads "Ran command" on both (iOS showed "Shell").

Checks

  • node scripts/check-string-keys.mjs: pass (848 shared keys).
  • xmllint --noout on strings.xml and python3 -m json.tool on the catalog: pass. Catalog formatting matches what Xcode writes (sorted, byte-identical round trip).
  • xcrun swiftc -parse on every changed Swift file, tests included: pass.
  • node scripts/check-hardcoded-text.mjs: total 77 → 52. What remains in scope is listed under Risks.
  • Tests updated to compare resolved English: Android through .english(), iOS through .resolved or a new english(_:) test helper. Fixtures use verbatim text. No assertion was dropped.
  • 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 NavigationKeys.SessionToolGroup uses type-use @Serializable(with = UiTextSerializer::class) on nullable UiText? fields.
    • The @Serializable ToolResultPresentation now has getter-only UiText properties.
    • The snackbar's toOpenCodeSnackbarMessage() is now @Composable.
    • onSendFailed now carries UiText. App text goes to the snackbar; server errors stay the timeline error.
    • iOS TimelineText equality relies on LocalizedStringResource being Equatable.
    • iOS implicit .app(…) / .verbatim(…) members in ternaries and if expressions, in SessionChatTimelineBlocks.swift and ToolResultPresentation.swift.
  • Components still take String (OpenCodeToolCallCard, OpenCodeToolChip, OpenCodeStepRail, OpenCodeActivityCard, OpenCodeTimelineNotice on both platforms). Call sites resolve text right before passing it in. When the design-system slice switches them to localisable text, those call sites should pass the text through instead.
  • Left hardcoded:
    • Working indicator, Android: "Compacting…" stays a const on SessionCompactChrome.STATUS_LABEL, because session status labels (and "Idle", "Thinking") are plain strings end to end in the session status chrome. iOS resolves it from the catalog.
    • iOS SessionChatView (10 findings): these come from other feature models on both platforms: the attachment drop summary, the composer model notice, the side-question notice, the rename error, and the Move to worktree menu, sheet and rows.
    • Agent fallback: "General" / "Task" is kept as an agent name (content).
    • Durations: thought durations ("6.4s", "2m 7s") are unchanged.
    • Fork titles: "Forked session" / "Fork of …" are unchanged.
    • Snackbar sources: messages that other regions send to the Session Chat snackbar as String are shown verbatim (MCP load error, branch copied, chip-timeline notices, composer and worktree notices).
  • Platform-only keys: some keys exist on both platforms but are used on one today:
    • iOS only: timeline.activity.waiting_for_you, tool.unknown.*, timeline.step.tool_named, session_chat.todos.progress.
    • Android only: timeline.notice.accessibility.
  • Stale text after a language change: the tool group route resolves its text when shown, so it follows a language change. iOS snackbar strings resolve when posted.
  • gitleaks is not installed locally; the Secret Scan workflow covers it.

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

@ivanfenenko
ivanfenenko force-pushed the feature/886-l10n-timeline branch from 809a67d to 9eca558 Compare November 2, 2026 23:16
@ivanfenenko
ivanfenenko changed the base branch from feature/886-l10n-settings to feature/886-l10n-changes November 2, 2026 23:16
@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
@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

@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 2 passes agreed on.

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

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