Commit Graph

53 Commits

Author SHA1 Message Date
Misaka_Company
0c6bb85e67 1.12.0 2026-04-14 10:51:21 +08:00
Misaka_Company
b065e23306 1.11.1 2026-04-07 08:53:22 +08:00
Misaka
6b3c62268a 1.11.0 2026-04-06 19:22:32 +08:00
Misaka
c6f67e49a4 1.10.0 2026-04-05 21:41:08 +08:00
Misaka
7e521da3f1 feat(db): add PostgreSqlService with pg driver
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 10:04:48 +08:00
Misaka
6e431bc37e test: fix remaining P0/P1 test issues
- Remove obsolete env.test.ts (.env mechanism abandoned, use YAML config)
- Remove manual test files (not proper unit/integration tests)
- Fix errors.test.ts getErrorMessage assertion to match implementation
- Clean up dotenv dependency (not used as project uses YAML config)

## Test Results After Fix:
- Remaining failures: 14 tests (logger: 11, update: 2, manual: 1)
- Pass rate: 95% (315/329 tests)

## Next Steps Needed:
- logger.test.ts needs logger initialization refactor (circular dep with ConfigManager)
- manual tests should be converted to proper integration tests
2026-04-04 18:41:19 +08:00
Misaka
fe02e37848 test(P0): fix critical test infrastructure issues
- Add complete Electron mock with all required APIs (getVersion, getName, etc.) - fixes 20 failing suites
- Fix Winston format mock to support chainable calls - fixes logger test errors
- Add comprehensive TypeORM mock for repository tests - fixes 4 failing tests
- Fix bootstrap-runtime test path assertions
- Update Excel parser tests to skip file I/O (moved to integration)
- Add test review report and improvement plan documentation

## Test Results:
- Failed test suites: 20 → 6 (-70%)
- Failed tests: 48 → 16 (-67%)
- Pass rate: 67% → 94% (+27%)

## Remaining (P1/P2 - not blocking):
- logger.test.ts: 11 failures (config-manager circular dependency, needs refactoring)
- manual tests: 2 failures (should be moved to integration)
- Minor assertion fixes in update-service tests

Fixes: P0 test infrastructure issues
2026-04-04 18:36:38 +08:00
Misaka
528a8157ff 1.9.0 2026-04-04 18:12:10 +08:00
Misaka
1e0bb1de24 feat(logging): add Seq transport, global meta fields, and improve error handling
- Add Seq centralized logging transport with async ESM import
- Add appVersion and computerName to logger defaultMeta (all app logs)
- Add appVersion to audit log entries for version-level traceability
- Improve unhandledRejection to capture full stack traces for Error instances
- Add Seq config schema and template configuration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 16:33:03 +08:00
Misaka_Company
63a292c5f9 1.8.0 2026-04-01 15:18:31 +08:00
Misaka_Company
811361a1a3 1.7.2 2026-04-01 13:56:14 +08:00
Misaka_Company
3cbe9eef12 1.7.1 2026-04-01 08:36:50 +08:00
Misaka_Company
c6eb60ada7 1.7.0 2026-03-31 15:28:26 +08:00
Misaka_Company
dd2cf1c576 1.6.2 2026-03-26 12:51:28 +08:00
Misaka_Company
6b2a3b088f 1.6.1 2026-03-26 12:17:28 +08:00
Misaka_Company
00c75fb0b8 1.6.0 2026-03-26 10:37:28 +08:00
google-labs-jules[bot]
5178a2425a feat(ui): add report analysis feature for admin
Added a new ReportAnalysisDialog component, accessible from the ReportViewerDialog, strictly for Admin users. It parses execution reports, extracts markdown metrics like processed orders, skipped materials, errors, and execution time, and presents them in an interactive recharts line chart aggregated by day.

Co-authored-by: luwamgere15-crypto <255338376+luwamgere15-crypto@users.noreply.github.com>
2026-03-25 10:47:32 +00:00
Misaka
5cce470850 1.5.1 2026-03-24 21:43:39 +08:00
Misaka_Company
7a78948a8c 1.5.0 2026-03-24 17:45:45 +08:00
Misaka_Company
37eade6360 1.4.2 2026-03-23 10:23:41 +08:00
Misaka
bede488230 chore: align packaging with windows release flow 2026-03-21 18:30:05 +08:00
Misaka
68e6c9483f 1.4.1 2026-03-20 23:30:05 +08:00
Misaka
78544af8de Merge branch 'dev' 2026-03-20 23:28:24 +08:00
Misaka
7d73592d41 Merge remote-tracking branch 'origin/dev' into dev 2026-03-20 23:25:32 +08:00
Misaka
bacdd2d82f 1.4.0 2026-03-20 23:22:53 +08:00
Misaka
9add23f6ed feat: add one-click release publishing 2026-03-20 22:56:31 +08:00
Misaka
6ad9463e73 feat: rebuild portable auto-update flow 2026-03-20 21:20:28 +08:00
Misaka_Company
7644b8d4ea feat(report-viewer): add searchable combobox for report selection
Replace native select dropdown with Headless UI Combobox component to enable:
- Search/filter functionality for reports
- Better UX with keyboard navigation
- Improved visual feedback for selected items
- Empty state handling for no matches

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 17:33:16 +08:00
test
5e50a8fbcf feat(report-viewer): add syntax highlighting and GitHub-style markdown rendering
Add rehype plugins for enhanced markdown rendering:
- rehype-highlight: syntax highlighting for code blocks
- rehype-slug: generates heading IDs for anchoring
- rehype-autolink-headings: auto-links headings
- github-markdown-css: GitHub-flavored markdown styling

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 20:13:40 +08:00
Misaka_Company
9ee1ea566c 1.3.1 2026-03-18 13:18:15 +08:00
Misaka_Company
baa7622954 chore: bump version to 1.3.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 11:03:20 +08:00
google-labs-jules[bot]
a020ee537d feat: Add Report Viewer Dialog to Cleaner Page
Added a new "View Reports" button to the CleanerPage which opens a new ReportViewerDialog. This dialog lists all available execution reports stored in S3 for the current user, or for all users if the current user is an admin.
The reports are downloaded as Markdown and rendered using react-markdown.
Added three new IPC channels to fetch and download reports using the existing RustfsService and S3Client.

Co-authored-by: luwamgere15-crypto <255338376+luwamgere15-crypto@users.noreply.github.com>
2026-03-17 23:03:13 +00:00
test
351e9a92bc chore: bump version to 1.2.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 22:04:25 +08:00
test
f5514dd721 Merge branch 'dev' 2026-03-17 22:03:01 +08:00
Misaka_Company
569c8e8ecc chore: add prebuild script to clean dist and out before build
Ensures clean build by removing dist and out directories before
each build:win, build:mac, and build:linux command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 17:07:42 +08:00
Misaka_Company
21bb8ef79c chore: bump version to 1.1.1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 16:50:15 +08:00
Misaka_Company
7bc6daf1b7 feat(rustfs): add test script, dependencies, and configuration template
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-17 15:49:20 +08:00
Misaka_Company
ad8b3deb00 feat(order-resolver): add deduplication logic for production order number resolution
- Add P0: DISTINCT in SQL query to prevent database duplicates
- Add P1: Input layer deduplication to avoid redundant queries
- Add P2: Return layer deduplication in getValidOrderNumbers()
- Optimize resolve() to use batch query instead of loop queries
- Add getDeduplicationReport() for human-readable mapping summary
- Improve extraction logs to show deduplication statistics
- Only log merged mappings (multiple productionIDs → one order number)
- Remove duplicate marking as error (normal business scenario)
- Bump version to 1.0.1

Example log output:
  输入 5 个总排号 → 解析为 2 个唯一订单号(3 个重复已合并)
  重复合并详情:
    SC70202603120085 ← 26B12214、26B12213、26B12212 (共 3 个总排号)
    SC70202603120131 ← 26B12125、26B12126 (共 2 个总排号)
2026-03-16 16:02:52 +08:00
test
62e1647eaf feat(a11y): add focus lock dependency and useDialogFocus hook
- Install react-focus-lock@2.13.7 for focus trap functionality
- Create useDialogFocus hook with focus management, Escape key handling,
  initial focus, focus restoration, and body scroll lock
- Create E2E test infrastructure with helper functions for focus testing
- Compatible with React 19 and Electron 39
2026-03-08 17:01:00 +08:00
test
b3abad7fae feat(playwright): enable Playwright in production builds with custom browser path
Move Playwright from dev to production dependencies and implement robust browser
management for company deployment environment:

- Move playwright and playwright-core to dependencies
- Set PLAYWRIGHT_BROWSERS_PATH to user data directory before imports
- Add startup validation for Chromium browser with friendly error dialog
- Update build scripts to skip browser download during build process
- Configure electron-builder to unpack Playwright for native module access
- Add deployment documentation for browser setup in restricted environments

This allows manual browser installation in company environments where direct
downloads are blocked during build.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-07 19:03:29 +08:00
test
54a82200b6 refactor: complete migration from .env to YAML configuration
BREAKING CHANGE: Application now uses config.yaml instead of .env files

## Changes:
- Remove dotenv dependency from package.json
- Update all services to use ConfigManager for configuration
- Update tests to use fixed credentials instead of env vars
- Delete obsolete config-manager.test.ts (used old .env API)
- Update documentation (README.md, CLAUDE.md) to reflect new config system

## Configuration Architecture:
- ConfigManager: Centralized YAML configuration with Zod validation
- config.yaml location:
  - Development: Project root (easy to edit and version control)
  - Production: User AppData (persists across updates)
- ERP credentials: Stored in database (dbo_BIPUsers) per user
- Other settings: Stored in config.yaml (database, paths, extraction, etc.)

## Files Modified:
- package.json: Removed dotenv dependency
- cleaner-handler.ts: Use ConfigManager.getDatabaseType()
- run-migration.ts: Read from config.yaml instead of .env
- All integration tests: Use fixed test credentials
- tests/setup.ts: Removed dotenv loading
- README.md, CLAUDE.md: Updated documentation

Migration is complete. Application no longer depends on .env files.
2026-03-07 17:22:13 +08:00
test
6f19890a84 refactor(erp-auth): implement precise login result detection with three outcomes
- Add waitForLoginResult() method using Promise.race to detect:
  - Success: .nc-workbench-icon element visible
  - Failure: '名称或密码错误' error text visible
  - Force login: click confirm button and re-detect
- Extract timeout constants (PAGE_LOAD_TIMEOUT, LOGIN_RESULT_TIMEOUT, FORCE_LOGIN_TIMEOUT)
- Improve error handling with clear error messages
- Add unit tests for class structure verification
- Fix test setup for Electron app mock

Fixes: ERP login success/failure detection was ambiguous
2026-03-07 14:07:08 +08:00
test
8e0c37bf74 feat: add ERP login debug tool with documentation
Add interactive debugging tool for ERP login flow analysis:
- Add tsx dependency for TypeScript script execution
- Add npm scripts: debug:erp-login and debug:config-path
- Add erp-login-debug.ts with automated login and element inspection
- Add comprehensive usage guide and quick reference documentation

The debug tool automates ERP login and provides pause points for
manual element inspection using browser DevTools or Playwright Inspector.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-07 13:16:43 +08:00
test
c13be9e19a refactor: migrate configuration to YAML-based system 2026-03-07 11:30:09 +08:00
Misaka
9939201ca1 Fix: Add chromium-bidi dependency and externalize Playwright to resolve module loading errors 2026-03-04 20:04:48 +08:00
google-labs-jules[bot]
fed76b4fe0 Refactor ExtractorPage with custom hooks and UI components
* Extract logic and state management from `ExtractorPage.tsx` into a custom hook `useExtractor.ts`.
* Extract log rendering logic and auto-scrolling into a separate `LogPanel.tsx` component.
* `ExtractorPage.tsx` is now significantly smaller, focused purely on presentation.
* Verified no regressions via type checking and application building.

Co-authored-by: luwamgere15-crypto <255338376+luwamgere15-crypto@users.noreply.github.com>
2026-03-04 11:18:04 +00:00
Misaka_Company
a06276127d fix: resolve Chinese character encoding issue in console output
- Set console code page to UTF-8 (65001) in build scripts
- Fix garbled Chinese characters in winston logger output
2026-03-04 16:24:13 +08:00
Misaka
a05c8a9037 feat: add TypeORM, logger, schemas, hooks and stores
- Add TypeORM integration with data-source, entities and repositories
- Add logger service for structured logging
- Add Zod validation schemas for auth, cleaner and extractor
- Add custom React hooks (useAuth, useCleaner, useExtractor, useValidation)
- Add Zustand stores (useAppStore, useUserStore)
- Add UI components (Button, Modal, Toast)
- Add error types and ErpBrowserManager
- Refactor IPC handlers and services
- Add unit tests for new modules

Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
2026-03-02 23:10:15 +08:00
google-labs-jules[bot]
bbdd1e18f8 Refactor UI layout to match user-provided Tailwind mock
- Integrated Tailwind v4 into the electron.vite.config.ts and main.css.
- Refactored App.tsx layout to use Tailwind styling and Lucide icons as provided.
- Refactored ExtractorPage, CleanerPage, and SettingsPage to match the new UI mock layout while maintaining existing state and logic.
- Simplified SettingsPage based on user feedback.
- Ensured default exports and imports are consistent across pages.

Co-authored-by: luwamgere15-crypto <255338376+luwamgere15-crypto@users.noreply.github.com>
2026-03-02 01:35:27 +00:00
Misaka
484ca31d79 test: add E2E test for Extractor workflow using Playwright
- Create tests/e2e/extractor-workflow.test.ts with full workflow tests
- Add playwright.config.ts for E2E test configuration
- Add npm scripts: test:e2e, test:e2e:ui, test:e2e:report
- Update vitest.config.ts to exclude E2E tests
2026-03-01 15:53:03 +08:00