Files
hermes-agent/tests
Austin Pickett 3da330fe23 fix(desktop): git-enrich lazily created session rows; never switch to a fallback lane label
Desktop session rows are created on the first submit (_ensure_session_db_row),
after _hydrate_session_cwd has already run against a missing row, so no git
probe was ever claimed and git_branch/git_repo_root stayed NULL. The sidebar
then labelled the lane with the DEFAULT_BRANCH_LABEL "main" fallback, and "+"
ran `git switch main`, which fails on a master-trunk repo.

- _ensure_session_db_row schedules the generation-scoped git probe once per
  live session when the row has a cwd but lacks git metadata.
- "+" on a main-checkout lane switches only when git lists the label as a
  branch (laneSwitchTarget); otherwise the session opens on the current checkout.

Fixes #108694
Fixes #108784
2026-09-29 16:29:04 -04:00
..