Skip to content

feat: polish nav-row tooltips (delay, localization, persistence) - #30

Merged
luoxuanzao merged 5 commits into
mainfrom
feat/nav-tooltip-polish
Aug 18, 2026
Merged

feat: polish nav-row tooltips (delay, localization, persistence)#30
luoxuanzao merged 5 commits into
mainfrom
feat/nav-tooltip-polish

Conversation

@luoxuanzao

@luoxuanzao luoxuanzao commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Tooltip responsiveness: nav-row buttons (new tab, new conversation, chat history) and tab badges now use the official setTooltip API with a 300ms hover delay via a shared setButtonTooltip helper, instead of Obsidian's 1000ms cold-start default that felt sluggish and inconsistent between adjacent buttons.
  • Credits button consistency: the gauge button now gets a static localized "Usage" tooltip through the same shared helper (aria-label + 300ms) as its neighbors — previously it used a browser title with the live percentage, rendering in a different tooltip style. Only its click behavior (opening the usage popover) differs.
  • Nav-row localization: the hardcoded English strings ("New tab" / "New conversation" / "Chat history" / blank-tab "New Chat") now go through the i18n catalog (commands.newTab reused, new nav group) in all ten locales, so zh-CN etc. no longer show English tooltips next to localized controls.
  • Settings persistence fix (Obsidian 1.13+): the declarative settings base class persists control changes into the plugin data file, but Qoderian loads settings from .qoderian/qoderian-settings.json, so simple controls (language, auto-scroll, other toggles) silently reverted on restart. setControlValue now writes to our own data source per the API contract (single write, no data.json duplicate).
  • Live re-localization: changing the language re-applies localized static text in open chat views (nav tooltips, tab titles, credits button label/panel) via refreshLocalizedChrome() instead of keeping the old language until the view reopens.

Verification

  • npm run typecheck
  • npm run lint
  • npm run test (3341 passed)
  • npm run build
  • npm run release:check
  • npm run audit:prod (0 vulnerabilities)
  • Tested affected qodercli behavior against a real CLI when applicable (UI behavior verified manually in Obsidian)

Safety

  • No credentials, private vault content, internal URLs, or personal paths are included
  • User-visible changes are documented in CHANGELOG.md

luoxuanzao and others added 5 commits August 18, 2026 08:48
Obsidian's native aria-label tooltips use a 1000ms cold-start delay and a
100ms warm window, so hovering across the chat toolbar feels inconsistent
and sluggish compared to common web toolbars (200-700ms initial, ~300ms
warm). Route the navigation buttons (new tab, new conversation, chat
history) and the tab-bar badges through a shared setButtonTooltip helper
built on the official setTooltip API with a 300ms delay, keeping native
rendering and accessibility intact. The obsidian test mock mirrors
setTooltip so unit tests exercise the new path.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
…uttons

The credits usage button set a browser `title` attribute with the live
usage percentage, so its tooltip rendered in the OS/browser style and
read differently from the other nav-row buttons, which use aria-label
and Obsidian's native tooltip. Drop the percentage from the trigger
copy in all ten locales and set a static aria-label ("Usage") instead,
so the gauge button looks and behaves like its neighbors; the popover
panel keeps the detailed numbers.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
The nav-row buttons hardcoded English strings ("New tab",
"New conversation", "Chat history") and getTabTitle fell back to a
hardcoded "New Chat", so non-English locales (e.g. zh-CN) saw English
tooltips next to the localized credits button. Route them through the
i18n catalog: reuse commands.newTab for the new-tab button and add a
nav group (newConversation / chatHistory / newChat) in all ten locales.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
…witch

On Obsidian 1.13+ the declarative settings base class persists control
changes into the plugin data file, but Qoderian loads its settings from
.qoderian/qoderian-settings.json, so simple controls (language,
auto-scroll, and the other toggles) silently reverted on restart. Per
the API contract, override setControlValue to write to our own data
source: mutate the settings bag and save once through saveSettings(),
skipping the base class' data.json write. After a language change,
open chat views also re-apply localized static text (nav-row tooltips,
tab titles, and the credits button label/panel) via a new
refreshLocalizedChrome() instead of keeping the old language until the
view reopens.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
The credits button still wrote its aria-label directly, keeping the
default 1s native delay while the other nav-row buttons use the shared
setButtonTooltip helper (300ms). Use the same helper so the button is
built and hinted exactly like its neighbors; only its click behavior
(opening the usage popover) differs.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
@luoxuanzao
luoxuanzao force-pushed the feat/nav-tooltip-polish branch from 9d8e4fb to b441916 Compare August 18, 2026 00:48
@luoxuanzao
luoxuanzao merged commit 06a629e into main Aug 18, 2026
10 checks passed
@luoxuanzao
luoxuanzao deleted the feat/nav-tooltip-polish branch August 18, 2026 00:51
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