Skip to content

Commit 2ec3a1e

Browse files
authored
v0.6.5 — tab-strip + notification fixes + per-tab working indicator (#54)
Fixes #19 (drag-reorder), #49 (color picker popover), #50 (notifications toggle discoverability); adds #46 (per-tab working spinner). Also closed #45. Independent review + #46 live-verified.
1 parent 378756e commit 2ec3a1e

10 files changed

Lines changed: 322 additions & 30 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# Changelog
22

3+
## [v0.6.5] — 2026-06-22
4+
5+
A bug-fix release for the Windows/Linux tab strip and notification discoverability,
6+
plus a per-tab "working" indicator.
7+
8+
### Added
9+
10+
- **Windows/Linux: tabs now show a "working" spinner while their session is
11+
streaming** (issue #46). A small spinner appears on a tab whose session has a
12+
run in flight (mirroring the web app's in-progress spinner), so with several
13+
tabs open you can see at a glance which background tabs are busy. Driven by the
14+
page's own busy state — the same signal as the in-app spinner — and clears the
15+
moment the run finishes (the tab's profile dot / attention badge takes over
16+
again).
17+
18+
### Fixed
19+
20+
- **Windows/Linux: dragging a tab now reorders it** (issue #19). The reorder
21+
handlers shipped in v0.4.0 but never worked: the tab-strip webview didn't
22+
disable wry's native OS drag-drop handler, so it intercepted the gesture and
23+
the strip page never received the HTML5 `dragstart`/`drop` events (the same
24+
root cause the #27 fix addressed for content webviews). The strip webview now
25+
disables the native handler, so drag-to-reorder works. (macOS already reorders
26+
via its native tab bar.)
27+
- **Windows/Linux: the per-profile color picker now has clear controls** (issue
28+
#49, follow-up to v0.6.4's #47). Right-clicking a tab previously opened the
29+
bare OS color dialog with no obvious way to apply or close it. It now opens a
30+
small in-strip popover with one-click palette swatches, a custom-color input,
31+
and explicit **Reset** (back to the auto color) and **Close** buttons (also
32+
Escape / click-away). The chosen color still persists per profile.
33+
- **Notifications: the desktop toggle is now easier to find, with a pointer to
34+
the second switch** (issue #50). The desktop Preferences notification toggle
35+
now sits under its own "NOTIFICATIONS" heading and notes that notifications
36+
must *also* be enabled in Hermes WebUI Settings → "Browser notifications" —
37+
the WebUI-side gate a user had to discover separately before anything fired.
38+
339
## [v0.6.4] — 2026-06-21
440

541
A sweep focused on the per-tab profile dots — distinct, customizable, and

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hermes-webui-desktop",
3-
"version": "0.6.4",
3+
"version": "0.6.5",
44
"private": true,
55
"scripts": {
66
"tauri": "tauri"

‎src-tauri/Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src-tauri/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hermes-webui-desktop"
3-
version = "0.6.4"
3+
version = "0.6.5"
44
description = "Hermes WebUI Desktop — cross-platform shell for hermes-webui"
55
edition = "2021"
66
license = "MIT"

‎src-tauri/src/bridge.rs‎

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,31 @@ const PROFILE_REPORTER: &str = r##"
537537
})();
538538
"##;
539539

540+
/// S16 — busy/streaming reporter (issue #46): watch the WebUI's `S.busy` flag —
541+
/// the same state that drives the web app's in-progress spinner — and report
542+
/// working/idle over the bridge, so the strip can show a per-tab "working"
543+
/// glyph (you can see which background tabs have a run in flight). `S` is a
544+
/// top-level `const` in the WebUI's classic, deferred `ui.js`, reachable as a
545+
/// free variable from this injected script (same page realm where the
546+
/// notification shim patches `window.Notification`). Polled at 700ms + on
547+
/// focus, debounced to emit only on change. The try/catch guards the brief
548+
/// pre-`ui.js` window where `S` is still in its temporal dead zone.
549+
const BUSY_REPORTER: &str = r##"
550+
(function () {
551+
var last = null;
552+
var report = function () {
553+
try {
554+
var b = (typeof S !== 'undefined' && S) ? !!S.busy : false;
555+
if (b !== last) { last = b; EMIT('busy', b); }
556+
} catch (e) {}
557+
};
558+
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', report);
559+
else report();
560+
setInterval(report, 700);
561+
window.addEventListener('focus', report);
562+
})();
563+
"##;
564+
540565
/// macOS-only profile reporter (issue #44). macOS uses native tabs with no
541566
/// strip, so there's nowhere to hang the Win/Linux color dot — surface the
542567
/// active profile in the native tab TITLE instead. Mirrors `PROFILE_REPORTER`
@@ -589,9 +614,10 @@ pub fn init_script(label: &str, pre_paint_hex: &str, is_ssh: bool) -> String {
589614
}
590615
if cfg!(not(target_os = "macos")) {
591616
parts.push(SHORTCUT_FORWARDER);
592-
// Profile dot is strip-only (Windows/Linux); macOS native tabs have no
593-
// dot, so skip the reporter's polling there (issue #31).
617+
// Profile dot + working glyph are strip-only (Windows/Linux); macOS
618+
// native tabs have no strip, so skip these reporters there (#31, #46).
594619
parts.push(PROFILE_REPORTER);
620+
parts.push(BUSY_REPORTER);
595621
}
596622
parts.push(THEME_BRIDGE);
597623
parts.push(ROUTE_REPORTER);
@@ -662,6 +688,13 @@ pub fn install(app: &AppHandle) {
662688
crate::strip::set_tab_dot_profile(&handle, &label, &name);
663689
}
664690
}
691+
// Tab busy/streaming state for the per-tab "working" glyph (#46).
692+
"busy" => {
693+
if crate::strip::enabled() && label.starts_with("tab-") {
694+
let busy = payload["value"].as_bool().unwrap_or(false);
695+
crate::strip::set_tab_busy(&handle, &label, busy);
696+
}
697+
}
665698
// Active-profile NAME for the macOS native tab title (issue #44).
666699
// Non-default name → title prefix; empty → no prefix.
667700
"mac-profile" => {

‎src-tauri/src/state.rs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ pub struct TabEntry {
2222
/// the strip renders an attention badge so a blocked background tab is
2323
/// findable without clicking through every tab.
2424
pub attention: bool,
25+
/// This tab's session is actively streaming a response (issue #46). Reported
26+
/// by the page's busy reporter watching the WebUI's `S.busy` flag — the same
27+
/// state that drives the web app's in-progress spinner — so the strip can
28+
/// show a per-tab "working" glyph and you can see which background tabs have
29+
/// a run in flight. Transient: re-derived each launch, never persisted.
30+
pub busy: bool,
2531
/// The active WebUI profile for this tab — the value of its per-tab
2632
/// `hermes_profile` cookie (None = the default profile). Read from the
2733
/// tab's isolated cookie jar after each real page load. Drives the strip's

‎src-tauri/src/strip.rs‎

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,14 @@ fn build_strip_window(
229229
let strip_label = format!("strip-{n}");
230230
let init = format!("window.__HERMES_WIN = '{label}';");
231231
let swb = WebviewBuilder::new(&strip_label, WebviewUrl::App("shell.html".into()))
232-
.initialization_script(&init);
232+
.initialization_script(&init)
233+
// Drag-to-reorder tabs (#19) is HTML5 drag in shell.html. Without this,
234+
// wry's native OS drag-drop handler intercepts the gesture and the page
235+
// never sees dragstart/drop — so reorder silently no-ops on Windows
236+
// (same root cause as #27 for content webviews). The strip hosts only
237+
// the tab bar + ⋯ menu; it needs no native file-drop, and window-drag
238+
// (data-tauri-drag-region) is a separate mechanism, unaffected.
239+
.disable_drag_drop_handler();
233240
let scale = win.scale_factor().unwrap_or(1.0);
234241
let logical = win
235242
.inner_size()
@@ -681,6 +688,7 @@ pub(crate) fn add_tab_with(app: &AppHandle, window_label: &str, spec: TabSpec) {
681688
label: tab_label.clone(),
682689
title,
683690
attention: false,
691+
busy: false,
684692
profile: seed_profile.clone(),
685693
// Seed the dot from the profile we know at creation so a tab with a
686694
// cookie shows its color instantly; the page's active-profile
@@ -1066,6 +1074,34 @@ pub fn set_tab_dot_profile(app: &AppHandle, tab_label: &str, name: &str) {
10661074
}
10671075
}
10681076

1077+
/// Set a tab's busy (actively-streaming) flag (issue #46), reported by the
1078+
/// page's busy reporter (the WebUI's `S.busy`). Emit-on-change so a streaming
1079+
/// tab — whose `S.busy` is polled, not its constantly-mutating title — doesn't
1080+
/// flood the strip. No webview read (just a bool from the bridge), so it's safe
1081+
/// regardless of the menu modal loop (#33).
1082+
pub fn set_tab_busy(app: &AppHandle, tab_label: &str, busy: bool) {
1083+
let Some(window_label) = window_of_tab(tab_label) else {
1084+
return;
1085+
};
1086+
let state = app.state::<AppState>();
1087+
let changed = {
1088+
let mut strip = state.strip.lock().unwrap();
1089+
match strip
1090+
.get_mut(&window_label)
1091+
.and_then(|e| e.tabs.iter_mut().find(|t| t.label == tab_label))
1092+
{
1093+
Some(tab) if tab.busy != busy => {
1094+
tab.busy = busy;
1095+
true
1096+
}
1097+
_ => false,
1098+
}
1099+
};
1100+
if changed {
1101+
emit_tabs(app, &window_label);
1102+
}
1103+
}
1104+
10691105
/// Rename a strip tab (issue #7). `name` = the user's label, or None/empty to
10701106
/// clear it and fall back to the page title. Persisted so it survives restart.
10711107
pub fn rename_tab(app: &AppHandle, window_label: &str, tab_label: &str, name: Option<String>) {

‎src-tauri/tauri.conf.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "Hermes WebUI Desktop",
4-
"version": "0.6.4",
4+
"version": "0.6.5",
55
"identifier": "ai.get-hermes.HermesWebUIDesktop",
66
"build": {
77
"frontendDist": "../src"

‎src/prefs.html‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@
6666
.checkbox-row input {
6767
margin-top: 2px;
6868
}
69+
.checkbox-row .hint {
70+
display: block;
71+
margin-top: 4px;
72+
font-size: 11px;
73+
color: var(--hermes-fg-secondary);
74+
}
6975
hr {
7076
border: none;
7177
border-top: 1px solid var(--hermes-border);
@@ -131,12 +137,19 @@
131137
<label>Target URL</label>
132138
<input type="text" id="targetURL" placeholder="http://localhost:8787" />
133139
</div>
140+
<div class="section">NOTIFICATIONS</div>
134141
<div class="checkbox-row">
135142
<span></span>
136143
<label>
137144
<input type="checkbox" id="notifications" />
138-
Show a notification when a response completes while the app is in the
139-
background
145+
<span>
146+
Show a native notification when a response completes while the app is
147+
in the background.
148+
<span class="hint"
149+
>Notifications must also be enabled in Hermes WebUI Settings →
150+
“Browser notifications” for them to fire.</span
151+
>
152+
</span>
140153
</label>
141154
</div>
142155
<div class="footer">

0 commit comments

Comments
 (0)