Skip to content

fix(#1103): show reasoning chip on page load, not only after session load#1114

Closed
bergeouss wants to merge 1 commit intonesquena:masterfrom
bergeouss:fix/1103-reasoning-chip-initial-visibility
Closed

fix(#1103): show reasoning chip on page load, not only after session load#1114
bergeouss wants to merge 1 commit intonesquena:masterfrom
bergeouss:fix/1103-reasoning-chip-initial-visibility

Conversation

@bergeouss
Copy link
Copy Markdown
Contributor

Thinking Path

  • The reasoning chip wrap starts with style="display:none" in HTML (correct — avoids FOUC)
  • _currentReasoningEffort starts as null — chip stays hidden
  • fetchReasoningChip() is only called from syncReasoningChip(), which is only triggered during session render
  • On first page load with no saved session, or before any session is loaded, the chip never becomes visible
  • Fix: call fetchReasoningChip() during boot initialization, before session load

What Changed

  • static/boot.js: Added fetchReasoningChip() call in the async boot IIFE, just before the saved session load. Guarded with typeof check. The chip now fetches the current reasoning effort from the API and displays it immediately.

Why It Matters

Users couldn't see or interact with the reasoning chip until they loaded a session. This was confusing — the chip appeared only after clicking on a conversation. Now it's visible from the start, showing the current reasoning effort level.

Verification

  • pytest tests/test_issue1103_reasoning_chip_visibility.py -v — 7/7 pass

Model Used

  • Provider: zai
  • Model: glm-5-turbo
  • Tools: Hermes Agent

Closes #1103

…session load

- Call fetchReasoningChip() during boot initialization, before session load
- Chip now visible immediately with 'Default' label, updates when session loads
- Add 7 JS source analysis tests
@nesquena-hermes nesquena-hermes added bug Something isn't working merge soon Reviewed and queued for next release batch labels Apr 26, 2026
@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Clean fix with the right diagnostic path — the reasoning chip staying hidden until a session click was a genuine UX gap.

Code review:

  • Calling fetchReasoningChip() in the boot IIFE before the saved session load is the correct placement — it ensures the chip state is initialized regardless of whether a session exists
  • The typeof fetchReasoningChip === 'function' guard prevents a hard failure if the function isn't available (e.g. in partial-load scenarios)
  • 7 tests covering the visibility behavior is solid coverage

One note: The boot call uses the current API state to determine reasoning effort level. If the server returns a non-null effort (e.g. "medium"), the chip will appear immediately on load — which is the intended behavior. The display:none FOUC guard in HTML is preserved, so there's no flash.

This PR is included in the v0.50.222 batch (#1119). Good contribution @bergeouss!

nesquena-hermes added a commit that referenced this pull request Apr 26, 2026
…SRI (#1119)

* feat: add Korean locale support (#1093, @jundev0001) — 615 keys, copy_failed added

* fix(#1094): provider deletion + false positive API key + threading deadlock (#1102, @bergeouss)

* fix(#1103): show reasoning chip on page load not only after session load (#1114, @bergeouss)

* fix(#1100): remove Prism CSS SRI integrity to fix intermittent blocking (#1115, @bergeouss)

* fix(tests): update copy_failed locale count for 7 locales (Korean added)

* fix: drop unused _cfg_cache import; update locale count comment

---------

Co-authored-by: nesquena-hermes <[email protected]>
@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Absorbed and shipped in v0.50.222 (PR #1119). Closing — thanks!

JKJameson pushed a commit to JKJameson/hermes-webui that referenced this pull request Apr 29, 2026
…SRI (nesquena#1119)

* feat: add Korean locale support (nesquena#1093, @jundev0001) — 615 keys, copy_failed added

* fix(nesquena#1094): provider deletion + false positive API key + threading deadlock (nesquena#1102, @bergeouss)

* fix(nesquena#1103): show reasoning chip on page load not only after session load (nesquena#1114, @bergeouss)

* fix(nesquena#1100): remove Prism CSS SRI integrity to fix intermittent blocking (nesquena#1115, @bergeouss)

* fix(tests): update copy_failed locale count for 7 locales (Korean added)

* fix: drop unused _cfg_cache import; update locale count comment

---------

Co-authored-by: nesquena-hermes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working merge soon Reviewed and queued for next release batch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug/ux: reasoning chip stays hidden on page load — only appears after explicitly setting a level

2 participants