Skip to content

fix(dashboard): populate cron delivery dropdown from configured platforms#40218

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-47163f53
Jun 6, 2026
Merged

fix(dashboard): populate cron delivery dropdown from configured platforms#40218
teknium1 merged 2 commits into
mainfrom
hermes/hermes-47163f53

Conversation

@teknium1

@teknium1 teknium1 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

The dashboard cron delivery dropdown now reflects what the user actually has set up — no hardcoded platform list. Matrix (and every other backend-supported platform) appears the moment its gateway is configured; platforms the user never set up no longer show.

Reported by a Matrix user (Biscuit): the cron-create modal only offered local/telegram/discord/slack/email, so there was no way to deliver a report to their Matrix room even though the scheduler delivers to Matrix fine.

Root cause

CronPage.tsx hardcoded five <SelectOption> values. The cron scheduler supports far more (_KNOWN_DELIVERY_PLATFORMS / _HOME_TARGET_ENV_VARS), so the UI silently drifted from the engine.

Changes

  • cron/scheduler.py: cron_delivery_targets() — single source of truth. Intersects gateway-configured platforms with cron-deliverable ones; reports each platform's home-channel status.
  • hermes_cli/web_server.py: GET /api/cron/delivery-targets exposes the list (+ implicit local).
  • web/src/pages/CronPage.tsx: both modals render options dynamically. Configured platforms missing a home channel are still shown, annotated "set a home channel first". Edit modal keeps a job's current target even if no longer configured. Local-only → "configure a platform under Channels" hint.
  • i18n: two new optional cron.delivery keys (needsHomeChannel, noneConfigured).

Validation

Scenario Result
Matrix configured, home room set Matrix listed, home_target_set: true (clean label)
Matrix configured, no home room Matrix listed, flagged "set a home channel first"
Platform not configured Excluded from dropdown
No gateway config Local only + hint

Endpoint + scheduler fn E2E'd against a real Matrix gateway config. 5 new tests added; tests/cron/test_scheduler.py + tests/hermes_cli/test_web_server.py green (366 passed).

Infographic

cron-delivery-targets-dynamic

teknium1 added 2 commits June 4, 2026 17:11
Port from anomalyco/opencode#30749.

When compression.enabled is false, NO automatic compaction trigger may
fire. The proactive token-threshold paths (preflight + post-response
should_compress gate) already honoured the setting, but the three
provider-overflow recovery paths in the agent loop — long-context-tier
429, 413 payload-too-large, and context-overflow — called
_compress_context() unconditionally, silently compressing and rotating
the session against the user's explicit choice.

Add a single guard at the top of the overflow-recovery dispatch: when
compression is disabled and the error is one of those three overflow
classes, surface a terminal error (compaction_disabled: True) telling the
user to /compress manually, /new, switch to a larger-context model, or
reduce attachments. Manual /compress (force=True) is unaffected — it never
enters this loop.

Tests: new TestOverflowWithCompactionDisabled (413 + 400 overflow don't
compress when disabled; control case still compresses when enabled).
Existing overflow-recovery tests updated to enable compaction explicitly
(they verify the recovery fires); fixture defaults flipped to True to
match production (compression.enabled defaults to True).
…orms

The dashboard cron-create/edit dropdown hardcoded five delivery options
(local, telegram, discord, slack, email), so users on Matrix — or any
other backend-supported platform — had no way to pick their channel even
though the cron scheduler delivers to all of them. It also offered
Telegram/Discord/etc. to users who never set those up.

- cron/scheduler.py: add cron_delivery_targets() — the single source of
  truth. Intersects gateway-configured platforms with cron-deliverable
  ones and reports whether each platform's home channel is set.
- web_server.py: GET /api/cron/delivery-targets exposes that list (+ the
  implicit local option) to the dashboard.
- CronPage.tsx: both modals render options from the endpoint. Configured
  platforms missing a home channel still appear, annotated "set a home
  channel first" (option B), so the user knows what to fix. Edit modal
  preserves a job's current target even if it's no longer configured.
  Local-only state shows a "configure a platform under Channels" hint.

Validation: scheduler + endpoint E2E'd with a Matrix gateway (home set
and unset); 5 new tests; tests/cron + tests/hermes_cli/test_web_server
green (366 passed).
@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-47163f53 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9868 on HEAD, 9868 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5117 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

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

Approved. Dashboard cron-delivery dropdown now populates from configured platforms — small scope, clear fix, no security concerns.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management labels Jun 6, 2026
@teknium1 teknium1 merged commit 50f9ad7 into main Jun 6, 2026
23 of 25 checks passed
@teknium1 teknium1 deleted the hermes/hermes-47163f53 branch June 6, 2026 03:23
changman pushed a commit to changman/hermes-agent that referenced this pull request Jun 10, 2026
…orms (NousResearch#40218)

* fix: respect disabled auto-compaction on context overflow

Port from anomalyco/opencode#30749.

When compression.enabled is false, NO automatic compaction trigger may
fire. The proactive token-threshold paths (preflight + post-response
should_compress gate) already honoured the setting, but the three
provider-overflow recovery paths in the agent loop — long-context-tier
429, 413 payload-too-large, and context-overflow — called
_compress_context() unconditionally, silently compressing and rotating
the session against the user's explicit choice.

Add a single guard at the top of the overflow-recovery dispatch: when
compression is disabled and the error is one of those three overflow
classes, surface a terminal error (compaction_disabled: True) telling the
user to /compress manually, /new, switch to a larger-context model, or
reduce attachments. Manual /compress (force=True) is unaffected — it never
enters this loop.

Tests: new TestOverflowWithCompactionDisabled (413 + 400 overflow don't
compress when disabled; control case still compresses when enabled).
Existing overflow-recovery tests updated to enable compaction explicitly
(they verify the recovery fires); fixture defaults flipped to True to
match production (compression.enabled defaults to True).

* fix(dashboard): populate cron delivery dropdown from configured platforms

The dashboard cron-create/edit dropdown hardcoded five delivery options
(local, telegram, discord, slack, email), so users on Matrix — or any
other backend-supported platform — had no way to pick their channel even
though the cron scheduler delivers to all of them. It also offered
Telegram/Discord/etc. to users who never set those up.

- cron/scheduler.py: add cron_delivery_targets() — the single source of
  truth. Intersects gateway-configured platforms with cron-deliverable
  ones and reports whether each platform's home channel is set.
- web_server.py: GET /api/cron/delivery-targets exposes that list (+ the
  implicit local option) to the dashboard.
- CronPage.tsx: both modals render options from the endpoint. Configured
  platforms missing a home channel still appear, annotated "set a home
  channel first" (option B), so the user knows what to fix. Edit modal
  preserves a job's current target even if it's no longer configured.
  Local-only state shows a "configure a platform under Channels" hint.

Validation: scheduler + endpoint E2E'd with a Matrix gateway (home set
and unset); 5 new tests; tests/cron + tests/hermes_cli/test_web_server
green (366 passed).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management 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.

3 participants