Skip to content

fix: remove server.url/host/port consistency validator#343

Open
evagundan wants to merge 2 commits into
XiaoMi:mainfrom
evagundan:fix/remove-server-url-validation
Open

fix: remove server.url/host/port consistency validator#343
evagundan wants to merge 2 commits into
XiaoMi:mainfrom
evagundan:fix/remove-server-url-validation

Conversation

@evagundan

Copy link
Copy Markdown

Summary

  • Remove _validate_server_url_host_port model validator from MilocoSettings

Motivation

The validator assumes server.url matches server.host:server.port, which breaks deployments where the external URL differs from the local bind address:

  • Reverse proxy: server.url points to the public URL (e.g. https://miloco.example.com) while server.host is 127.0.0.1
  • Hermes platform: server.url may point to a different host/port for agent webhook callbacks
  • Docker/WSL: Network address translation means the external URL differs from the internal bind address

The validator only emits a warning (doesn't block startup), but the warning is misleading in these scenarios — the configuration is intentional, not a mistake.

Changes

  • backend/miloco/src/miloco/config/settings.py: Remove _validate_server_url_host_port method and its comment block (49 lines removed)

Testing

  • Verified the app starts correctly with mismatched server.url and server.host:server.port
  • No other code depends on this validator

The _validate_server_url_host_port validator assumes server.url matches
server.host:server.port, which breaks deployments where the external URL
differs from the local bind address (e.g. behind a reverse proxy or when
server.url points to a different host/port for agent webhook callbacks).

Remove this validator to allow flexible server.url configuration.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

Copy link
Copy Markdown

👋 感谢提交 PR @evagundan!维护者会尽快 review。

提交前请确认:

  • CI 全绿(test / lint / build)
  • 改动聚焦单一主题,便于审阅
  • 若改动了依赖(lockfile / pyproject.toml / package.json),需维护者评论 /allow-dependencies-change <当前 head SHA> 放行(之后再 push 需重新放行)

Add a new Rules tab to the sidebar that displays configured automation
rules with enable/disable toggles and manual trigger buttons.

Changes:
- Add Rule type definitions to types.ts
- Add rule API functions (list, toggle, trigger) to real.ts and index.ts
- Create RuleListPanel component with rule cards showing:
  - Rule name with tag badge
  - Mode badge (event/state)
  - Condition query text
  - Duration/ratio info
  - Toggle switch and trigger button
- Add rules tab to Sidebar navigation
- Add i18n translations for zh and en
- Wire rules panel into App.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants