You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(push): offer hermex-push updates from the session list - #1807
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.managelist (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.
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.
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.
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.
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.
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.
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: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
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
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
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.
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 {
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
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.
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.
🤖 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
HermexPushPlugin.newestVersionis nowminimumVersion: 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.managelist(sent without a Profile, so it lists the dashboard's own plugins) reportsupdate_available+update_targetfor a git install its last scheduled check found behind. Verified against hermes-agent at the pinned3b42157(tui_gateway/methods_tools.py_plugin_rows, contractAgentPluginRow); the dashboard hub route carries no such field. That row'sversionisplugin.yamlon disk, so a newer one than the loaded version means "Restart Hermes to finish". Features still gate on/capabilities.HermexPushUpdateOffersholds each server's last accepted standing in memory, keyed by server URL. The Hermes Sessions list runs the existingcheckPlugin()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.SessionListCard.pluginUpdate, built onSessionListCardShell. 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.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.ci/check_string_catalog.pyandci/check_comments.pyclean.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:
plugins.managefailure reads as up to date and clears a known "newer" card; keep the last offer for the same loaded version.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
scripts/test-sim <assigned-simulator-udid>with the tests required byAGENTS.md§ Verifying; the selection and results are recorded aboveCodablemodels decode tolerantly (optionals for fields the server might add or rename)AGENTS.mdis locked)Made by Claude Opus 5.5 (
claude-opus-5-5) in Claude Code via T3 Code.🤖 Generated with Claude Code
Summary by CodeRabbit