diff --git a/00-overview/postgres-migration-roadmap.md b/00-overview/postgres-migration-roadmap.md index bc57005..f2bcba8 100644 --- a/00-overview/postgres-migration-roadmap.md +++ b/00-overview/postgres-migration-roadmap.md @@ -484,6 +484,9 @@ | 2026-11-19 | Phase 5: personal keys | `mcp_tokens` with hash + hint, one active key per (`user_id`, `consumer`), session key API, `/internal/keys` provisioning, rate limits | | 2026-11-19 | Phase 5: actor and revocation | Mutating tools accept `is_user`; REST accepts `X-Actor`; blocked users lose all keys; role changes mark keys stale | | 2026-11-19 | Phase 5: tests | Full suite: 75 passed, 1 known stale-freshness failure | +| 2026-11-19 | Phase 6: shell and auth gate | Drawer navigation, `GnPageHeader` on every page, gnexus-auth gate, settings, logout | +| 2026-11-19 | Phase 6: pages and i18n | Docs search/history/diff/restore, inventory JSON/raw, changesets/apply, status reports, MCP keys page, en/uk/ru | +| 2026-11-19 | Phase 6: verification | Production build plus headless Chromium smoke in file mode, database mode and auth-gate mode; no browser console errors | Notes: @@ -500,6 +503,7 @@ redirect URI) and its webhook secret, all supplied through `.env`/gnexus-creds. - Role-specific publish policy remains open; the current rule is "authenticated and not blocked may write". MCP keys carry `read`/`write` scopes. -- The Vue UI does not yet expose the MCP keys page; the API is ready. -- The next phase is Phase 6: UI parity, auth gate, i18n, history/diff and the MCP keys - page. +- The Vue UI now covers the current functionality, the auth gate, i18n and the MCP + keys page. Real gnexus-auth credentials are still required to exercise live login. +- The next phase is Phase 7: importer v1, dual-run reconciliation, cutover rehearsal + and the final migration of the existing knowledge base. diff --git a/CLAUDE.md b/CLAUDE.md index c680610..975971c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -122,7 +122,7 @@ ## UI architecture -The entire frontend is a single Vue 3 app in `ui/src/main.js` (no router). It renders tabbed, read-focused views — docs, inventory, changes, git — using components from `gnexus-ui-kit/vue`. All data goes through `/api` (`apiGet`/`apiPost`). Avoid copying UI-kit styles locally; prefer upstream changes in the kit. +The frontend is a single Vue 3 app in `ui/src/main.js` (no router). It uses a drawer shell with pages: docs (search, history, diff, proposals), inventory (JSON/raw), changes (apply), status, MCP keys, and settings. `ui/src/i18n/` holds flat en/uk/ru dictionaries; navigation labels must be `computed` because `t()` reads the reactive locale. The auth gate calls `/api/me`; sign-in redirects through `/api/auth/login`, and gnexus-auth returns to `/auth/callback` (Vite proxies `/auth` and `/webhooks`, nginx proxies them in production). All data goes through `/api`. Avoid copying UI-kit styles locally; prefer upstream changes in the kit. ## Testing notes diff --git a/ui/README.md b/ui/README.md index 63c9a4b..2eff083 100644 --- a/ui/README.md +++ b/ui/README.md @@ -1,7 +1,7 @@ --- owner: gmikcon -status: draft -last_reviewed: 2026-05-09 +status: active +last_reviewed: 2026-11-19 review_interval: 30d confidence: high source_of_truth: owner-confirmed @@ -9,9 +9,9 @@ # Gnexus Book UI -The Gnexus Book UI should be a custom Vue.js application based on `gnexus-ui-kit`. +The Gnexus Book UI is a custom Vue.js application based on `gnexus-ui-kit`. -`gnexus-ui-kit` is the official UI kit and design-system layer for Gnexus projects. It should be consumed as a dependency so the shared visual style can be managed centrally across projects. +`gnexus-ui-kit` is the official UI kit and design-system layer for Gnexus projects. It is consumed as a dependency so the shared visual style can be managed centrally across projects. Source UI kit repository: @@ -19,35 +19,34 @@ https://git.gnexus.space/root/gnexus-ui-kit ``` -## MVP Role +## Current implementation -The first UI is not a document editor. +The UI is a maintenance console, not a document editor. It provides: -It should provide: +- an auth gate backed by gnexus-auth SSO (`/api/me`, explicit sign-in, logout); +- drawer navigation with `GnPageHeader` on every page; +- documentation browsing, search, frontmatter/body view, version history, diff and restore; +- inventory browsing with JSON and generated raw views; +- draft changesets with validation results and apply/publish; +- validation and freshness reports with issue details; +- MCP personal key management (create, rotate, revoke, copy-once token); +- settings with per-service language selection and account details; +- en/uk/ru localization through `src/i18n/`. -- documentation browsing; -- inventory browsing; -- validation and freshness reports; -- traffic route inspection; -- recent local change or commit inspection if practical. +All writes go through the backend API; the UI does not edit files directly. -All write operations should initially go through the backend API and agent workflows. +## Architectural notes -## Frontend Decision +- `src/main.js` is the single-page application: no router, page switching is local state. +- Navigation labels are `computed` because `t()` reads a reactive locale; module-level + arrays would freeze the initial language. +- Toasts require `GnToastProvider` at the app root; `useToast()` is used inside it. +- Authentication is disabled when the server has no gnexus-auth client configured; + the UI then runs open for local development and hides the MCP keys page. +- The login button redirects to `/api/auth/login`. gnexus-auth redirects back to + `/auth/callback`, so the dev server proxies `/auth` and `/webhooks` as well as `/api`. -Use: - -- Vue.js; -- `gnexus-ui-kit` as a dependency; -- the FastAPI backend under `server/`. - -Do not replace this with MkDocs as the primary UI. - -Avoid copying UI kit styles into this project unless there is a temporary integration reason. Prefer upstream changes in `gnexus-ui-kit` for shared style decisions. - -## Local Dependency - -The current local development dependency is: +## Local dependency ```json "gnexus-ui-kit": "file:../../gnexus-ui-kit" @@ -55,6 +54,8 @@ This keeps the UI kit as a package dependency while allowing local updates to the official kit source. +Avoid copying UI kit styles into this project unless there is a temporary integration reason. Prefer upstream changes in `gnexus-ui-kit` for shared style decisions. + ## Development ```bash @@ -63,4 +64,6 @@ npm run dev ``` -The dev server runs on port `3006` and proxies `/api/*` to the FastAPI backend on `127.0.0.1:3005`. +The dev server runs on port `3006` and proxies `/api/*`, `/auth/*`, and +`/webhooks/*` to the FastAPI backend on `127.0.0.1:3005`. Build with `npm run build`; +the output is `dist/`.