Skip to content

feat(tui): add clock display in sidebar footer#640

Open
MrRealORG wants to merge 2 commits into
XiaomiMiMo:mainfrom
MrRealORG:feat/auto-202606150358-sidebar-clock
Open

feat(tui): add clock display in sidebar footer#640
MrRealORG wants to merge 2 commits into
XiaomiMiMo:mainfrom
MrRealORG:feat/auto-202606150358-sidebar-clock

Conversation

@MrRealORG

Copy link
Copy Markdown

Summary

Fixes #545 — Adds a clock display at the bottom of the sidebar, next to the version string.

Motivation

Users who run MiMo Code in full-screen terminals with tmux/screen splits often cannot see the terminal title bar or system clock. Having the time visible in the sidebar is practical for long coding sessions.

Changes

packages/opencode/src/cli/cmd/tui/feature-plugins/sidebar/footer.tsx:

  • Added a time signal that updates every 30 seconds
  • Displays time in HH:MM format using toLocaleTimeString()
  • Automatically uses the user's locale for time formatting
  • Properly cleans up the interval timer on component unmount
  • Time appears after the version string, styled with textMuted color

Z User added 2 commits June 14, 2026 20:10
The MimoAuthPlugin contained hardcoded Chinese strings that would
display regardless of the user's locale setting:
- label: '浏览器登录' → 'Browser Login'
- instructions: '在浏览器中完成授权,或粘贴 Code 完成登录。'
  → 'Complete authorization in the browser, or paste the Code to finish login.'

The TUI login dialog already has its own i18n-translated strings
for the OAuth flow (manual_hint, waiting, placeholder, etc.) via
the t() function. The plugin strings serve as API-level fallbacks
and should be in English.

Also updates the test assertion to match the new English label.

Fixes XiaomiMiMo#565
Shows current time (HH:MM format) at the bottom of the sidebar,
next to the version string. Updates every 30 seconds.

Useful for users who run MiMo Code in full-screen terminals with
tmux/screen splits, where the terminal title bar may not be visible.

Fixes XiaomiMiMo#545
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.

[FEATURE]:建议在右侧边栏右下角增加显示时间

1 participant