[PR #4926] [MERGED] Manage Onboarding decision via DB flag #4826

Closed
opened 2026-02-22 18:36:36 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4926
Author: @timothycarambat
Created: 1/28/2026
Status: Merged
Merged: 1/28/2026
Merged by: @timothycarambat

Base: masterHead: onboarding-flag


📝 Commits (3)

📊 Changes

12 files changed (+160 additions, -21 deletions)

View changed files

📝 .github/workflows/dev-build.yaml (+1 -1)
📝 frontend/src/components/PrivateRoute/index.jsx (+5 -13)
frontend/src/hooks/useOnboardingComplete.js (+16 -0)
📝 frontend/src/models/system.js (+26 -0)
📝 frontend/src/pages/OnboardingFlow/Steps/Home/index.jsx (+2 -0)
📝 frontend/src/pages/OnboardingFlow/Steps/LLMPreference/index.jsx (+10 -3)
📝 frontend/src/pages/OnboardingFlow/Steps/index.jsx (+2 -0)
📝 server/endpoints/system.js (+20 -0)
📝 server/endpoints/workspaces.js (+0 -3)
📝 server/models/systemSettings.js (+23 -1)
📝 server/utils/boot/index.js (+3 -0)
server/utils/boot/markOnboarded.js (+52 -0)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

What is in this change?

Currently, if the instance is onboarded, users can manually access the /onboarding pages of instances that are fully set up. If the instance has authentication, you cannot do anything on this page, but you can still see it.

If the instance is onboarded, you should be auto-redirected to the home/login page. Instead of inferring the status of onboarding by checking if certain properties are set in the ENV we set a static protected system setting.

For legacy instances, we include a startup boot script that will automatically self-mark itself as onboarded by the old legacy rules so that existing users are not redirected to onboarding who already use AnythingLLM.

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/4926 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 1/28/2026 **Status:** ✅ Merged **Merged:** 1/28/2026 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `onboarding-flag` --- ### 📝 Commits (3) - [`911c40e`](https://github.com/Mintplex-Labs/anything-llm/commit/911c40e6a6c5aeb4c229dd35fd24cd795d7cfc02) WIP add onboarding flag to db - [`f0a59f3`](https://github.com/Mintplex-Labs/anything-llm/commit/f0a59f3f43c1e3f2fa81f39b0b0e5ff57d23bfe2) dev build - [`7129650`](https://github.com/Mintplex-Labs/anything-llm/commit/712965091c5281aff5687100eb915adaed38ca0d) fix onboarding telem call ### 📊 Changes **12 files changed** (+160 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/dev-build.yaml` (+1 -1) 📝 `frontend/src/components/PrivateRoute/index.jsx` (+5 -13) ➕ `frontend/src/hooks/useOnboardingComplete.js` (+16 -0) 📝 `frontend/src/models/system.js` (+26 -0) 📝 `frontend/src/pages/OnboardingFlow/Steps/Home/index.jsx` (+2 -0) 📝 `frontend/src/pages/OnboardingFlow/Steps/LLMPreference/index.jsx` (+10 -3) 📝 `frontend/src/pages/OnboardingFlow/Steps/index.jsx` (+2 -0) 📝 `server/endpoints/system.js` (+20 -0) 📝 `server/endpoints/workspaces.js` (+0 -3) 📝 `server/models/systemSettings.js` (+23 -1) 📝 `server/utils/boot/index.js` (+3 -0) ➕ `server/utils/boot/markOnboarded.js` (+52 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [ ] 🐛 fix - [x] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### What is in this change? Currently, if the instance is onboarded, users can manually access the `/onboarding` pages of instances that are fully set up. If the instance has authentication, you cannot do anything on this page, but you can still see it. If the instance is onboarded, you should be auto-redirected to the home/login page. Instead of inferring the status of onboarding by checking if certain properties are set in the ENV we set a static protected system setting. For legacy instances, we include a startup boot script that will automatically self-mark itself as onboarded by the old legacy rules so that existing users are not redirected to onboarding who already use AnythingLLM. <!-- Describe the changes in this PR that are impactful to the repo. --> ### Additional Information <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [ ] I ran `yarn lint` from the root of the repo & committed changes - [ ] Relevant documentation has been updated - [ ] I have tested my code functionality - [ ] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:36:36 -05:00
yindo closed this issue 2026-02-22 18:36:36 -05:00
yindo changed title from [PR #4926] Manage Onboarding decision via DB flag to [PR #4926] [MERGED] Manage Onboarding decision via DB flag 2026-06-05 15:20:35 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4826