chore: land in-progress workspace changes before 1.16.2

The tree carried uncommitted work from several areas (web push, mobile
screens, admin charts, test-hygiene cleanup, CI and map docs). It is landed
as one commit so the release pipeline can start from a clean tree; the
desktop transcript-correction behaviour shipped in the previous commit and
is unchanged here.
This commit is contained in:
Yun Chan 2026-11-05 21:58:44 +09:00
parent 9c2b6a9782
commit 7fe49c437e
144 changed files with 3760 additions and 4523 deletions

View file

@ -2,7 +2,11 @@
> Status: ACTIVE
> Last full audit: 2026-09-13
> Last update: 2026-11-04 — **Windows v1.16.1 패치 배포.** 빠른 한영 자판 교정이 다음 키 입력과 백스페이스 배치 사이에서 경합하지 않도록 140ms 입력 간격 게이트와 유휴 후 현재 영역 일괄 교정을 적용했다. 데스크톱 2,773개 테스트·typecheck·프로덕션 빌드·변경 범위 lint가 GREEN이며, 설치본과 서명된 업데이트 메타데이터를 Forgejo에 게시하고 공개 피드와 설치 파일 HTTP 200을 확인했다. 1.16.1 설치 후 Latin 대조군 GUI와 물리 키보드·Chromium/terminal 검증은 남아 있다.
> Last update: 2026-11-04 — **테스트 위생 재편.** 버그헌팅 E2E(red-team cycle) 스펙과 중복·죽은 스펙 11개를 삭제하고, 데스크톱 E2E 를 공용 Electron 픽스처 + 5개 보호 여정으로 통합했다. 루트 `tests/e2e` 와 일회성 Playwright 러너 7개도 제거. 새 게이트 `npm run test:hygiene`(+`:test`)를 CI 두 파이프라인에 넣어 `.only`/이유 없는 skip/가짜 단정/머신 경로/`waitForTimeout`/`.e2e.test.ts` 를 막는다. 정본: [`docs/tdd-red/06-repo-application.md`](../tdd-red/06-repo-application.md).
>
> Previous update: 2026-11-04 — **Wave 4 모노레포 위생 점검.** 사용되지 않는 chart/recharts·feature gate·내부 선언·Turbo/pnpm 잔여를 제거하고, mobile navigation 타입/로깅, push·quota 계약, embedding quota SSOT, updater dialog i18n, CI web build·migration metadata gate, `audio-purge` 함수 설정을 정합화했다. Web Push production call site, 12-locale 표면 노출, meeting memo ABA conflict, audio-purge 배포/pg_cron은 완료로 올리지 않고 `11`에 남겼다. 제품 버전은 1.16.1 그대로이며 커밋·푸시·배포·릴리스는 수행하지 않았다. 상세: [`REFACTOR_WAVE4_REPORT.md`](../REFACTOR_WAVE4_REPORT.md).
>
> Previous update: 2026-11-04 — **Windows v1.16.1 패치 배포.** 빠른 한영 자판 교정이 다음 키 입력과 백스페이스 배치 사이에서 경합하지 않도록 140ms 입력 간격 게이트와 유휴 후 현재 영역 일괄 교정을 적용했다. 데스크톱 2,773개 테스트·typecheck·프로덕션 빌드·변경 범위 lint가 GREEN이며, 설치본과 서명된 업데이트 메타데이터를 Forgejo에 게시하고 공개 피드와 설치 파일 HTTP 200을 확인했다. 1.16.1 설치 후 Latin 대조군 GUI와 물리 키보드·Chromium/terminal 검증은 남아 있다.
>
> Previous update: 2026-11-02 — Windows 1.16.0 실GUI에서 회의 파일 선택→전사→로컬 요약 생성을 확인했다. 네이티브 한글 IME는 100% CPU 및 `gemma4:e4b` 콜드 로딩 중 7/7 정확히 통과했다. 한영 자판 교정 대조군은 다음 키가 백스페이스에 섞이는 결함을 재현했고, 소스에서는 140ms 입력 간격 게이트와 유휴 후 현재 영역 일괄 교정으로 수정했다. 데스크톱 2,773개 테스트·빌드는 GREEN이지만 수정본 설치 GUI와 모바일 운영 배포는 남아 있다. 상세 증거: [2026-11-02 verification](../evidence/2026-11-02-verification.md).
>
@ -29,7 +33,7 @@
> Previous update: 2026-09-22 — **Gemma/Ollama 폭주 방어 계약을 기록했다.** 19:14:12 부팅 워밍업이 `keep_alive: 30m`으로 `gemma4:e4b`를 19:44:12까지 VRAM 3,226,342,521 bytes / context 4096으로 강제 상주시킨 것이 관측됐으며, 같은 시점 Windows GPU Engine PID 표본에는 Ollama의 활성 compute가 없었다. 즉 당시 상태는 무한 추론이 아니라 강제 residency였다. 19:11:17~19:11:58의 자동 제안 연속 생성은 기존 900 ms·12/min·5 candidates·128 tokens·한 글자 재생성 정책이 허용한 burst였다. 현재 구현 계약은 부팅 warmup 제거, `keep_alive: 2m`, 제안 600 ms / 최소 5 s 간격 / 기본 6회·hard max 12회 per min / 3 candidates / 64 tokens / 12-char growth / 8 s timeout, 그리고 요청별 취소·상한·종료 정리다. 독립 표적 검증은 6 test files / 69 tests passed / 0 failed, 변경 코드·테스트 ESLint와 `git diff --check`도 exit 0이다. Raw Ollama에서는 cold bounded 요청이 client hard timeout 15.044 s에 취소된 뒤 `/api/ps`가 비었고 `/api/version`은 80 ms에 회복했다. 명시 warmup은 HTTP 200 / 16.639 s, 후속 warm 요청은 body `options.num_predict=1`, `keep_alive='2m'`로 553 ms HTTP 200 / `done:true` / `eval_count:1` / `done_reason:length`였고 `/api/ps` expiry는 약 119.9 s였다. **19:48:59 +09:00에는 새 generate/unload/kill/retry 없이 충분히 지난 뒤 한 번의 `/api/ps`가 HTTP 200 / 45.8 ms / `{models:[]}`였고 `/api/version`은 HTTP 200 / 7.3 ms / `0.32.13`이었다.** 이는 raw API 수준의 expiry 뒤 unload 확인일 뿐 앱 재시작·GUI·실제 타이핑 증거는 아니므로 상태는 `[~]`로 유지한다 (`11` GAP-LLM-04, GAP-INPUT-06).
>
> Previous update: 2026-09-21 — **Input intelligence (입력 레메트리 + 다음 문장 제안) 신규**. 데스크톱에 입력 수집기(`InputTelemetryService`), UIA 컨텍스트 브리지(사이드카 `GET /uia/focus`), 제안 서비스(`SuggestionService`), 어렛 커 오버레이, 설정 > 입력 탭(동의·정책·주간 인사이트·개인 문구)을 추가했다. 카탈로그에 `INPUT-01`~`INPUT-08`(전부 데스크톱 `[~]` — 유닛 48건은 GREEN 이지만 **실앱 타이핑 검증 전**), 백로그에 GAP-INPUT-01~05 + GAP-LLM-03, §7 에 CONSTRAINT-INPUT-01(키 내용 미저장 — ActivityWatch 정책 채택)을 기록. 설계 근거는 조사 기반이다: 어렛은 `GetGUIThreadInfo` 가 아니라 UIA `TextPattern.GetSelection`(Chromium 은 `TextPattern2` 미구현), 타이핑 스트는 키코드 복원이 아니라 UIA 스냅샷 diff(한/일 IME 대응), 디바운스/토큰 한도는 인라인 컴플리션 실측값(Continue 350 / Tabby 250 / twinny 300 ms, 출력 64~256 토큰). 의존성: `koffi` 3.3.1(포그라운드 창 FFI), 사이드카 `uiautomation` 2.0.29 + `comtypes`. 데스크톱 유닛 총계 1409(+49), Electron ABI 실행에서 신규 실패 0건. 당시의 24.7초/4.9초 지연 설명과 `keep_alive: 30m`·부팅 워밍업 처방은 **현재 상태가 아닌 과거 가설/완화 이력**이며, 최신 운영 결론은 위 2026-09-22 항목과 `11` GAP-LLM-04를 따른다. 직전: LLM instruction-prompt fix (`9c2b4d4`): the custom-instruction path inserted the instruction's own wording instead of the processed result and had **never worked in any shipped release** (`v0.1.0-alpha`..`v1.4.0`, introduced `fea923d` 2026-04-05, not a regression). `llm-prompts.ts` is now the SSOT for prompt resolution and placeholder substitution, shared by `VoiceModeService` / `ChainService` / `LLM.PROCESS`. AI-04/05/06/07 are demoted to `[~]` on desktop — fixed with unit tests, but **not verified in a running app** and the four related `tests/red/*.usecase.test.ts` could not execute (`better-sqlite3` ABI). New: GAP-LLM-01 (no target-language setting), GAP-LLM-02 (this fix unverified); GAP-INFRA-06 amended (the ABI masks verification, not just dev-env switching cost); GAP-I18N-01 amended (`popup.error.default` missing in 10 locales). Earlier the same day: CAP-16 (desktop key bindings rebuilt on one `@d3ro/core/keybinding` SSOT — multiple bindings per action, mouse buttons, `HOTKEY` → `KEYBINDING` IPC group), verified on Windows by a manual run, so CAP-16 and CAP-02 are `[x]` and GAP-KEY-01 is closed. Still open: GAP-KEY-02/03, GAP-QA-02, GAP-I18N-01/02, GAP-INFRA-06, GAP-LLM-01/02, GAP-INPUT-01~05; `11` §7 holds accepted design constraints (things deliberately kept, not gaps)
> Scope: entire monorepo `D:/workspace/D3ROVoice` at product version `1.14.0` (`release/product-version.json`, released 2026-10-29)
> Scope: entire monorepo `D:/workspace/D3ROVoice` at product version `1.16.1` (`release/product-version.json`, released 2026-11-04)
> Purpose: let any agent (or human) answer two questions in under a minute:
> 1. **What infrastructure exists?** (build, CI, services, APIs, data, packages, deploy)
> 2. **How far is each feature developed?** (per surface, with file anchors and status)

View file

@ -1,7 +1,7 @@
# 02 — Repository & Infrastructure Map
> Surface: whole repo
> Last updated: 2026-11-04 — Windows 1.16.1 installer and signed update metadata published; public feed and installer availability verified
> Last updated: 2026-11-04 — Wave 4 toolchain/CI map reconciliation; Windows 1.16.1 release evidence remains unchanged
> Source of truth for: layout, workspaces, build/test commands, CI/CD, Docker, deploy, scripts, resources
---
@ -34,20 +34,20 @@ D:/workspace/D3ROVoice
├── scripts/ ~145 automation scripts + scripts/ci/ (31) + scripts/lib/
├── docs/ Design, phases, v2/v3 plans, deployment, map/ (this map)
├── memory/ Project status, handoffs, archive
├── tests/e2e/, test-results/ Root-level e2e + last-run artifacts
├── test-results/ Last-run artifacts (root tests/e2e removed 2026-11-04 — orphaned duplicates)
├── scratch/ Large local evidence (APKs, screenshots, DBs) — not build input
├── supabase/ Empty scaffolding (.branches/, snippets/) — real project is server/supabase
├── .gitlab-ci.yml GitLab CI (primary desktop/mobile release pipeline)
├── .forgejo/workflows/ Forgejo Actions (CI, site deploy to Cloudflare Pages, payple-renew cron, portable/release)
├── docker-compose.yml, docker-compose.nas.yml
├── apps/api-server/Dockerfile, apps/admin/Dockerfile, apps/web/Dockerfile
├── turbo.json, tsconfig.json, tsconfig.base.json, pnpm-workspace.yaml
├── tsconfig.json, tsconfig.base.json
├── package.json monorepo root, npm workspaces
├── CLAUDE.md Claude-specific project rules
└── AGENTS.md Cross-agent entry: rules + map obligation (this map's anchor)
```
Note: root `package.json` declares npm workspaces `apps/desktop`, `apps/web`, `apps/admin`, `packages/*`. `pnpm-workspace.yaml` also exists (`apps/*`, `packages/*`) but npm is the active toolchain. **Mobile is intentionally outside the workspace.**
Note: root `package.json` is the only workspace manifest and declares npm workspaces `apps/desktop`, `apps/web`, `apps/admin`, `packages/*`. The unused `turbo.json` and `pnpm-workspace.yaml` manifests were removed in Wave 4. **Mobile is intentionally outside the workspace.**
---
@ -58,13 +58,12 @@ Note: root `package.json` declares npm workspaces `apps/desktop`, `apps/web`, `a
| Node | 24.19.0 | `.nvmrc` |
| TypeScript | 5.7 | root `package.json` |
| .NET SDK | 10.0.300 (rollForward latestPatch) | `global.json` |
| Deno | 2.8.1 | CI (`edge-functions-quality`) |
| Deno | 2.8.1 | CI (`edge-functions`) |
| JDK | 17 | mobile CI |
| Electron | 33.4.11 | `apps/desktop/electron-builder.yml` |
| koffi | 3.3.1 | `apps/desktop/package.json` — FFI into user32/kernel32 for foreground window title/pid/exe/bounds (`utils/win32-foreground.ts`). Chosen over `get-windows` because that package needs an install script this repo does not run; koffi ships N-API 8 prebuilds as optional deps. `asarUnpack` covers `koffi`/`@koromix`. |
| uiautomation / comtypes | 2.0.29 / 1.4.17 | `apps/desktop/sidecar/requirements.txt` (Windows only) — UI Automation snapshot behind `GET /uia/focus` (`sidecar/uia_bridge.py`). Dev install: `apps/desktop/sidecar/.venv/Scripts/python.exe -m pip install uiautomation comtypes`. |
| React Native | 0.85 | `apps/mobile-rn/package.json` |
| Turborepo | turbo.json tasks: build/typecheck/test/lint/dev | `turbo.json` |
---
@ -78,7 +77,7 @@ When required sidecar changes ship, run `node --env-file-if-exists=.env scripts/
npm run dev # desktop dev (electron-vite)
npm run build # desktop production build
npm run build:admin # admin production build
npm run build:all | npm run ci # scripts/ci/build-all.mjs
npm run build:all | npm run ci # typecheck + test + desktop/admin/web production builds
npm run checksum # scripts/ci/generate-checksums.mjs
npm run version:check | version:sync
npm run release:metadata[:test]
@ -86,22 +85,23 @@ npm run release:forgejo[:check] # canonical Forgejo publisher/feed
npm run release:tag # annotated/signed immutable release tag
npm run security:secrets[:test] # hardcoded-secret scanner
npm run check:desktop-renderer[:test] # built renderer pages reference only assets on disk
npm run check:migrations[:test] # Supabase migration ordering, naming & optional remote drift check
npm run check:migrations[:test] # Supabase migration filename/order/non-empty metadata checks; no DB replay or remote drift
npm run rebuild:app # rebuild better-sqlite3 in-place for Electron ABI
npm run rebuild:test # rebuild better-sqlite3 in-place for host Node ABI (Vitest)
node scripts/ci/verify-native-abi.mjs --self-test # required packaged N-API prebuild missing/present fixture
node scripts/ci/sync-i18n-locales.mjs # synchronize 12 locales against ko/en SSOT
npm run test:e2e:red # content-report red e2e
npm run release:mobile:boundary[:test]
npm run release:mobile:config[:test]
npm run release:mobile:build-config:test
npm run release:play:assets[:test]
npm run typecheck # all workspaces
npm run typecheck # all workspaces; web/admin run `next typegen` before `tsc`
npm run test # all workspaces
npm run lint # eslint apps/desktop apps/web apps/admin packages
npm run format # prettier
npm run typecheck:mobile # apps/mobile-rn tsc (outside npm workspaces)
npm run lint:mobile # apps/mobile-rn eslint --max-warnings=0
npm run test:mobile # apps/mobile-rn jest
npm run test:mobile # apps/mobile-rn test:ci (jest --runInBand)
npm run verify:all # aggregate: workspaces + mobile (typecheck/lint/test)
```
@ -110,10 +110,10 @@ Per-app commands that matter:
| App | Commands |
|---|---|
| desktop | `npm run dev --workspace=@d3ro/desktop`, `build`, `typecheck`, `test` (vitest), playwright e2e; local STT engine: `npm --prefix apps/desktop run sidecar:setup` then `sidecar:build` (PyInstaller → `sidecar-dist/sidecar`), full local Windows package: `npm --prefix apps/desktop run dist:win:full`; `setup:sox` re-downloads the bundled SoX |
| mobile-rn | `npm run typecheck:mobile` / `lint:mobile` / `test:mobile` (root), or `npm --prefix apps/mobile-rn run lint/typecheck/test`; android gradle builds, Maestro E2E |
| mobile-rn | `npm run typecheck:mobile` / `lint:mobile` / `test:mobile` (root; Jest uses `test:ci`/`--runInBand`), or `npm --prefix apps/mobile-rn run lint/typecheck/test`; android gradle builds, Maestro E2E |
| api-server | `dotnet build`, `dotnet test` (also `apps/api-server.Tests`) |
| web | `next build`, playwright e2e in `apps/web/e2e` |
| admin | `next build` (`build:admin`) |
| web | `next typegen && tsc --noEmit`, `next build`, `test` (vitest, `apps/web/tests`), playwright e2e in `apps/web/e2e` |
| admin | `next typegen && tsc --noEmit`, `next build` (`build:admin`) |
Desktop Vitest uses one `apps/desktop/vitest.config.ts` SSOT with mode-specific include globs:
@ -155,11 +155,11 @@ See [`03-shared-packages.md`](./03-shared-packages.md). Summary:
| Package | Provides |
|---|---|
| `@d3ro/core` | Domain types, `D3ROError`/`ErrorCode`, IPC channel SSOT, key-binding SSOT (`./keybinding`), constants, `crypto-license`, `pii-redactor`, `secure-memory`, `supabase-config`, `meeting-markdown`, `markdown-to-docx`; has vitest tests (`packages/core/vitest.config.ts`, `npm run test --workspace=@d3ro/core`) |
| `@d3ro/core` | Domain types, `D3ROError`/`ErrorCode`, IPC channel SSOT, key-binding SSOT (`./keybinding`), plan/quota catalog including `knowledge_embedding`, constants, `crypto-license`, `pii-redactor`, `secure-memory`, `supabase-config`, `meeting-markdown`, `markdown-to-docx`; Deno consumes the generated contract checked by `contract:check`; has vitest tests (`packages/core/vitest.config.ts`, `npm run test --workspace=@d3ro/core`) |
| `@d3ro/ui` | Theme tokens, CSS vars, MUI DS components (web/desktop) |
| `@d3ro/ui-native` | RN design system (MetalCard, PhosphorText, Led, PhysicalButton, WaveBars, …) |
| `@d3ro/i18n` | 12 locales, `I18nProvider`, `t()`, date/number/relative formatters |
| `@d3ro/api-client` | Supabase browser/server clients, meetings/history/usage/transcribe wrappers, shared types; has vitest tests |
| `@d3ro/i18n` | 12 locales / 2,742 parity-checked keys, `I18nProvider`, `t()`, date/number/relative formatters; includes native updater-dialog keys |
| `@d3ro/api-client` | Supabase browser/server clients, meetings/history/usage/transcribe wrappers, canonical push-token/provider + push/quota RPC types; has vitest tests |
---
@ -174,7 +174,7 @@ See [`03-shared-packages.md`](./03-shared-packages.md). Summary:
Stages `validate → test → build → e2e → package → publish → deploy`. Primary pipeline for desktop Windows/macOS releases (Forgejo Generic Registry is the canonical updater feed; GitLab project 1172 is a legacy mirror) and production mobile releases (`mobile-production-release`, manual/protected). Admin NAS deploy job is intentionally **disabled**. `package-windows`/`package-macos` build the faster-whisper sidecar (`sidecar:setup` → `sidecar:build`) and run `scripts/ci/verify-sidecar-bundle.mjs` before electron-builder, so a release can never ship without the local STT engine. Every pipeline that runs `npm run build --workspace=@d3ro/desktop` (`.forgejo` CI/release/portable) then runs `scripts/ci/verify-desktop-renderer-bundles.mjs`, which fails packaging when a renderer page references an asset the build did not emit (GAP-INFRA-05).
### Forgejo Actions (`.forgejo/workflows/`)
`ci.yml` — CI is now Forgejo-only (`.github/workflows` deleted 2026-09-26, Wave 3, dc43884). Jobs: `quality` (`version:check`, `contract:check`, `release:metadata:test`, secret scan, mobile release/config/build-config self-tests, Play asset contract, lint, typecheck, Vitest), `build-validation`, `mobile-quality`, `edge-functions` (Deno), `api-server-tests`.
`ci.yml` — CI is now Forgejo-only (`.github/workflows` deleted 2026-09-26, Wave 3, dc43884). Jobs: `quality` (`version:check`, `contract:check`, `release:metadata:test`, migration checker self-test + actual filename/order/non-empty check, secret scan, mobile release/config/build-config self-tests, Play asset contract, lint, typecheck, Vitest), `build-validation` (desktop renderer verification + admin + web production builds), `mobile-quality`, `edge-functions` (Deno), `api-server-tests`. Web/admin typecheck runs Next 16 `typegen` before `tsc`, so a clean checkout generates and checks route/root-param declarations instead of relying on a prior dev/build artifact. The migration checks are file metadata/order gates only; Supabase replay, shadow DB, and remote drift remain separate runtime/integration gates. A separate isolated local run on 2026-11-04 applied all 73 migrations from empty and after reset, then returned an empty `pg-delta --strict-coverage` shadow diff; that runtime gate is not yet part of CI and says nothing about linked remote drift.
`payple-renew.yml` — daily cron (+ manual dispatch) → `payple-renew` edge function; ported from the never-run `.github/workflows/payple-renew.yml` because the repository has no GitHub remote. Requires Forgejo secrets `SUPABASE_URL`, `CRON_SECRET`. 2026-09-26~10-11 `SUPABASE_URL` 시크릿이 로컬 주소(`127.0.0.1:55321`)라 한 번도 성공하지 못했다(GAP-OPS-03).
@ -207,9 +207,9 @@ Public endpoints (production): `https://d3ro.chanpaca.net` — **랜딩/다운
## 7. `server/supabase` (backend)
- `config.toml` — project `d3ro-voice`, ports 55321-55324, DB major 17, auth redirects (localhost, `d3ro.chanpaca.net`, `d3ro-voice://auth-callback`), providers Google/GitHub/Apple.
- `migrations/` — **63 SQL migrations** (schema, RLS, auth triggers, storage, team invites, knowledge/pgvector, push outbox, Payple billing (legacy Stripe columns/provider values kept for history), admin roles, mobile platform/monetization, atomic command reorder, device revocation, content reporting, audit log, meeting documents, STT quota reservations, ad reward replay protection, team activity feed).
- `functions/` — **~24 Deno Edge Functions** (`stt-proxy`, `llm-proxy`, `content-report`, `generate-meeting-document`, `embed-chunks`, `search-knowledge`, `realtime-token`, `team-invite`, `team-accept`, `send-push`, `account-delete`, `admin-users`, `admin-subscriptions`, `admin-payments`, `admin-audit-log`, billing `billing-catalog`/`payple-checkout`/`payple-manage`/`payple-renew`/`payple-webhook`, `iap-verify`, `admob-ssv`, `google-play-rtdn`; Stripe functions removed 2026-09-26). Shared contracts in `functions/_shared/` — push transports now include `webpush.ts` (VAPID + RFC 8291) and `apns.ts` (.p8 token) alongside FCM. CI (`edge-functions-quality`) runs `deno check` + `deno test` and also the Cloudflare worker drain test.
- `config.toml` — project `d3ro-voice`, ports 55321-55324, DB major 17, Supabase CLI 3.x `[local_smtp]`, auth redirects (localhost, `d3ro.chanpaca.net`, `d3ro-voice://auth-callback`), providers Google/GitHub/Apple. `audio-purge` has an explicit function stanza with gateway JWT verification disabled because its handler verifies the exact pg_cron service credential. An isolated local stack proved missing/non-service key 401, service 200, and pg_cron/Vault/pg_net removal of the queue row, `audio_files` row, and Storage object; deployment and the production schedule remain unverified.
- `migrations/` — **73 SQL migrations** (schema, RLS, auth triggers, storage, team invites, knowledge/pgvector, push outbox, Payple billing (legacy Stripe columns/provider values kept for history), admin roles, mobile platform/monetization, atomic command reorder, device revocation, content reporting, audit log, meeting documents, STT quota reservations, ad reward replay protection, team activity feed).
- `functions/` — **24 Deno Edge Functions** (`stt-proxy`, `llm-proxy`, `content-report`, `generate-meeting-document`, `embed-chunks`, `search-knowledge`, `realtime-token`, `team-invite`, `team-accept`, `send-push`, `audio-purge`, `account-delete`, `admin-users`, `admin-subscriptions`, `admin-payments`, `admin-audit-log`, billing `billing-catalog`/`payple-checkout`/`payple-manage`/`payple-renew`/`payple-webhook`, `iap-verify`, `admob-ssv`, `google-play-rtdn`; Stripe functions removed 2026-09-26). Shared contracts in `functions/_shared/` — push transports now include `webpush.ts` (VAPID + RFC 8291) and `apns.ts` (.p8 token) alongside FCM. CI (`edge-functions`) runs `deno check` + `deno test` and also the Cloudflare worker drain test.
- `tests/` — integration/E2E for content report, mobile platform/recording/reward-race, payments, mobile release preflight, push, team push security, STT quota.
Full detail: [`09-supabase-backend.md`](./09-supabase-backend.md).
@ -219,11 +219,12 @@ Full detail: [`09-supabase-backend.md`](./09-supabase-backend.md).
## 8. `scripts/` groups
- **CI (`scripts/ci/`, 33 files):** build/version/release (`build-all`, `sync-version`, `generate-checksums`, `verify-release-metadata`, `create-release-tag`, `extract-release-notes`), security (`check-no-hardcoded-secrets`), mobile release gates (`verify-mobile-release-boundary/-config/-build-config`, `verify-android-artifact/-app-links`, `verify-play-store-assets`, `prepare-whisper-model`, `create-mobile-release-evidence`, `prepare-mobile-release-publication`, emulator/CSPRNG gates), keys (`create-desktop-license-keypair`, `create-release-evidence-key`, etc.), publish (`publish-forgejo-release` canonical, `publish-gitlab-release` mirror; the legacy `sync-and-publish-forgejo-release`/`upload-asset-to-forgejo-release` scripts were deleted 2026-09-26, Wave 3, cd9d199), env/tooling (`bootstrap-linux-toolchain.sh`, `audit-nas-stt-config.ps1`, mobile local E2E scripts).
- **Packaged native gate:** `verify-native-abi.mjs` rejects a packaged `better_sqlite3.node` that the host Node runtime can load (wrong ABI) and requires the target-specific `uiohook-napi/prebuilds/<platform>-<arch>/uiohook-napi.node`. `--self-test` proves the missing/present N-API fixture; relative and absolute `--dir` inputs resolve to the same package. `build-desktop-installer.mjs` and `build-portable.mjs` repair only the better-sqlite3 ABI, verify both native contracts, and require `resources/app-update.yml` before publication.
- **Deploy/release:** `deploy-nas.ps1/.sh`, `nas-control.sh`, `publish-gh.ps1`, `gen-keystore.js` (`deploy-site-to-nas.js` deleted 2026-09-26, Wave 3, cd9d199 — site deploy is Cloudflare Pages only).
- **Android artifact verification (2026-11-01):** `verify-android-artifact.mjs` parses both legacy `Signer #1` and Build Tools 37 `V2/V3.x Signer` certificate output. Self-test and the actual universal E2E APK verification pass with Build Tools `37.0.0`.
- **GCP/Google OAuth automation + inspection (~70 `*.mjs`):** `auto-configure-oauth`, `automate-google-oauth`, `setup-consent`, `create-*-client`, `check-*`, `inspect-*` — mostly one-off/browser-driven console automation.
- **AdMob console automation:** `admob-probe.mjs` (read-only login/app/ad-unit probe), `admob-login.mjs` + `run-admob-login.bat` (one interactive headful Chrome login into a persistent profile), `admob-automate.mjs` (dry-run by default; `--apply` creates/verifies banner+rewarded units and reports Play-store link). Uses `playwright` with `channel: 'chrome'` and the gitignored `.chrome-playwright-profile`.
- **E2E / verification:** `e2e-desktop-*.js`, `real-app-multi-tab-e2e.js`, `test-and-capture-all-10-ad-services.js`, `verify-live-production-d3ro.js`.
- **E2E / verification:** `test-and-capture-all-10-ad-services.js`, `verify-live-production-d3ro.js`. The old ad-hoc `e2e-desktop-*.js` / `real-app-multi-tab-e2e.js` / `run_e2e_*.cjs` runners were deleted 2026-11-04 (machine-specific paths, no references); Playwright specs under `apps/desktop/tests/e2e` are the E2E path.
- **Screenshots/captures:** `capture-*.js`.
- **Forgejo ops:** `check-forgejo-actions-runs.js`, `capture-forgejo-*.js`.
@ -235,7 +236,7 @@ Full detail: [`09-supabase-backend.md`](./09-supabase-backend.md).
| File | Purpose |
|---|---|
| `release/product-version.json` | version `1.9.0`, `androidVersionCode`/`iosBuildNumber` `1090000`, releaseDate `2026-09-27`, desktop license keyId |
| `release/product-version.json` | version `1.16.1`, `androidVersionCode`/`iosBuildNumber` `1160100`, releaseDate `2026-11-04`, desktop license keyId |
| `release/android-release-identity.json` | package `com.d3ro.voice`, Play app ID, app-signing SHA-256, upload cert SHA-256, evidence keyId, AdMob unit IDs |
| `release/desktop-license-public.pem` | Ed25519 public key for desktop offline licenses |
| `release/mobile-release-evidence-public.pem` | Ed25519 public key for mobile release evidence |
@ -256,11 +257,12 @@ Version sync is enforced by `scripts/ci/sync-version.mjs` and `verify-release-me
- `resources/ffmpeg/` — optional bundled ffmpeg (CI or manual); `getFfmpegPath()` also resolves the `@ffmpeg-installer/ffmpeg` binary from `app.asar.unpacked`.
- `apps/desktop/sidecar-dist/` — PyInstaller sidecar bundle consumed by `extraResources` (gitignored; built by `npm --prefix apps/desktop run sidecar:build`).
- `resources/icons/` — empty; electron-builder falls back to `build/icon.ico|png`.
- Desktop tests: `apps/desktop/tests/` (vitest unit + playwright e2e), `apps/desktop/test-results/`.
- Desktop tests: `apps/desktop/tests/` — `unit/`, `main/`, `red/`, `shared/`, `integration/`, `eval/` run under Vitest; `e2e/` holds Playwright specs plus the shared `e2e/support/electron-app.ts` fixture (per-test temp user-data dir). Artifacts in `apps/desktop/test-results/`.
- Test taxonomy + hygiene gate: `docs/tdd-red/06-repo-application.md`. `npm run test:hygiene` (+ `:test`) rejects `.only`, reason-less `.skip()`, trivial assertions, `isVisible()`-gated assertions, machine-specific paths, `waitForTimeout`, and `.e2e.test.ts` names; wired into CI `quality`.
- Mobile tests: `apps/mobile-rn/__tests__/` (57 suites / 353 tests per mobile SSOT), `.maestro/` + `.maestro-output/` E2E evidence. Note: a full parallel Jest run can hit the 5s render timeout on slow machines; re-run the failing spec in isolation before treating it as a regression.
- Web tests: `apps/web/e2e/` (playwright).
- Web tests: `apps/web/tests/` (vitest pure-logic contracts: billing catalog, Web Push client, web STT client — now part of root `npm test`) and `apps/web/e2e/` (playwright: `smoke.spec.ts` owns the unauthenticated surface contract; billing/payple/dashboard/history are fixture-based browser journeys). Web declares its own `@playwright/test` + `vitest` devDeps (2026-11-04) instead of relying on the desktop workspace's hoisted copies.
- API tests: `apps/api-server.Tests/` (xUnit).
- Root: `tests/e2e/`, `test-results/.last-run.json`.
- Root: `test-results/.last-run.json` (no root-level e2e suite).
---
@ -282,7 +284,7 @@ See [`11-gap-backlog.md`](./11-gap-backlog.md) for the maintained list (`INFRA-*
| Payple 정기 갱신 cron | `CRON_SECRET` | Supabase 함수 시크릿 `CRON_SECRET`, Forgejo 시크릿 `CRON_SECRET` |
| NAS 배포(ssh 별칭 `yunchan-nas`) | `NAS_HOST`, `NAS_USER`, `NAS_SSH_PORT`, `NAS_DEPLOY_PATH` | — |
| NAS compose 필수 값 | `SUPABASE_URL`, `SUPABASE_SERVICE_ROLE_KEY`, `ADMIN_BOOTSTRAP_TOKEN`, `API_SERVER_URL` 외 | NAS `/volume1/docker/d3ro/.env` |
| 웹앱 이미지 build arg | `NEXT_PUBLIC_SUPABASE_URL`, `NEXT_PUBLIC_SUPABASE_ANON_KEY` (`NEXT_PUBLIC_PAYPLE_CLIENT_KEY`는 보류, GAP-BILL-02) | — |
| 웹앱 이미지 build arg | `NEXT_PUBLIC_SUPABASE_URL`, `NEXT_PUBLIC_SUPABASE_ANON_KEY`; 선택적 `NEXT_PUBLIC_PAYPLE_CLIENT_KEY`와 `NEXT_PUBLIC_VAPID_PUBLIC_KEY` (`WEBPUSH_VAPID_PUBLIC_KEY`와 같은 공개키). VAPID 공개키 누락 시 알림 UI는 unavailable로 fail-closed | `.env` / NAS build environment; `NEXT_PUBLIC_*`는 이미지 build-time에 고정 |
| Forgejo API | `FORGEJO_TOKEN` | Forgejo 시크릿 `FORGEJO_TOKEN` |
- 공개 라우팅: `d3ro.chanpaca.net` → 브리지 워커 → `/app`·`/api`·`/health`는 터널 kd-nas(NAS 3002·5050), 그 밖은 Pages `d3ro`. 터널 ingress `d3ro.chanpaca.net` path `^/app` → `http://192.168.0.39:3002`.

View file

@ -26,6 +26,7 @@ The canonical place for types and cross-surface logic. Both desktop and web/mobi
| PII | `pii-redactor`, `secure-memory` | Redaction + secure memory helpers |
| Supabase config | `supabase-config` | Shared Supabase config shape |
| Entitlement | `./entitlement` | `EntitlementTier`, `AdminRole`, `EntitlementSnapshot`, `resolveEntitlement`, `normalizeEntitlementTier`/`normalizeAdminRole` — canonical tier/role contract across Supabase, desktop license, and .NET |
| Plan catalog | `./plan-catalog` | Tier/price/quota SSOT. `knowledge_embedding` is explicit per tier (Free 5,000/week; Pro 50,000/day; Pro+ 150,000/day; Team 300,000/day; Enterprise unlimited), generated into `server/supabase/functions/_shared/core-contract.generated.ts`, and guarded by `contract:check` |
| Doc utils | `./utils/meeting-markdown`, `./utils/markdown-to-docx` | Meeting Markdown export + DOCX generation (dep: `docx`) |
**When to change:** new cross-surface type, new error code, new IPC channel, license format. Add here first, then consume.
@ -63,7 +64,7 @@ App-specific `ScreenHeader`, `RecordFab`, and `UnifiedSearchResultRow` stay unde
| Provides | Notes |
|---|---|
| 12 locales | `ko` (master), `en`, `ja`, `zh`, `zh-TW`, `es`, `fr`, `de`, `pt`, `ru`, `vi`, `th` in `src/locales/` |
| 12 locales | `ko` (master), `en`, `ja`, `zh`, `zh-TW`, `es`, `fr`, `de`, `pt`, `ru`, `vi`, `th` in `src/locales/`; 2,742 parity-checked keys, including the 16 native `update.dialog.*` keys |
| Type-safe keys | `TranslationKey` derived from `ko.json` |
| React context | `I18nProvider`, `useI18n`, `TFunction` |
| Fallback chain | locale → `en` → `ko` → key |
@ -86,9 +87,9 @@ Electron-independent. Rule: no hardcoded Korean/English strings in UI; use `t()`
| `transcribe` | STT calls |
| `supabase-browser` | Browser client (`getSupabaseBrowserClient`, `isSupabaseConfigured`) |
| `supabase-server` | Server client (`createSupabaseServerClient`) |
| `types` | Shared DB/domain types — **canonical; do not redefine table types per app** |
| `types` | Shared DB/domain types — **canonical; do not redefine table types per app**. Includes `PushProvider`, device-bound `PushToken`, `push_tokens` row/insert/update shapes, `register_push_registration`/`unregister_push_registration`, and period-aware `consume_quota` RPC contracts |
Deps: `@d3ro/core`, `@supabase/supabase-js`; optional peer `@supabase/ssr`. Tests: `__tests__/` (client, transcribe, types) via vitest.
Deps: `@supabase/supabase-js`; optional peer `@supabase/ssr`. The unused `@d3ro/core` dependency was removed in Wave 4. Tests: `__tests__/` (client, transcribe, types) via vitest.
Consumed by `apps/web`, `apps/admin` (via re-exports), `apps/mobile-rn`, and desktop cloud paths.
@ -100,7 +101,7 @@ Consumed by `apps/web`, `apps/admin` (via re-exports), `apps/mobile-rn`, and des
@d3ro/i18n (standalone)
@d3ro/ui → @d3ro/core
@d3ro/ui-native(standalone, peers react-native)
@d3ro/api-client → @d3ro/core
@d3ro/api-client(standalone; depends on Supabase SDK)
@d3ro/core (standalone)
```

View file

@ -43,13 +43,12 @@ Root layout: `ThemeProvider → I18nProvider → AuthProvider`.
|---|---|
| `actions/` | `action-runner.tsx` (LLM parse → action: create_meeting/search_knowledge/create_memo/send_team_invite) |
| `record/` | `mic-recorder.tsx` (MediaRecorder + level analyser → `transcribeWebAudio`) |
| `dashboard/` | `meetings-trend-chart.tsx` (recharts) |
| `billing/` | `billing-checkout-options`, `payple-checkout-button`, `payple-client`, `payple-manage-button` |
| `meetings/` | `document-editor`, `generate-document-button`, `live-transcript-list` (Realtime), `markdown-preview` (Mermaid), `meeting-audio-player` (signed URL), `memo-form` |
| `chat/` | `chat-panel.tsx` |
| `teams/` | `create-team-form`, `invite-member-form`, `activity-feed` (team notes + realtime) |
| `knowledge/` | `add-knowledge-form` (text or `.txt`/`.md` file, newline-aware chunking, `embed-chunks` on submit), `knowledge-search` (semantic via `search-knowledge`) |
| `layout/` | `sidebar.tsx` (nav, theme selector, logout, i18n) |
| `layout/` | `sidebar.tsx` (nav, theme selector, logout, i18n) + `web-push-control.tsx` (permission/subscription status and explicit opt-in/out switch) |
| `providers/` | `auth-provider`, `i18n-provider`, `theme-mode-context`, `theme-provider` |
---
@ -65,13 +64,19 @@ Root layout: `ThemeProvider → I18nProvider → AuthProvider`.
| `history-client.ts` | History list/get/update/delete, revision-safe |
| `supabase-browser.ts` | Re-export `@d3ro/api-client/supabase-browser` |
| `supabase-server.ts` | Next `cookies()` wrapper |
| `web-device.ts` | Stable browser installation identity + active `platform='web'` device lookup/create/check-in; revoked rows are never resurrected |
| `web-push.ts` | Web Push service-worker/VAPID subscribe/unsubscribe helper. Requires a valid active `deviceId`, persists only through register/unregister RPCs, rolls back a failed registration, re-registers an existing browser subscription before reporting it connected, and runs bounded server cleanup independently from local unsubscribe |
| `web-push-session.ts` | Production orchestration boundary used by the sidebar and logout: user-gesture permission → device registration → subscription, plus per-user disabled intent, fail-closed reconciliation, and non-blocking logout cleanup |
| `web-stt-client.ts` | Web STT via `stt-proxy`, 25 MB limit, `WebSttError` codes |
---
## 4. Tests
Playwright specs in `apps/web/e2e/`: billing, payple-checkout, dashboard-dictionary-commands, history, web-stt-client, smoke.
Two layers:
- **Vitest** (`apps/web/tests/`, `npm --prefix apps/web run test`, part of root `npm test`): pure-logic contracts — `billing-catalog`, `web-push` (device/RPC/rollback/reconciliation/logout, 17 cases), `web-stt-client`.
- **Playwright** (`apps/web/e2e/`): `smoke.spec.ts` (unauthenticated surface + fail-closed redirects + `/download` handoff), `billing`, `payple-checkout`, `dashboard-dictionary-commands`, `history` (fixture-based browser journeys).
---
@ -84,4 +89,5 @@ Playwright specs in `apps/web/e2e/`: billing, payple-checkout, dashboard-diction
- Action runner team-invite uses a manual redirect safety path instead of a live invite (`action-runner.tsx`).
- `/download` shows "artifact not yet published" for the current desktop release.
- Knowledge file upload, semantic search, dictionary import/export, and the team activity feed are now implemented (`[x]` in the catalog).
- **2026-11-04 Wave 4 hygiene:** Removed the unreferenced dashboard trend chart and the web `recharts` dependency. Web Push now has a production sidebar opt-in/out flow, stable web-device registration, device-bound register/unregister RPCs, disabled-intent reconciliation, bounded local/server cleanup, logout-independent sign-out, and a Docker-copied service worker. An isolated local browser run with ephemeral VAPID proved one active web device, one `webpush` token, one pending outbox attempt, a completed drain, and a `delivered` provider result; that result proves provider acceptance, not service-worker/browser receipt. A later production-standalone run built and served successfully but timed out during throwaway login navigation before the dashboard, so production-rendered 1440/390, accessibility-tree, hit-target, permission/subscription, and receipt gates remain open. No production secrets or deployment were changed.
- **2026-10-28 designpaca audit (`SHELL-15`):** All 15 routes and shared components aligned with `design.md` v4 ("조용한 계기"): undefined `--d3-text-inverse` replaced with `--d3-accent-ink`, minimum font size raised to `11px` (`0.6875rem`), `uppercase` and positive `letterSpacing` removed from Korean UI copy, raw `monospace` replaced with `var(--d3-font-mono)`, single `component="h1"` hierarchy enforced per route, and native form controls equipped with `:focus-visible` rings and `<label htmlFor>` / `aria-label` attributes.

View file

@ -92,8 +92,9 @@ Source of truth for status is `docs/v3/MOBILE_APP_COMPLETION_SSOT.md` sections 0
| Area | Status |
|---|---|
| Auth / account | `[~]` Implemented + Jest GREEN; external OAuth consent→callback and logout/delete/provider device E2E pending |
| Onboarding | `[x]` current fresh auth/signup/invite and small-screen journeys GREEN on physical Fold6; this does not verify the new v4 shell on every viewport/theme |
| v4 shell / theme / accessibility | `[x]` shell journey at 320dp dark and 411dp light; `[~]` broader design-system/a11y proof because TalkBack/font-scale/rotation remain |
| Onboarding | `[~]` unit coverage and the current `.3` isolated API 34 AVD fresh auth/signup journeys are GREEN; the historical `.2` Fold6 fresh journeys passed, but current `.3` Fold6 first-run failed twice at onboarding visibility. The 2026-11-04 `1.16.1` Fold6 result is a state-preserving upgrade/cold launch, not current physical-device first-run proof |
| v4 shell / theme / accessibility | `[x]` shell journey at 320dp dark and 411dp light; `[~]` broader design-system/a11y proof. 2026-11-04 Android automation added current-source physical/AVD install+launch, inspected-route labels/48dp, and AVD font-scale 2.0 + rotation/scroll evidence; manual TalkBack/focus order, the SDK ad WebView, app-wide coverage, and iOS remain |
| Large screen (tablet / unfolded foldable) | `[ ]` No adaptation. 2026-11-05 audit at ≈825dp (Fold6 OPENED) shows every screen as a single stretched phone column (no `useWindowDimensions`, breakpoints, or `numColumns`), full-width Edit/Delete/Select buttons, and an adaptive-banner height shift. See `11` GAP-UX-08 and `docs/evidence/2026-11-05-tablet-layout-audit.md` |
| Recording / transcription / Talk | `[x]` core path GREEN on API 34 (FGS, recovery, local Whisper, cloud fail-closed, TTS) |
| Data portability | `[x]` export/restore + share E2E GREEN |
| History / meetings | `[x]` real data + meeting creation contract GREEN; audio timestamp/speaker + cross-app E2E pending |
@ -123,6 +124,7 @@ The v4 shell also removed `DashScreen` and `WorksHubScreen`. Home replaces the d
- Historical `.2` Fold6 physical-device gate (Android 16, `SM-F956N`): fresh auth **60 s PASS**, fresh signup **67 s PASS**, warm/cold invite **31 s PASS**, and small-screen signup **61 s PASS** on 2026-11-01. Fatal/Metro matches 0; evidence is `apps/mobile-rn/.maestro-output/fold6-20261101-fix1/`. Authenticated parity was not run because test credentials are absent.
- v4 local runtime: `apps/mobile-rn/.maestro/navigation-shell-search-local.yaml`; 320dp dark **1/1 PASS, 88 s** at `scratch/design-audit/wave45/navigation-shell-search-320-dark-verified.xml`, and 411dp light **1/1 PASS, 100 s** at `scratch/design-audit/wave45/navigation-shell-search-411-light-verified.xml`.
- Current runtime APK: `com.d3ro.voice`, `1.15.4-e2e.20261101.3` / `2026110103`, 147158575 bytes, SHA-256 `937d2a0b3fb6b810516f07e91dd97ffe99d34c5885a72f21805a51e8a408027f`. Build Tools 37 verifier PASS; installed identity matches. Import entry and metadata editor rendered on Fold6 without saving new data. Earlier `.3` fresh-auth + retry both FAILED at onboarding visibility (black screenshots); those failures are retained. No data reset was performed, so `.2` historical passes are not current first-run proof. Production configuration fails with `firebase_expected_project_id_missing`, including with root `.env`. [Evidence](../evidence/2026-11-01-completion.md).
- 2026-11-04 current-source E2E runtime: `1.16.1-e2e.20261104.1` / `2026110401`, SHA-256 `3d2875c74b555dbcd854468e57b9b4b3a8e6c9657f210760cbe24a77ee92cf7c`, verifier PASS, then state-preserving `adb install -r` and cold launch PASS on Fold6 Android 16 and API 34 AVD. Physical Notifications status/privacy/recent cards passed a `clearState:false` Maestro flow without a permission action. UIAutomator and AVD font-scale 2.0/rotation are automated evidence only; manual TalkBack, notification permission transitions/FCM receipt, app-wide a11y, and iOS remain. [Evidence](../evidence/2026-11-04-mobile-runtime-a11y.md).
- Committed evidence summary: [`docs/evidence/wave45-mobile-shell-search-2026-09-28.md`](../evidence/wave45-mobile-shell-search-2026-09-28.md).
- Android instrumentation: `apps/mobile-rn/android/app/src/androidTest` (CSPRNG + incoming share).
- Build verifiers: `scripts/ci/verify-android-artifact.mjs` (legacy + Build Tools 37 signer output), `verify-android-app-links.mjs`, `verify-mobile-build-config.mjs`, `verify-mobile-release-boundary.mjs`.

View file

@ -74,7 +74,7 @@ Root files: `instrumentation.ts` (startup security validation), `proxy.ts` (edge
## 4. Components (`src/components/`)
`admin-sidebar` (nav island: Core Platform / Customer & Revenue / Intelligence & Security), `unavailable-admin-panel` (reusable "NOT CONNECTED", no sample data), `audit-diff-viewer`, `payment-history`, `subscription-form`, `role-change-dialog` + `role-change-button`, `memo-dialog`, `license-issuer-button` + `license-issuer-dialog`, `checksum-copy`, charts (`dau-chart`, `feature-usage-chart`, `top-users-chart`).
`admin-sidebar` (nav island: Core Platform / Customer & Revenue / Intelligence & Security), `unavailable-admin-panel` (reusable "NOT CONNECTED", no sample data), `audit-diff-viewer`, `payment-history`, `subscription-form`, `role-change-dialog` + `role-change-button`, `memo-dialog`, `license-issuer-button` + `license-issuer-dialog`, `checksum-copy`.
---
@ -89,4 +89,5 @@ Root files: `instrumentation.ts` (startup security validation), `proxy.ts` (edge
- `UnavailableAdminPanel` whenever Supabase env absent; writes disabled, no sample metrics.
- `/pipelines` and dashboard node/error sections render only measured data.
- Deploy: `apps/admin/Dockerfile` → GHCR + NAS compose; the duplicate root `Dockerfile.admin` was deleted 2026-09-26 (Wave 3, cd9d199) since `apps/admin/Dockerfile` is the one actually used. GitLab admin NAS deploy job disabled.
- **2026-11-04 Wave 4 hygiene:** Removed three unreferenced chart components (`dau-chart`, `feature-usage-chart`, `top-users-chart`) and the admin `recharts` dependency; no active admin route imported them.
- **2026-10-28 designpaca audit (`SHELL-15`):** `console-theme.ts` `C.dim` upgraded from `#67789e` to `#7e8eb0` (WCAG AA 4.94:1 on dark card surface), `panelSx`/`innerCoreSx`/`filterBtnSx`/`statusBadgeSx`/`primaryButtonSx` flattened (removed `backdropFilter` blur, decorative gradients, `uppercase`, and positive `letterSpacing`), 1.0:1 foreground/background token collisions (`--d3-status-successBg`, `--d3-status-dangerBg`, `--d3-tag-cyanBg`) fixed across `admin-sidebar.tsx`, `ads`, `releases`, `subscriptions`, `usage`, `users`, and `login`, sub-11px font sizes raised to `11px`, and keyboard navigation (`role="button"`, `tabIndex={0}`) + `aria-label` added to sidebar and dialog controls.

View file

@ -7,12 +7,12 @@
## 1. Supabase project (`server/supabase/`)
- `config.toml` — project_id `d3ro-voice`; local ports API 55321 / DB 55322 / Studio 55323 / Inbucket 55324; DB major v17; storage 50 MiB; auth `site_url` localhost:5173, redirects include `https://d3ro.chanpaca.net` and `d3ro-voice://auth-callback`; external providers Google/GitHub/Apple; per-function `verify_jwt` settings; analytics off.
- `seed.sql`, `migrations/` (66; production at `20260927000036` — it lagged at `0028` until 2026-09-27, GAP-OPS-01), `functions/` (23, all redeployed 2026-09-27), `functions/_shared/`, `tests/`, `deno.json`.
- `config.toml` — project_id `d3ro-voice`; local ports API 55321 / DB 55322 / Studio 55323 / local SMTP UI 55324; DB major v17; storage 50 MiB; auth `site_url` localhost:5173, redirects include `https://d3ro.chanpaca.net` and `d3ro-voice://auth-callback`; external providers Google/GitHub/Apple; per-function `verify_jwt` settings; analytics off. The mail section uses the Supabase CLI 3.x `[local_smtp]` name rather than the removed `[inbucket]` alias.
- `seed.sql`, `migrations/` (73 source files; last confirmed production state was `20260927000036`), `functions/` (24 source functions; the 23 functions present on 2026-09-27 were redeployed that day), `functions/_shared/`, `tests/`, `deno.json`.
> Note: root `supabase/` contains only empty scaffolding (`.branches/`, `snippets/`). The real project lives under `server/supabase/`.
### 1.1 Migrations (62) — thematic groups
### 1.1 Migrations (73) — thematic groups
| Theme | Examples |
|---|---|
@ -32,9 +32,9 @@
| STT quota | atomic quota reservations (00026) |
| Ads | ad reward receipt replay protection (00028) |
Migration numbering referenced in SSOT goes up to `00028`; CI verifies `migration-up` + shadow replay.
Forgejo CI runs `check:migrations:test` and `check:migrations`. These gates validate filename format, unique and monotonically increasing timestamps, and non-empty files; they do **not** apply SQL to a local/shadow database or compare remote migration state. Separately on 2026-11-04, an isolated `d3ro-voice-wave4-runtime` stack applied all 73 migrations from empty and after `db reset`; `db diff --use-pg-delta --strict-coverage` replayed the same history into a shadow DB and returned no schema changes. This local proof does not establish linked/production drift.
### 1.2 Edge Functions (~27)
### 1.2 Edge Functions (24)
| Function | Purpose |
|---|---|
@ -42,7 +42,8 @@ Migration numbering referenced in SSOT goes up to `00028`; CI verifies `migratio
| `llm-proxy` | LLM gateway (Claude/OpenAI) |
| `realtime-token` | OpenAI Realtime ephemeral token (tier-gated, session quota) |
| `generate-meeting-document` | AI document generation (minutes/report/idea-note/mindmap) |
| `embed-chunks` / `search-knowledge` | RAG embeddings + semantic search |
| `embed-chunks` / `search-knowledge` | RAG embeddings + semantic search. `knowledge_embedding` budgets are read from generated `PLAN_QUOTA`, whose source is `packages/core/src/plan-catalog.ts` |
| `audio-purge` | Service-only audio object purge worker invoked by pg_cron. `config.toml` sets `verify_jwt = false` so modern service keys reach the handler; the handler then authorizes the exact service credential before queue/storage work. Isolated local runtime proof on 2026-11-04 covered missing/non-service key 401, service-key 200, direct drain, and `pg_cron` → Vault → `pg_net` → Edge → Storage deletion |
| `content-report` | AI content reporting |
| `team-invite` / `team-accept` | Team invitations |
| `send-push` | Push delivery |
@ -54,7 +55,7 @@ Migration numbering referenced in SSOT goes up to `00028`; CI verifies `migratio
| `admob-ssv` | AdMob server-side verification + reward ledger |
| `google-play-rtdn` | Play Real-time Developer Notifications |
Shared contracts in `functions/_shared/`: admin, auth, audit, cors, quota, payple, push, llm, stt, team, generation-receipt, google-play, pubsub, generative-ai-safety (+ `*.test.ts`).
Shared contracts in `functions/_shared/`: admin, auth, audit, cors, quota, embedding-quota, payple, push, llm, stt, team, generation-receipt, google-play, pubsub, generative-ai-safety (+ `*.test.ts`).
### 1.3 Tests (`server/supabase/tests/`)
@ -98,5 +99,6 @@ Shared TS types for these live in `packages/api-client` (SSOT).
- Push: Supabase owns tokens/devices/outbox/retries. Transports implemented for **FCM, Web Push (VAPID + RFC 8291), and APNs (.p8 token)**; the Cloudflare Worker cron drains the outbox every minute. Android still requires FCM at the device. Details: `docs/deployment/push-transport-without-firebase.md`.
- Content safety: generation receipts + `content-report` **implemented**.
- Data portability (`account-delete`, export/restore): **implemented**.
- Audio purge source wiring, unit tests, and an isolated local pg_cron/Vault invocation are verified: the fixture queue, `audio_files` row, and Storage object each changed from one to zero and `net._http_response` recorded HTTP 200. Deployment and the production schedule/Vault/object path remain unverified.
External gates are enumerated in `docs/v3/MOBILE_APP_COMPLETION_SSOT.md` §0/§6 and mirrored in `11-gap-backlog.md` (`EXT-*`, `BE-*`).