Skip to content

fix: normalize update banner repository URLs#1701

Merged
1 commit merged into
nesquena:masterfrom
Michaelyklam:fix/issue-1691-whats-new-url
May 5, 2026
Merged

fix: normalize update banner repository URLs#1701
1 commit merged into
nesquena:masterfrom
Michaelyklam:fix/issue-1691-whats-new-url

Conversation

@Michaelyklam
Copy link
Copy Markdown
Contributor

Thinking Path

  • The update banner's "What's new?" link is only useful if the backend provides a canonical browser-facing repository URL.
  • Issue bug: wrong link #1691 reports the link pointing at https://github.com/nesquena/hermes-webu/ instead of hermes-webui.
  • The fragile part is remote URL normalization: .git must be treated as a literal suffix, not as a character set, and trailing slashes should not prevent suffix removal.
  • This PR keeps the fix narrow by centralizing update remote normalization in api/updates.py and pinning the edge case with a regression test.
  • The user-visible benefit is that the "What's new?" compare link stays on the intended nesquena/hermes-webui repository.

What Changed

  • Added _normalize_remote_url() in api/updates.py for update-banner repository URLs.
  • Preserved SSH-to-HTTPS conversion while stripping only a literal .git suffix.
  • Normalized trailing slashes before and after .git removal so URLs like https://github.com/nesquena/hermes-webui.git/ become https://github.com/nesquena/hermes-webui.
  • Added a regression test covering the .git/ trailing-slash case for the WebUI repo URL.

Why It Matters

The update banner should send users to the actual Hermes WebUI repository when they click "What's new?". A truncated repository slug makes the link useless and undermines the update flow at exactly the moment users are trying to understand a release.

Closes #1691.

Verification

/home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_update_banner_fixes.py::TestUpdateChecker::test_repo_url_strips_dot_git_before_trailing_slashes -q
/home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_update_banner_fixes.py::TestUpdateChecker -q
env -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_update_banner_fixes.py tests/test_issue1579_whats_new_link_404.py -q
env -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/ -q
git diff --check

Result:

RED: new regression failed before the production change because repo_url remained `https://github.com/nesquena/hermes-webui.git/`.
GREEN: TestUpdateChecker passed (3 passed in 1.42s).
Related update-banner/link tests passed (42 passed in 3.33s).
Full suite passed: 4478 passed, 2 skipped, 3 xpassed, 1 warning, 8 subtests passed in 405.72s.
git diff --check passed.

Manual verification, if applicable:

  • Not applicable; this is backend URL normalization covered by regression tests.

UI media, if applicable:

  • Not applicable; no visual UI layout or interaction flow changed.

Risks / Follow-ups

  • Low risk: this only centralizes the existing update remote normalization and adds support for trailing slash variants.
  • Follow-up only if maintainers want broader remote URL support beyond GitHub-style HTTPS/SSH origins.

Model Used

AI assisted.

  • Provider: OpenAI Codex
  • Model: gpt-5.5
  • Notable tool use: gh issue/PR workflow, git worktree isolation, pytest regression/full-suite verification, diff inspection.

This was referenced May 5, 2026
@nesquena-hermes nesquena-hermes closed this pull request by merging all changes into nesquena:master in 4daa238 May 5, 2026
Michaelyklam pushed a commit to Michaelyklam/hermes-webui that referenced this pull request May 5, 2026
Michaelyklam added a commit to Michaelyklam/hermes-webui that referenced this pull request May 5, 2026
10 PRs (3 surfaces additions, 7 fixes):
- nesquena#1644 model picker chip + group count (@bergeouss, closes nesquena#1425)
- nesquena#1684 update network failures UX (@Michaelyklam, closes nesquena#1321)
- nesquena#1685 Codex spark models (@Michaelyklam, closes nesquena#1680)
- nesquena#1689 normalize profile base homes (@Michaelyklam, refs nesquena#749)
- nesquena#1693 adaptive title refresh deadlock (@ai-ag2026)
- nesquena#1701 normalize update banner URL (@Michaelyklam, closes nesquena#1691)
- nesquena#1702 workspace double-click rename (@Michaelyklam, closes nesquena#1698)
- nesquena#1703 cache invalidation on auth-store drift (@Michaelyklam, closes nesquena#1699)
- nesquena#1704 markdown fence lengths (@Michaelyklam, closes nesquena#1696)
- nesquena#1706 multi-image paste fix (@Michaelyklam, closes nesquena#1697)

Tests: 4477 → 4503 (+26). Opus: SHIP, 7/7 verification clean.

Co-authored-by: Michael Lam <Michaelyklam1@gmail.com>
Co-authored-by: ai-ag2026 <noreply@github.com>
Co-authored-by: bergeouss <noreply@github.com>
@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Closed by the v0.51.4 release in PR #1707 (merged at 4daa238, deployed to production).

Live on production: https://github.com/nesquena/hermes-webui/releases/tag/v0.51.4

🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: wrong link

2 participants