mirror of
https://github.com/Komediruzecki/token-circles.git
synced 2026-10-20 09:46:43 +02:00
New users land in a guided six-step wizard instead of an empty dashboard:
welcome → name your space (profile rename/create + base currency) → first
account(s) → bring your data (the real import flow embedded, with in-place
account creation) → auto-detected subscriptions → orbit complete. Fully
skippable (with are-you-sure confirms where data could be lost), relaunchable
from Settings → About and the tour menu, and impossible to get trapped in:
any pristine-check failure keeps it closed.
Trigger: zero accounts AND zero transactions AND zero bills AND no recorded
decision. Finishing/skipping stamps localStorage AND mirrors into the
per-profile settings KV, so in server mode a decision made on one device is
respected everywhere. A relaunched wizard recognizes existing accounts
('Your accounts — N already in orbit') instead of pitching a first account.
Import page refactored into reusable modules (headless createImportFlow +
ImportDataEntry/ImportMappingStep/ImportPreviewStep/BankRulesEditor) shared
verbatim by the page and the wizard; the bank tab's per-file account picker
(AccountSelect) offers 'New account…' in-place creation. Re-imports are
honest end to end: the preview dry-run announces rows the dedup pass will
skip ('Everything here was already imported'), the result message names
already-imported counts in both storage modes, and the import log records
total duplicates avoided. Bank-file drops no longer fail silently (snapshot +
allSettled + loading overlay + per-file errors).
Subscription auto-detection (features/subscriptionDetection.ts, pure +
30 table-driven tests): token matching with a bounded typo budget, cadence
from median charge gaps, catalogue-plan matching (18.00 → Claude Pro),
ambiguous retailer tokens require stable recurrence, dominant-amount-cluster
keeps Prime detectable amid Amazon shopping. Review UI (SubscriptionScan)
serves the wizard step, Bills → Subscriptions → Scan transactions, and the
Import page's post-import prompt.
Orbital loading system: OrbitSpinner (binary planets around a luminous core)
fronts the Import overlays and subscription scan; OrbitBootScreen replaces
the bare 'Loading...' boot gate and Suspense fallback; index.html stamps the
saved theme pre-paint so nothing flashes. ConfirmDialog moves to z-index
5000 and gains test-ids. The Node test backend stubs GET /api/billing/status
(worker-only feature) so the client's boot probe stops 404-spamming consoles.
Testing: 46 new unit tests (detection engine, onboarding store incl. KV
mirroring via onboardingMirrorSettled), 13 e2e specs across
onboarding.spec.ts / import.spec.ts with a gotoServerlessZeroState helper
(suppressed demo seed = true zero state) and an E2E_PORT env for the whole
harness (default 3800; CI unchanged). EARS spec: docs/specs/frontend/onboarding.md.
46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
import os from 'os'
|
|
|
|
// Default 3800 (what CI and the helpers expect). Override with E2E_PORT when
|
|
// another dev server already occupies 3800 locally — the helpers read the same
|
|
// variable, so the whole suite follows.
|
|
const PORT = Number(process.env.E2E_PORT || 3800)
|
|
|
|
/**
|
|
* See https://playwright.dev/docs/test-configuration.
|
|
*/
|
|
export default defineConfig({
|
|
timeout: 60000,
|
|
testDir: './tests',
|
|
fullyParallel: true,
|
|
forbidOnly: process.env.CI !== undefined,
|
|
retries: 0,
|
|
workers: os.cpus().length,
|
|
reporter: 'list',
|
|
use: {
|
|
baseURL: `http://127.0.0.1:${PORT}`,
|
|
trace: 'retain-on-failure',
|
|
headless: true,
|
|
testIdAttribute: 'data-test-id',
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
|
|
webServer: {
|
|
command: `npm run dev -- --port ${PORT} --strictPort`,
|
|
url: `http://127.0.0.1:${PORT}`,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120000,
|
|
stdout: 'pipe',
|
|
stderr: 'pipe',
|
|
// The e2e backend runs on :3847 (started + seeded in CI). Pin the vite dev proxy there,
|
|
// regardless of the local-dev default (the Cloudflare worker on :8787).
|
|
env: { API_PROXY_TARGET: 'http://127.0.0.1:3847' },
|
|
},
|
|
})
|