refactor(desktop): localize relative times in the v2 workspace list, board and terminal dropdown
What & why
Follow-up to #9051. Three v2 surfaces got their compact age label from the v1 helper getRelativeTime(ts, { format: "compact" }) in screens/main/components/WorkspacesListView/utils.ts:
V2WorkspaceRow: the workspace listV2WorkspacesBoardCard: the board viewTerminalSessionDropdown: terminal session ages
That helper builds "5m ago" / "2w ago" as hardcoded English, so these labels stayed English in all 16 locales. AGENTS.md says to use formatCompactRelativeTime instead, and that helper gives the same compact shape through Intl.
The compact branch of getRelativeTime now has no callers, so it goes. The default branch stays for the v1 WorkspaceRow ("Opened 2 hours ago"), which builds an English sentence around it and needs its own i18n pass.
How I tested it
apps/desktoptypecheck passesbun test v2-workspaces WorkspacesListView TerminalPane: 62 pass, 0 failbun run check:i18n: 0 missing in every locale (no catalog changes)biome checkis clean
Opened by the daily cleanup automation.
Summary by cubic
Follows up on #9051 by localizing the compact age labels in the v2 workspace list, board view, and terminal session dropdown, which previously rendered hardcoded English in all locales.
- Switches
V2WorkspaceRow,V2WorkspacesBoardCard, andTerminalSessionDropdowntoformatCompactRelativeTime, which produces the same compact shape throughIntl. - Removes the compact branch from
getRelativeTime; the default branch remains for the v1WorkspaceRow, which builds an English sentence around it and needs its own i18n pass.
Summary by CodeRabbit
- Improvements
- Workspace cards, workspace rows, and terminal session menus now display creation or activity times using compact relative-time labels, making timestamps easier to scan.
- Relative-time labels in the main workspace list continue to use their standard wording, including abbreviated minute and hour labels and longer labels for days, weeks, months, and years.