Skip to content

Bug: viewer config save overwrites viewer.port with UI default (18799) on Hermes #2212

Description

@asorry75

Bug Description

On the Hermes variant, saving settings from the Memory Viewer overwrites viewer.port in ~/.hermes/memos-plugin/config.yaml with the UI default 18799 (the OpenClaw port). Hermes hardcodes its viewer port to 18800 (the bridge connects there), so after a save the daemon listens on a different port and the bridge/stdio link breaks until the config is fixed by hand.

Observed side effects of one save: viewer.port changed 18800 -> 18799, and a placeholder embedding.endpoint: "mem os" appeared.

Steps to Reproduce

  1. Install memos-local-plugin into Hermes (v2.0.12).
  2. Open the Memory Viewer at :18800 → Settings.
  3. Change any setting and save (or click restart after save).

Expected Behavior

Saving settings must not clobber fields the user did not edit — especially viewer.port, which the Hermes adapter owns.

Actual Behavior

PATCH /api/v1/config accepts the whole dirty form (viewer/src/views/SettingsView.tsx:139) and the backend writes it verbatim, so untouched fields fall back to UI defaults (e.g. 18799).

Suggested Fix

  • Backend: protect/ignore adapter-owned keys (viewer.port, agent identity) on PATCH /api/v1/config, or merge with the existing config instead of replacing.
  • Frontend: do not submit unchanged fields.

Environment

  • OS: Windows
  • Plugin: memos-local-plugin 2.0.12 (Hermes adapter)

Metadata

Metadata

Labels

ai:pr-readyAI-created PR is ready for review | AI 生成的 PR 已等待评审area:pluginOpenClaw & Hermesstatus:in-progressSomeone or AI is working on it | 人工或 AI 正在处理types:bugSomething isn't working | 功能异常

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions