Skip to content

fix(analytics): resolve server connection error and enhance analytics UX#1464

Open
daxforge wants to merge 1 commit into
aryandas2911:mainfrom
daxforge:fix/analytics-connection
Open

fix(analytics): resolve server connection error and enhance analytics UX#1464
daxforge wants to merge 1 commit into
aryandas2911:mainfrom
daxforge:fix/analytics-connection

Conversation

@daxforge

@daxforge daxforge commented Jun 7, 2026

Copy link
Copy Markdown
  • Relocated adaptiveSettings to the root of the Routine schema in Routine.js to ensure settings are correctly saved and loaded.
  • Configured a local database fallback in db.js using mongodb-memory-server when local MongoDB daemon is offline.
  • Implemented offline fallback/demo mode in Analytics.jsx so the page remains interactive when the API is unreachable.
  • Added animated skeleton layout placeholders, a real-time server connection status pill, auto-retry connection attempts, and manual refresh/reconnect buttons.
  • Extended backend CORS origins in server.js to support port 5174 when port 5173 is occupied.
  • Enhanced backend controller logging with database connection readyState and error stack details.

📌 Description

Briefly explain the changes made.

🔗 Related Issue

Closes #<issue_number>

🛠 Changes Made

📸 Screenshots (if applicable)

Add screenshots or GIFs to explain UI changes.

✅ Checklist

  • Code runs locally
  • Followed project structure
  • No console errors
  • Properly tested changes
  • Linked the issue

🚀 Notes for Reviewers

Anything specific you want reviewed.

- Relocated `adaptiveSettings` to the root of the Routine schema in `Routine.js` to ensure settings are correctly saved and loaded.
- Configured a local database fallback in `db.js` using `mongodb-memory-server` when local MongoDB daemon is offline.
- Implemented offline fallback/demo mode in `Analytics.jsx` so the page remains interactive when the API is unreachable.
- Added animated skeleton layout placeholders, a real-time server connection status pill, auto-retry connection attempts, and manual refresh/reconnect buttons.
- Extended backend CORS origins in `server.js` to support port 5174 when port 5173 is occupied.
- Enhanced backend controller logging with database connection readyState and error stack details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant