Skip to content

fix(desktop): show remote backend updates without counts - #52828

Merged
OutThisLife merged 1 commit into
NousResearch:mainfrom
helix4u:fix/desktop-backend-update-indicator
Jun 26, 2026
Merged

fix(desktop): show remote backend updates without counts#52828
OutThisLife merged 1 commit into
NousResearch:mainfrom
helix4u:fix/desktop-backend-update-indicator

Conversation

@helix4u

@helix4u helix4u commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the remote Desktop backend update indicator when the connected backend reports that an update is available but cannot provide an exact commit count.

The backend update API already distinguishes update_available from behind; for presence-only update checks it can return behind: -1 with update_available: true. Desktop was collapsing that into behind: 0, which made the remote backend statusbar/overlay look up to date even when the backend reported an available update.

This also aligns official-SSH git backend update checks with the Desktop client checker by returning 1 when the backend HEAD differs from upstream, without running git fetch or hitting SSH auth.

Related Issue

Discord support thread: 1519895846533988454 (No remote gateway updates count)

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Preserve backend update_available in Desktop update state instead of deriving availability only from a positive behind count.
  • Show the remote backend statusbar item as update-available when the backend has an update but no exact count.
  • Keep the remote backend update overlay in the available-update state instead of showing “You’re all set” for unknown-count updates.
  • Return 1 for official-SSH git backend checkouts when HEAD differs from upstream, matching the Desktop client update count behavior while still avoiding SSH fetch/auth prompts.
  • Add coverage for presence-only backend update responses and update the official-SSH update-check expectation.

How to Test

  1. scripts/run_tests.sh -j 4 tests/hermes_cli/test_update_check.py tests/hermes_cli/test_dashboard_admin_endpoints.py::TestUpdateCheckEndpoint
  2. venv/bin/python -m pytest tests/hermes_cli/test_dashboard_admin_endpoints.py::TestUpdateCheckEndpoint -q
  3. npm exec vitest run src/store/updates.test.ts -- --environment jsdom --maxWorkers 4 from apps/desktop/
  4. npm --prefix apps/desktop run typecheck

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Ubuntu/WSL checkout with targeted Python + Desktop TypeScript tests

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

N/A

Screenshots / Logs

Targeted checks passed:

  • scripts/run_tests.sh -j 4 tests/hermes_cli/test_update_check.py tests/hermes_cli/test_dashboard_admin_endpoints.py::TestUpdateCheckEndpoint15 passed
  • venv/bin/python -m pytest tests/hermes_cli/test_dashboard_admin_endpoints.py::TestUpdateCheckEndpoint -q7 passed
  • npm exec vitest run src/store/updates.test.ts -- --environment jsdom --maxWorkers 422 passed
  • npm --prefix apps/desktop run typecheck → passed

@helix4u
helix4u marked this pull request as ready for review June 26, 2026 03:42
@alt-glitch alt-glitch added type/bug Something isn't working comp/desktop Electron desktop app (apps/desktop/*) comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels Jun 26, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Fixes the update indicator not showing when the backend cannot count commits behind (e.g. Nix-managed installs where behind is -1 but update_available is true).

Looks Good

  • Adds updateAvailable field to DesktopUpdateStatus interface, propagated from update_available in the backend check response
  • All UI consumers (status bar, updates overlay, idle view) updated to use the new field instead of behind > 0
  • banner.py fix correctly maps UPDATE_AVAILABLE_NO_COUNT to 1 for the CLI banner
  • Test coverage: new test for behind: -1, update_available: true case, existing test updated
  • Clean, focused, backward-compatible

Reviewed by Hermes Agent

@OutThisLife
OutThisLife merged commit 5cc4009 into NousResearch:main Jun 26, 2026
32 checks passed
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…d-update-indicator

fix(desktop): show remote backend updates without counts
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
…d-update-indicator

fix(desktop): show remote backend updates without counts
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…d-update-indicator

fix(desktop): show remote backend updates without counts
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…d-update-indicator

fix(desktop): show remote backend updates without counts
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…d-update-indicator

fix(desktop): show remote backend updates without counts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants