Skip to content

refactor: show Overview, Devices overview, and plan usage in Fluent messages - #924

Merged
penso merged 6 commits into
mainfrom
i18n/panels-overview-usage
Oct 31, 2026
Merged

penso merged 6 commits into
mainfrom
i18n/panels-overview-usage

Conversation

@penso

@penso penso commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Part of Phase 2 of docs/i18n.md (string migration), following #880's patterns. This PR covers three of the activity bar's surfaces: the Overview, the Devices overview tab, and plan usage (status bar segments, the panel a segment opens, and the Usage section). Orchestrator, Security, Review, and Automations follow in their own PRs.

  • overview.ftl, devices-overview.ftl, and usage.ftl hold every string these surfaces show. overview.rs, devices_overview.rs, usage.rs, and pull_request.rs (which shows no text) are marked // i18n: migrated.
  • Plurals: hand-built plurals ("1 agent"/"3 agents", "1 device · 2 agents", "4 agents · 1 working") are Fluent selectors.
  • Times: Overview's "4m"/"2h"/"now", snooze times ("Mon 09:00", with the weekday chosen in the message), and usage countdowns ("2h 53m", "Updated 5m ago") are messages.
  • herdr-usage values: usage/text.rs renders the crate's typed values through messages: limit kinds, countdowns, pace ("11% in reserve · Lasts until reset"), "N% left", and balances ("$12.30 of $50.00"). Text a service reports, or that herdr-usage writes for one (fact and share titles, balance labels, count units, named windows, setting help), still shows as is. docs/i18n.md lists it under What is left.
  • Overview summary: each stat is one message ("{ $count } need you"). The count is still drawn bold by finding Fluent's isolated number, so word order is free.
  • Tables of message IDs: snooze presets and the device table's columns name message IDs, checked by a test with i18n::takes.
  • Leak tests: each surface has an en-XA leak test (overview/tests/en_xa.rs, devices_overview/tests/en_xa.rs, usage/tests/en_xa.rs). i18n::leak_tests::uncut drops the cut copies GPUI shapes while measuring a truncated element, which the recorder otherwise reports as leaks. Text from modules other agents are migrating (sidebar status names, the browser's "Devices" tab title) is passed as data for now.
  • Agent prompts stay English, since they are written for the agent. Errors keep their $error placeables.

Visible change: the Overview host card's CPU/MEM label width is now a minimum instead of fixed, since under en-XA the label ran under its bar. English looks as before.

Screenshots

Native macOS captures, debug build, against an isolated sandbox daemon (no agents). Under en-XB the Devices search field still shows en-XA: it was built before the switch, as docs/i18n.md documents.

en-XA (accented, longer) en-XB (right to left)
Overview (empty, host column) Overview en-XA Overview en-XB
Usage section Usage en-XA Usage en-XB
Devices overview Devices en-XA Devices en-XB

The Overview en-XA capture is after the host-meter fix; before it, "[ĆƤŨŨ]" and "[ḾḖḖḾ]" ran under their bars.

QA

  • just format
  • just ci on 646e499e (macOS arm64): passed, 14,938 Rust tests, 0 failed; check-i18n: 1171 messages in 36 files valid and used
  • en-XA leak tests: Overview (empty page, list, shelves, snooze menu), Devices overview (lanes and an open row), usage (status bar, the panel for a report, Keychain needed and denied, setup, and the section)
  • Native en-XA and en-XB check of the empty Overview, the Usage section, and the Devices overview (screenshots above)
  • Native check with agents running: Overview rows, the snooze menu, and Closed/Snoozed/Settled shelves under en-XA and en-XB
  • Native check of the status bar's usage segments and panel with a signed-in agent (Claude, Codex) under en-XA
  • English: Overview, Devices overview, and usage read as before

just lint-linux/lint-windows were not run: no cfg gates changed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BFavh5KCVyLoRNDUMJmjfN

penso and others added 2 commits October 30, 2026 01:08
…essages

Part of Phase 2 of docs/i18n.md: the activity bar's Overview, the Devices
overview tab, and plan usage (status bar segments, the panel they open,
and the Usage section) take their text from overview.ftl,
devices-overview.ftl, and usage.ftl, and their modules are marked
migrated.

- Hand-built plurals (agent and device counts, report counts) are Fluent
  selectors; times ("4m", "Mon 09:00", "2h 53m") are messages, with the
  weekday chosen in the message.
- usage/text.rs renders herdr-usage's typed values (limit kinds,
  countdowns, pace, balances) through messages; what a service names
  itself stays as reported, and docs/i18n.md lists the text herdr-usage
  still writes.
- The Overview summary stresses each count inside one message rather than
  splicing the number beside a fragment.
- Snooze presets and the device table's columns name message IDs, checked
  by tests.
- Each surface has an en-XA leak test. i18n::leak_tests gains `uncut`,
  which drops the cuts GPUI shapes while measuring a truncated element.

English text is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFavh5KCVyLoRNDUMJmjfN
The CPU and MEM labels on a host card had a fixed 30 px width, so a
longer translation ran under its bar (seen under en-XA). The width is now
a minimum.

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

netlify Bot commented Oct 30, 2026

Copy link
Copy Markdown

👷 Deploy Preview for herdr-ui processing.

Name Link
🔨 Latest commit 646e499
🔍 Latest deploy log https://app.netlify.com/projects/herdr-ui/deploys/6ae4c28f019e8bb4365c626a

@netlify

netlify Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for herdr-ui canceled.

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

@penso

penso commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

just ci ran locally and passed on aa84f7d (macOS arm64).

@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Moves Overview, Devices overview, and plan-usage text into Fluent messages.

  • The Overview shows translated labels, counts, and times.
  • The Devices overview shows translated labels, counts, and device states.
  • Plan usage labels and typed values follow the selected language.
  • Pseudo-locale leak checks ignore clipped text shapes.

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

penso and others added 2 commits October 30, 2026 14:19
Review follow-ups for the Overview, Devices overview, and usage
migration:

- The Devices overview's search and the sidebar's device tree search
  format their placeholders again when the language changes
  (`set_placeholder_with`), as Settings' searches do.
- claude-swap's notes on other accounts ("token expired", "disabled")
  come from usage.ftl, chosen by the account's status, which
  herdr-usage now exports as `ClaudeAccountStatus`; a test checks every
  status reads as the crate's English did.
- The leak tests cover OpenAI's daily spend, claude-swap's other
  accounts, and the Overview's Closed shelf with Reopen and Forget.

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

penso commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai review — the leak-test finding is addressed in 0e4a6a8 (OpenAI daily spend, claude-swap's other accounts, and the Overview's Closed shelf).

penso and others added 2 commits October 30, 2026 20:48
…927)

* refactor: show the Security section and its pages in Fluent messages

Part of Phase 2 of docs/i18n.md: the activity bar's Security section,
its list and filter, and an alert's or a report's page take their text
from security.ftl, and security.rs is marked migrated.

- Hand-built plurals (reports in triage, open alerts) are Fluent
  selectors; relative times and dates ("Oct 14, 2026 · 5 h ago") are
  messages, with the month chosen in the message.
- Severity keeps its English label for agent prompts and gains `text()`
  for the window; page tabs keep a stable `id()` for element IDs and
  selectors, so `security-tab-Advisory` becomes `security-tab-advisory`.
- The fix and investigate prompts written for an agent stay English, as
  do upgrade commands and GraphQL queries (`// i18n: data`); docs/i18n.md
  adds agent prompts to what is never translated.
- The orchestrator's Look takes owned labels for icon buttons, toggles,
  and compact buttons.
- An en-XA leak test opens the section with every kind of note, then
  each tab of an alert's and a report's page.

English text is unchanged.

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

* refactor: keep the Security filter's placeholder in the shown language

The filter field is built once per window, so its placeholder kept the
language it was built in. It now formats again when the language
changes (`set_placeholder_with`), as Settings' searches do.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@penso
penso merged commit 71652d3 into main Oct 31, 2026
8 of 22 checks passed
@penso
penso deleted the i18n/panels-overview-usage branch October 31, 2026 17:27
shin1ohno added a commit to shin1ohno/herdr-gpui that referenced this pull request Nov 1, 2026
Brings in upstream's 16 commits, among them the native Herdr Remote app
and one pairing for every machine (sheprd-labs#905), the device picker rebuilt as
unfolding devices (sheprd-labs#939), and the i18n Fluent migrations with exhaustive
error mappings (sheprd-labs#913, sheprd-labs#915, sheprd-labs#924, sheprd-labs#925, sheprd-labs#926, sheprd-labs#941).

Conflicts: upstream's picker, sessions and usage code win; the iPad's
needs are re-applied on top. The iPad's Sessions entry now lives on the
unfolded SSH Herdr 1 device (the old footer button and Page::Sessions
are gone upstream). Every error variant this branch added has a Fluent
message, and the iPad's cloud, update and remote notices say iPadOS
instead of Windows. The local scan never runs on iPad.

On the desktop, the picker and sidebar read the selected device's
connection state from the window, as this branch did before. View-level
iPad picker and Sessions behaviour is type-checked; its pure predicates
run in the host tests.
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