#4215

Add a recipe for reviewing AI category suggestions from CSV imports

Draft404oopswants to merge intofrom

Add a category-cleanup recipe and runnable playground that open an existing CSV from Puter, suggest mappings for distinct category labels, require user approval, and save the approved CSV through the Puter Save dialog. Papa Parse preserves quoted fields and amount strings; validation and formula protection keep untrusted file and AI content out of executable output. Editing a mapping requires approval again.

Addresses PUT-1967. Base: main. The receipt recipe is stacked above this draft.

Validation at 4dbdced92a21925044c03917e413c0470491d77b:

  • Both executable recipe suites passed together, 396 tests. The combined docs build passed without warnings.
  • The actual pinned Papa Parse handled quoted multiline text, string amounts, duplicate headers, malformed rows, and the row limit.
  • Chromium exercised the real SDK, local Puter desktop popup, backend files, review/approval, Save cancellation, and saved-file readback. Unselected-file reads and arbitrary destination writes were denied. The real website popup's legacy cancellation messages have explicit regressions.
  • This new browser pass used deterministic AI HTTP fixtures. Earlier pre-picker live inference traversed the real SDK, HTTP, Puter driver, and configured provider; that remains separate evidence for inference.

The isolated Docker test server used synthetic files/users, in-memory SQLite/storage, real Dynalite, and mocked Redis. Its health check probed the actual ephemeral test origin and was healthy. Test-only sharp resolution and compiled import.meta.url adaptations were required. Browser tests exercised dialog Cancel buttons; browser-blocked popups and direct browser-window closure were not tested. No real receipts or user files were used.

Stack: main → #4215 → #4216. Current head: 966c8c9106da9730f7fc9174b4cc1efbe29a4fda.

Both recipe patches are unchanged and isolated from the code stack on current main. The combined tree matches main plus only the two original recipe patches. All 396 recipe tests and the docs build passed.

Activity

6
github-actions[bot]17d ago

Coverage Report

StatusCategoryPercentageCovered / Total
🔵Lines94.99%
🟰 ±0%
35733 / 37616
🔵Statements93.08%
🟰 ±0%
39161 / 42071
🔵Functions92.7%
🟰 ±0%
6812 / 7348
🔵Branches83.38%
⬇️ -0.01%
26703 / 32023
File CoverageNo changed files found.
Generated in workflow #2551 for commit 966c8c9 by the Vitest Coverage Report Action
github-actions[bot]17d ago

Coverage Report for puter.js SDK

StatusCategoryPercentageCovered / Total
🔵Lines58.95%
🟰 ±0%
5145 / 8727
🔵Statements57.12%
🟰 ±0%
5483 / 9599
🔵Functions59.44%
🟰 ±0%
957 / 1610
🔵Branches52.5%
🟰 ±0%
3444 / 6560
File CoverageNo changed files found.
Generated in workflow #1298 for commit 966c8c9 by the Vitest Coverage Report Action

This pull request is a draft

Merging is unavailable until it is marked ready for review.