Commit Graph

313 Commits

Author SHA1 Message Date
yuqei a1f04c7d7a chore: align V2 into final four-project layout 2026-06-22 19:51:30 +08:00
yuqei bc05857082 docs: clarify V2 shared module boundaries 2026-06-22 19:27:38 +08:00
yuqei 65b4b45b5b feat: add AI platform config knowledge audit MVP 2026-06-22 19:08:03 +08:00
yuqei 25d1ae0380 feat: add legal QA platform SDK loop 2026-06-22 18:50:35 +08:00
yuqei dfb514e0cf feat: initialize V2 contract web shell 2026-06-22 18:45:39 +08:00
yuqei a6157fcaf8 chore: initialize V2 backend foundation 2026-06-22 18:19:59 +08:00
yuqei 3176954a1d docs: freeze shared assets and seed V2 contracts 2026-06-22 18:11:28 +08:00
yuqei 6842c239f7 docs: plan V2 and shared AI rebuild 2026-06-22 18:01:33 +08:00
yuqei c22b464546 chore: reset main for V2 rebuild 2026-06-22 17:38:44 +08:00
yuqei 3d28cb6b9f chore: capture V1 baseline and V2 rebuild plan 2026-06-22 17:16:11 +08:00
yuqei 0cfbcbf56f fix: render chat markdown formatting 2026-06-22 13:16:32 +08:00
yuqei 2998c01111 fix: keep legal article hits when fallback search fails 2026-06-22 13:09:01 +08:00
yuqei f9eb3864e9 fix: improve property fee legal article recall 2026-06-22 13:00:41 +08:00
yuqei ebb8ca0754 fix: cite legal basis in chat answers 2026-06-22 12:46:29 +08:00
yuqei 16f6bf9aac fix: reduce duplicate chat answer summary 2026-06-22 12:32:01 +08:00
yuqei a8db7c4bef fix: stabilize legal chat streaming 2026-06-22 11:13:07 +08:00
yuqei 69ce717ec6 feat: support runtime shared AI settings 2026-06-22 10:13:04 +08:00
yuqei 278bc28416 fix: fallback chat history when ai config missing 2026-06-21 19:15:21 +08:00
yuqei 17f5ada9f2 fix: normalize markdown contract content 2026-06-21 18:57:53 +08:00
yuqei f2b3660101 fix: restore production workspace text 2026-06-21 18:44:52 +08:00
yuqei ade5053a14 fix: resolve frontend deploy type errors 2026-06-21 18:10:28 +08:00
yuqei 3fa71dc00e chore: support sshpass deploy scripts 2026-06-21 17:56:21 +08:00
yuqei 76b9198b64 fix: stabilize file downloads and file workspace 2026-06-21 17:56:16 +08:00
yuqei a89f4c7050 Refactor contract platform workflows and UI 2026-06-21 17:51:34 +08:00
cyuqei 93089e2a89 feat: add backend approval sla tracking 2026-06-19 18:07:16 +08:00
cyuqei 52a676ff19 feat: enhance ledger archive and approval sla 2026-06-19 13:31:49 +08:00
cyuqei ae76b9a296 feat: add lifecycle reminder workbench 2026-06-19 11:23:32 +08:00
yuqei b14be976d2 feat: improve contract ledger tracking 2026-06-19 09:26:10 +08:00
cyuqei 5bb330b610 feat: enhance contract workflow and approval assignees 2026-06-19 01:57:26 +08:00
cyuqei 431ad08b8d fix: support shared AI SDK api prefix 2026-06-19 00:29:11 +08:00
yuqei b7073d9c5b feat: enhance production deployment configuration and documentation
- Update .env.example with production-ready environment variables
- Add frontend Aliyun deployment configuration with nginx gateway
- Refactor docker-compose.server.yml for external services
- Add comprehensive deployment guide (docs/DEPLOYMENT.md)
- Enhance troubleshooting documentation with Git Bash path issues
- Add deployment scripts (build-frontend.sh, deploy-frontend.sh)
- Add deploy directory with docker-compose and nginx config
- Update .gitignore to exclude temporary directories

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 22:27:00 +08:00
cyuqei 175c0a69af feat: align deployment and approval workflow 2026-06-18 03:37:03 +08:00
yuqei 328f8c7da3 feat: add Phase14 legal library crawl data and import manifests
- Add all-valid-laws-list.json (complete national law registry)
- Add bbbs collection progress and crawl results
- Add priority1 law BBBs, import manifest, and list data
- Add NPC aggregate data and search results
- Add incremental batch confirmed-001

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 17:27:21 +08:00
yuqei 182a1ba663 feat: add production deployment guide and monitoring tools
Production deployment:
- Add deployment guide with data migration steps
- Add deployment checklist and rollback plan
- Add performance verification steps

User documentation:
- Add user guide for law library enhancement
- Document new features and coverage areas
- Add FAQ section

Monitoring and alerts:
- Add monitoring SQL script with health checks
- Add alert thresholds configuration
- Add storage and access statistics

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-16 22:31:38 +08:00
yuqei 4f22e2965c feat: enhance contract review with semantic search and legal citations
Phase15 optimization:
- Add semantic search fallback in _attach_legal_article_refs()
- Expand LEGAL_ARTICLE_REFERENCE_RULES from 12 to 30+ scenarios
- Add LEGAL_SOURCE_ALIAS_MAP for 35+ legal sources

Contract review enhancement:
- Cover labor, corporate, investment, procurement, construction
- Add IP, data privacy, franchise, real estate scenarios
- Enable vector semantic search as final fallback

Legal citation visualization:
- Create LegalArticlePreview component with hover tooltip
- Support compact/full display modes
- Add copy and detail link features

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-16 22:09:27 +08:00
yuqei 6d12eb4aef feat: add law library update monitoring and maintenance guide
- Add GitHub Actions workflow for monthly update checks
- Add maintenance guide with backup/restore procedures
- Add backup metadata and summary

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-16 21:42:48 +08:00
yuqei 50cc7cb1cf feat: complete Phase14 legal library expansion
- Import 789,853 legal articles from LawRefBook/Laws
- Add 19,712 laws including national and regional regulations
- Filter 1,370 expired laws
- Create vectorization scripts and backup tools
- Add law update monitoring mechanism
- Generate comprehensive documentation

Database: PostgreSQL with GIN index for full-text search
Vectorization: 100% complete with LegalSemanticMatcher
Performance: 7x improvement in semantic search

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-16 21:26:20 +08:00
yuqei 6d2edc6753 feat: migrate PDF/OCR extraction to shared-ai-platform
Remove all local PDF/OCR extraction and quality gate logic from
review_service.py, replacing it with calls to the shared-ai-platform
document extraction service via the SDK.

Removed from review_service.py:
- 17 local PDF/OCR methods (_extract_text_from_pdf, _classify_pdf_source,
  _extract_text_from_pdf_with_ocr, _extract_text_from_image_with_ocr,
  _evaluate_ocr_quality, _looks_like_platform_review_report, etc.)
- All PDF/OCR constants (PDF_TEXT_PATTERN, PDF_NOISE_LINE_PATTERN,
  REPORT_PDF_MARKERS, OCR_GATE_*, PDF_SOURCE_KIND_*, etc.)
- Imports: pdfplumber, pypdfium2, pytesseract, PIL.Image

Added:
- extract_review_upload_text() now calls shared platform's
  client.extract_document_text() directly
- _detect_upload_type() retained locally for upload validation only
- Protocol methods extract_document_text, classify_pdf_source in client

Removed from requirements.txt: pdfplumber, pytesseract
Added to config: shared_ai_platform_document_extraction_enabled

Also includes prior changes:
- Model settings and chat history stabilization
- Mobile UI polish
- Governance launch-closure enhancements

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 11:09:13 +08:00
yuqei 19ed42c880 feat: add model settings and stabilize chat history 2026-06-10 18:57:22 +08:00
yuqei afbcc71144 feat: mobile UI polish - fix grid overflow, simplify hero panel, improve appbar layout
- Adjust GridView aspect ratio to prevent overflow warnings
- Resize icons and text in action cards
- Add mainAxisAlignment.center for better vertical centering
- Update API config to use local network IP
2026-06-08 04:28:46 +08:00
yuqei 6c37d72179 feat: complete governance launch-closure enhancements
- Governance release summaries with launch readiness indicators
- Workbench reviewer completion condition constraints
- Asset detail blocker status display
- Imports page post-import action guidance
- Backend test coverage for governance services
- Production deployment handoff documentation

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 10:00:55 +08:00
yuqei 739d2f51f9 feat: support image uploads in direct review flow
- accept png/jpg/jpeg in the uploaded-contract review path
- add local image OCR extraction and quality gating
- keep existing PDF/DOCX/TXT review behavior intact

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 19:42:15 +08:00
yuqei 1eae603c0f feat: refine core pc review and generation flows
- improve workspace and review entry UX for uploaded contracts
- stabilize shared AI Docker/frontend delivery path
- adapt shared AI generation to structured JSON responses

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 15:26:31 +08:00
yuqei 0cc597466c feat: enrich contract content assets and review UX
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 20:59:41 +08:00
yuqei e376c1c436 feat: close mobile Android polish backlog — risk actions, lifecycle, file service, and screen polish
Review detail:
- Add review risk actions with status tracking and skip/apply support
- Pull-to-refresh and auto-navigate after review submit
- Report download, open, share, and copy-link actions

Contract lifecycle:
- Add contract lifecycle models and controller for mobile
- Version chain display and lifecycle status transitions
- Contract result screen now shows lifecycle tasks

File service:
- New unified file_service.dart for file management

API client:
- Add review risk actions and contract lifecycle endpoints

Screen polish:
- Login screen visual polish with brand assets
- Dashboard redesign with updated layout
- Profile screen updates
- Review entry/history screen improvements
- Theme and brand asset updates

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 00:06:38 +08:00
yuqei 36f4474ad6 feat: redesign users page with left-tree right-detail layout
- Left sidebar: tree menu showing all users grouped by role (admin/legal/business)
  and status (active/disabled)
- Right panel: selected user's detail with role, status toggle, and account info
- Create/edit moved to Drawer

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 23:35:53 +08:00
yuqei 38885f3a3f feat: redesign files page with left-tree right-detail layout
- Left sidebar: tree menu showing all files grouped by file type
  (contract/document/image/other) and storage bucket
- Right panel: selected file's detail with download, delete, and
  file info (size, hash, MIME type, object path)
- Upload area moved to sidebar bottom with type/bucket selectors
- Modern card-based styling consistent with other pages

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 23:12:45 +08:00
yuqei 8eb09db8f0 feat: redesign reviews page with left-tree right-detail layout
- Left sidebar: tree menu showing all reviews grouped by contract type,
  review status, and risk level (each review is a leaf node)
- Right panel: selected review's detail including status, risk level,
  report download, and action suggestions
- "New Review" button links to /review page
- Modern card-based styling consistent with other pages

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 21:58:49 +08:00
yuqei 7dc0f77c2b feat: redesign contracts page with left-tree right-detail layout
- Left sidebar: tree menu showing all contracts grouped by contract type
  and lifecycle status (each contract is a leaf node)
- Right panel: selected contract's detail including auto-review result,
  lifecycle status with transition buttons, generation quality
- "Generate New Contract" moved to Drawer with step-by-step wizard
- Modern card-based styling consistent with templates page

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 21:23:53 +08:00
yuqei c9bff4c15f feat: redesign templates page with left-tree right-detail layout
- Left sidebar: tree menu showing all templates grouped by contract type,
  template category, and industry (each template is a leaf node)
- Right panel: selected template's full detail including content preview,
  variable definitions, version history, and action buttons
- Edit/Create moved to Drawer
- Modern styling with card-based sections, monospace content display,
  and visual version history timeline

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 19:21:15 +08:00