hermes-agent/apps/desktop/electron
ethernet db5cbff884 feat(desktop): detect and surface gone branches for cleanup
Add `gone` branch detection (upstream tracking ref deleted on remote) to
the composer coding rail and the sidebar project tree, plus a bulk archive
action for sessions on gone branches.

Part 1 — composer "gone" indicator:
- Add `_branch_gone()` to `web_git.py` (remote/REST path) and
  `branchGone()` to `git-review-ops.ts` (Electron local path), both using
  `git for-each-ref --format=%(upstream:track)`.
- Add `gone: boolean` to `HermesRepoStatus` type.
- Show amber "gone" badge in `CodingStatusRow` next to the branch name.
- Rides existing repo-status refresh edges (cwd change, workspace change
  tick, busy→idle, window focus) — no new polling.

Part 2a — session DB staleness fix:
- Re-probe `git_branch`/`git_repo_root` at turn-complete (gateway
  `_run_prompt_submit` finally block) and on session resume (both
  deferred and eager paths), using the existing `_persist_session_git_meta`
  daemon-thread helper. Keeps the session DB's branch column fresh so the
  sidebar tree and gone-branch cleanup are accurate.

Part 2b — sidebar gone-branch detection + cleanup UI:
- Add `gone_branches()` to `git_probe.py` (one `for-each-ref` per repo).
- Add `gone_fn` parameter to `project_tree.build_tree()` + `_annotate_gone()`
  helper that marks branch lanes with `gone: True`.
- Wire `_gone_branches_for_repo` into the gateway's `_build_project_tree`.
- Add `gone?: boolean` to `SidebarSessionGroup` (renderer type).
- Show amber "gone" badge on sidebar branch lanes in `WorkspaceHeader`.
- Add bulk "Archive sessions" action to `WorkspaceMenu` for gone lanes:
  confirms, optimistically tombstones, calls `setSessionArchived` per
  session, surfaces success/failure toasts.
- i18n strings for all 4 locales (en, ja, zh, zh-hant).

Tests:
- `test_status_gone_after_remote_branch_deleted` — E2E with bare remote,
  push, delete, fetch --prune, verify gone=true.
- `test_gone_fn_annotates_branch_lanes` — project tree annotation.
- `test_gone_fn_absent_leaves_no_gone_field` — no spurious gone field.
- Updated `sampleStatus` in coding-status.test.ts with `gone: false`.
2026-07-15 17:41:31 -04:00
..
backend-child.ts test(desktop): extract hiddenWindowsChildOptions + stopBackendChild for real unit tests 2026-07-13 17:22:17 -04:00
backend-command.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
backend-command.ts cleanup(desktop): remove 'use strict' in ts & mjs 2026-07-13 17:22:17 -04:00
backend-env.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
backend-env.ts cleanup(desktop): lint&fmt all 2026-07-13 17:22:17 -04:00
backend-probes.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
backend-probes.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
backend-ready.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
backend-ready.ts cleanup(desktop): lint&fmt all 2026-07-13 17:22:17 -04:00
bootstrap-platform.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
bootstrap-platform.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
bootstrap-runner.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
bootstrap-runner.ts cleanup(desktop): note that ts imports don't need extension in one comment 2026-07-13 17:22:17 -04:00
connection-config.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
connection-config.ts feat(desktop): Hermes Cloud connection mode — one sign-in, agent discovery, silent connect 2026-07-10 01:37:43 -05:00
dashboard-token.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
dashboard-token.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
desktop-uninstall.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
desktop-uninstall.ts cleanup(desktop): lint&fmt all 2026-07-13 17:22:17 -04:00
embed-referer.ts feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
entitlements.mac.inherit.plist fix(desktop): inherit microphone entitlement for macOS helpers 2026-06-03 07:32:00 +07:00
entitlements.mac.plist Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
fs-read-dir.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
fs-read-dir.ts feat(desktop): bridge WSL paths for a Windows host + WSL backend 2026-07-12 05:32:54 -04:00
gateway-ws-probe.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
gateway-ws-probe.ts cleanup(desktop): lint&fmt all 2026-07-13 17:22:17 -04:00
git-repo-scan.ts feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
git-review-ops.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
git-review-ops.ts feat(desktop): detect and surface gone branches for cleanup 2026-07-15 17:41:31 -04:00
git-root.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
git-root.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
git-worktree-ops.test.ts fix(desktop): inline git identity in worktree tracking test for CI 2026-07-15 11:46:29 -04:00
git-worktree-ops.ts fix(desktop): worktree from origin/main should not set up upstream tracking 2026-07-15 11:46:29 -04:00
hardening.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
hardening.ts cleanup(desktop): lint&fmt all 2026-07-13 17:22:17 -04:00
link-title-window.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
link-title-window.ts cleanup(desktop): lint&fmt all 2026-07-13 17:22:17 -04:00
main.ts feat(desktop): electron — openDir IPC + ⌘W menu bridge (tabs, not windows) 2026-07-13 17:57:54 -04:00
oauth-net-request.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
oauth-net-request.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
preload.ts feat(desktop): electron — openDir IPC + ⌘W menu bridge (tabs, not windows) 2026-07-13 17:57:54 -04:00
profile-delete-routing.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
profile-delete-routing.ts cleanup(desktop): remove 'use strict' in ts & mjs 2026-07-13 17:22:17 -04:00
session-windows.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
session-windows.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
titlebar-overlay-width.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
titlebar-overlay-width.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
update-count.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
update-count.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
update-marker.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
update-marker.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
update-rebuild.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
update-rebuild.ts feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
update-relaunch.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
update-relaunch.ts cleanup(desktop): lint&fmt all 2026-07-13 17:22:17 -04:00
update-remote.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
update-remote.ts cleanup(desktop): lint&fmt all 2026-07-13 17:22:17 -04:00
vscode-marketplace.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
vscode-marketplace.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
window-state.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
window-state.ts cleanup(desktop): lint&fmt all 2026-07-13 17:22:17 -04:00
windows-child-options.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
windows-child-options.ts test(desktop): extract hiddenWindowsChildOptions + stopBackendChild for real unit tests 2026-07-13 17:22:17 -04:00
windows-hermes-path.test.ts test(desktop): replace windows-child-process.test.ts regex with real tests 2026-07-13 17:22:17 -04:00
windows-hermes-path.ts test(desktop): replace windows-child-process.test.ts regex with real tests 2026-07-13 17:22:17 -04:00
windows-user-env.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
windows-user-env.ts cleanup(desktop): lint&fmt all 2026-07-13 17:22:17 -04:00
workspace-cwd.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
workspace-cwd.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
wsl-clipboard-image.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
wsl-clipboard-image.ts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
wsl-path-bridge.test.ts test(desktop): move node tests to vitest as well 2026-07-13 17:22:17 -04:00
wsl-path-bridge.ts feat(desktop): bridge WSL paths for a Windows host + WSL backend 2026-07-12 05:32:54 -04:00
zoom.test.ts refactor(desktop): funnel zoom apply+notify so restore can't desync 2026-07-13 17:39:03 -04:00
zoom.ts refactor(desktop): funnel zoom apply+notify so restore can't desync 2026-07-13 17:39:03 -04:00