Skip to content

feat(web): add batch upload mode with one-click deep review#2

Open
CZH-THU wants to merge 1 commit into
AndrewNgGirl:mainfrom
CZH-THU:batch
Open

feat(web): add batch upload mode with one-click deep review#2
CZH-THU wants to merge 1 commit into
AndrewNgGirl:mainfrom
CZH-THU:batch

Conversation

@CZH-THU
Copy link
Copy Markdown

@CZH-THU CZH-THU commented May 24, 2026

Summary

Adds a batch upload and batch deep review workflow to the SkillLens web app. Users can upload multiple independent skill packages (folder or zip), run deep review on all of them in one click, inspect per-skill and cross-skill scores, and export results to CSV.

What's new

Upload & parsing

  • Upload mode toggle alongside skill type: Single skill vs Batch mode
  • Loader detects multiple packages (one SKILL.md per subfolder) from folders and zips
  • packagePath + skillInstanceKey() for stable React keys and per-skill state when folder names repeat (e.g. multiple 总技能/SKILL.md)

Batch deep review

  • Run batch deep review — sequentially reviews all pending skills
  • Progress bar with current skill name and done/total
  • Stop to cancel the remaining queue
  • Retry deep review on failed skills (per card)
  • Per-skill LLM/market state stored in runStates (switching skills does not overwrite others)

Results & export

  • Score cards per skill (total + status)
  • All skills — deep review scores table (total + pillars %)
  • Expandable dimension scores detail
  • Cross-skill statistics (mean, max, min, variance, median) for total, pillars, and dimensions
  • Finance expert aggregates when finance review mode is active
  • Export CSV — per-skill scores + aggregate stats (UTF-8 BOM for Excel)

Refactors & fixes

  • Shared runSkillDeepReview() for single- and batch-review paths
  • Abort/cancel returns { aborted: true } instead of unhandled AbortError rejections
  • Next.js 16.2.6 and Postcss 8.5.x (with overrides)

Files (high level)

Area Files
UI BatchReviewPanel.tsx, BatchStatsPanel.tsx, Uploader.tsx, page.tsx
Scoring batch-stats.ts, batch-csv.ts, run-skill-deep-review.ts
Loading loader.ts

How to test

  1. Select Batch mode → upload a folder/zip with multiple skill packages (one SKILL.md per package).
  2. Click Run batch deep review and confirm progress updates.
  3. After completion, check the score tables and Cross-skill statistics.
  4. Click Export CSV and open in Excel/Sheets.
  5. Force a failure (e.g. disconnect API) → Retry deep review on that card.
  6. Click Stop mid-batch → no console AbortError / unhandled rejection.
  7. Upload a folder with duplicate display names but different packagePath → no duplicate React key warnings.

Notes

  • Batch mode does not support paste or sample skills (folder/zip only).
  • In batch mode, the per-skill Run deep review CTA is hidden; use the batch panel instead.
  • web/next-env.d.ts local dev path changes were intentionally not included in this commit.

Support multi-package folder/zip uploads, per-skill LLM state, batch orchestration with progress and retry, cross-skill aggregate stats, and CSV export. Bump Next/postcss deps and fix AbortError on cancelled reviews.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant