Skip to content

refactor(i18n): show the pane menu's move to another device in Fluent messages - #938

Merged
penso merged 1 commit into
fix/i18n-errors-after-905from
i18n/rest-menus
Oct 31, 2026
Merged

penso merged 1 commit into
fix/i18n-errors-after-905from
i18n/rest-menus

Conversation

@penso

@penso penso commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Summary

Part of Phase 2 of docs/i18n.md (string migration), following #880's patterns. This covers the last of menu/ and the pane menu's move to another device, whose Teleport steps, review lines, and warnings were still English.

Depends on #937, which makes main build again after #905. This PR targets that branch so the diff shows only this change. GitHub retargets it to main once #937 merges.

  • Steps and review lines: the move's progress line used Step::label, and its "what runs there" line used herdr-remote's describe. Both now go through teleport/text.rs (step, pane), which the Teleport dialog already used, so both moves share teleport.ftl. herdr-remote's English describe functions are gone. SessionReview::resume() exposes the work and action instead.
  • Warnings are typed: herdr-remote used to format each "did not carry over" warning as an English String. It now reports a teleport::Warning enum, keeping its English Display for logs. text::warning shows each variant through a teleport-warning-* message, with $error from localize(). This changes both the pane move's flash and the Teleport dialog's. Carried and Outcome lose Clone/PartialEq, which nothing but one test used, since the warnings now hold their typed causes.
  • Errors: the move's failures, the busy refusal, and the Teleport dialog's failures go through localize() instead of to_string(). The dialog's poll returned Result<Outcome, String> and now keeps teleport::Error.
  • Markers: menu/mute.rs and menu/page.rs show no text and are marked // i18n: migrated. Every non-test file in menu/ is now covered.
  • Leak test: pane_menu/carry/tests/en_xa.rs covers the review (shell into a new worktree, an agent resumed in a fast-forwarded space, a program missing there, session only), progress at several steps, the failure, and the flash for every warning variant.
  • docs/i18n.md: "What is left" drops the menu/ bullet. It now names the menu/ views that still pass errors through to_string(); follow-up PRs switch those to localize().

English reads as before.

Screenshots

None captured. The move dialog only opens for a pane on a host with another connected, scriptable device, reached by right-clicking the pane. I did not post synthetic input on the shared display to get there. The en-XA leak test above covers each stage headlessly. en-XA and en-XB native captures are left to the QA list.

QA

  • just format
  • just ci on 12e19247a (macOS arm64): passed, 16,286 Rust tests, 0 failed. check-i18n: 3,616 messages in 154 files valid and used
  • en-XA leak tests: the move's review (four kinds), progress, and failure, and the flash for each Warning variant. The Teleport dialog's existing en-XA test still passes
  • herdr-remote carry tests: the repository move ends with no warnings, and the session-only review resumes the agent's session
  • Native: right-click a pane on a host with another device connected, then Move to > that device. Under en-XA and en-XB, check the review, progress, and a failure (e.g. stop the destination's daemon mid-review)
  • Native: finish a move whose agent is not installed on the destination, and check the warning flash under en-XA
  • English: the move and Teleport read as before

just lint-linux/lint-windows were not run: no platform cfg gate changed. The new test sits in the carry tests, already gated to Linux and macOS.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BFavh6qHGnTNP5nJXgXoKN

… messages

The move's progress line, the review's "what runs there" line, and the
warnings a finished move flashes were English: the progress came from
`Step::label`, the review from herdr-remote's `describe`, and the
warnings were strings herdr-remote formatted. Failures went through
`to_string()`.

herdr-remote now reports warnings as a typed `teleport::Warning`, with
an English `Display` kept for logs, and the session-only review exposes
the resume it runs instead of describing it. The app renders steps,
pane lines, and warnings through `teleport/text.rs`, which the Teleport
dialog already used, so both moves share one set of messages. Errors in
the move and in the Teleport dialog go through `localize()`, and the
dialog's poll result keeps the typed error instead of a `String`.

`menu/mute.rs` and `menu/page.rs` show no text and are marked migrated,
so every file in `menu/` is now covered. An en-XA leak test covers the
move's review, progress, failure, and every warning's flash.
@penso

penso commented Oct 31, 2026

Copy link
Copy Markdown
Owner Author

just ci ran locally and passed on 12e19247ad577d05bdc9c15e3acd225b01481d68 (macOS arm64): 16,286 Rust tests, 0 failed; check-i18n 3,616 messages valid and used. No extra recipes run (no platform cfg gates changed).

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Moves the pane menu’s progress, review lines, errors, and warnings into Fluent messages.

  • Pane moves now use shared translated review and progress text.
  • Move warnings stay typed until the app displays them.
  • The i18n checklist now marks completed menu migration work.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Move[Pane move or Teleport worker] --> Warning[Typed Warning]
  Warning --> Logs[English Display for logs]
  Warning --> Text[teleport::text::warning]
  Text --> Fluent[Fluent message and localized cause]
  Fluent --> Flash[Warning flash]
Loading

Reviews (1) · Last reviewed commit: "refactor(i18n): show the pane menu's mov..." · Reviewed by Greptile

@penso
penso merged commit ce0741b into fix/i18n-errors-after-905 Oct 31, 2026
19 checks passed
@penso
penso deleted the i18n/rest-menus branch October 31, 2026 19:21
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