Skip to content

Fix #758: Memmy 概览页面持续提示“memory layer network error”,重启后仍无法恢复 - #760

Open
Memtensor-AI wants to merge 1 commit into
MemTensor:mainfrom
Memtensor-AI:feature/autodev-758-20261027084326546
Open

Memtensor-AI wants to merge 1 commit into
MemTensor:mainfrom
Memtensor-AI:feature/autodev-758-20261027084326546

Conversation

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Description

Fixed the persistent "memory layer network error" on the Memory overview page.

Root cause: OverviewSubPage treated a single failed panel read as terminal. It replaced any cached snapshot with the raw backend text ("memory layer network error"), had no retry, and offered no recovery action. The Memory service runs as a local child process that is briefly unreachable while installing, migrating, or restarting; the backend maps that to memory_layer_unavailable (503), so one unlucky read left the page permanently broken until it remounted — matching the reported "still broken after restarting the app" behavior.

Changes (App/frontend/desktop):

  • New memory-panel-error.ts: classifies panel read failures (not-ready / unavailable / unauthorized / unknown), marks transient service outages as retryable, and defines a bounded backoff schedule (1.5s, 4s, 10s, 20s).
  • New use-memory-panel-load.ts: shared load hook that keeps the last successful snapshot on screen, retries on the backoff schedule, and exposes state for manual retry.
  • New use-memory-service-restart.ts: restart action that clears the stale panel cache on success and reports success/failure.
  • New memory-panel-error-notice.tsx / memory-panel-status.tsx: actionable notice (localized headline, auto-retry status, Retry now / Restart service buttons). The raw backend message is demoted to a diagnostic line alongside the request id instead of being the primary copy.
  • OverviewSubPage and AnalyticsSubPage both now use this path. Analytics previously had no recovery at all and dead-ended identically.
  • zh-CN and en-US copy added; panel error styles added to styles.css.

Verification:

  • Typecheck (App/frontend/desktop tsconfig) passes.
  • ESLint on all changed/added files passes with no warnings; the 8 repo-wide lint errors are pre-existing in untouched files (policies-sub-page, tasks-sub-page, codex-sidebar-layout).
  • Frontend test suite: 233 files / 2431 tests pass, including 26 new tests covering auto-recovery, backoff exhaustion, cached-snapshot retention, missing-client handling, manual retry, and service restart success/failure.
  • Vite production build succeeds.
  • Two initial suite failures were a pre-existing build-order issue (@memmy/migrations not built); they pass after building that workspace and are unrelated to this change.

Commit daeab8f on feature/autodev-758-20261027084326546, pushed to remote.

Related Issue (Required): Fixes #758

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • Documentation update

How Has This Been Tested?

Automated tests are pending.

  • Unit Test
  • Test Script Or Test Steps (please provide)
  • Pipeline Automated API Test (please provide)

Checklist

  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have created related documentation issue/PR in MemOS-Docs (if applicable)
  • I have linked the issue to this PR (if applicable)
  • I have mentioned the person who will review this PR

Reviewer Checklist

The overview panel treated a single failed read as a terminal state: it
replaced any cached snapshot with the raw "memory layer network error"
text, had no retry, and offered no way out. When the local Memory service
was still installing, migrating, or wedged, the page stayed broken until
it remounted — including across app restarts, which is the reported
symptom.

Load panel data through a shared useMemoryPanelLoad hook that keeps the
last good snapshot on screen, retries on a backoff schedule, and surfaces
an actionable notice with retry and service-restart actions once automatic
attempts run out. Apply it to both the overview and analytics panels,
which read the same service and previously dead-ended the same way.

The raw backend message is kept, but demoted to a diagnostic line with the
request id; users now see what failed and what to do about it.

Refs MemTensor#758

This branch has not been deployed

No deployments
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.

Memmy 概览页面持续提示“memory layer network error”,重启后仍无法恢复

2 participants