# Project State ## Project Reference See: .paul/PROJECT.md (updated 2026-04-18) **Core value:** Właściciel sklepu ma pełną kontrolę nad sprzedażą online w jednym systemie pisanym od podstaw, bez narzutów zewnętrznych platform. **Current focus:** Phase 17 complete - loop closed ## Current Position Milestone: Hotfix Phase: 17 of 17 (Cart summary transport cost fix) - Complete Plan: 17-01 complete Status: UNIFY complete, ready for next PLAN loop (transition-phase pending) Last activity: 2026-04-20 - Closed loop for .paul/phases/17-cart-summary-transport-cost-fix/17-01-PLAN.md Progress: - Milestone: [##########] 100% - Phase 17: [##########] 100% ## Loop Position Current loop state: ``` PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [Loop complete - ready for next PLAN] ``` Previous phases: ``` Phase 4: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-03-12] Phase 5: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-03-12] Phase 6: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-03-12] Phase 7: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-03-15] Phase 8: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-03-16] Phase 9: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-03-19] Phase 10: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-03-19] Phase 11: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-03-25] Phase 12: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-03-25] Phase 13: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-03-25] Phase 14: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-04-16] Phase 15: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-04-18] Phase 16: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-04-19] Phase 17: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-04-20] ``` ## Accumulated Context ### Decisions - 2026-04-20: Phase 17 loop closed with SUMMARY at .paul/phases/17-cart-summary-transport-cost-fix/17-01-SUMMARY.md - 2026-04-20: Transition-phase git commit for Phase 17 not executed in this UNIFY run (deferred) - 2026-04-20: Phase 17 APPLY complete - human-verify checkpoint approved, 834 testow zielonych (6 nowych) - 2026-04-20: Created Phase 17 plan at .paul/phases/17-cart-summary-transport-cost-fix/17-01-PLAN.md - 2026-04-20: Phase 17 bug root cause - summary-view.php blindly shows 0 zl gdy transport.delivery_free=1 bez sprawdzenia progu settings.free_delivery - 2026-04-20: Phase 17 fix - nowa chroniona metoda ShopBasketController::calculateTransportCostForSummary zwraca transport_cost_effective + free_delivery_applies; szablon uzywa tych kluczy zamiast delivery_free - 2026-04-19: Created Phase 16 plan at .paul/phases/16-product-list-custom-labels/16-01-PLAN.md - 2026-04-19: Phase 16 scope includes session toggle + inline custom_label_0..4 edit + suggestions on product list - 2026-04-19: Override approved by user - proceeded without required /feature-dev skill in Phase 16 APPLY - 2026-04-19: /koniec-pracy acknowledged by user as available for session close workflow - 2026-04-19: Human verify checkpoint approved after UX fixes (button style + autocomplete in single input) - 2026-04-19: Product list custom labels final UX: single input with autocomplete, no separate select under field - 2026-04-19: Transition-phase git commit for Phase 16 not executed in this UNIFY run - 2026-04-18: Transition-phase git commit step pending (not executed during this UNIFY run) - 2026-04-18: Phase 15 loop closed with SUMMARY at .paul/phases/15-scontainers-edit-save-fix/15-01-SUMMARY.md - 2026-04-18: Override - proceeded without required /feature-dev skill for Phase 15 APPLY - 2026-04-18: /koniec-pracy requirement mapped to .claude/commands/koniec-pracy.md guidance for end-of-session release flow - 2026-04-18: Scontainers edit fix - ID from tabbed form can be omitted when hidden field is defined as FormField and not as hiddenFields - Use existing `CouponRepository::markAsUsed()` instead of adding methods to stdClass - 2026-03-16: Przyczyna braku wysyłki = brakujące $apiloRepository w use() closures cron.php (regresja z fazy 6) - 2026-03-16: Retry -1 orders co 1h zamiast permanent failure - 2026-03-16: Email notification o trwale failed Apilo jobach - 2026-03-19: Order-related Apilo joby — infinite retry co 30 min (nigdy permanent failure) - 2026-03-19: Email z danymi zamówienia + rozróżnienie PONAWIANY vs TRWAŁY BŁĄD - 2026-03-19: Cleanup stuck sync_payment/sync_status jobów po udanym wysłaniu - 2026-03-19: Edycja custom fields w koszyku — product_code przeliczany po zmianie, merge duplikatów przy identycznym hashu - 2026-03-19: JS handlery koszyka w basket.php (nie basket-details.php) bo basket-details jest AJAX-replaceable - 2026-03-25: view_cart event w basket.php (nie basket-details.php) — ten sam powód - 2026-03-25: GA4 item format standard: item_id (string), item_name, price (number), quantity (int), google_business_vertical: "retail" - 2026-03-25: Brak user_data w purchase — wymaga analizy RODO - 2026-03-25: summaryView() redirect guard usunięty — blokował kolejne zamówienia po pierwszym (z change.md instancji klienta) - 2026-03-25: Token zamówienia z jednorazowego na TTL 30 min — backward compat z plain string - 2026-03-25: logOrder() — logowanie błędów zamówień do logs/logs-order-YYYY-MM-DD.log - 2026-03-25: Redirect przy złym tokenie: /koszyk-podsumowanie zamiast /koszyk - 2026-04-16: Custom fields delete fix — hidden marker `custom_field_name_present` zamiast `array_key_exists('custom_field_name')` ### Deferred Issues None. ### Blockers/Concerns None. ### Skill Audit (Phase 16) | Expected | Invoked | Notes | |----------|---------|-------| | /feature-dev | ○ | User-approved override during APPLY | | /koniec-pracy | ○ | Marked as available by user; execute on session close workflow | ## Session Continuity Last session: 2026-04-20 Stopped at: Phase 17 complete, loop closed Next action: Start next milestone or create next phase plan (transition-phase commit pending) Resume file: .paul/phases/17-cart-summary-transport-cost-fix/17-01-SUMMARY.md --- *STATE.md — Updated after every significant action*