Skip to content

fix: align generation activity tooltip and localization - #44

Open
morehardy wants to merge 1 commit into
0xsline:mainfrom
morehardy:codex/fix-generation-activity-tooltip-i18n
Open

fix: align generation activity tooltip and localization#44
morehardy wants to merge 1 commit into
0xsline:mainfrom
morehardy:codex/fix-generation-activity-tooltip-i18n

Conversation

@morehardy

@morehardy morehardy commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the Generation Activity trigger's native title tooltip with the same immediate tooltip and hover treatment used by the other top-bar action icons
  • extract the former private TBtn implementation into a shared TopBarIconButton, including badge support for active generation jobs
  • localize the Generation Activity panel's labels, relative timestamps, canonical job statuses, and retry classifications
  • add a regression check and wire toolbar tooltip checks into pretest

Why

The Generation Activity icon was implemented separately from the adjacent top-bar controls. It used the browser-native title tooltip and had no matching foreground/background hover feedback, so its interaction looked and behaved differently.

The component called t() for some labels, but the English dictionary did not contain those keys. Several helper paths also returned hard-coded Chinese strings, including relative timestamps and legacy job summaries. As a result, switching the UI to English still showed Chinese text.

Implementation

  • introduce TopBarIconButton as the single implementation for right-side top-bar icon actions
  • reuse it from both TopBar and GenerationActivity, while preserving the active-job count badge
  • normalize wire job statuses through the existing normalizeStatus() helper before displaying localized labels
  • route retry classes and relative-time placeholders through the existing i18n system
  • add an accessible localized label to the panel close button
  • verify that Generation Activity uses the shared control, avoids native title, contains all required English keys, and formats relative time through i18n

User impact

The Generation Activity icon now has the same immediate tooltip and hover feedback as adjacent actions. The task panel displays consistent Chinese or English copy after changing the interface language, without changing persisted job data or job lifecycle behavior.

Validation

  • npm run verify:toolbar-tooltips — passed
  • npm run lint — passed
  • git diff --check — passed
  • rebased onto upstream main at 94f1ba9; GitHub reports the PR as mergeable with no conflicts
  • npm run build — currently blocked by an upstream type error outside this PR: firstChunkMs is not present in the declared timing type used by src/agent/api-runtime.ts
  • npm test — all checks reached before src/media/mobileImport.verify.ts passed; the suite then stopped because the installed heic-to/csp module does not export the requested heicTo symbol. The affected file is unchanged by this PR.

@morehardy
morehardy marked this pull request as ready for review August 5, 2026 15:08
@morehardy
morehardy force-pushed the codex/fix-generation-activity-tooltip-i18n branch from 7681800 to ec41a84 Compare August 5, 2026 23:18
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