diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e69487f..c842330 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -106,8 +106,9 @@ jobs: - name: Install Playwright system deps only if: steps.pw-cache.outputs.cache-hit == 'true' run: yarn playwright install-deps chromium - - name: Create .env for dev server + - name: Create .env for build run: echo "NUXT_PUBLIC_BASE_URL_API=http://localhost:8080" > .env + - run: yarn build - run: yarn test:e2e env: CI: 'true' diff --git a/CLAUDE.md b/CLAUDE.md index 969704e..1bd61af 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -132,6 +132,7 @@ Modules are discovered dynamically by the modular-rest framework. Entry point: [ - **Mongo spans multiple databases** (`user_content`, `subturtle_leitner`, `subturtle_board`, `cms`). Always check [server/src/config.ts](server/src/config.ts) before adding a collection. - **Live-session audio formats are fixed**: mic input is 16 kHz Int16 PCM via an AudioWorklet (`pcm16-downsampler`); server audio comes back at 24 kHz and is queued as gapless `AudioBufferSourceNode`s. Don't change rates without updating the worklet. - **Yarn only** — both workspaces ship `yarn.lock`. Mixing `npm install` will desync the lockfile. +- **pilotui ` - - - - diff --git a/frontend/composables/useDashboardNavigatorItems.ts b/frontend/composables/useDashboardNavigatorItems.ts index 33d059e..7f2ee62 100644 --- a/frontend/composables/useDashboardNavigatorItems.ts +++ b/frontend/composables/useDashboardNavigatorItems.ts @@ -62,11 +62,6 @@ export const useDashboardNavigatorItems = (): Array => { icon: 'IconCreditCard', to: '/settings/subscription', }, - // { - // title: t('billing.billing'), - // icon: 'IconClipboardText', - // to: '/settings/billing', - // }, ], }, ] as Array; diff --git a/frontend/constants/analyticsEvents.ts b/frontend/constants/analyticsEvents.ts new file mode 100644 index 0000000..77cf566 --- /dev/null +++ b/frontend/constants/analyticsEvents.ts @@ -0,0 +1,12 @@ +// Shared registry of Mixpanel event names — keeps event names consistent and +// greppable across the app. Fired via `analytic.track(...)` (see ~/plugins/mixpanel). +// The server fires its own copies of the server-truth events via +// server/src/utils/analytics.ts. +export const ANALYTICS_EVENTS = { + CAP_HIT: 'cap-hit', // props: { cap: 'save_words' | 'ai_taste' } + TRIAL_STARTED: 'trial-started', // props: { cadence, currency } + TRIAL_CONVERTED: 'trial-converted', // server-fired + TRIAL_CANCELED: 'trial-canceled', // server-fired + STARTER_AI_EXHAUSTED: 'starter-ai-exhausted', // server-fired + FLUENT_WAITLIST_SIGNUP: 'fluent-waitlist-signup', +} as const; diff --git a/frontend/layouts/default.vue b/frontend/layouts/default.vue index 667b432..ce602a7 100644 --- a/frontend/layouts/default.vue +++ b/frontend/layouts/default.vue @@ -20,6 +20,7 @@ @@ -33,6 +34,7 @@ diff --git a/frontend/pages/settings/subscription.vue b/frontend/pages/settings/subscription.vue index 5652eff..6523ce8 100644 --- a/frontend/pages/settings/subscription.vue +++ b/frontend/pages/settings/subscription.vue @@ -13,101 +13,77 @@
- -

- {{ activeSubscriptionData.label }} -

- -
-
-
-

{{ t('subscription.started-at') }} {{ new - Date(activeSubscriptionData.start_date).toLocaleDateString() }}

- -
-
-
+
+
- {{ t('billing.days-left') }}: {{ activeSubscriptionData.remaining_days }} + {{ t('billing.days-left') }}: {{ activeSubscriptionData.remaining_days ?? 0 }}
-
- + -