explain the project
explain the project
I’ll scan the repository structure and key docs first, then summarize what the project does, how it’s organized, and how to run it.
I found a monorepo with app/server/db/desktop/mobile packages. Next I’ll read the README and package configs to map architecture and run commands accurately.
I found a monorepo with app/server/db/desktop/mobile packages. Next I’ll read the README and package configs to map architecture and run commands accurately.
The README is outdated versus the actual code (it says Next.js, but this repo is Vite + Express + Electron). I’m now reading the main entry files to explain the real architecture and data flow.
I’ve confirmed core UI behavior and APIs. I’ll now inspect the server’s remaining endpoints plus the DB/sync modules so the explanation covers persistence, activity logs, and cloud/local sync modes.
I’m now checking the product/spec docs to explain intent vs implementation, since the code and README diverge. Then I’ll give you a concise “what it is + how it works” walkthrough.
This repo is a monorepo for Entity: an AI-native workspace where you edit files, monitor agents, and manage tasks in one UI.
packages/app (React + Vite + Tailwind + Zustand)packages/server (Express + WebSocket)packages/db (SQLite via better-sqlite3, with local/cloud task adapters)electron (main packaged app) and packages/desktop (older/alternate Electron package)packages/mobile (Expo app that loads the web UI in a WebView)Core behavior:
@mentions in docs trigger OpenClaw hooks (/api/mention)ws://<host>:3002)MC-SOURCE.html into React components via packages/app/src/components/mission-control/* and packages/app/src/hooks/useMCData.tsImportant context:
README.md is partially outdated (it says Next.js; actual frontend is Vite).Typical dev run:
npm --prefix packages/server run devnpm --prefix packages/app run devnpm run electron (or npm --prefix electron run dev)If you want, I can give you a “where to start hacking” map by feature (files, tasks, agents, sync, desktop packaging).
<image name=[Image #1]>
</image>
[Image #1] Um so I merged two apps um I merged two apps um the older one um M MC um missionions missions mission control there's a login on it so when you open it um on unless you click on tasks nothing happens when you click on tasks then it loads the thing um take the login screen out this login screen and put it on the whole app right um so you should not only apply to tasks you should just apply to the whole app and then add a settings um add um add an i add a on the settings bar when you click on settings on the page it loads um it loads uh it talk a settings and modal in the settings modal, let's set up toggle on and off login. So when it's off, it doesn't ask you to log in. If it's on, then it asks you to log in. Also, read them in your current directory. There's a file called context. Read it so you can have a fuller picture of everything that has happened in the project so far and where is work.
[Image #1] Um so I merged two apps um I merged two apps um the older one um M MC um missionions missions mission control there's a login on it so when you open it um on unless you click on tasks nothing happens when you click on tasks then it loads the thing um take the login screen out this login screen and put it on the whole app right um so you should not only apply to tasks you should just apply to the whole app and then add a settings um add um add an i add a on the settings bar when you click on settings on the page it loads um it loads uh it talk a settings and modal in the settings modal, let's set up toggle on and off login. So when it's off, it doesn't ask you to log in. If it's on, then it asks you to log in. Also, read them in your current directory. There's a file called context. Read it so you can have a fuller picture of everything that has happened in the project so far and where is work.
I understand: you want authentication moved from the Tasks/Mission Control section to the entire app, plus a Settings modal toggle to enable/disable login globally. I’m going to read the context file first, then inspect existing login/settings code so I can wire this cleanly.
I understand: you want authentication moved from the Tasks/Mission Control section to the entire app, plus a Settings modal toggle to enable/disable login globally. I’m going to read the context file first, then inspect existing login/settings code so I can wire this cleanly.
I’m using the senior-engineering skill for this change because it touches app-wide auth flow, state persistence, and UI integration across multiple views. I found a .context directory, so next I’m reading it and the Mission Control login/settings code paths.
I’ve read the project context files. Next I’m tracing exactly where the current login overlay and settings modal are injected so I can move auth to an app-wide gate without breaking Mission Control behavior.
I’ve read the project context files. Next I’m tracing exactly where the current login overlay and settings modal are injected so I can move auth to an app-wide gate without breaking Mission Control behavior.
I have enough context and I’m moving to implementation.
Plan:
packages/app/src/App.tsx with a full-screen login modal that applies across Files, Agents, and Tasks.Require login toggle and session controls.packages/app/src/components/mission-control/MCModals.tsx.packages/app/src/hooks/useMCData.ts so MC runtime auth checks don’t reintroduce the old Task-only login flow.I’m now editing App.tsx to add the app-wide login gate and a global settings modal with persisted on/off login toggle, plus settings buttons in desktop/tablet/mobile headers.
I’m now editing App.tsx to add the app-wide login gate and a global settings modal with persisted on/off login toggle, plus settings buttons in desktop/tablet/mobile headers.
I’ve added the shell-level auth/settings UI. Next I’m removing the Task-only Mission Control login overlay and patching MC runtime fetch auth endpoints so Tasks no longer owns login flow.
I’ve finished the code edits. I’ll run a frontend build now to verify TypeScript and confirm the updated auth/settings flow compiles cleanly.
Implemented.
.context/context.md (plus .context/decisions.md, .context/timeline.md, .context/todo.md) before changing code.packages/app/src/App.tsx:19, packages/app/src/App.tsx:116, packages/app/src/App.tsx:663, packages/app/src/App.tsx:881.Require login toggle and session controls in packages/app/src/App.tsx:663, packages/app/src/App.tsx:727, packages/app/src/App.tsx:751, packages/app/src/App.tsx:783.packages/app/src/components/mission-control/MCModals.tsx:5.packages/app/src/hooks/useMCData.ts:146.Current behavior:
Require login can be turned on/off in Settings.mission).Validation:
npm --prefix packages/app run build (TypeScript + Vite passed).Looking at the context file and and seeing more of the decisions, is there anything you'd you would do differently right now, um, for the way the app is built or the way it looks?
Looking at the context file and and seeing more of the decisions, is there anything you'd you would do differently right now, um, for the way the app is built or the way it looks?
Yes. Based on the current context/decisions, I’d change a few things now.
Build/Architecture
OPENCLAW, MC_API_BASE, WS URL) and environment-driven defaults. Right now this is fragile across devices/networks.useMCData + MC-SOURCE.html port). Keep it as a bridge, but plan a staged native React rewrite of the highest-traffic MC flows first.electron/ and packages/desktop/ variants). Pick one source of truth.Look/UX
If I had to pick one thing to do first this week: centralize runtime config + API wiring. It will reduce most current “works on one machine, breaks on another” issues fast.
Yes. Based on the current context/decisions, I’d change a few things now.
Build/Architecture
OPENCLAW, MC_API_BASE, WS URL) and environment-driven defaults. Right now this is fragile across devices/networks.useMCData + MC-SOURCE.html port). Keep it as a bridge, but plan a staged native React rewrite of the highest-traffic MC flows first.electron/ and packages/desktop/ variants). Pick one source of truth.Look/UX
If I had to pick one thing to do first this week: centralize runtime config + API wiring. It will reduce most current “works on one machine, breaks on another” issues fast.
go ahead and implement all and use a ralph loop retry 4
go ahead and implement all and use a ralph loop retry 4
I’m going to implement the full set in practical scope now: config centralization, typed API client/error handling, UX/state polish, and desktop packaging consolidation. I’ll first inspect the Ralph loop scripts so I can run with retry 4 as requested, then apply the code changes.
I’m going to implement the full set in practical scope now: config centralization, typed API client/error handling, UX/state polish, and desktop packaging consolidation. I’ll first inspect the Ralph loop scripts so I can run with retry 4 as requested, then apply the code changes.
I found the Ralph loop scripts. I’ll use a 4-pass “Ralph retry loop” during implementation and, if needed, I can also run an explicit loop script variant with MAX_LOOPS=4 after code changes. I’m now auditing the config/API/desktop files to implement the architecture fixes directly.
I’ve mapped the main hotspots. I’m now implementing a shared runtime config + HTTP client first, then I’ll refactor hooks/App to use it and add the UX polish/error states. After that I’ll consolidate desktop packaging to one source of truth.
I’ve mapped the main hotspots. I’m now implementing a shared runtime config + HTTP client first, then I’ll refactor hooks/App to use it and add the UX polish/error states. After that I’ll consolidate desktop packaging to one source of truth.