Add document assembly mode, configuration save/load, and unit tests#2
Draft
bencarver wants to merge 10 commits intojamietso:mainfrom
Draft
Add document assembly mode, configuration save/load, and unit tests#2bencarver wants to merge 10 commits intojamietso:mainfrom
bencarver wants to merge 10 commits intojamietso:mainfrom
Conversation
- Add SavedConfiguration interface to serialize extraction state as JSON - Implement handleSaveConfiguration to export signature pages, edits, and grouping mode - Implement handleLoadConfiguration to restore previously saved configs - Add smart rescan+merge: when restored PDFs are re-uploaded, run fresh AI extraction while preserving user edits (party name, signatory, capacity, copies) - Use wasRestored flag and useEffect to route restored docs through merge-rescan flow - Add "Needs file" UI badge for restored documents awaiting re-upload - Improve Gemini prompt to correctly extract individual signatories from role-labeled blocks - Add Save/Load Config buttons to header - Fix duplicate file upload in React StrictMode by moving state computation outside setter Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add Assembly mode: upload executed/signed pages, AI analysis per page - Auto-match executed pages to blank signature pages via weighted similarity - Completion checklist matrix (documents x parties) with manual override - PDF assembly: replace blank sig pages with executed versions at exact page positions - Improve Gemini prompts for LP/fund/trust multi-level entity chains (LP -> GP -> Individual) - Add retry logic when partyName or signatoryName is empty after first AI pass - Add debug console logging for extraction diagnosis Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CompletionChecklist: one column per signatory (not per party), with party names shown as sub-labels in the header; draggable columns for reordering; multiple buttons per cell when a signatory signs for multiple parties on the same document - InstructionsModal: group signing instructions by signatory with party shown as a column, matching the grid layout - App.tsx: add min-w-0 / overflow-auto fixes to allow horizontal scroll in the assembly grid Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…gress view - Save/load configuration and smart rescan for signature extraction - Document assembly mode: upload executed pages, AI analysis, auto-matching - Completion checklist matrix with manual override and PDF assembly/download - Assembly progress view reorganized by signatory with draggable columns Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ly state - Replace full AI re-extraction on config restore with thumbnail-only rendering from saved pages, eliminating unnecessary API calls and delays - Embed PDF files as base64 in saved config so re-uploading isn't needed - Persist assembly state (executed uploads, matches) in saved config - Fix stale closure issues by replacing useEffect-based restore trigger with direct call from handleFileUpload using restoringIds ref guard - Fix TypeScript error in CompletionChecklist partiesBySignatory Set generic Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 tests covering: - Exact and fuzzy matching (case, whitespace, containment) - isConfirmedExecuted guard - Score threshold filtering - Greedy assignment (each page matched at most once) - Preserved user-confirmed / user-overridden matches - Auto-matched entries are re-computed (not preserved) - createManualMatch field mapping - Empty input edge cases Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds three major features to Signature Packet IDE:
Features
Document Assembly
Configuration Save/Load
.jsonTesting
Changes
Assemblytab in toolbar for assembly modeSave Config/Load Configbuttons in headermatchingService.ts(withmatchingService.test.ts)App.tsxwith assembly handlers, config save/load logictypes.tswith assembly-related types (ExecutedUpload,AssemblyMatch,SavedConfiguration)CompletionChecklist.tsx,ExecutedPageCard.tsx,MatchPickerModal.tsxREADME.mdwith Assembly Mode and Save & Restore documentation.envto.gitignoreto prevent API key leaksAPI_KEY→GEMINI_API_KEY)npm start→npm run dev)Testing
All 13 unit tests pass:
Tested locally with:
Notes for Reviewers