HERMES-GIELIE/api
nesquena-hermes ed5afd2ae3
Release ON: show_cli_sessions default-on for new installs (#3988) + symlink delete/rename guard (#4217) (#4230)
* fix(#3988): default show_cli_sessions to true for new installs, grandfather existing OFF

Combines the best of #3997 (rodboev) and #4222 (Sanjays2402):
- config.py default flipped True so NEW installs surface CLI/TUI/Telegram/
  Discord/Hermes One sessions in the sidebar without hunting for the toggle.
- load_settings() backfill grandfathers ESTABLISHED installs OFF: when the saved
  settings predate the flip (onboarding_completed True + key absent), pin False so
  an existing user's sidebar doesn't silently change. Fresh installs get True.
- Default-true hydration at every read site (config.py / boot.js / panels.js
  checkbox) via the !==false idiom — no config-ON-but-UI-OFF mismatch (#4006 class).
- 10 tests: config default, bool-key round-trip, grandfather matrix
  (fresh/mid-onboarding/established-absent/explicit-true/explicit-false/
  save-preserves-grandfather), and both frontend hydration sites.

Co-authored-by: Rod Boev <rod.boev@gmail.com>
Co-authored-by: Sanjays2402 <Sanjays2402@users.noreply.github.com>

* fix(#4217): guard /api/file/delete and /api/file/rename against symlink targets

* chore(release): stamp v0.51.427 (Release ON) for #3988 + #4217

* chore: drop unused imports (ruff F401) in absorbed test files

* fix(#4217,#3988): address review — dangling-symlink ordering + boot.js catch fallback

Greptile review on #4230 + the related-PR reviews surfaced two fixes on the
shipped code:
1. (#4217) _handle_file_delete/_handle_file_rename checked target.exists()
   BEFORE is_symlink(), so a DANGLING workspace symlink resolved to a missing
   target -> misclassified as 404 'File not found' and left permanently
   undeletable/unrenameable. Moved the no-follow is_symlink() guard before the
   follow-based exists() check in both handlers. +2 dangling-symlink tests.
2. (#3988) boot.js settings-load-FAILURE catch block hardcoded
   _showCliSessions=false, inconsistent with the new True default (the #4006
   catch-block-fallback class). Now defaults true. +1 test pinning the fallback.

Both confirmed by the new tests (20/20 in the two files).

* fix(#3988,#4217): address Opus review — broaden grandfather signal + move-handler parity

Opus #4230 ship-review surfaced 2 LOW findings, both now fixed in-line:
1. (#3988) The grandfather keyed only on onboarding_completed, so a CLI-configured
   user who tweaked a WebUI setting but never ran the wizard would get flipped ON
   (and onboarding.py later auto-persisting onboarding_completed=True would make it
   permanent). Now: established = show_cli_sessions absent AND (onboarding_completed
   OR any persisted setting other than a falsy onboarding flag). A genuinely new /
   still-mid-onboarding file still falls through to True. +1 test.
2. (#4217) _handle_file_move still checked exists() before is_symlink() — the same
   dangling-symlink-404 bug just fixed in delete/rename. Reordered for parity so a
   dangling symlinked source is rejected 400, not 404.

22 tests across the two files pass; ruff clean.

---------

Co-authored-by: nesquena-hermes <agent@nesquena-hermes>
Co-authored-by: Rod Boev <rod.boev@gmail.com>
Co-authored-by: Sanjays2402 <Sanjays2402@users.noreply.github.com>
2026-06-14 23:06:22 -07:00
..
__init__.py
agent_health.py Release v0.51.260 — Release IB (stage-r8) (#3614) 2026-06-04 15:21:41 -07:00
agent_sessions.py fix(#3930): push source filters into agent session scans 2026-06-11 16:59:18 -04:00
auth.py harden(#4023): apply Opus security findings — verify-side name-pattern gate + require handler when auth enabled 2026-06-12 07:37:48 +00:00
background.py
background_process.py [HELD — independent review pending] Release v0.51.340 — bg_task agent wakeup (trio #2968+#2971+#2979) (#3867) 2026-06-08 22:36:18 -07:00
clarify.py feat: add distinct attention request sound 2026-05-30 19:40:40 +00:00
commands.py Merge #4112 (skill bundles in WebUI slash commands, #4087) onto master 2026-06-13 23:13:28 +00:00
compression_anchor.py fix(sidebar): keep newer continuation visible over older snapshot 2026-05-28 13:38:06 -06:00
config.py Release ON: show_cli_sessions default-on for new installs (#3988) + symlink delete/rename guard (#4217) (#4230) 2026-06-14 23:06:22 -07:00
dashboard_probe.py fix: preserve IPv6 dashboard link brackets 2026-05-19 21:35:10 -04:00
extensions.py Opus pre-release follow-ups for PR #1445 2026-05-02 03:49:40 +00:00
gateway_chat.py Apply Codex fix: gateway done-payload uses _session_payload_with_full_messages too (sibling of streaming done/error sites) + test 2026-06-14 20:38:43 +00:00
gateway_watcher.py Release v0.51.256 — Release HX (stage-r4) (#3596) 2026-06-04 12:28:06 -07:00
goals.py fix(i18n): localize /goal runtime status strings 2026-05-10 15:21:24 +08:00
helpers.py Merge #4028 (align profile cookie env var with HERMES_WEBUI_ prefix) onto master 2026-06-13 07:20:58 +00:00
kanban_bridge.py Release v0.51.348 — Release LL (Phase 0 hotfix: timeout regression + data-loss + leaks) (#3917) 2026-06-10 01:12:48 -07:00
metering.py fix: show TPS in assistant message headers 2026-05-04 21:26:43 +00:00
models.py Release OL: empty-pending session-save guard (#4205) + cron-reply fix (#3975) (#4219) 2026-06-14 19:39:26 -07:00
oauth.py Release v0.51.330 — Release KT (#3716 api docstring backfill, partial) (#3841) 2026-06-08 12:22:22 -07:00
onboarding.py Classify onboarding DNS probe failures consistently 2026-05-15 08:51:30 +08:00
passkeys.py Release v0.51.270 — Release IL (stage-u1 — un-hold batch: #3517 #3624 #3613) (#3674) 2026-06-05 11:35:26 -07:00
paths.py fix(profiles): avoid config import cycle 2026-06-01 05:05:16 +00:00
plugin_providers.py Release v0.51.270 — Release IL (stage-u1 — un-hold batch: #3517 #3624 #3613) (#3674) 2026-06-05 11:35:26 -07:00
plugins.py fix(#2622): plugin card UX — legible Open button, single badge, visible toggle + reject protocol-relative tab.path 2026-06-02 03:58:02 +00:00
profiles.py fix(profiles): scope the detached models-rebuild worker to the active profile (#3957) 2026-06-11 01:41:24 +00:00
providers.py fix(providers): claim probe workers under the pool lock (#3787) 2026-06-13 16:42:43 -04:00
request_diagnostics.py fix: add request wedge diagnostics 2026-05-08 15:37:08 +00:00
rollback.py v0.50.255: Opus follow-ups (4 fixes) + CHANGELOG 2026-05-01 17:19:53 +00:00
route_approvals.py fix(approval): extract _webui_mirror_token literal into named constant 2026-06-14 17:48:37 +00:00
routes.py Release ON: show_cli_sessions default-on for new installs (#3988) + symlink delete/rename guard (#4217) (#4230) 2026-06-14 23:06:22 -07:00
run_journal.py fix(streaming): tighten tool limit terminal guards 2026-06-12 10:03:31 +08:00
runner_client.py harden: runner client rejects non-http(s) base_url + no redirect-follow (#3073) 2026-05-31 17:49:26 +00:00
runtime_adapter.py Stage 398: PR #2696 — feat(runtime): add runner-local adapter selection (RuntimeAdapter slice 4c, feature-flagged) 2026-05-21 17:43:54 +00:00
session_discoverability.py Merge PR #3048 2026-05-28 17:47:33 +00:00
session_events.py perf(sidebar): cache and single-flight /api/sessions payloads (#3791) 2026-06-13 22:36:25 -04:00
session_lifecycle.py Release v0.51.256 — Release HX (stage-r4) (#3596) 2026-06-04 12:28:06 -07:00
session_ops.py Release v0.51.276 — Release IR (stage-p3e — preserve manually-named session titles #3542) (#3682) 2026-06-05 13:34:54 -07:00
session_recovery.py Release v0.51.329 — Release KS (#3814 O(n) index map + #3815 startup recovery skip) (#3840) 2026-06-08 11:49:26 -07:00
skill_usage.py fix: remove webui-side writer to avoid conflict with agent 2026-05-27 20:57:32 +08:00
startup.py fix: P0 hotfixes — API regression, code block parser, chmod override 2026-05-01 12:10:48 +00:00
state_sync.py fix: use Optional[T] for default None parameters in state_sync.py 2026-06-01 17:20:17 +00:00
streaming.py fix: keep settled stream message counts consistent 2026-06-14 20:33:56 +00:00
system_health.py feat: add VPS resource health panel 2026-05-05 17:30:56 +00:00
terminal.py Release v0.51.304 — Release JT (stage-p2a — un-held terminal reaper + opt-in Docker GPU) (#3757) 2026-06-06 18:04:16 -07:00
todo_state.py Release v0.51.261 — Release IC (stage-r11) (#3616) 2026-06-04 16:46:20 -07:00
turn_journal.py Release v0.51.326 — Release KP (#3618 + #3802 + #3762 + #3810) (#3816) 2026-06-07 23:18:51 -07:00
updates.py fix(#4085): surface dirty install state in update-check payload 2026-06-13 06:05:06 +00:00
upload.py Release v0.51.326 — Release KP (#3618 + #3802 + #3762 + #3810) (#3816) 2026-06-07 23:18:51 -07:00
usage.py fix: display canonical cache hit percentage 2026-05-19 02:27:12 -06:00
webui_session_db.py Release v0.51.305 — Release JU (stage-p2b — dormant unified-SessionDB adapter) (#3759) 2026-06-06 18:16:07 -07:00
workspace.py Release v0.51.296 — stage-3731 (remote-workspace blocked-root security fix #3731) (#3744) 2026-06-06 13:49:59 -07:00
workspace_git.py Release v0.51.311 — Release KA (brick-wave: workspace Git RCE hardening #3769 + stale-snapshot sidebar visibility #3770) (#3776) 2026-06-07 08:05:30 -07:00
worktrees.py Harden worktree removal safeguards 2026-05-13 09:49:15 +08:00