Skip to content

Release FY — v0.51.205 (stage-hi1: workspace syntax highlighting + generated-image rendering + manual title regeneration) - #3363

Merged
nesquena-hermes merged 10 commits into
masterfrom
release/stage-hi1
Jun 2, 2026
Merged

nesquena-hermes merged 10 commits into
masterfrom
release/stage-hi1

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Release FY — v0.51.205 (stage-hi1)

Three contributor feature PRs, deep-reviewed and UX-iterated with maintainer polish. Phase-3 HIGH-tier wave 1.

What's in this release

#3337 — Workspace file-preview syntax highlighting (@mysoul12138)
Prism.js highlighting in the workspace code preview (reuses the Prism already loaded for chat code blocks — no new dependency, degrades to plain text offline). Covers Python/JS/TS/CSS/JSON/SQL/shell/etc.

  • Maintainer fix: prevented a cross-file highlight leak (viewing a .css then a .txt file mis-highlighted the plain text) by stripping stale language-* from the <pre> each render + only highlighting when a language is assigned.
  • Maintainer fix: uniform code background across light + dark (Prism's theme painted the outer <pre> a different shade than the inner <code>, producing a two-tone block on dark).

#3220 — Generated image rendering (@AJV20)
Generated local images render as a clean, prominent inline image (up to 360px, natural aspect ratio) with click-to-zoom lightbox and a hover/focus-revealed Download button overlaid on the image — matching the ChatGPT/Claude/Gemini pattern. (Reworked from the original card design per maintainer UX review.)

#3223 — Manual session title regeneration (@AJV20, closes #3106)
A "Regenerate title" action in the session menu, generating a fresh title from the saved transcript without reordering the sidebar (preserves chronology) and syncing to state.db when Insights sync is enabled.

  • Maintainer fix: scoped the imported-session guard to the regenerate action rather than broadening the shared read-only helper.
  • Maintainer polish: streamlined the whole session action menu to a compact icon + label layout (descriptions → hover tooltips), 44% shorter, and fixed a viewport-clip case on top-anchored rows.

Verification

  • Pre-Opus gate: node -c, ruff forward gate, ESLint runtime gate, merge-marker scan — all clean
  • Full sequential pytest: 7209 passed, 0 failed
  • Opus advisor: SHIP-AS-IS
  • Codex regression gate: SAFE TO SHIP
  • Deep browser-based UX review across dark/light × 390/1280/1440/1920, vision-verified
  • UX approved by maintainer (Telegram, 2026-06-01)

Follow-ups (filed separately, non-blocking)

Co-authored-by: mysoul12138 mysoul12138@users.noreply.github.com
Co-authored-by: AJV20 AJV20@users.noreply.github.com

nesquena-hermes added 10 commits June 1, 2026 21:20
- CHANGELOG entry moved to ### Added (feature, not fix)
- zh-Hant locale: use Traditional 開啟/下載 instead of simplified forms
Closes #3106. Adds /api/session/title/regenerate endpoint + session-action
menu item. Preserves chronology (touch_updated_at=False), guards read-only
and imported sessions, syncs to state.db when Insights sync enabled.

Maintainer refinement (Opus SHOULD-FIX): scope the is_imported guard to the
regenerate action only instead of broadening the shared _isReadOnlySession()
helper, which also gates rename/pin/archive/move/fork. Matches the backend
403 guard. Test updated to assert the scoped shape.
Maintainer fix on stage (browser-test catch): Prism.highlightElement()
propagates the language-* class onto the parent <pre>, so previewing a
.css file then a .txt file rendered the plain text with CSS grammar.
Strip any stale language-* from #previewCode before each render and only
call highlightElement when a language was assigned. Adds regression test
(tests/test_issue3337_workspace_preview_highlight.py) and bumps the
_openSessionActionMenu scan window in test_1466 to cover the new
Regenerate-title action lines (#3223).
…load, #3337 uniform code bg, #3223 menu clip fix

#3220: redesign generated-image rendering from a permanent bordered card
(filename + Open/Download buttons) to a clean inline image with click-to-zoom
lightbox + a hover/focus-revealed Download overlay, matching ChatGPT/Claude/
Gemini. Drops redundant Open (lightbox already covers it). Tests updated.

#3337: fix two-tone code background — Prism's prism-tomorrow theme styled the
parent <pre> gray while the <code> was navy var(--code-bg), so dark theme showed
a gray frame around navy code. Override BOTH .preview-code[class*=language-] and
its <code> to var(--code-bg) (mirrors the chat code-block fix at .msg-body pre).

#3223: fix action-menu clipping — the new Regenerate-title row made the 9-item
menu tall enough to overflow the viewport bottom when opened on a top-anchored
row at short viewports (e.g. 1280x720). _positionSessionActionMenu now clamps
the menu within both viewport edges and caps max-height with scroll when the
menu is taller than the viewport.
…keys

Opus iter2 SHOULD-FIX (both non-blocking, applied for cleanliness):
- esc() the media_download title/aria-label so a future translator's quote
  can't break out of the attribute (defense-in-depth).
- Remove the now-dead media_open key from all 11 locales + the ui.js fallback
  dict (the Open button was dropped in the clean-image redesign).
…con+label menu

Nathan feedback round 2:
- #3220: generated images were rendering at the 120x90 upload-thumbnail size
  (too small for the subject of the message). Now render at natural aspect
  ratio up to 360px (max-height 360, responsive max-width), lightbox preserved.
- #3223: drop the per-item subtitle/description lines from the session action
  menu — show only icon + label (VS Code / browser / ChatGPT pattern). The
  description is preserved as a hover tooltip (title=). Makes the menu ~40%
  shorter, less crowded, and structurally less prone to viewport clipping.
…rlays the image

The .msg-artifact-image span was stretching wider than the image (inline-block
in a block context filled the line), so the absolutely-positioned download
button (right:8px of the wrapper) floated ~240px to the right of the image.
Add width:fit-content + max-width so the wrapper hugs the image; the button now
correctly overlays the image's top-right corner. line-height:0 removes inline
descender gap.
…rop blur)

Nathan feedback: the download icon read as 'oddly placed' on dark generated
images. Geometry was already correct (8px inset on the image corner) — the
issue was low contrast: a flat rgba(0,0,0,.55) button blends into a dark image.
Add a subtle 1px white border, soft shadow, and 3px backdrop-blur so the button
reads as a clear chip-on-image regardless of the underlying pixels (the standard
treatment for on-image controls). CSS-only.
@nesquena-hermes
nesquena-hermes merged commit 383e050 into master Jun 2, 2026
11 checks passed
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
Release FY — v0.51.205 (stage-hi1: workspace syntax highlighting + generated-image rendering + manual title regeneration)
@nesquena-hermes
nesquena-hermes deleted the release/stage-hi1 branch June 28, 2026 06:06
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] Better sessions naming

1 participant