Commit Graph

587 Commits

Author SHA1 Message Date
Fusion
65daf99b2e chore(payments): remove EFT/bank-transfer method, keep Stripe only
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Removes the EFT (havale) payment surface across API, web, i18n, and docs.
Card payment via Stripe is now the only checkout path.

API (apps/api/src):
- Delete payments/bank-accounts/ module (controller + service + module)
- payments.service: drop EFT methods (createEftPayment, uploadEftReceipt,
  approveEft, rejectEft, getActiveBankInfo, getPendingEftPayments) and the
  BankAccountsService dependency
- payments.controller: drop /payments/eft, /payments/eft/:id/{receipt,approve,reject},
  /payments/bank-info, /payments/pending; keep /payments/me
- payments.module: drop BankAccountsModule import
- admin.service: drop pending EFT counter from getDashboardStats; drop
  getPendingPayments (admin EFT approval list)
- admin.controller: drop /admin/payments/pending endpoint
- admin.service.spec: drop the getPendingPayments + pendingPayments assertions

Web (apps/web/src):
- Delete components/payment/bank-transfer-card.tsx
- Delete routes/dashboard/admin/payments.tsx (EFT approval page); regenerate
  routeTree.gen.ts
- subscription/index.tsx: drop EFT tab from PaymentMethodSection, drop the
  paymentMethod state + handleEftCompleted, simplify ConfirmationCard to the
  Stripe-only path, drop unused imports (Tabs, BankTransferCard, Building2)
- billing.tsx: drop "eft" from method filter chips; keep methodLabels.eft and
  the legacy receipt download so historical EFT records still display
- dashboard.tsx + admin/index.tsx: drop /dashboard/admin/payments from the
  sidebar + admin quick-link grid; trim unused icon imports; KEYS_6 → KEYS_5
  for the now-5-card admin stats skeleton
- messages/{tr,en}.json: strip every EFT-only key under payment.* (eftTransfer,
  eftConfirmationDescription, eftPaid, eftStatus, bank.*, uploadReceipt* etc.)

Schema (apps/api/src/database/schema):
- bankAccounts table + payments.bankAccountId column are kept as-is: legacy
  EFT payments remain visible on the billing page and the schema preserves
  historical records.

Docs:
- README.md: "Stripe (kart) + EFT" → "Stripe (kart)"
- CLAUDE.md: stack table + PaymentsModule row + payments table note + route
  list updated; admin EFT approval route removed

Verification:
- pnpm typecheck: green (api + web + shared + config + ui)
- pnpm lint: green
- pnpm test: 20 web tests pass, 173 api tests pass
2026-05-16 11:03:30 +03:00
1278ef679d Merge pull request #16 — feat(FN-395): P1 candidate shortlist 2026-05-16 08:01:36 +00:00
Fusion
2ecc4fab8f feat(FN-395): P1 candidate shortlist 2026-05-15 (CEO deliverable)
Commits merged:
- docs(FN-395): P1 candidate shortlist 2026-05-15 (CEO deliverable)

Files changed:
docs/product/p1-shortlist-2026-05-15.md | 82 +++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

Fusion-Task-Id: FN-395
2026-05-16 11:01:24 +03:00
09dba7d6ff Merge pull request #15 — broaden leaf detection 2026-05-16 07:30:56 +00:00
33605ead25 fix(categories): broaden leaf detection to all /extern/*/{vin,mdl}_items endpoints
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
The leaf-path checks only matched /servicepart/vin_items literally, but
PL24's P5 modern catalog ships the same shape under /chemicals/vin_items,
/accessories/vin_items, /chemicals/mdl_items, etc. When user clicked a
"Rötuşkalemseti" (touch-up paint set) category whose linkPath was
/p5vwag/extern/chemicals/vin_items, the code drilled in, treated each
paint chemical's per-part URL (?partno=LLSMAX010) as a sub-category,
and inserted 228 ghost rows under it. Replace the literal substring
match with a regex that covers the whole /extern/{kind}/(vin|mdl)_items
pattern; apply to both the user-vehicle (categories.service) and the
catalog (catalog.service) flows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 10:30:46 +03:00
4a72f2482b Merge pull request #14 — fix(pl24): Ford VIN flow 2026-05-16 07:04:52 +00:00
af4142077f fix(categories): treat image-board.action linkPaths as leaves in user-vehicle flow
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
getChildren had a leaf-detection whitelist that covered BOM/partinfo paths
but missed PL24's image-board.action (and the VIN variant). When users
clicked into a vin-image-board.action leaf, fetchSubGroupsByPath ran on
its HTML, parsed the BOM rows' jsonUrl="...json-vin-bom-detail.action..."
attributes as if they were sub-groups, and inserted 10+ ghost category
rows under the leaf — each pointing to a per-part endpoint that's not
a sub-group at all. Drilling into one of those ghosts then surfaced the
"0 parça listeleniyor" empty state instead of the real BOM table.

Add both image-board.action and json-vin-bom-detail.action to the leaf
detection list so the flow short-circuits and getCategoryWithParts
handles them via fetchPartsByPath as designed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 10:03:59 +03:00
2bf5e1622c fix(pl24): pass Ford VIN BOM detail URL through fetchP4Page baseUrl prefix
fetchFordVinBomParts was forwarding the relative HTML jsonUrl with
isFullUrl=true, which made undici try to parse \`/ford/fordp_parts/…\`
as an absolute URL and throw "Failed to parse URL" for every PNC row.
The Hyundai BOM expander next door calls fetchP4Page with the default
isFullUrl=false (relative path) — match that.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 10:03:59 +03:00
be3fb2a4b5 feat(pl24): wire Ford/Volvo VIN-decode flow end-to-end via json-vin endpoints
VIN-decoded Ford P/T and Volvo legacy vehicles used to land on an empty
category page: the .action HTML the decoder scraped only carried header
breadcrumbs (Portal / Model seçimi / VIN). The real catalog hangs off
three JSON endpoints that the partslink24 UI calls in the background
once a VIN session is established. None of them need mode/upds/JSESSIONID
beyond the standard PL24TOKEN cookie. Plumb the whole chain so a user
who decoded a VIN sees real Turkish part categories and OEM part
numbers in the user-vehicle flow:

  json-vin-main-group.action   → real top-level groups (8 for Mondeo)
  json-vin-sub-group.action    → 58 leaf subgroups (filters subheaders)
  vin-image-board.action       → BOM table with pncHierCode + jsonUrl
  json-vin-bom-detail.action   → final OEM partno entries (per variant)

Schema image fetch reuses the existing image-ticket extractor since the
ticket URL lives in the same jsIlluData payload as Hyundai/Opel/Volvo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 10:03:59 +03:00
032217716e fix(pl24): drop P4 nav-crumb links from decoded categories
VIN-group HTML for Ford/Volvo legacy services exposes the header
breadcrumb links (Portal / Model seçimi / current VIN) via the same
.action pattern the parser relied on, so they were being persisted as
"part categories" — users saw three useless rows instead of real groups.
The PSA flow already documented this trap and bypassed rawData; extend
the same defense to the rest of P4 legacy (parser-side + categories
insert fallback).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 10:03:59 +03:00
a9611b913e Merge pull request 'dev' (#13) from dev into main
Reviewed-on: #13
2026-05-14 20:54:54 +00:00
Semih
de84d8d267 fix(schema-viewer): drop empty schema panel for image-less BOM overviews
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
PL24's bomOverviewlist widget (PR-code-filtered overview tables like
"Alternatöre genel bakış · Start-Stop modu bulunan araçlar için
[PR:7L6,7L8]") returns parts but no illustration — upstream genuinely
has no schema for these. Previously the 60% left panel rendered the
text "Sema goruntusu bulunamadi", which reads like a failure and
wastes most of the layout for what is actually a complete result.

When schemaPic is null, skip the schema panel entirely and let the
parts list take the full container width. The parts panel already
handles its own header/empty state, so no other adjustment needed.
2026-05-14 20:47:43 +00:00
Semih
7ffff32cac chore(pl24): remove [imgdbg] diagnostic log
Diagnostic served its purpose: confirmed that PL24 bomOverviewlist
URLs (e.g. illustrationId=4336125, "Alternatöre genel bakış" with
PR-code filters) return only a records array with no images field —
upstream genuinely has no schema illustration for these overview
tables. Frontend UX for this case is handled separately.
2026-05-14 20:47:03 +00:00
Semih
7f0f17580e chore(pl24): log full response shape when images field is missing (temp diagnostic) 2026-05-14 20:33:24 +00:00
Semih
cf82e49678 chore: remove playwright repro scratch file 2026-05-14 20:17:43 +00:00
Semih
33e3a7a7d6 fix(vehicles): make decoded vehicles readable by any authenticated user
Decoded vehicle data is shared across the platform — once any user
decodes a VIN, the vehicle, its categories, and its parts should be
visible to every authenticated user. The previous getById enforced a
user↔vehicle junction via inner join, returning 404 "Araç bulunamadı"
when a user tried to view a vehicle they hadn't decoded themselves.
This surfaced as "Veriler yüklenirken bir hata oluştu" on the category
detail page for any vehicle the current user wasn't linked to.

Drop the ownership filter from getById; the userVehicles junction is
now used only for per-user history listing and delete operations.
Verified with Playwright: GET /api/vehicles/.../categories/... was
returning 404 from the ownership check for non-owner users.
2026-05-14 20:17:38 +00:00
Semih
47f76e47d2 fix(FN-373): stop stack reset on every render in CategoryGrid
useTranslation returns a fresh `t` each render, so including it in the
useEffect deps caused the effect to re-fire continuously, resetting the
drill-down stack immediately after handleSelect pushed a child level.
Result: clicking a parent category in grid view did nothing — no API
call, no UI change, no navigation. Reproduced via Playwright on
dev.sase.tr.

Drop `t` from the dep array (key is static; locale changes mid-session
are rare and acceptable to render stale until the next prop change).
2026-05-14 20:02:14 +00:00
Fusion
6c28688283 feat(FN-373): grid view drill-down for parent categories (+1 more)
Commits merged:
- chore(FN-373): verify grid drill-down lint + typecheck clean
- fix(FN-373): grid view drill-down for parent categories

Files changed:
.../src/components/categories/category-grid.tsx    | 175 ++++++++++++++++-----
 apps/web/src/messages/en.json                      |   3 +
 apps/web/src/messages/tr.json                      |   3 +
 3 files changed, 138 insertions(+), 43 deletions(-)

Fusion-Task-Id: FN-373
2026-05-14 18:56:08 +00:00
Fusion
0ce68a7b99 feat(FN-368): parts panel loading state, inert unavailable rows, escape hatch (gitea #10)
Commits merged:
- fix(FN-368): parts panel loading state, inert unavailable rows, escape hatch (gitea #10)

Files changed:
.../schema/__tests__/parts-panel.test.tsx          | 151 ++++++++++++++
 apps/web/src/components/schema/parts-panel.tsx     | 230 ++++++++++++---------
 apps/web/src/components/schema/schema-viewer.tsx   |   7 +-
 3 files changed, 291 insertions(+), 97 deletions(-)

Fusion-Task-Id: FN-368
2026-05-14 18:43:20 +00:00
0b03415997 Merge pull request 'feat(FN-367): add inline retry affordance after VIN decode failure (FN-367, gitea #11)' (#12) from dev into main
Reviewed-on: #12
2026-05-14 14:42:44 +00:00
Fusion
e274e02c23 feat(FN-367): add inline retry affordance after VIN decode failure (FN-367, gitea #11)
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Commits merged:
- fix(web): add inline retry affordance after VIN decode failure (FN-367, gitea #11)

Files changed:
apps/api/src/telemetry/__tests__/telemetry.spec.ts |   2 +-
 .../src/routes/__tests__/dashboard-search.test.tsx | 172 +++++++++++++++++++++
 apps/web/src/routes/dashboard/search.tsx           | 145 ++++++++++-------
 3 files changed, 266 insertions(+), 53 deletions(-)

Fusion-Task-Id: FN-367

Fusion-Task-Lineage: 5dccf49f-5c77-4fe4-ae2d-0273016d517d
2026-05-14 13:55:36 +00:00
d97c04c933 Merge pull request 'dev' (#9) from dev into main
Reviewed-on: #9
2026-05-14 10:42:27 +00:00
Fusion
a0deefd4b2 chore(remotion): acknowledge Remotion license on Player instances
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Suppresses the 'license required' console warning on the homepage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:40:57 +00:00
Fusion
d59451968b chore(gitignore): ignore fusion agent runlogs and wrangler local state
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:34:16 +00:00
e1b1920e7a Merge pull request 'dev' (#8) from dev into main
Reviewed-on: #8
2026-05-14 10:32:17 +00:00
Fusion
09901899d1 fix(csp): allow data: media for Remotion player audio
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:31:12 +00:00
Fusion
36d041d514 fix(csp,faro): allow t.sase.tr in CSP and proxy /collect/ to Grafana Cloud
CSP was blocking PostHog scripts/connections (t.sase.tr) and the theme-FOUC
inline script in index.html. Faro /collect/ requests were aborting because
the bare-metal nginx route disappeared during the Coolify migration.

- Add https://t.sase.tr to scriptSrc + connectSrc
- Add sha256 hash for the theme-FOUC inline script in index.html
- Exclude /collect/* from the /api global prefix
- Add FaroCollectController that forwards POST /collect/:id to
  faro-collector-prod-eu-west-2.grafana.net (overridable via FARO_UPSTREAM)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:08:18 +00:00
Fusion
5bd5325367 feat(FN-356): add checkout_started PostHog event to subscription checkout flow (+1 more)
Commits merged:
- chore(FN-356): verify checkout_started event is in place
- feat(FN-356): add checkout_started PostHog event to subscription checkout flow

Files changed:
apps/web/src/routes/dashboard/subscription/index.tsx | 4 ++++
 1 file changed, 4 insertions(+)

Fusion-Task-Id: FN-356
2026-05-14 10:00:40 +00:00
05f6f9072a Merge pull request 'docs(readme): spacing tweak — measure cache-enabled dev deploy speed' (#7) from dev into main
Reviewed-on: #7
2026-05-14 09:55:41 +00:00
Fusion
69d07fc488 docs(readme): spacing tweak — measure cache-enabled dev deploy speed
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 09:34:17 +00:00
448cc021dc Merge pull request 'docs(readme): add staging URL — gitea deploy flow smoke test' (#4) from dev into main
Reviewed-on: #4
2026-05-14 08:58:36 +00:00
Fusion
97b2973eee docs(readme): add staging URL — gitea deploy flow smoke test
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 08:56:28 +00:00
854dd63d63 Merge pull request 'dev' (#3) from dev into main
Reviewed-on: #3
2026-05-14 08:45:48 +00:00
Fusion
12bc1228b9 ci: drop deploy.yml + sync-dev-to-gitea.yml — pipeline now Gitea-only
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Gitea (git.semih.ai) is the canonical remote. Coolify pulls from Gitea
and triggers builds via Gitea webhooks. Deployment notifications come
from Coolify's built-in Telegram integration (team-level, configured
2026-05-14).

What used to be done by GH Actions:
- deploy.yml (push main → SSH → PM2 → bare-metal sase.tr)
- sync-dev-to-gitea.yml (mirror github/dev → gitea/dev)

What replaces it:
- Push to gitea/main → Coolify webhook → sparkling-snake (production env, prod-iskelet ready)
- Push to gitea/dev  → Coolify webhook → good-gerenuk (staging env, dev.sase.tr)
- Both deploys notified via Coolify → Telegram (chat 7840804807)

qa-gate.yml retained for now (PR test gating); will revisit when Gitea
Actions / Drone are wired or removed if obsolete.
2026-05-14 07:47:52 +00:00
Fusion
3267984395 ci: Telegram notify on prod deploy + dev→Gitea sync (success/fail with commit info)
Some checks failed
Sync dev → Gitea / Mirror dev to Gitea (push) Has been cancelled
2026-05-14 06:38:12 +00:00
Fusion
cd24444f66 docs(audit): mark sections 4/5/9 as shipped to stop Designer dupes
Some checks failed
Sync dev → Gitea / Mirror dev to Gitea (push) Has been cancelled
The post-P0 subscription audit listed Sections 4 (trust copy aria-labels),
5 (payment badge SVGs), and 9 (cancel-save dialog width) as outstanding
P1 polish items. All three have shipped to dev:
- Section 4 → FN-294 / 7036b18
- Section 5 → FN-296 / e5201b2
- Section 9 → 1dfeb13 (manual; FN-291/295 attempts both failed/duplicated)

Designer's heartbeat kept reading the stale status table and re-spawning
duplicate tasks (FN-291 → FN-296 → FN-326 chain for Section 5 alone).
Mark them DONE with commit refs and add an explicit "do not create new
tasks" note so heartbeats stop looping on it.
2026-05-14 06:36:24 +00:00
Fusion
2e30d2abbc chore(scope): enforce Fusion-ships-to-dev-only rule; remove prod-targeted e2e cruft
Fusion is allowed to ship to dev.sase.tr (staging) only — the user owns
the dev→main GitHub merge that promotes to production. Heartbeat-created
tasks kept hallucinating prod deploys / monitoring (FN-291 / 315 / 323 /
324 / 311 etc.), and an entire e2e suite targeting live sase.tr was merged
under FN-320 with hardcoded test creds.

Changes:
- Add "Project-wide rule: Fusion ships to dev.sase.tr only" block to all
  7 agent personas (ceo/cto/cpo/designer/qa/backend-eng/frontend-eng).
- Add /AGENTS.md at project root as the canonical rule (loaded once
  pi-markdown-workflows is reinstalled in the container).
- Remove production-targeted e2e suite under apps/web/e2e/ (auth.setup.ts,
  deployment-audit.cjs, p0-subscription-cro.spec.ts, p0-subscription-cro-verify.cjs,
  playwright.config.ts, screenshots/).
- Remove docs/product/funnel-monitoring-p0-cro-post-deploy-2026-05.md
  (prod-monitoring deliverable, out-of-scope).
- Subscription downgrade-offer dialog: avoid mobile-viewport overflow by
  capping width at calc(100vw - 2rem) below sm breakpoint
  (formerly attempted in failed/duplicate FN-291/295).
2026-05-14 06:36:24 +00:00
Fusion
2ba2a2703c feat(FN-350): cleanup — FN-344 and FN-347 already absent from board
Commits merged:
- chore(FN-350): cleanup — FN-344 and FN-347 already absent from board

Files changed:
pnpm-lock.yaml | 71 +++++++++-------------------------------------------------
 1 file changed, 10 insertions(+), 61 deletions(-)

Fusion-Task-Id: FN-350

Fusion-Task-Lineage: 43d43125-cdac-4ab3-8b8e-d709ef190c7d
2026-05-14 05:23:27 +00:00
Fusion
cc251d207b fix(FN-349): exclude spec files from tsc build
Fusion-Task-Id: FN-349
Fusion-Task-Lineage: 6221f636-1ede-4ebb-b8b2-b3abb3b252c3
2026-05-14 05:21:21 +00:00
Fusion
1039812a8f feat(FN-349): add vitest tests for @sase/config and @sase/shared packages
Fusion-Task-Id: FN-349
Fusion-Task-Lineage: 6221f636-1ede-4ebb-b8b2-b3abb3b252c3
2026-05-14 05:21:21 +00:00
Fusion
906eef148d feat(FN-346): add CLS regression test for skeleton plan grid (+1 more)
Commits merged:
- feat(FN-346): add grid-parity integration test for skeleton CLS regression
- feat(FN-346): add CLS regression test for skeleton plan grid

Files changed:
.../subscription/__tests__/cls-regression.test.tsx | 128 +++++++++++++++++++
 .../subscription/__tests__/grid-parity.test.tsx    | 141 +++++++++++++++++++++
 .../src/routes/dashboard/subscription/index.tsx    |   4 +-
 3 files changed, 271 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-346
2026-05-14 05:09:47 +00:00
Fusion
5333ef44c7 feat(FN-348): verification script, API checks, and report
Commits merged:
- feat(FN-348): complete Step 1 — verification script, API checks, and report

Files changed:
qa/post-deploy/fn348-verify.mjs | 548 ++++++++++++++++++++++++++++++++++++++++
 qa/post-deploy/report.md        | 171 +++++++++++++
 qa/post-deploy/results.json     | 146 +++++++++++
 3 files changed, 865 insertions(+)

Fusion-Task-Id: FN-348
2026-05-14 04:30:23 +00:00
Fusion
aaf2e763cb feat(FN-345): fix skeleton layout shift, dialog overflow, and safe-area padding (+1 more)
Commits merged:
- fix(FN-345): add mobile-safe max-width to cancel confirm dialog
- fix(FN-345): fix skeleton layout shift, dialog overflow, and safe-area padding

Files changed:
apps/web/src/routes/dashboard/subscription/index.tsx | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-345
2026-05-14 03:05:45 +00:00
Fusion
561b02b3d2 feat(FN-343): remove lingering iyzico references after Stripe migration (+1 more)
Commits merged:
- chore(FN-343): remove lingering iyzico references from docs, config, and scripts
- feat(FN-343): remove lingering iyzico references after Stripe migration

Files changed:
CLAUDE.md                                    | 10 +++++-----
 README.md                                    |  2 +-
 apps/api/src/database/schema/core.ts         |  1 +
 apps/web/src/messages/en.json                |  1 -
 apps/web/src/messages/tr.json                |  1 -
 apps/web/src/routes/dashboard/billing.tsx    |  6 +++---
 docker-compose.coolify.yml                   |  5 ++---
 docs/INDEX.md                                | 27 ++++++++++++-------------
 knowledge.md                                 | 30 ++++++++++++++--------------
 packages/shared/src/constants/error-codes.ts |  1 -
 packages/shared/src/index.ts                 |  1 -
 packages/shared/src/types/payment.ts         | 12 +----------
 scripts/fn342-pw-verify.mjs                  |  2 +-
 scripts/validate-env.sh                      |  3 +--
 14 files changed, 43 insertions(+), 59 deletions(-)

Fusion-Task-Id: FN-343
2026-05-14 02:31:42 +00:00
Fusion
c1085d0bbf feat(FN-342): add Playwright visual verification script for P0 subscription CRO fixes (+1 more)
Commits merged:
- feat(FN-342): finalize production verification — all P0 CRO fixes confirmed live
- feat(FN-342): add Playwright visual verification script for P0 subscription CRO fixes

Files changed:
scripts/fn342-pw-verify.mjs | 416 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 416 insertions(+)

Fusion-Task-Id: FN-342
2026-05-14 01:29:02 +00:00
Fusion
dc63dac838 feat(FN-335): log coordination check-in — confirmed human-blocked at Step 1
Commits merged:
- chore(FN-335): log coordination check-in — confirmed human-blocked at Step 1

Files changed:
docs/product/funnel-audit-p0-cro-2026-05.md | 1 +
 1 file changed, 1 insertion(+)

Fusion-Task-Id: FN-335
2026-05-14 00:02:18 +00:00
Sase Dev
02bf7342a1 fix(subscription): recover stepper when a pending checkout is abandoned
Some checks failed
Deploy / Deploy to Production (push) Has been cancelled
A user who picked a plan + brands, clicked the checkout button to
create the pending subscription, then closed the tab without paying
came back to a frozen "Mevcut Plan · Bekliyor" card with no payment
button and no way to edit. Status was "pending", which my conditional
treated as an active subscription and routed away from the stepper.

Frontend
- hasActiveSub narrowed to active|cancelled only. Pending users now
  see the stepper again.
- New effect pre-fills selectedPlanKey, selectedBrandIds,
  billingPeriod from the pending row on first render and jumps
  straight to the payment step.
- New PendingPaymentBanner at the top of the stepper with
  "Odemeye devam et" (scrolls + sets step=payment) and "Vazgec"
  (calls cancel-pending then resets selection).

Backend
- subscriptions.service.create() auto-expires existing pending
  rows for the user before inserting a new one — abandoned checkouts
  no longer accumulate and a fresh attempt with a different plan
  doesn't 409.
- New PATCH /subscriptions/cancel-pending + service method for
  the banner's explicit cancel action.

i18n: subscription.pendingBanner.* (tr/en).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 22:57:13 +00:00
Sase Dev
9c05a05a7a fix(drizzle): register 0004_hot_quicksilver in migration journal
The 0004 migration file shipped in 6a0b36a but _journal.json did not
include its entry, so the hash-based migrate runner saw "0 applied,
4 already applied" on the previous deploy. Append idx 4 so the next
deploy picks it up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 22:46:54 +00:00
Sase Dev
6a0b36a7a0 feat: replace Iyzico with Stripe + single-page subscription stepper
Subscription/checkout flow rewritten end-to-end. The plan-card "Devam Et"
button silently wiped brand selection on re-click and the actual proceed
button lived offscreen — fixed by collapsing plan/brands/payment/confirm
into a single vertical stepper with one sticky CTA.

Backend
- Stripe Hosted Checkout (`/payments/stripe/checkout`) + webhook
  (`/payments/stripe/webhook`, raw body) replacing the stubbed Iyzico
  module. Webhook activates subscription on `checkout.session.completed`,
  expires the pending subscription on cancel/expire so users can retry.
- New `bank_accounts` table — multiple rows, single `is_active` enforced
  by a partial unique index. Admin CRUD under `/admin/bank-accounts`
  with multipart QR upload to MinIO; atomic `/activate` swap in a
  transaction; `GET /payments/bank-info` returns the active row.
- `payments` gains `stripe_session_id`, `stripe_payment_intent_id`,
  `bank_account_id`. EFT flow now reads the active bank account at
  payment time and stores the FK for reconciliation.
- Env: `IYZICO_*` removed, `STRIPE_*` added (validated by zod schema).
- `main.ts` `rawBody: true` for Stripe signature verification.
- Drizzle 0003 snapshot id collision fixed (VIEW-only migration shared
  prevId with 0002, blocking new generates).

Frontend
- `/dashboard/subscription` rewritten as a 4-step vertical stepper with
  step-aware sticky bottom CTA; plan re-selection is idempotent and
  preserves brand state. `/dashboard/subscription/pay` deleted; Stripe
  returns to the same page via `?stripe=success|cancelled` and the UI
  polls `/subscriptions/me` until the webhook activates the row.
- New components: `bank-transfer-card.tsx` (DB-driven IBAN + Kolay Adres
  + uploaded QR image + receipt upload) and `stripe-checkout-button.tsx`.
- Active subscription view, trial onboarding/urgency banner, downgrade
  and cancel dialogs preserved.
- TR/EN i18n: new `subscription.steps.*`, `subscription.stickyCta.*`,
  `payment.stripe.*`, `payment.bank.*`; provider label updated.

PostHog: `method: "iyzico"` → `"stripe"`; new events `iban_copied`,
`kolay_adres_copied`, `qr_viewed`, `eft_initiated`,
`stripe_redirect_returned`.

Deploy runs `db:migrate` which applies 0004_hot_quicksilver
(additive: new table + nullable columns; safe to apply on prod).
Operator must add `STRIPE_SECRET_KEY`, `STRIPE_PUBLISHABLE_KEY`,
`STRIPE_WEBHOOK_SECRET` to env and create the first
`bank_accounts` row via the admin endpoint before the bank tab works.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 22:42:28 +00:00
Sase Dev
0b6d4bb0a7 feat(analytics): enrich PostHog VIN/parts/subscription events (SASE-PH-001 Faz 0/1 additive subset)
Per sase-posthog-events-prd.md, additive-only pass (no renames, no dead-feature events):

- search.tsx: add search_input_focused, search_input_validation_failed,
  search_paste_detected, search_history_item_selected; track query_source
  (manual|paste|history) and propagate to vin_decoded/success/error; add
  response_time_ms, source, status_code on success/error; add selected_index,
  candidates_count, time_to_select_ms to vin_decode_candidate_selected.
- parts-panel.tsx: add parts_panel_viewed with vehicle_id, category_id,
  parts_count, has_prices, available_groups_count (one-shot per mount).
- subscription/index.tsx: enrich plan_selected (period, from_plan, status),
  checkout_started (from_plan, brands_count, trial_available, status),
  subscription_cancelled (from_plan, billing_period, status_before_cancel,
  days_since_start, had_downgrade_offer).
2026-05-13 22:05:50 +00:00