feat: enable document orientation detection for scanned PDFs

- Enable PP-StructureV3's use_doc_orientation_classify feature
- Detect rotation angle from doc_preprocessor_res.angle
- Swap page dimensions (width <-> height) for 90°/270° rotations
- Output PDF now correctly displays landscape-scanned content

Also includes:
- Archive completed openspec proposals
- Add simplify-frontend-ocr-config proposal (pending)
- Code cleanup and frontend simplification

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
egg
2025-12-11 17:13:46 +08:00
parent 57070af307
commit cfe65158a3
58 changed files with 1271 additions and 3048 deletions

View File

@@ -15,7 +15,7 @@ export default function UploadPage() {
const navigate = useNavigate()
const { toast } = useToast()
const [selectedFiles, setSelectedFiles] = useState<File[]>([])
const { setBatchId, setFiles, setUploadProgress } = useUploadStore()
const { setBatchId, setUploadProgress } = useUploadStore()
const uploadMutation = useMutation({
mutationFn: async (files: File[]) => {
@@ -28,10 +28,10 @@ export default function UploadPage() {
return tasks
},
onSuccess: (tasks) => {
// For now, just use the first task_id as batch_id
// TODO: Update store to handle multiple tasks
// Use the first task_id as the current batch identifier
// Note: Type assertion needed - store expects number but API returns string UUID
if (tasks.length > 0) {
setBatchId(tasks[0].task_id as any) // temporary workaround
setBatchId(tasks[0].task_id as unknown as number)
}
toast({
title: t('upload.uploadSuccess'),