Skip to content

feat(push): offer hermex-push updates from the session list - #1807

Merged
uzairansaruzi merged 6 commits into
masterfrom
issue/1803-plugin-update-card
Nov 25, 2026
Merged

uzairansaruzi merged 6 commits into
masterfrom
issue/1803-plugin-update-card

Conversation

@uzairansaruzi

@uzairansaruzi uzairansaruzi commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Linked issue

Fixes #1803

What changed

Hermex offered a hermex-push update only on Settings › Notifications, and only when the host's plugin was older than a version built into the app, so plugin fixes that ship between app releases reached almost nobody.

  • Two thresholds. HermexPushPlugin.newestVersion is now minimumVersion: the oldest plugin this build works properly with. A loaded plugin below it gets the recommendation ("This version of Hermex needs 0.7.3 or newer"; the minimum moved to 0.7.3 when master's 0.7.3 bump, chore(push): offer the hermex-push 0.7.3 update #1806, was merged in). At or above it, the host's own update check is the signal: plugins.manage list (sent without a Profile, so it lists the dashboard's own plugins) reports update_available + update_target for a git install its last scheduled check found behind. Verified against hermes-agent at the pinned 3b42157 (tui_gateway/methods_tools.py _plugin_rows, contract AgentPluginRow); the dashboard hub route carries no such field. That row's version is plugin.yaml on disk, so a newer one than the loaded version means "Restart Hermes to finish". Features still gate on /capabilities.
  • Checked without opening Settings. HermexPushUpdateOffers holds each server's last accepted standing in memory, keyed by server URL. The Hermes Sessions list runs the existing checkPlugin() once its connection is live, at most hourly per server, only for a paired server. Settings refreshes it too. A passive read that started before Settings settled a result is dropped (per-server revision), so a slow host can't bring back a stale card after an update.
  • Session list card. SessionListCard.pluginUpdate, built on SessionListCardShell. Its button opens Settings › Notifications in a sheet and raises the existing "Update the hermex-push plugin?" confirmation there; a restart-needed card opens the same page, which owns the restart. The confirmation is unchanged, so the gateway restart is still never one tap.
  • Ranking: first, ahead of usage reports, tip and star, and it ignores the rating cooldown, because it fixes something. Usage-report consent isn't time-sensitive and keeps its turn on a later launch.
  • Dismissal is stored per server, per offered version (the minimum, the host's update target, or the restart), and a different offer brings the card back.
  • Badge. A red dot on Settings › Notifications while an update is pending, dismissed or not.
  • DEBUG: Settings › Developer › "Force plugin update card".
  • ADR 0122 records the decisions; ADR 0089, bots.md, the isolation table and the TestFlight gate are updated. New copy is in the String Catalog for all shipped languages.

How it was tested

  • scripts/test-sim FBA8E9C3-3BA8-40BF-9048-F3EEE95A5EA1 --only HermesMobileTests/HermexPushProvisioningTests --only HermesMobileTests/SessionListCardTests --only HermesMobileTests/PluginsModelTests --only HermesMobileTests/RatingPromptTests --only HermesMobileTests/AuthManagerStateTests --only HermesMobileTests/LocalizationCatalogTests --only HermesMobileTests/UsageReportsTests: 181 passed, 0 failed.
  • New tests: host-reported update → restart needed → up to date, recorded only for that server; below minimum recorded as required; an update before pairing publishes nothing; a late Sessions read can't restore a settled offer; listing parse (only a reported update counts; no Profile sent); plugin card outranks every card; dismissal hides only that offer on that server, survives relaunch, and a new offer brings it back.
  • ci/check_string_catalog.py and ci/check_comments.py clean.
  • Signed Debug build on the iPhone 17e simulator with the DEBUG override, signed into a Hermes server: the card renders above the list, and Update plugin… opens the Notifications sheet. No live server was mutated.

Plugin update card on the Sessions list

Reviewed with sol-loop: 3 rounds with gpt-6.2-sol on high (Business account, earliest weekly reset). Sol verdict: changes requested at budget end. Fixed: offers only for a paired server, unpaired checks don't use the hourly slot, a late passive read can't restore an offer, a lost pairing drops the card. One finding disputed after two replies, for the owner:

  • Sol: a transient plugins.manage failure reads as up to date and clears a known "newer" card; keep the last offer for the same loaded version.
  • Me: that listing is the optional "newer" signal. Keeping the offer means storing the target beside it and threading a "listing failed" standing through every caller, and throwing instead would regress hosts without plugins.manage. The next hourly or Settings check restores it, and the below-minimum recommendation never depends on the listing.
    Declined as nits: restart dismissal keyed on the loaded rather than the installed version (two installs before one restart), and the plugin card taking the one-card-per-launch slot.

Checklist

  • Local validation passes using scripts/test-sim <assigned-simulator-udid> with the tests required by AGENTS.md § Verifying; the selection and results are recorded above
  • New/changed Codable models decode tolerantly (optionals for fields the server might add or rename)
  • No new third-party dependencies (the list in AGENTS.md is locked)
  • No invented API endpoints or JSON shapes (verified against upstream source or a running server)

Made by Claude Opus 5.5 (claude-opus-5-5) in Claude Code via T3 Code.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • The Sessions list can show a Hermex push plugin update card when an update is available or the installed version is below the minimum required.
    • Open Notifications settings from the card to review and confirm an update. A badge appears on Notifications while an offer is pending.
    • Dismissing an offer applies only to that server. Offers can reappear when the update status changes.
  • Bug Fixes
    • Removing a server now also clears its saved plugin update offers.

uzairansaruzi and others added 4 commits November 24, 2026 18:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

Hermes checks host-reported hermex-push versions against the app’s minimum supported version and tracks update offers per server. Offers can appear as session-list cards or as a badge in Notifications settings, where the existing update confirmation can be presented.

Changes: Hermex push update offers

Layer / File(s) Summary
Plugin status and offer tracking
HermesMobile/Features/Bots/HermexPushPairing.swift, HermesMobile/Features/Bots/HermexPushProvisioner.swift, HermesMobile/Networking/..., HermesMobile/Auth/AuthManager.swift, HermesMobile/Features/Bots/BotConnectionView.swift, HermesMobileTests/HermexPushProvisioningTests.swift, TESTFLIGHT.md, docs/adr/*, docs/agents/*
The app uses minimumVersion and the host’s plugin listing to determine plugin status. It tracks offers per server, checks no more than hourly, and clears offer state when pairing is unavailable or removed. Tests cover host-list parsing, offer updates, and stale results.
Session-list update card
HermesMobile/Config/SessionListCardState.swift, HermesMobile/Config/UsageReports.swift, HermesMobile/Features/SessionList/*, HermesMobile/Features/Settings/SettingsAboutPage.swift, HermesMobileTests/SessionListCardTests.swift
An eligible plugin-update card takes priority over other cards. It opens Notifications settings, and its dismissal is recorded for the matching server. The developer settings page adds a toggle to force the card in debug builds.
Notifications update prompts and indicator
HermesMobile/Features/Bots/HermexPushSettingsPage.swift, HermesMobile/Features/Settings/SettingsNotificationsPage.swift, HermesMobile/Features/Settings/SettingsView.swift, HermesMobile/Resources/Localizable.xcstrings
When update offers are enabled, the Notifications page can present the existing update confirmation for available or newer plugin statuses. The Notifications row displays a badge when the server has an offer. Localized text distinguishes the minimum supported version from a newer host-reported version.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant HermesSessionListView
  participant HermexPushUpdateOffers
  participant HermexPushProvisioner
  participant BotDashboardClient
  participant HermesServer
  HermesSessionListView->>HermexPushUpdateOffers: check due offer for server
  HermexPushUpdateOffers->>HermexPushProvisioner: check plugin status
  HermexPushProvisioner->>BotDashboardClient: request host listing
  BotDashboardClient->>HermesServer: pluginsList(profile: nil)
  HermesServer-->>BotDashboardClient: plugin listing and update signal
  BotDashboardClient-->>HermexPushProvisioner: parsed host listing
  HermexPushProvisioner->>HermexPushUpdateOffers: record accepted status
Loading

Possibly related PRs

  • uzairansaruzi/hermex#1658: Adds a GitHub star card to the same session-list card slot and establishes related card ordering and rating-prompt behavior.

Suggested reviewers: audichuang

Merge Risk: Low · up to 9edbb

Update offers can briefly disappear after a transient host listing failure, and webui servers do not get the Sessions-list card. Settings › Notifications still works, and the badge still appears there. Neither issue blocks merge, but both are worth follow-up.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(push): offer hermex-push updates from the session list" matches the main change. The PR adds a per-server plugin-update offer card to the Sessions list, a Settings Notifications badge,…
Linked Issues check Passed Issue #1803 has one direct linked issue and no active parent context. Its coding requirements are covered by the whole-PR summary at head 9edbbd6.

[#1803] Two thresholds: `HermexPushPlugin.minimumVer…
Out of Scope Changes check Passed Each changed area either implements #1803 or supports it.
- HermesCall.pluginsList(profile:) accepts an optional profile. This supports the host listing check without a Profile.
- `UsageReports.reco…
Full details: Title check

Explanation

The title "feat(push): offer hermex-push updates from the session list" matches the main change. The PR adds a per-server plugin-update offer card to the Sessions list, a Settings Notifications badge, and a minimumVersion threshold for hermex-push. The title is specific, concise, and follows a conventional-commit style. It does not cover every detail, such as the Settings badge or the hourly check, which is acceptable.

Full details: Linked Issues check

Explanation

Issue #1803 has one direct linked issue and no active parent context. Its coding requirements are covered by the whole-PR summary at head 9edbbd6.

[#1803] Two thresholds: HermexPushPlugin.minimumVersion replaces newestVersion (HermexPushPairing.swift). HermexPushProvisioner recommends an update below the minimum. At or above it, hostListing reads update_available and update_target from the plugins.manage list, sent without a Profile. The status .newer(loaded:target:) covers a host-reported target.

[#1803] Checks outside Settings: HermexPushUpdateOffers.checkIfDue runs the existing checkPlugin() for paired servers only, at most hourly per server. The Sessions list triggers it when the connection is live. Settings also refreshes it. Offers are held in memory keyed by server URL. A per-server revision drops stale passive reads.

[#1803] Session list card: SessionListCard.pluginUpdate is selected before other eligible cards and ignores the rating cooldown. It is built on SessionListCardShell. Dismissal is stored per server and per offer. A different offer shows the card again.

[#1803] Badge: SettingsView shows a red dot on the Notifications row while an offer exists for the server, dismissed or not.

[#1803] Feature gating: the summary shows no version-based feature gate. Features remain gated on /capabilities.

Deviation: the issue says the card button runs the existing confirmed update directly, or opens Notifications for a restart. The PR opens a Notifications sheet for both cases. The existing confirmation still runs, so no required safety step is removed. The PR states this choice openly.

The PR description now states minimum 0.7.3. The code sets minimumVersion to 0.7.3, so the earlier mismatch is resolved.

Automated tests cover host-reported updates, below-minimum recording, pre-pairing behavior, stale-read protection, listing parse, card ranking, and dismissal persistence. I did not run the tests. The author reports 181 passing tests for the listed targets.

Unresolved uncertainty: the summary does not show the incremental changes since the previous reviewed heads in detail. The whole-PR summary is used as the evidence base.

Full details: Out of Scope Changes check

Explanation

Each changed area either implements #1803 or supports it.

  • HermesCall.pluginsList(profile:) accepts an optional profile. This supports the host listing check without a Profile.
  • UsageReports.record ignores .pluginUpdate as well as .usageReports. This supports the card ranking requirement.
  • SessionListCardShell takes an optional dismiss callback. SessionListView passes pluginUpdateServer: nil in the rating-card check. These support the new card.
  • AuthManager.removeBotConnection and BotConnectionSetup discard clear stored offers. This meets the per-server isolation requirement from multi-server-state-isolation.md.
  • The DEBUG-only "Force plugin update card" toggle supports testing the card. It is not shipped behavior.
  • The localized strings, bots.md, the isolation table, the TESTFLIGHT gate, and ADRs 0089 and 0122 document or support the change.
  • Test updates cover the renamed minimum and the new behavior.

No change was shown to be unrelated to #1803. The author's declined review finding (a transient plugins.manage failure can clear a known newer offer) concerns robustness of the optional newer signal. It is not a stated requirement of #1803, so it does not make a change out of scope.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are fixed and no new blocking issue was found.

Summary

This PR adds per-server plugin update cards to Sessions and a pending-update dot in Notifications settings.

  • Hermex offers plugin updates when a host reports one or needs a newer minimum.
  • The Sessions list checks paired hosts and puts plugin update cards first.
  • Notifications settings shows a badge for pending plugin updates.

Reviews (3) · Last reviewed commit: "fix(push): let only the newest plugin ch..." · Reviewed by Greptile

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Show plugin update offers on the webui Sessions list. · SessionListView.swift:674

HermesMobile/Features/SessionList/SessionListView.swift:674
Minor · Functional Correctness · Quick win

Show plugin update offers on the webui Sessions list.

The webui Sessions list cannot show a hermex-push update card, even when Settings records an offer for that server. The slot at line 674 receives no pluginUpdateServer, so the offer lookup returns nil. The rating lookup at line 211 also passes nil, so the offer is excluded there too. The isolation table lists the offer for both server kinds.

Users on webui servers still reach the update through Settings › Notifications, where the pending badge appears. The gap is limited to the discovery card on this surface.

Pass the active server to both call sites. Pass an openNotifications action to the card slot that opens the existing Notifications page for this server, as the Hermes list does. Run the paired-server passive check on this surface, as the Hermes list does after connection. Servers without an offer must keep the existing card selection.

Suggested fix for the rating lookup

-                        if let card = SessionListCard.current(pluginUpdateServer: nil, hasSharedImport: hasSharedImport), isQuietSessionListVisible {
+                        if let card = SessionListCard.current(pluginUpdateServer: server, hasSharedImport: hasSharedImport), isQuietSessionListVisible {
Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f7fe366 and cd00814.

Files selected for processing: 22

  • HermesMobile/Auth/AuthManager.swift
  • HermesMobile/Config/SessionListCardState.swift
  • HermesMobile/Config/UsageReports.swift
  • HermesMobile/Features/Bots/HermexPushPairing.swift
  • HermesMobile/Features/Bots/HermexPushProvisioner.swift
  • HermesMobile/Features/Bots/HermexPushSettingsPage.swift
  • HermesMobile/Features/SessionList/HermesSessionListView.swift
  • HermesMobile/Features/SessionList/SessionListCards.swift
  • HermesMobile/Features/SessionList/SessionListView.swift
  • HermesMobile/Features/Settings/SettingsAboutPage.swift
  • HermesMobile/Features/Settings/SettingsNotificationsPage.swift
  • HermesMobile/Features/Settings/SettingsView.swift
  • HermesMobile/Networking/Bots/BotDashboardClient.swift
  • HermesMobile/Networking/Hermes/HermesCall.swift
  • HermesMobile/Resources/Localizable.xcstrings
  • HermesMobileTests/HermexPushProvisioningTests.swift
  • HermesMobileTests/SessionListCardTests.swift
  • TESTFLIGHT.md
  • docs/adr/0089-hermes-plugins.md
  • docs/adr/0122-hermex-push-host-plugin.md
  • docs/agents/bots.md
  • docs/agents/multi-server-state-isolation.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

…ved connection's offer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Do not treat a failed host listing as an up-to-date result. · HermexPushProvisioner.swift:472

HermesMobile/Features/Bots/HermexPushProvisioner.swift:472
Minor · Functional Correctness · Quick win

Do not treat a failed host listing as an up-to-date result.

If hostListing() throws after this server has a .newer offer, Line 110 converts the error to nil. This branch returns .upToDate, and offers.record removes the pending offer. The card and badge then disappear until a later successful check.

Keep listing failures distinct from successful “no update” results. Preserve the known offer on failure, but clear it when a successful listing confirms no pending update.

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4a03657 and 9edbbd6.

Files selected for processing: 5

  • HermesMobile/Features/Bots/BotConnectionView.swift
  • HermesMobile/Features/Bots/HermexPushPairing.swift
  • HermesMobile/Features/Bots/HermexPushProvisioner.swift
  • HermesMobileTests/HermexPushProvisioningTests.swift
  • docs/agents/multi-server-state-isolation.md
Files skipped from review as they are similar to previous changes: 1

  • docs/agents/multi-server-state-isolation.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@uzairansaruzi

Copy link
Copy Markdown
Owner Author

Note

🤖 Claude Opus 5.5 responding on behalf of uzairansaruzi

Re CodeRabbit's outside-diff finding at HermexPushProvisioner.swift:472 ("Do not treat a failed host listing as an up-to-date result"): declining on purpose, as in the sol-loop review recorded in the PR body.

  • The effect is small. It only touches the optional "newer version available" card for a host that is already at or above minimumVersion. If one plugins.manage list read fails, that card hides until the next check: the next Sessions check within the hour, or any visit to Notifications. The below-minimum card, which carries the real recommendation, never depends on this read.
  • The fix isn't. hostListing returns nil both when the read fails and when there's no hermex-push row. Telling the two apart needs a new standing that pluginStanding, publish and the Settings callout would all handle, and Settings would show a "couldn't check" error over a plugin that works.

A follow-up can separate the two if a vanishing card turns out to matter in practice.

@uzairansaruzi
uzairansaruzi merged commit 6234f81 into master Nov 25, 2026
5 checks passed
@uzairansaruzi
uzairansaruzi deleted the issue/1803-plugin-update-card branch November 25, 2026 01:47
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.

feat(push): tell users when hermex-push has an update, without waiting for an app release

1 participant