Commit Graph

1499 Commits

Author SHA1 Message Date
nesquena-hermes b62f9dbbf8 Stage 312: PR #1790 — fix: keep workspace open from preview breadcrumb by @Michaelyklam 2026-05-07 06:25:17 +00:00
Michael Lam f90f283b73 docs: add workspace breadcrumb before screenshot 2026-05-07 06:25:17 +00:00
Michael Lam ee5600e46c fix: keep workspace open from preview breadcrumb 2026-05-07 06:25:17 +00:00
nesquena-hermes 3d1d42cdf7 Stage 312: PR #1791 — fix: keep assistant-only stream deltas on current turn by @Michaelyklam 2026-05-07 06:25:16 +00:00
nesquena-hermes 34726c3356 Stage 312: PR #1783 — fix(config): custom provider + :free/:beta/:thinking suffix mis-resolution by @Sanjays2402 2026-05-07 06:25:16 +00:00
Michael Lam 048f1fa24e fix: keep assistant-only stream deltas on current turn 2026-05-07 06:25:16 +00:00
Sanjay Santhanam 064d14c85b fix(config): custom provider + :free/:beta/:thinking suffix mis-resolution (#1776)
PR #1762 fixed the rsplit grammar collision for plain @openrouter:model:free
qualifiers, but skipped the fallback whenever the provider hint started with
'custom:' on the assumption that custom providers route directly. That left
'@custom:my-key:some-model:free' broken: rsplit yields
provider='custom:my-key:some-model', bare='free' → custom guard skips the
split-fallback → returns provider='custom:my-key:some-model', model='free'.

Detect the over-split structurally instead of using a known-suffix allowlist:
custom hints carry exactly one segment after 'custom:' (constructed at
api/config.py:1363 as 'custom:' + entry_name). So any rsplit result of
'custom:<a>:<b>' with bare model '<c>' has eaten one model segment — peel
it back with a second rsplit and prepend it to the bare model.

This is robust for :free / :beta / :thinking / :preview / any future
OpenRouter suffix without an allowlist to maintain.

Adds 5 regression tests covering the matrix (free/beta/thinking/preview/
slashed-model). All 7 existing #1744 tests still pass; #1228 tests
unaffected.

Co-authored-by: Cake <51058514+Sanjays2402@users.noreply.github.com>
2026-05-07 06:25:16 +00:00
nesquena-hermes 9875967528 Merge pull request #1788 from nesquena/stage-311
v0.51.17 — 2-PR batch (#1780, #1782)
v0.51.17
2026-05-06 21:54:15 -07:00
nesquena-hermes 428e83750c chore(release): stamp v0.51.17 — 2-PR batch (#1780, #1782)
Constituent PRs:
- #1780 (@jasonjcwu) kanban-bridge: docstring + board_exists early-out
- #1782 (@jasonjcwu) replace native title tooltips with custom CSS tooltips
  + extensive maintainer-side polish: i18n.js title-clear, ui.js
    _applyDashboardStatus tooltip-aware, boot.js _setButtonTooltip helper
    + 6 callsites refactored, CSS rewrite (z-index 60→1500, gold-tinted
    border, stronger shadow, no arrow per VS Code/Slack/Linear pattern,
    150ms onset / 0ms dismissal), coverage +11 buttons, panel-header
    overflow:visible escape, has-tooltip--left for right-edge clipping,
    btnWorkspacePanelToggle reverted (chip already labels it),
    test tolerance updates + 3 new regression tests.

Tests: 4716 → 4723 collected (+7). 4716 passed, 0 failed.

Pre-release verification:
- pytest 4716 passed, 0 failed (~141s)
- Browser API sanity 11/11 endpoints
- Browser-verified each major tooltip surface — zero stuck title
  attributes at runtime, all coordinate-fits within 1280px viewport
- Opus advisor reviewed PR head + brief; flagged CI failures and
  i18n.js title leak — BOTH already fixed in stage-311's maintainer
  polish layer (Opus reviews contributor PR head, not the stage)

Closes #1775.
2026-05-07 04:51:45 +00:00
nesquena-hermes c731803312 fix(ux): remove tooltip from workspace toggle (chip already labels it)
Browser verification showed the side-tooltip on btnWorkspacePanelToggle
was being clipped by its parent .composer-workspace-group's overflow:hidden
(necessary for the chip's border-radius:999px rounded-pill clipping).

Per user feedback: 'tooltips are only for things where there's really a
possibility you wouldn't know what it is — if there's already text on
the screen, no need.' The workspace toggle button is part of a chip
group whose adjacent .composer-workspace-chip label already shows the
current workspace path (e.g. /home/hermes/workspace, or 'Home') —
making the toggle icon's purpose self-evident.

Reverts btnWorkspacePanelToggle from data-tooltip='Show workspace panel'
+ class='has-tooltip' to title='Show workspace panel' (legacy native).
The native tooltip's slow display is acceptable here since (a) the chip
already contextualizes the button, and (b) the rounded-chip overflow:hidden
is non-negotiable for the visual design.

bot.js _setButtonTooltip helper is still in place — it correctly falls
back to el.title for elements without data-tooltip, so the runtime
title swap (open vs collapsed state) still works.
2026-05-07 04:35:55 +00:00
nesquena-hermes 56d88723cf fix(ux): add has-tooltip--left variant for right-edge buttons + fix tests
(1) Send-button tooltip clipping fix:
    The send button (btnSend) sits at the right edge of the composer area.
    Its side-positioned tooltip extended 'Send message' (~95px wide) past
    the viewport edge, leaving only 'Se' visible in some viewports —
    confirmed by maintainer screenshot review.

    Added a new `.has-tooltip--left` variant that flips the tooltip to
    the LEFT side of the trigger via `right: calc(100% + 8px)` instead
    of `left: calc(100% + 8px)`. Applied to btnSend in index.html.
    Browser-verified: full 'Send message' text now readable to the left
    of the gold Send button, no clipping.

(2) Test compatibility for the tooltip coverage expansion:
    5 pre-existing tests hardcoded specific class strings or 'title='
    attributes that no longer apply after we added has-tooltip + replaced
    title= with data-tooltip= on 11 high-traffic icon buttons.

    - tests/test_issue1488_composer_voice_buttons.py:
      - test_dictation_button_has_dictate_i18n_key: accept either
        title='Dictate' or data-tooltip='Dictate' as the static fallback.
      - test_buttons_have_distinct_static_titles: extracted helper
        _static_tooltip() that prefers data-tooltip over title.
    - tests/test_sprint20.py::test_mic_button_has_mic_btn_class:
      regex tolerant to additional utility classes between icon-btn and
      mic-btn (now 'icon-btn mic-btn has-tooltip').
    - tests/test_sprint20b.py::test_send_button_has_title_attribute:
      accept title= OR data-tooltip= per #1775.
    - tests/test_sprint20b.py::test_send_button_still_has_send_btn_class:
      regex tolerant to additional utility classes.
    - tests/test_workspace_panel_session_list.py::TestWorkspacePanelCollapsePriority::test_panel_header_no_longer_uses_space_between:
      panel-header was changed from overflow:hidden to overflow:visible
      so its tooltips can escape the header bar. The title-text ellipsis
      moved to the inner span (.panel-header > span:first-child) which
      already had its own overflow:hidden + text-overflow:ellipsis.
      Test now accepts either parent-level or inner-span overflow handling.

All 192 of the previously-failing or impacted tests now pass.
2026-05-07 04:30:02 +00:00
nesquena-hermes 53ad5eccba fix(ux): allow tooltips to escape panel-header overflow + polish shadow
Browser-verified two issues with stage-311 tooltip rendering:

(1) Workspace panel header tooltips (NewFile, NewFolder, Refresh, etc.)
    were being clipped because .panel-header had overflow:hidden. The
    title span at `.panel-header > span:first-child` already has its own
    overflow:hidden + text-overflow:ellipsis for the workspace name
    truncation, so the parent doesn't need it. Changed .panel-header to
    overflow:visible — verified tooltip now floats correctly below the
    icon row, ellipsis on the title still works because the inner span
    handles it locally.

(2) Strengthened tooltip body styling per browser screenshot review:
    - Border: var(--border) (#2A2A45 dark slate) → var(--accent-bg-strong)
      (gold-tinted at 15% alpha). Subtle brand-tied edge that's slightly
      more visible against the very dark page background.
    - Shadow: 6px/20px / 0.55 alpha + 1px ring at 0.25 → 8px/24px / 0.65
      alpha + 1px ring at 0.35 + 1px inset highlight at 0.04 alpha. Gives
      the tooltip more elevation against the dark theme so it reads as a
      floating element rather than painted onto the background.

All 19 tooltip pytest checks still pass. Browser-verified on rail
(Tasks, Settings), composer (Attach files, Send message), and workspace
panel header (New folder) — screenshots delivered to maintainer for
visual sign-off.
2026-05-07 04:24:31 +00:00
nesquena-hermes 6dd133b1f7 fix(ux): drop tooltip arrow/caret, use spatial proximity instead
Browser verification of the rail tooltip showed the 5px arrow ::before
pseudo-element was rendering as a tiny rectangle slice (not a triangle)
because the global `*, ::before, ::after { box-sizing: border-box }`
reset makes the colored border eat inward from a 10×10 box rather than
projecting outward from a 0×0 box. Adding `box-sizing: content-box`
inline to the pseudo fixes the geometry but at 11px text size and 5px
border-width the resulting triangle reads as visual noise rather than
a clear connector — multiple AI vision passes consistently couldn't
identify the arrow even when it was rendering correctly.

VS Code, Slack, and Linear's rail/icon-button tooltips all skip the
arrow for the same reason: spatial proximity at small sizes (an 8px gap
between trigger and tooltip body) is sufficient association without
the visual clutter of a tiny triangle.

Removes both ::before pseudo-rules. Tooltip body unchanged. Side
tooltip moved 12px → 8px gap (closer to trigger now that the arrow is
gone), bottom tooltip 10px → 8px for the same reason.

Browser-verified: rail Tasks tooltip rendering at 8/10 polish per
vision-AI assessment of the standalone tooltip body (solid surface bg,
solid border, warm-white text, 6px shadow + 1px ring, z-index 1500).

Co-authored-by: Jason Wu <jasonjcwu@users.noreply.github.com>
2026-05-07 04:11:40 +00:00
test 119a994341 Stage 311: PR #1782 — fix(ux): replace native title tooltips with custom CSS tooltips by @jasonjcwu (with maintainer-side polish + coverage expansion) 2026-05-07 04:00:46 +00:00
nesquena-hermes d41555cec6 fix(ux): polish CSS tooltips + clear native title + extend coverage
Stage 311 maintainer-side enhancements on top of @jasonjcwu's PR #1782,
addressing browser-verified issues + extending coverage to high-traffic
icon buttons:

(1) Clear native title when custom data-tooltip is present (the core bug fix):
    - static/i18n.js: when data-i18n-title runs against an element that has
      data-tooltip, sync data-tooltip AND removeAttribute('title'). Without
      this, the slow ~1.5s native browser tooltip co-fires alongside the
      fast custom CSS tooltip — exactly the bug #1775 reports.
    - static/ui.js _applyDashboardStatus: same treatment for the dashboard
      rail/mobile buttons (was setting btn.title=warning unconditionally).
    - static/boot.js: added _setButtonTooltip() helper, replaced 6 direct
      .title assignments (workspace toggle/collapse/clear, voice dictate,
      voice mode active/inactive) with calls through the helper.

(2) Extend coverage to high-traffic icon buttons in static/index.html:
    - Composer area (side tooltip): btnAttach, btnMic, btnVoiceMode,
      btnWorkspacePanelToggle, btnSend.
    - Workspace panel header (bottom tooltip): btnCollapseWorkspacePanel,
      btnUpDir, btnNewFile, btnNewFolder, btnRefreshPanel, btnClearPreview.
    - All 11 buttons gain has-tooltip[--bottom] class and data-tooltip,
      lose their native title=. Total covered surfaces: rail (12), sidebar
      nav-tabs (12), panel-head (31), composer/workspace icons (11) = 66.

(3) CSS polish (browser-verified visible improvement):
    - z-index 60 → 1500/1501 so the tooltip clears all sidebar/panel
      stacking contexts. Earlier verification showed the tooltip overlapping
      the Filter conversations search input.
    - background: var(--bg-strong, ...) → var(--surface) (solid #1A1A2E
      instead of falling back via undefined cascade).
    - color: var(--text, var(--accent-text)) → var(--text) (solid warm white
      #FFF8DC instead of gold which clashed at body-text size).
    - border: var(--accent-bg-strong) → var(--border) (#2A2A45 solid
      instead of gold at 0.15 alpha — the old border was barely visible
      and the arrow ::before triangle was invisible).
    - shadow: 4px/0.45 alpha → 6px/0.55 alpha + 0 0 0 1px ring fallback.
    - Added 150ms hover-onset delay (matches Cygnus's spec in #1775); 0s
      dismissal-delay so quick mouse-aways don't leave the tooltip behind.
    - Fixed has-tooltip--bottom arrow direction: was pointing down (wrong),
      now points up at the trigger (border-color order corrected).
    - Bumped offsets: side tooltip 10px → 12px (clearance from icon edge),
      bottom tooltip 8px → 10px.

(4) Test fixes (the 2 CI failures):
    - tests/test_cron_refresh_button_835.py: assertion accepts either
      title= or data-tooltip= per #1775 (was hardcoded title=).
    - tests/test_mobile_layout.py::test_profiles_sidebar_tab_present:
      regex tolerant to additional utility classes (has-tooltip).

(5) Regression tests added to tests/test_css_tooltips.py:
    - test_native_title_cleared_when_custom_tooltip_present: pins the
      removeAttribute('title') call so we don't regress to dual tooltips.
    - test_native_title_path_preserved_for_non_tooltip_elements: pins the
      el.title fallback for elements without data-tooltip.

Browser-verified: all 72 has-tooltip elements have zero native title at
runtime (was 94 with native, 2 stuck via dashboard JS path).

Co-authored-by: Jason Wu <jasonjcwu@users.noreply.github.com>
2026-05-07 04:00:40 +00:00
test 57ccdcb965 Stage 311: PR #1780 — fix(kanban): docstring + board_exists early-out by @jasonjcwu 2026-05-07 03:58:16 +00:00
fxd-jason b86bdf9dc8 fix(ux): replace native title tooltips with custom CSS tooltips (#1775)
- Add .has-tooltip CSS utility class with 300ms delay (vs ~1500ms native)
  - Position-aware: right side for rail buttons, bottom for nav/panel buttons
  - Arrow indicator pointing back at trigger element
  - :focus-visible support for keyboard accessibility
  - prefers-reduced-motion: no animation for users who opt out
- Replace native title="" with data-tooltip="" on all rail-btn, sidebar
  nav-tab, and panel-head-btn elements in index.html
- Sync data-tooltip via data-i18n-title handler for locale switching
- 17 tests covering HTML coverage, CSS class definitions, and i18n sync

Closes #1775
2026-05-07 03:58:16 +00:00
fxd-jason a80b7695d8 fix(kanban): update stale read-only docstring + board_exists early-out in board counts
The bridge module docstring still described the API as 'deliberately
read-only' but it now exposes full CRUD (tasks, boards, comments,
links, SSE). Updated to list the supported operations.

For _board_counts_for_slug (the hot path for the board-switcher badge),
added a board_exists() early-out that mirrors the agent's own helper
in plugin_api.py (path.exists() before connect()). This avoids a
redundant init_db()+connect() schema pass per board per list refresh.
connect() already handles auto-init for fresh databases via its
needs_init check, so the extra init_db was unnecessary overhead on
the hot path that scales linearly with board count.

Tests:
- test_board_counts_returns_empty_for_nonexistent_board: verifies the
  early-out (no connect() call, returns {})
- test_board_counts_returns_real_counts_for_populated_board: verifies
  actual per-status counts are returned for existing boards
2026-05-07 03:58:16 +00:00
nesquena-hermes 697a7a10d1 Merge pull request #1781 from nesquena/stage-310
v0.51.16 — 3-PR batch (#1768, #1778, #1779)
v0.51.16
2026-05-06 20:12:44 -07:00
nesquena-hermes c38ee6c339 chore(release): stamp v0.51.16 — 3-PR batch (#1768, #1778, #1779)
Constituent PRs:
- #1768 (@franksong2702) serialize Anthropic env fallback reads. Closes #1736.
- #1778 (@Michaelyklam) preserve CLI session tool metadata. Closes #1772.
- #1779 (@Michaelyklam) reset model picker on session switch. Closes #1771.
  AUTO-FIX: Opus stage-310 caught a regression in the new !hasSessionModel
  branch — it dropped the deferModelCorrection guard that the parallel
  else-branch keeps. Fired spurious /api/session/update POSTs against
  imported/read-only CLI sessions whose model field reads 'unknown' (the
  exact surface #1778 introduces in this same release). Wrapped the new
  branch's _persistSessionModelCorrection call + state mutation in
  if(!deferModelCorrection). Added test_sync_topbar_does_not_persist_correction_while_model_resolution_deferred
  regression test covering both empty and 'unknown' fast-path interaction.

Tests: 4694 → 4702 collected (+8). 4695 passed, 4 skipped, 3 xpassed,
0 failed in 141.29s.

Pre-release verification:
- All 3 PRs CI-green individually.
- node -c clean on static/ui.js.
- 11/11 browser API endpoints PASS.
- Pre-stamp re-fetch: all PR heads match local rebases.
- Opus advisor: SHIP #1768 + #1778, #1779 SHOULD-FIX before merge — auto-fix
  applied at stage with regression test, re-verified clean.

Closes #1736, #1771, #1772.
2026-05-07 03:10:43 +00:00
test db132b97db Stage 310: PR #1779 — fix: reset model picker on session switch by @Michaelyklam 2026-05-07 02:52:01 +00:00
Michael Lam 24f76bcf37 fix: reset model picker on session switch 2026-05-07 02:52:01 +00:00
test 8ed7a7f61c Stage 310: PR #1778 — fix: preserve CLI session tool metadata by @Michaelyklam 2026-05-07 02:47:19 +00:00
test 3bc8bc8bdd Stage 310: PR #1768 — fix(oauth): serialize Anthropic env fallback reads by @franksong2702 2026-05-07 02:47:19 +00:00
Michael Lam 0bd65ef0bf fix: preserve CLI session tool metadata 2026-05-07 02:47:19 +00:00
Frank Song 91f99d8194 fix(oauth): serialize Anthropic env fallback reads 2026-05-07 02:47:19 +00:00
nesquena-hermes 9cc106272f Merge pull request #1777 from nesquena/stage-309
v0.51.15 — 4-PR batch (#1762, #1767, #1769, #1770)
v0.51.15
2026-05-06 19:06:58 -07:00
nesquena-hermes 516e5ad1f0 chore(release): stamp v0.51.15 — 4-PR batch (#1762, #1767, #1769, #1770)
Constituent PRs:
- #1762 (@bergeouss) openrouter/ prefix for tencent/hy3-preview:free. Closes #1744.
- #1767 (@Michaelyklam) use spawn for manual cron subprocesses. Closes #1754.
  AUTO-FIX applied: 2 tests skip on dev machines with editable hermes_agent
  install (the spawn child resolves the real cron.scheduler first instead of
  the fake one). Tightened detector to use importlib.util.find_spec origin
  check per Opus stage-309 SHOULD-FIX.
- #1769 (@nesquena-hermes, APPROVED by @nesquena) three context-menu
  essentials from #1764: Reveal-in-finder, Copy-path, Open-with-system.
- #1770 (@Michaelyklam) surface Codex usage exhaustion errors. Closes #1765.

Tests: 4662 → 4694 collected (+32). 4687 passed, 4 skipped (2 dev-only +
2 prong-2 noise), 3 xpassed, 0 failed in 135s.

Pre-release verification:
- All 4 PRs CI-green individually.
- node -c clean on all 4 changed JS files.
- 11/11 browser API endpoints PASS.
- Pre-stamp re-fetch: all PR heads match local rebases.
- Opus advisor: SHIP, all 5 verification questions clean, 0 MUST-FIX,
  2 SHOULD-FIX (one absorbed: detector tightening; one filed as #1776
  follow-up: custom provider + :free suffix edge case in #1762).

Closes #1744, #1754, #1764, #1765.
2026-05-07 02:04:36 +00:00
test fc8c5d56f2 Stage 309: PR #1770 — fix: surface Codex usage exhaustion errors by @Michaelyklam 2026-05-07 01:39:52 +00:00
test de10246a84 Stage 309: PR #1769 — feat(ux): three high-leverage context-menu essentials from #1764 by @nesquena-hermes 2026-05-07 01:39:52 +00:00
Michael Lam 2d20842450 fix: surface Codex usage exhaustion errors 2026-05-07 01:39:52 +00:00
nesquena-hermes f77a44fce2 feat(ux): three high-leverage context-menu essentials from #1764
Issue #1764 asked for a much larger surface (Reveal + Copy-path on
every UI surface that references a file path, plus Rename in session
menus). Per Nathan's curation we ship only the three highest-leverage
pieces in this PR — they cover the three concrete user-visible
frictions Cygnus reported, and leave the broader sweep for follow-up.

## 1. Copy file path in workspace tree right-click menu

The tree's right-click already had Rename and Reveal in File Manager.
Reveal is slow when the user just wants the path string for a
terminal/editor — and there was no Copy-path action anywhere.

Added "Copy file path" between Reveal and Delete. It POSTs to a new
`/api/file/path` endpoint that resolves the relative tree-rooted path
into the absolute on-disk path (the frontend can't compute it because
only the server knows the workspace root) and writes the result to
the OS clipboard via `navigator.clipboard.writeText()`. Falls back to
the legacy execCommand pattern on browsers where the modern Clipboard
API is gated.

The new endpoint deliberately does NOT require the target to exist:
copy-path on a recently-deleted file is still useful (paste into a
terminal to investigate). `safe_resolve` continues to gate path
traversal — the test suite pins this with a `../../../../../etc/passwd`
attempt that 400s.

## 2. Rename in session three-dot menu

Cygnus's specific ask: double-click rename in the sidebar is timing-
sensitive — the first click frequently registers as "open the chat"
before the second click arrives, so users open the conversation when
they meant to rename it. Putting Rename in the menu eliminates the
timing entirely.

Added Rename as the FIRST item in `_openSessionActionMenu` (above
Pin). It reuses the existing `startRename` closure attached to each
session row — no duplicated state, no second API call out of band
with the double-click path. Mechanism: the row builder now stores
`el._startRename = startRename` and `el.dataset.sid = s.session_id`,
so the menu can find the row by data-sid and call its closure
directly. This keeps all the `_renamingSid`/`oldTitle`/`applyTitle`
bookkeeping single-sourced.

Read-only imported sessions skip the menu item via the same
`_isReadOnlySession` gate the closure already uses.

## 3. Reveal-failed toast includes the resolved server-side path

Cygnus posted a screenshot of a "Failed to reveal: not found" toast
that dropped the path entirely. Without it the user can't tell which
file the system expected — useful when a stale session row still
references a deleted file.

Server-side fix in `_handle_file_reveal`: instead of returning
`bad(handler, "File not found", 404)`, return
`bad(handler, f"File not found: {target}", 404)` where target is the
resolved absolute path. Frontend toast also defends against err with
no .message: `(err.message||err)` instead of `err.message` alone.

Verified live: a missing-file reveal now produces:

    Failed to reveal: File not found: /home/hermes/workspace/missing-xyz.txt

Cygnus's exact diagnostic-friction is gone.

## Tests

* tests/test_1764_context_menu_essentials.py (new)
  - 13 source-level pinning tests
  - 6 live HTTP behaviour tests against the conftest test server

* tests/test_1466_sidebar_cancel_clarify.py
  - Two assertion-window bumps (3200→4400, 3600→4800) to accommodate
    the new Rename action prepended to _openSessionActionMenu. The
    test relied on a fixed-byte-window function-body slice — comments
    added explaining why the bumps were needed.

* All 9 locales got translations for the 5 new keys
  (copy_file_path, path_copied, path_copy_failed, session_rename,
  session_rename_desc) — locale parity tests pass.

## Verification

Full pytest suite: 4671 passed, 2 skipped, 3 xpassed (matches
pre-change baseline).

Live browser verification on port 8789:
- Right-click .git folder in workspace tree → menu shows
  Rename / Reveal in File Manager / Copy file path / Delete (red).
- Click Copy file path → clipboard gets "/home/hermes/workspace/.git",
  toast confirms "File path copied to clipboard".
- Open session three-dot menu → Rename conversation appears first
  with pencil icon, followed by Pin / Move / Archive / Duplicate /
  Delete in the same order as before.
- Trigger reveal on a non-existent file → toast reads
  "Failed to reveal: File not found: /home/hermes/workspace/<filename>".
  The resolved server-side path is now visible in the failure.

Refs nesquena/hermes-webui#1764.
2026-05-07 01:39:52 +00:00
test 922c3e530d Stage 309: PR #1767 — fix: use spawn for manual cron subprocesses by @Michaelyklam 2026-05-07 01:39:51 +00:00
test 12bae4bce6 Stage 309: PR #1762 — fix: add missing openrouter/ prefix for tencent/hy3-preview:free by @bergeouss 2026-05-07 01:39:51 +00:00
Michael Lam 1fc8e83c90 fix: use spawn for manual cron subprocesses 2026-05-07 01:39:51 +00:00
bergeouss 9711070119 fix: resolve rsplit collision for OpenRouter models with :free/:beta/:thinking suffixes (#1744)
The previous approach of prepending 'openrouter/' to the model ID in the
catalog was incorrect — it only masked the symptom while regressing the
config_provider=openrouter codepath.

The root cause is in resolve_model_provider(): rsplit(':', 1) on
'@openrouter:tencent/hy3-preview:free' yields provider='openrouter:tencent/hy3-preview'
and model='free', because the ':free' suffix collides with the @provider:model
grammar.

Fix: after rsplit, validate that the extracted provider hint is a known
provider (in _PROVIDER_MODELS, _PROVIDER_DISPLAY, or starts with 'custom:').
If not, fall back to split(':', 1) so trailing suffixes stay attached to
the model ID.

This fixes all current and future OR models with colon-suffixed tags
(:free, :beta, :thinking, :nitro, etc.) without catalog changes.

Also adds regression tests for the affected models and edge cases.

Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>
2026-05-07 01:39:51 +00:00
bergeouss ca1a268512 fix: add missing openrouter/ prefix for tencent/hy3-preview:free model (#1744) 2026-05-07 01:39:51 +00:00
nesquena-hermes 2106083e71 Merge pull request #1763 from nesquena/stage-308
v0.51.14 — 4-PR contributor batch (#1756, #1757, #1760, #1761)
v0.51.14
2026-05-06 15:22:13 -07:00
nesquena-hermes e8659d1a40 chore(release): stamp v0.51.14 — 4-PR contributor batch (#1756, #1757, #1760, #1761)
Constituent PRs:
- #1760 (@ai-ag2026) preserve pending user turn on stream errors. Closes #1361.
- #1761 (@dso2ng) scope terminal stream cleanup to owner session. Refs #1694.
  AUTO-FIX applied: restored !INFLIGHT[S.session.session_id] disjunct in
  _setActivePaneIdleIfOwner (regression introduced by helper centralization).
- #1756 (@ng-technology-llc) isolate profile cookie per webui instance. Closes #803.
- #1757 (@skspade) tri-state gateway status (alive: True/False/None).

Tests: 4642 → 4662 collected (+20). 4649 passed, 9 skipped (test-isolation
prong-2 noise), 3 xpassed, 0 failed in 152s.

Pre-release verification:
- All 4 PRs CI-green or rebased clean (#1757 had stale base; CHANGELOG conflict
  auto-resolved by dropping the PR's redundant entry).
- node -c clean on static/messages.js + static/panels.js.
- 11/11 browser API endpoints PASS.
- Pre-stamp re-fetch: all PR heads match local rebases.
- Opus advisor: SHIP, all 5 verification questions clean, 0 MUST-FIX, 0 SHOULD-FIX.
- Two NICE-TO-HAVE coverage gaps absorbed in-release:
  (1) test_sprint36.py asserts !INFLIGHT[...] disjunct in helper body
  (2) test_issue1361_cancel_data_loss.py adds structural-grep test to pin
      _materialize_pending_user_turn_before_error call sites at error branches.

Closes #803, #1361, #1694.
2026-05-06 22:20:17 +00:00
test 74edc38aac Stage 308: PR #1757 — fix: gateway status card shows not running when no platforms connected by @skspade 2026-05-06 22:02:51 +00:00
test 54c9fb48dd Stage 308: PR #1756 — fix: isolate profile cookie per webui instance by @ng-technology-llc 2026-05-06 22:02:51 +00:00
test 5ecce3cbe5 Stage 308: PR #1761 — fix: scope terminal stream cleanup to owner session by @dso2ng 2026-05-06 22:02:51 +00:00
test 7c39ff608a Stage 308: PR #1760 — fix: preserve pending user turn on stream errors by @ai-ag2026 2026-05-06 22:02:51 +00:00
nesquena-hermes fc5423f4aa auto-fix: preserve _setActivePaneIdleIfOwner permissive-fallback disjunct from PR #1753
PR #1753 (shipped v0.51.12) introduced the 3-way OR guard in done/error/cancel
handlers: 'isActiveSession || !S.session || !INFLIGHT[S.session.session_id]'.
The third disjunct ('no other inflight on the active pane') is the permissive
fallback Opus stage-306 verified — it allows the active pane to idle when no
other session is running, even when the completing stream is from a different
session. PR #1761's centralizing helper _setActivePaneIdleIfOwner inadvertently
dropped this disjunct, so a user viewing pane A (idle) while pane B completes
in the background would not get pane A's composer state cleared.

Restored: _setActivePaneIdleIfOwner now checks the same 3-way OR.

Verified via:
- node -c static/messages.js — clean
- pytest tests/test_session_runtime_ownership_invariants.py
       tests/test_1694_terminal_cleanup_ownership.py — 9 passed

Co-authored-by: dso2ng <dso2ng@users.noreply.github.com>
2026-05-06 22:02:37 +00:00
skspade 7193cee152 fix: tri-state gateway status — distinguish not-configured from not-running
- Backend: return `configured` field alongside `running`. When
  alive=None (no gateway metadata), configured=false with fallback to
  identity_map heuristic.
- Frontend: amber "Gateway not configured" when configured=false,
  red "Gateway not running" only when configured but process is down,
  green "Running" when both true.
- Replace dead try/except fallback with explicit tri-state check on
  health["alive"].
- Add regression test for last_active guard when alive=true and
  identity_map is empty.

All 87 gateway-related tests pass.
2026-05-06 22:01:36 +00:00
skspade eab39f14db fix: gateway status card shows 'not running' when no platforms connected
Use agent_health.build_agent_health_payload() as the authoritative
running signal instead of bool(identity_map). An empty identity_map
means zero connected messaging platforms, not that the gateway is down.

Falls back to identity_map heuristic when agent_health module is unavailable
(e.g. WebUI-only deployments).
2026-05-06 22:01:35 +00:00
Nick d5a31a0f4d fix: isolate profile cookie per webui instance 2026-05-06 22:01:20 +00:00
Dennis Soong 98a6f88ef7 fix: scope terminal stream cleanup to owner session 2026-05-07 05:56:17 +08:00
ai-ag2026 a7b04bbc1e fix: preserve pending user turn on stream errors 2026-05-06 22:47:58 +02:00
nesquena-hermes 704f8ab16a Merge pull request #1759 from nesquena/stage-307
v0.51.13 — Single-PR composer UX (#1758)
v0.51.13
2026-05-06 13:15:59 -07:00