Commit Graph

273 Commits

Author SHA1 Message Date
nesquena-hermes
f3f23abd4e fix(csp): allow external https images in img-src — closes #608
Co-authored-by: Hermes Agent <agent@hermes>
2026-04-16 23:34:21 -07:00
nesquena-hermes
d6267f4d31 chore: CHANGELOG v0.50.75 + version badge (#620 test isolation fix) (#621)
Co-authored-by: Hermes Agent <agent@hermes>
2026-04-16 23:06:16 -07:00
nesquena-hermes
a2ea15b557 fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613)
Squash-merges PR #613. Adds favicon to the app (was missing entirely — blank tab icon). 1371 tests passing, QA harness green. Review by independent agent (see PR comments). Follow-up commit addresses all three reviewer notes: hoisted _STATIC_MIME to module scope, fixed charset=utf-8 being appended to binary MIME types, confirmed correct MIME types on all three favicon formats.

Co-authored-by: tiansiyuan <tiansiyuan@users.noreply.github.com>
2026-04-16 20:11:02 -07:00
nesquena-hermes
2484409b7a fix: HERMES_WEBUI_DEFAULT_WORKSPACE wins over settings.json; trust DEFAULT_WORKSPACE subtree (#610)
Squash-merges PR #610. Fixes Docker workspace env var override and trust validation (issue #609). 1367 tests passing, QA harness green. Reviewed by independent agent (see PR comments).
2026-04-16 18:09:16 -07:00
nesquena-hermes
d5bea959a5 chore: CHANGELOG v0.50.70 + version badge (post-merge meta for PR #587 by @aronprins)
Post-merge meta commit for PR #587 by @aronprins. CHANGELOG entry for v0.50.70 + version badge bump. No code changes. 1361 tests passing.
2026-04-16 14:14:55 -07:00
Aron Prins
9a3dc10d93 feat: redesign chat transcript + fix streaming/persistence lifecycle — v0.50.70 (PR #587 by @aronprins)
Redesign chat transcript + fix streaming/persistence lifecycle — v0.50.70

Squash-merges PR #587 by @aronprins (Aron Prins). Full credit to @aronprins for all feature and fix work.

Transcript redesign: unified --msg-rail/--msg-max CSS variables, user turns as tinted cards, thinking cards as bordered panels, error card treatment, day-change separators, composer fade.

Approval/clarify as composer flyouts: cards slide up from behind composer top, overflow:hidden + translateY clip prevents travel visibility, focus({preventScroll:true}).

Streaming lifecycle: DOM order user→thinking→tool cards→response, no mid-stream jump. Live tool cards inserted before [data-live-assistant].

Persistence: reasoning attached before s.save(), _restore_reasoning_metadata on reload, role=tool rows preserved in S.messages, CLI-session tool-result fallback.

Workspace panel FOUC fix: [data-workspace-panel] set at parse time.

Docs: docs/ui-ux/index.html + two-stage-proposal.html.

Maintainer additions (433b867): CHANGELOG v0.50.70, version badge, usage badge loop simplification.

Reviewed and approved by @nesquena (independent review). 1361 tests passing.
2026-04-16 14:04:42 -07:00
nesquena-hermes
25d38a467a fix: Docker UID/GID auto-detect from workspace mount + message count tests — v0.50.69
Fixes #569: docker_init.bash auto-detects WANTED_UID/WANTED_GID from the mounted /workspace UID at Phase 1, before usermod remaps the container user. On macOS, host UIDs start at 501 — the default 1024 caused an empty workspace. Guards against root (0). Fallback 1024 preserved. Closes #579: topbar already correctly filters tool messages; sidebar count removed in #584. Regression tests added. Reviewed and approved by @nesquena. 1347 tests passing.
2026-04-16 12:19:25 -07:00
nesquena-hermes
6c5911a79f fix: light theme dialogs, workspace panel snap, model cache staleness, docker-compose docs — v0.50.68
Fixes four bugs + locks in one existing fix with regression tests.

Closes #594 (light theme dialogs), #576 (workspace panel snap), #585 (stale model list after CLI change), #567 (docker-compose macOS UID docs). Confirms and tests #590 (transcribing spinner already present).

Reviewed and approved by @nesquena. 1340 tests passing.
2026-04-16 11:55:18 -07:00
nesquena-hermes
54e83fb8b6 feat: support subpath mount via reverse proxy — v0.50.67 (PR #588 by @vcavichini)
Squash-merges feature from PR #588 by @vcavichini. Dynamic <base href> injection + api() helper slash-stripping enables deploying hermes-webui behind a reverse proxy at any subpath without configuration. Also fixes pre-existing bug: api/upload was using location.origin instead of location.href (closes #596). Co-authored-by: vcavichini <vcavichini@users.noreply.github.com>
2026-04-16 11:20:08 -07:00
nesquena-hermes
8a1bc134fa chore: CHANGELOG + v0.50.66 version badge (post-merge for PR #582)
Docs/version-only follow-up for PR #582. Nathan authorized full merge pipeline in session.
2026-04-16 10:21:39 -07:00
nesquena-hermes
db1240dde5 fix: HERMES_WEBUI_SKIP_ONBOARDING unconditional + guard against config writes + 10 skipped tests fixed — v0.50.65
Fixes two SKIP_ONBOARDING bugs and eliminates 10 permanently-skipped integration tests.

- SKIP_ONBOARDING=1 now honoured unconditionally (no longer gated on chat_ready)
- apply_onboarding_setup refuses to write config/env files when SKIP_ONBOARDING is set
- TestMediaEndpointIntegration (6) and TestOnboardingGateIntegration (4): collection-time
  skip guards removed; server reachability checked at runtime with fail() not skip()

Tests: 1327 passed, 0 skipped.

Admin merge — self-built PR, Nathan authorized full merge process in session.
2026-04-16 10:19:10 -07:00
nesquena-hermes
2efc1fb8e8 chore: CHANGELOG + v0.50.64 badge + Today-bucket test (post-merge follow-up for #584)
Admin merge — docs-only follow-up: CHANGELOG entry, version badge v0.50.64, one new test. No code logic. Nathan authorized end-to-end merge in session.
2026-04-16 10:09:51 -07:00
Aron Prins
a9a22ee751 fix(sidebar): declutter session items — drop message count, model, and source-tag badges (v0.50.64)
Squash-merges PR #584 by @aronprins.

Drops the meta row (message count, model slug, source-tag badge) from every sidebar session item. Each session now renders as a single title line — visible session count roughly doubles at typical viewport height.

Changes merged verbatim from contributor branch, plus maintainer additions:
- CHANGELOG entry for v0.50.64
- Version badge bump to v0.50.64
- New test: test_relative_time_today_bucket (closes minor coverage gap from code review)

Co-authored-by: aronprins <aronprins@users.noreply.github.com>
2026-04-16 09:58:53 -07:00
nesquena-hermes
a512f2020e feat: MCP toolsets in WebUI + onboarding fix for non-standard providers — v0.50.63
Squash-merges PR #578 (rebased from #574 by @renheqiang + #575 by @nesquena-hermes). MCP server toolsets now included in WebUI sessions; onboarding wizard no longer fires for non-standard providers. 1331 tests pass. Nathan override applied for self-built #575.
2026-04-15 23:39:07 -07:00
nesquena-hermes
45426bdcd1 fix: make hermes-agent source optional in Docker startup — v0.50.62
Squash-merges PR #577 (rebased from #573 by @nesquena). Docker hard-exit on missing hermes-agent → graceful warning. 1319 tests pass. Fixes #570.
2026-04-15 23:22:26 -07:00
nesquena-hermes
360379136b feat(upload): support Excel and Word file attachments — v0.50.61
Squash-merges PR #571 (rebased from contributor PR #566 by @renheqiang). Adds .xls/.xlsx/.doc/.docx to the file picker and MIME map. 1319 tests pass.
2026-04-15 22:43:31 -07:00
nesquena-hermes
e4fec9e4e0 test: skip onboarding config tests when PyYAML unavailable, remove duplicate definition — v0.50.60
Merges #564. Adds PyYAML skip guards to two onboarding tests. Removes duplicate _HAS_YAML/_needs_yaml block. No production code changed. 1319 tests pass.
2026-04-15 20:45:42 -07:00
nesquena-hermes
8cf10b152b fix: false Connection lost message after settled stream disconnect — v0.50.59
* fix: 避免流结束后误插入 Connection lost 错误

* chore: bump version to v0.50.59, update CHANGELOG

---------

Co-authored-by: fiver <fiver@example.com>
Co-authored-by: Hermes Agent <agent@hermes>
2026-04-15 20:25:31 -07:00
Hermes Agent
4f79b3f941 chore: bump version to v0.50.58, update CHANGELOG 2026-04-16 01:32:15 +00:00
Hermes Agent
8864001941 chore: bump version to v0.50.57, update CHANGELOG 2026-04-16 00:07:08 +00:00
Hermes Agent
215f7eff4d fix(review): 4 issues found in agent review of PR #535
BUG-1 (CRITICAL): messages.js line 522 — mismatched quote in
setComposerStatus('Reconnecting…') caused JS syntax error on the
reconnect path.

BUG-2 (HIGH): messages.js line 491 — broken template literal
'\\n\\n*{d.hint}*' restored to '\n\n*${d.hint}*'. Error hint
text was non-functional (missing $ prefix and escaped newlines).

BUG-3 (HIGH): messages.js — showApprovalCard(pending, pendingCount),
_approvalCurrentId, and approval_id in respondApproval() were removed,
regressing the simultaneous approval queue fix from PR #546. Restored
all three, including the '1 of N pending' counter and poll passthrough.

BUG-4 (LOW): api/streaming.py — MiniMax thinking delimiter regex
missing closing pipe: <|channel> -> <|channel|> in both
_strip_thinking_markup() and _looks_invalid_generated_title().

ALSO: test_issue487b.py docstring changed to raw string to fix
DeprecationWarning for invalid escape sequence '\s'.
2026-04-16 00:00:22 +00:00
franksong2702
a4ce9ccc99 fix(messages): keep inflight tool-call regression intact 2026-04-15 23:59:36 +00:00
Frank Song
8ff3fd9442 feat(sessions): auto-summarize provisional session titles 2026-04-15 23:59:36 +00:00
Hermes Agent
ec44a437a2 fix: version badge v0.50.54→v0.50.55, add CHANGELOG entry for v0.50.55
The v0.50.55 release (Docker honcho fix) missed the index.html version
badge bump and CHANGELOG entry. Caught during post-session QA sweep.
2026-04-15 23:40:11 +00:00
Hermes Agent
27d3f9543e chore: bump version to v0.50.54, update CHANGELOG 2026-04-15 23:04:06 +00:00
Hermes Agent
7bfba201da chore: bump version to v0.50.53, update CHANGELOG 2026-04-15 22:13:14 +00:00
Hermes Agent
25fae902d3 chore: bump version to v0.50.52, update CHANGELOG 2026-04-15 19:42:11 +00:00
Hermes Agent
d6b58b9ce0 fix: queue simultaneous approval requests per session (fixes #527)
Changes _pending from a single overwriting dict value to a list,
so parallel tool calls each get their own approval slot.

api/routes.py:
- Wraps submit_pending() to append to a list and assign a stable
  approval_id (uuid4) to each entry.
- _handle_approval_pending() returns the first queued entry plus
  pending_count so the UI can show '1 of N'.
- _handle_approval_respond() pops by approval_id (falls back to
  oldest entry for backward-compat with old clients).
- Backward-compat: legacy single-dict values in _pending are
  handled without crashing.

static/messages.js:
- respondApproval() sends approval_id in the POST body.
- showApprovalCard() accepts pendingCount, shows '1 of N pending'
  counter when multiple approvals are queued.
- _approvalCurrentId tracks the approval_id of the displayed card.
- Poll loop passes pending_count to showApprovalCard.

static/index.html:
- Adds approvalCounter element for the '1 of N' display.

tests/test_approval_queue.py:
- 14 tests: static-analysis checks (Python + JS + HTML),
  functional tests that inject two simultaneous approvals and
  verify both are surfaced and independently resolvable.
2026-04-15 19:16:14 +00:00
Hermes Agent
ce4e01ea92 chore: bump version to v0.50.51, update CHANGELOG 2026-04-15 19:06:54 +00:00
Hermes Agent
03df7132d0 chore: bump version to v0.50.50, update CHANGELOG 2026-04-15 19:02:43 +00:00
armorbreak001
50d7d1cf88 fix(themes): swap Prism syntax-highlighting theme on light/dark switch
The Prism CSS was hardcoded to prism-tomorrow (dark-only), so code
blocks stayed dark even when switching to Light or other non-dark themes.

- Add id='prism-theme' to the <link> element for runtime lookup
- In _applyTheme(), swap href between prism-tomorrow (dark) and
  prism (light) based on resolved theme
- Skips DOM write when the target href is already active

Fixes #505
2026-04-15 19:01:52 +00:00
Hermes Agent
e077d110c3 chore: bump version to v0.50.49, update CHANGELOG 2026-04-15 16:46:53 +00:00
vansour
74dee6b665 fix: respect IME composition in Enter submit flows 2026-04-15 23:12:47 +08:00
Hermes Agent
d3251fdbfd chore: bump version to v0.50.48, update CHANGELOG 2026-04-15 08:04:24 +00:00
Hermes Agent
31196d42af fix: show toast when model is switched during active session (#419)
When a user switches the model via the model picker while a session has
existing messages, a toast now informs them: 'Model change takes effect
in your next conversation'. This prevents confusion when the model
dropdown updates visually but the running conversation continues with
the original model.

Implementation: 4-line addition in modelSelect.onchange in boot.js,
after the existing provider-mismatch warning. Checks S.messages.length
(the reliable in-memory array) and guards showToast with typeof.

Synthesized from PRs #516 (armorbreak001), #517 and #518 (cloudyun888).
Placement follows #518's correct boot.js approach. Reference corrected
from S.session.messages to S.messages (always initialized by loadSession).

4 new tests in test_provider_mismatch.py::TestModelSwitchToast.

Co-authored-by: armorbreak001 <armorbreak001@users.noreply.github.com>
Co-authored-by: cloudyun888 <cloudyun888@users.noreply.github.com>
2026-04-15 08:04:03 +00:00
Hermes Agent
178251a5c0 chore: bump version to v0.50.47, update CHANGELOG 2026-04-15 07:52:23 +00:00
Hermes Agent
44a544362f feat: add System (auto) theme following OS prefers-color-scheme (#504)
Synthesized from PRs #506, #509, #514 (all by armorbreak001 and cloudyun888).

Implementation:
- static/index.html: flicker-prevention head script resolves 'system' to
  'dark'/'light' via matchMedia before first paint. Adds 'System (auto)'
  as first option in theme picker. onchange calls _applyTheme().
- static/boot.js: new _applyTheme(name) helper — resolves 'system' via
  matchMedia, sets data-theme, registers a MQ change listener so the UI
  tracks OS switches live. loadSettings() now calls _applyTheme() instead
  of direct data-theme assignment.
- static/commands.js: adds 'system' to valid /theme command names,
  delegates apply to _applyTheme().
- static/panels.js: _settingsThemeOnOpen reads from localStorage (preserves
  'system' string, not the resolved 'dark'/'light'). _revertSettingsPreview
  calls _applyTheme() so reverting to 'system' correctly re-enables OS tracking.
- static/i18n.js: cmd_theme description now lists 'system' first in all 5
  locales (en, es, de, zh-Hans, zh-Hant).

Design choices vs submitted PRs:
- No separate system-theme.js file (unnecessary indirection).
- matchMedia listener does NOT POST to /api/settings (OS can change rapidly;
  persisting on every OS switch would hammer the server).

Co-authored-by: armorbreak001 <armorbreak001@users.noreply.github.com>
Co-authored-by: cloudyun888 <cloudyun888@users.noreply.github.com>
2026-04-15 07:45:20 +00:00
Hermes Agent
36830e3cd1 fix: invalidate cron skill picker cache on form open and after skill save (#502)
Two complementary cache-busting strategies for the stale cron skill picker:

1. On cron form open (toggleCronForm): always null _cronSkillsCache before
   fetching, so freshly created skills are immediately visible without a
   page reload. Previously the cache was only populated once and never
   invalidated.

2. On skill save (submitSkillSave): null _cronSkillsCache after a successful
   write so the next cron form open is forced to re-fetch. Mirrors the
   existing _skillsData=null pattern one line above.

Fixes: #502
Co-authored-by: armorbreak001 <armorbreak001@users.noreply.github.com>
2026-04-15 07:43:00 +00:00
Hermes Agent
0b96f08b3e chore: bump version to v0.50.46, update CHANGELOG 2026-04-15 07:35:25 +00:00
Frank Song
ccba2f5c01 feat: harden clarify dialog flow and refresh recovery 2026-04-15 13:10:50 +08:00
nesquena-hermes
45d3dc0f68 fix: suppress N/A source_tag in session list sidebar (fixes #429)
fix: suppress N/A source_tag in session list sidebar (fixes #429)
2026-04-14 15:15:05 -07:00
Hermes Agent
7b9f08c774 fix: suppress N/A source_tag in session list sidebar (#429)
- sessions.js _formatSourceTag(): return null for unrecognised tags
  instead of raw string — prevents legacy 'N/A' values from surfacing
- sessions.js metaBits push: guarded with _stLabel null check so only
  known platform labels appear in the session metadata line
- sessions.js [SYSTEM:] title fallback: drop raw s.source_tag middle
  term, fall back directly to 'Gateway' for unknown sources

7 new tests in test_issue429.py.
1 updated test in test_sprint40_ui_polish.py (new guarded push pattern).

Closes #429
2026-04-14 22:14:31 +00:00
Hermes Agent
2810233af4 fix(renderer): extend _al_stash to include <img> tags, preventing autolink from mangling src= URLs
Bug: the autolink pass stashed <a> tags (via _al_stash) before running,
but did not stash <img> tags. When ![alt](url) was converted to an <img>
tag by the image pass, the subsequent autolink regex matched the URL
inside src="..." and wrapped it in <a href="...">url</a>, producing
src="<a href="...">url</a>" — a completely broken image source.

Fix: extend the _al_stash regex from:
  (<a\b[^>]*>[\s\S]*?<\/a>)
to:
  (<a\b[^>]*>[\s\S]*?<\/a>|<img\b[^>]*>)

This stashes both <a> and self-closing <img> tags before autolink runs,
then restores them after, so the URL inside src= is never touched.

Adds 7 regression tests in tests/test_issue487b.py.
2026-04-14 22:09:36 +00:00
Hermes Agent
887893ecd1 fix: code-in-table CSS sizing + markdown image rendering (#486, #487)
- static/style.css: add td code / th code rules (font-size 0.85em,
  padding 1px 4px, vertical-align baseline) for both .msg-body and
  .preview-md to fix cramped inline code in table cells (#486)

- static/ui.js inlineMd(): add image pass (![alt](url) → <img
  class=msg-media-img>) running while _code_stash is active (protects
  image syntax inside backticks), add _img_stash (\x00G) to shield
  rendered <img> src= from autolink, add img to SAFE_INLINE (#487)

- static/ui.js renderMd() outer: add image pass before outer link pass
  for images in plain paragraphs, add img to SAFE_TAGS allowlist (#487)

- tests/test_issue486_487.py: 45 new tests covering CSS source checks,
  JS source structure, rendering behaviour, and combination edge cases
  (code + image + link in same table cell, image inside code span, etc.)

Closes #486, closes #487
2026-04-14 21:52:34 +00:00
Hermes Agent
d8ab326b73 fix(renderer): fix two remaining renderMd issues found during browser QA
1. ** inside  was corrupted** — the outer bold/italic pass at line 480 ran
   after the outer backtick→<code> pass at line 457, causing esc() to corrupt <code> tags
   into &lt;code&gt; inside <strong>. Fix: add _ob_stash to protect <code> tags from
   the outer bold/italic pass.

2. **Table cells with [label](url) produced double <a> tags** — the outer [label](url) pass
   ran BEFORE the table regex, converting links to <a> tags in the raw table source.
   Then inlineMd() processed those <a> tags again and autolink re-linked the URL inside
   href="...". Fix: moved the outer link pass to AFTER the table pass so table cells
   get their links from inlineMd() only, which has its own _link_stash protection.
2026-04-14 21:22:20 +00:00
Hermes Agent
2343dc1d85 docs: v0.50.43 CHANGELOG + version bump (test count TBD) 2026-04-14 21:15:02 +00:00
Hermes Agent
eb7ec5bac3 fix(renderer): backtick code spans inside bold/italic no longer get esc'd 2026-04-14 21:14:00 +00:00
Hermes Agent
b673006b7f fix(renderer): address review feedback on PR #475 2026-04-14 21:13:53 +00:00
Nathan Esquenazi
5a79dd0dc9 fix: remove double semicolon in inlineMd link stash restore 2026-04-14 21:13:34 +00:00
Hermes Agent
0a570ada87 fix(renderer): prevent double-linking and esc() corruption in renderMd() 2026-04-14 21:13:33 +00:00