2.9 KiB
2.9 KiB
Descrybe: processing credit settings and Unicode exports (2026-10-20)
Changes
- Fixed
PUT /api/admin/credit-value-eurfailing withunknown settings key. The platform-settings allowlist now permits thebilling.reference_eur_per_creditvalue (not a secret). - Fixed
GET /api/admin/processing-costsreportingcould not scan processing costsby reading PostgreSQL numeric/integer costs as text, then explicitly parsing into the JSON response. This avoids driver conversion problems across schema revisions. - Product Management can still start a valid full-enrichment request when the credit estimate endpoint is temporarily unavailable, without displaying an invented credit estimate. A retry action is provided. Permission and billing checks still happen on the API/worker side.
- Price, stock and availability remain optional supplier/product inputs; missing values are not fabricated or used to block enrichment.
- All server-generated CSV downloads (product exports, public feed CSV, usage, Stripe invoices, AI costs) now use UTF-8 plus a single BOM (
EF BB BF) for direct Microsoft Excel compatibility. - Browser-generated CSV/TSV downloads (categories, attribute templates, sample feed) use UTF-8 with BOM. XML and JSON exports remain standard UTF-8 without a BOM.
- Added tests for credit reference-setting permission, price/stock-optional enrichment, CSV/TSV Unicode and XML/JSON preservation.
Deploy
- Backup your database and deploy both the updated Go API/worker and SvelteKit web client. Don't just upload the web files.
- Apply existing database migrations through
054_catalog_import_languages.sql, especially049_processing_cost_overrides.sqland053_content_credit_rates.sql. From the project root,npm run migrateafter setting up the database environment. - Rebuild/restart API and web; refresh the UI.
- In Admin > Billing, save the EUR-per-credit reference value. Set the actual product/output credit costs on the plan separately; EUR reference value does not set processing charges.
- Check
GET /api/admin/processing-costsandGET /api/billing/processing-costswith appropriate authenticated roles. - Try an imported product with no price/stock information, and export
Črpalka, šoba, Žarnicato CSV. A CSV file should beginEF BB BFand decode as UTF-8.
Validation in this environment
- Focused JS tests (pricing fallback, plan mode, UTF-8 exports): 6 passed, 0 failed.
- Full web test suite: 299 passed, 6 failed, due to unrelated existing translation key discrepancies, an absent source file and missing dependencies in the supplied archive.
- Go source was formatted/parsed by
gofmt. Full Go tests/build could not be run here: project requires Go 1.25, host has Go 1.23.2, and external downloads are unavailable. Rungo test ./internal/platformsettings ./internal/feeds ./internal/httpapi ./internal/billing ./internal/processingfromapps/apiin your Go 1.25 environment.