docs(mobile): post-review gaps in AGENT + MOBILE_DELEGATION roadmaps
- AGENT_TASK_ROADMAP: mobile summary row, dated bump, ordered gap list → blocks - MOBILE_DELEGATION_ROADMAP: post-review checklist table + NomGap SDK note Made-with: Cursor
This commit is contained in:
parent
db2874174b
commit
4ee604be76
@ -1,6 +1,6 @@
|
||||
# NoteLett — Agent Task Roadmap
|
||||
|
||||
**Date:** March 29, 2026
|
||||
**Date:** March 30, 2026
|
||||
**Product:** NoteLett (`notelett`) — Structured notes for humans + AI agents
|
||||
**Repo:** `learning_ai_notes`
|
||||
**Stack:** Fastify 5 backend (port 4016) · Next.js 16 web (port 3000) · Expo mobile
|
||||
@ -14,7 +14,7 @@
|
||||
|---------|-----------------|-------|-------|---------------|
|
||||
| **Backend** | 7 modules, ~32 endpoints, 8 MCP tools | 20 files (unit + integration) | ✅ tsc | 13 (5 missing source in common_plat) |
|
||||
| **Web** | 6 pages, 13 components, 15 lib files | 7 unit + 7 E2E | ✅ next build | 10 (all used) |
|
||||
| **Mobile** | 5 tabs incl. settings, note detail, auth (+ register), kill-switch gate, broadcast + survey surfaces, feedback submission, active offline queue enqueue/flush, runtime app metadata + a11y labels, Vitest RN mock infra + component smoke tests, 5 stores | 32 tests (6 files) | ✅ typecheck | — |
|
||||
| **Mobile** | 5 tabs incl. settings, note detail, auth (+ register + session-aware index), kill-switch gate, broadcast + survey in root layout, feedback on settings, offline queue flush (boot + foreground), `app-metadata` for telemetry versions, Vitest RN mocks + component smoke tests, 5 stores | 32 tests (6 files) | ✅ typecheck | Direct `@bytelyst/*` clients (+ optional future RN platform SDK) |
|
||||
|
||||
**Package resolution note:** 5 backend `@bytelyst/*` packages (`backend-config`, `backend-flags`, `backend-telemetry`, `fastify-auth`, `field-encrypt`) do not have source directories in `learning_ai_common_plat/packages/`. They resolve via `^0.1.0` from the private Gitea npm registry but their source must be created in common_plat. This is a shared blocker with NomGap — see Phase 0 below.
|
||||
|
||||
@ -22,6 +22,17 @@
|
||||
|
||||
For **ordered mobile implementation** (Expo app under `mobile/`), use **[`MOBILE_DELEGATION_ROADMAP.md`](./MOBILE_DELEGATION_ROADMAP.md)** — blocks, file pointers, and acceptance criteria in one place. Update the **Current State** table above when mobile capabilities change materially.
|
||||
|
||||
### Mobile — remaining gaps (March 2026 review)
|
||||
|
||||
Shipped since earlier audit: **session-aware `index`** (`hasBootstrapped` → tabs vs auth), **register** on auth store, **kill-switch blocking UI**, **broadcast + survey** in `_layout.tsx`, **feedback** on settings, **offline queue flush** on boot and `AppState` active, **telemetry app/build** via `mobile/src/lib/app-metadata.ts` (Expo Constants).
|
||||
|
||||
Still open or follow-up (see [`MOBILE_DELEGATION_ROADMAP.md`](./MOBILE_DELEGATION_ROADMAP.md) **§ Remaining checklist**):
|
||||
|
||||
1. **Hydrate vs auth** — `_layout` still kicks off `hydrateNotes` / `hydrateWorkspaces` / `hydrateInbox` in the same effect as `bootstrapAuth()` without awaiting auth; unauthenticated cold starts may still hit 401s or empty error handling (**Block A** refinement).
|
||||
2. **Telemetry flush** — No `AppState` → `telemetryClient.flush()` (or equivalent) on background; offline **note** queue flushes on foreground (**Block G**).
|
||||
3. **Optional convergence** — Adopt `@bytelyst/react-native-platform-sdk` for flags/kill/broadcast/survey to match NomGap, or keep discrete clients and document (**Block A §A.3**).
|
||||
4. **Deeper tests / sync** — Expand RNTL coverage; optional `@bytelyst/sync` remains **Block I**.
|
||||
|
||||
---
|
||||
|
||||
## Phase 0 — Missing Platform Package Source (SHARED BLOCKER)
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
**Repo:** `learning_ai_notes`
|
||||
**Mobile app root:** `mobile/` (Expo Router under `mobile/src/app/`).
|
||||
**Stack:** Expo ~55, React Native ~0.83, Zustand + MMKV, `@bytelyst/*` (auth-client, api-client, telemetry-client, feature-flag-client, kill-switch-client, blob-client, offline-queue, diagnostics-client).
|
||||
**Stack:** Expo ~55, React Native ~0.83, Zustand + MMKV, `@bytelyst/*` (auth-client, api-client, telemetry-client, feature-flag-client, kill-switch-client, blob-client, broadcast-client, survey-client, feedback-client, offline-queue, diagnostics-client).
|
||||
|
||||
**Related pattern:** NomGap uses the same idea under `learning_ai_fastgap/docs/MOBILE_DELEGATION_ROADMAP.md` — **do not** copy fasting-specific paths or M-numbers; this file is authoritative for NoteLett.
|
||||
|
||||
@ -27,15 +27,33 @@
|
||||
|
||||
| Area | What to verify |
|
||||
|------|----------------|
|
||||
| **Router + shell** | `mobile/src/app/_layout.tsx` — bootstraps auth, `initPlatform()`, hydrates stores |
|
||||
| **Entry** | `mobile/src/app/index.tsx` → `Redirect` to `/auth` |
|
||||
| **Auth UI** | `mobile/src/app/auth.tsx` — email/password → `useAuthStore` → `/(tabs)` |
|
||||
| **Auth + API** | `mobile/src/api/auth.ts` (`createAuthClient`, MMKV `storagePrefix: PRODUCT_ID`), `mobile/src/api/client.ts` (`createApiClient` + `getToken`) |
|
||||
| **Platform clients** | `mobile/src/lib/platform.ts` — telemetry init + `trackEvent`, feature flags, kill switch, `blobClient`, diagnostics singleton |
|
||||
| **Stores + API modules** | `auth-store`, `notes-store`, `workspace-store`, `inbox-store`; `mobile/src/api/notes.ts`, `workspaces.ts`, `note-agent-actions.ts` |
|
||||
| **Offline queue (module)** | `mobile/src/lib/offline-queue.ts` exports `noteOfflineQueue` — **UI/store wiring is still partial** (see capture screen copy) |
|
||||
| **Tabs + detail** | `(tabs)/` index, search, capture, inbox; `mobile/src/app/note/[id].tsx` |
|
||||
| **Tests** | Vitest on stores (`*.test.ts`); no `@testing-library/react-native` in `mobile/package.json` today |
|
||||
| **Router + shell** | `mobile/src/app/_layout.tsx` — kill-switch gate UI, broadcast strip + survey modals, `initPlatform()`, hydrates, offline queue flush on boot + `AppState` active |
|
||||
| **Entry** | `mobile/src/app/index.tsx` — waits for `hasBootstrapped`, then `/(tabs)` vs `/auth` |
|
||||
| **Auth UI** | `mobile/src/app/auth.tsx` — sign-in + register → `useAuthStore` → `/(tabs)` |
|
||||
| **Auth + API** | `mobile/src/api/auth.ts`, `mobile/src/api/client.ts` |
|
||||
| **Platform clients** | `mobile/src/lib/platform.ts` — telemetry (versions from `app-metadata.ts`), flags, kill switch, blob, diagnostics |
|
||||
| **Broadcast / survey / feedback** | `mobile/src/lib/broadcast-client.ts`, `survey-client.ts`, `feedback-client.ts`; banners + survey UI in `_layout`; feedback form on `(tabs)/settings.tsx` |
|
||||
| **Stores + API modules** | `auth-store`, `notes-store`, `workspace-store`, `inbox-store`; `mobile/src/api/*.ts` |
|
||||
| **Offline queue** | `mobile/src/lib/offline-queue.ts` — `flushNoteQueue`, `getNoteQueueSize`; wired from `_layout` |
|
||||
| **Tabs + detail** | `(tabs)/` index, search, capture, inbox, **settings**; `mobile/src/app/note/[id].tsx` |
|
||||
| **Tests** | Store tests + RN mocks + component smokes (`*.test.tsx`) — confirm counts in `mobile/package.json` / CI |
|
||||
|
||||
---
|
||||
|
||||
## Remaining checklist (March 2026 review)
|
||||
|
||||
Earlier “post-review” items **1–7** (session index, kill UI, broadcast/survey, feedback, queue flush, telemetry versions) are **addressed in code**. Focus next:
|
||||
|
||||
| # | Issue | Primary files | Block |
|
||||
|---|--------|----------------|--------|
|
||||
| 1 | Hydrates still run in parallel with `bootstrapAuth` — may 401 before token | `_layout.tsx`, stores | **A** (refine) |
|
||||
| 2 | No telemetry **buffer flush** on background (offline note queue flushes on foreground) | `platform.ts` / `_layout.tsx` | **G** |
|
||||
| 3 | Blob uploads for attachments — ensure single path via `blobClient` when file capture ships | capture / note detail | **F** |
|
||||
| 4 | Deeper RNTL coverage beyond smoke tests | `mobile/` tests | **H** |
|
||||
| 5 | Optional `@bytelyst/react-native-platform-sdk` vs discrete clients (NomGap alignment) | providers | **A §A.3** |
|
||||
| 6 | Optional `@bytelyst/sync` | stores + API | **I** |
|
||||
|
||||
**Architecture note:** NomGap uses **`@bytelyst/react-native-platform-sdk`** for flags, kill switch, broadcast, survey. NoteLett uses **direct** `broadcast-client`, `survey-client`, etc. — both valid; converge only if you want one pattern across products.
|
||||
|
||||
---
|
||||
|
||||
@ -59,8 +77,8 @@ Block I → Optional — @bytelyst/sync or deeper sync (last; needs API contra
|
||||
|
||||
### A.1 Goals
|
||||
|
||||
- **Signed-in users** should not be forced through `/auth` on every cold start — `index` should redirect to `/(tabs)` when `useAuthStore` / `getAuthClient()` is authenticated (after `bootstrap` resolves).
|
||||
- Add **register** (and optional forgot-password) paths aligned with backend + web, or document why mobile is sign-in only.
|
||||
- **Signed-in users** should not be forced through `/auth` on every cold start — `index` should redirect to `/(tabs)` when authenticated (after `bootstrap`). **Shipped:** `hasBootstrapped` + redirect in `mobile/src/app/index.tsx`.
|
||||
- **Register** aligned with backend + web. **Shipped:** `auth-store.register` + auth UI paths; optional **forgot-password** still open if desired.
|
||||
- Ensure **token refresh** behavior matches `@bytelyst/auth-client` expectations (no silent 401 loops on `getApiClient()`).
|
||||
|
||||
### A.2 Files to read first
|
||||
|
||||
Loading…
Reference in New Issue
Block a user