Windows fs.rename fails when ffmpeg still holds the file handle. Use
copyFileSync + unlinkSync with retry (up to 10 attempts, 1s interval)
to work around the file lock.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
page.video() may return null after page.close(), so the video reference
must be captured before closing the detail page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Video directory now includes batchId: logs/video/{batchId}/
- Each order's video is renamed to {orderNumber}.webm after the
detail page is closed
- Handles name collisions (retries) by appending timestamp
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align the test fixture type with the updated ErpConfig source type
that now includes optional video recording fields.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ensureVideoDir helper that creates <logDir>/video/ directory on demand.
Pass recordVideo and videoDir to both ErpAuthService instantiations
(initial login and outer retry) in cleaner-application-service.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When recordVideo and videoDir are set in ErpConfig, pass Playwright's
recordVideo option to browser.newContext() so sessions are automatically
captured on context close.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add optional `recordVideo` field to CleanerInput and ErpConfig, and
`videoDir` field to ErpConfig. These fields form the foundation for
video recording support in the cleaner execution flow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace sequential for-loop with Promise.all so that matched batches
are fetched concurrently instead of one-by-one, reducing total query
latency from O(n) serial round-trips to a single parallel batch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add search bar to CleanerOperationHistoryModal with keyword search
across batch IDs, order numbers, and material codes/names. Search
results auto-expand with preloaded data and highlight matched text.
Also add searchHistoryRecords to the CleanerAPI type definition.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use Promise.all for parallel managers + records loading (async-parallel)
- Wrap KeywordCard in memo to skip unnecessary list item re-renders
- Stabilize handlers with useCallback + functional setState pattern
- Hoist generateId to module scope to avoid per-render recreation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restructure the dialog with a card-grid layout, KeywordCard subcomponent,
and smooth hover animations. Fix admin view where manager badge and delete
button overlapped by using flex layout with translate and max-width transitions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove playwright.config.ts (no longer using Playwright for E2E),
and delete test-s3-playwright.js / test-s3-playwright-simple.js
(one-off S3 debug scripts).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After logout, the cached silentLoginPromise caused silentLogin() to return
a stale result instead of re-executing loginByComputerName(), leaving
sessionManager.currentUser as null and making subsequent switchUser() calls fail.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add order-level serial number column in order table
- Add material-level serial number column in material details table
- Update colSpan from 10 to 11 to accommodate new column
- Add date-prefixed naming format: YYYY-MM-DD-description-type.md
- Document -plan.md and -design.md type suffixes
- Add examples from existing plan files
- Update classification examples to include plans/ naming
- Create user/ - User guides and configuration documentation
- Create features/ - Feature specifications and business flows
- Create debugging/ - Debug guides and quick references
- Create testing/ - Test infrastructure, reports, and plans
- Create internal/ - Internal plans, analyses, and templates
- Move cleaner/*.md to cleaner/ directory
- Move LOGGING_*.md to developer/guides/
Add docs/README.md as documentation index with category navigation
and quick lookup guide.
The reorganized structure makes it easier for users and developers
to quickly locate relevant documentation.
Update dialect tests for UTC timestamp functions and cleaner-handler
test for runCleaner's extended parameter signature.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Record ALL input orders in history, including resolution failures (not_found)
and ERP query misses (erp_not_found). Add ProductionId column to track original
总排号 input. Add 总排号 column and new status styles to the history UI. Fix
empty result caching that prevented retry on transient query failures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>