Skip to content

fix(i18n): map the errors #905 added so the app builds again - #937

Closed
penso wants to merge 4 commits into
mainfrom
fix/i18n-errors-after-905
Closed

penso wants to merge 4 commits into
mainfrom
fix/i18n-errors-after-905

Conversation

@penso

@penso penso commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

main at 71652d3e6 does not compile. #905 (iOS app, one pairing for every machine) and #926 (localized errors) merged independently. #905 changed or added several error enums, and #926's mappings don't match them:

  • herdr-automate's Binary, Checksum, and Platform variants moved into host_build::Error. automations::Error now wraps that error as Build.
  • herdr_client::Error::TerminalAttach (terminal_attach::Error)
  • herdr_remote_control::app::Error::Enroll (enroll::Error)
  • the root Error::Nearby (remote::nearby::Error)

Localize matches every variant on purpose, so none of these compiled. Each new enum now gets its own mapping and .ftl file, following #926:

Enum Mapping Messages
host_build::Error i18n/errors/host_build.rs error-host-build.ftl (takes over the three automation messages, now naming the program)
terminal_attach::Error i18n/errors/client/terminal_attach.rs error-client-terminal-attach.ftl
remote::nearby::Error i18n/errors/nearby.rs error-nearby.ftl
enroll::Error i18n/errors/remote_control.rs appended to error-remote-control.ftl

English text is the same as each variant's Display.

QA

  • Per-variant tests for each new enum: en-US matches Display, and the en-XA text is marked. The tests for root, client, automations, and remote control cover the new wrapping variants.
  • just ci on a54057bc4 (macOS arm64): passed, 16,282 tests, 0 failed; check-i18n: 3609 messages in 154 files valid and used
  • just lint-linux / just lint-windows: not run. No cfg gates were touched.

No screenshots: there are no visible changes. Errors read the same in English.

The other i18n branches in progress (menus, pages, chat/browser, window) build on this branch until it lands.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BFavh5CsF9aiVsJURUwioh

penso and others added 2 commits October 31, 2026 10:39
#905 (iOS app, one pairing for every machine) and #926 (localized
errors) merged independently. #905 moved herdr-automate's binary,
checksum, and platform failures into host_build::Error and added
herdr_client::Error::TerminalAttach, remote control's app::Error::Enroll,
and the root Error::Nearby, none of which had a Localize mapping, so main
no longer compiled.

Each new enum gets its own mapping and .ftl file, as #926 set out:
host_build (error-host-build.ftl, which takes over the three automation
messages), terminal_attach (error-client-terminal-attach.ftl), nearby
(error-nearby.ftl), and enroll (in error-remote-control.ftl). Per-variant
tests cover each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFavh5CsF9aiVsJURUwioh
@netlify

netlify Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for herdr-ui canceled.

Name Link
🔨 Latest commit 1cd8521
🔍 Latest deploy log https://app.netlify.com/projects/herdr-ui/deploys/6ae63faf702d3710df782b58

@penso

penso commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

just ci ran locally and passed on a54057b (macOS arm64): 16,282 tests, 0 failed.

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Restores exhaustive error mappings after the earlier error-enum changes.

  • Automation and remote pairing share helper-build error messages.
  • Terminal attach failures now have localized messages.
  • Nearby pairing failures now have localized messages.
  • Host enrollment failures now have localized messages.

No actionable issues were found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "style(i18n): keep the client error mappi..." · Reviewed by Greptile

penso added 2 commits October 31, 2026 12:20
… messages (#938)

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.
…h ago (#940)

Part of Phase 2 of docs/i18n.md. Security, code search, and the
orchestrator each built their own "5 min ago" in Rust; they now read the
shared ago module, so every relative time in the app comes from ago.ftl.

- ago::short ("now", "12m", "5h", "3d", "2w") is the compact form for list
  columns, where the orchestrator's issue and pull request rows used a
  hand-built one.
- Security drops its security-ago-* messages. Its failed reads show through
  localize(), from a new error-security.ftl mapping, instead of to_string().
- Code search's "New 5 min ago" line under a changed file is one message
  per case, not a word joined to a time.
- The orchestrator's facts line under an item's title ("opened 2 h ago",
  "+3 −1 in 2 files") is messages, with a selector for the file count.

English changes: a time between one and two days ago reads "yesterday",
the orchestrator's comments say "just now" and "2 h ago" rather than "now"
and "2h ago", and a one-file pull request says "1 file".
@penso

penso commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #989: #938 and #940 merged into this branch instead of main, and #989 lands them there. This branch's own fix for the errors #905 added was already on main in 3f18590.

@penso penso closed this Nov 1, 2026
@penso
penso deleted the fix/i18n-errors-after-905 branch November 1, 2026 22:02
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