Add text-only editable PPTX export option#489
Conversation
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new 'Only Text Layers Editable' (text_only) option for PPTX exports, allowing users to preserve the original slide image as a background while overlaying only detected text as editable text boxes. The changes span the frontend UI, API endpoints, backend export services, documentation, and tests. The review feedback highlights a potential runtime issue when initializing an empty inpaint registry under text_only mode, and suggests a performance optimization to avoid set subtraction overhead inside a loop.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces an 'Only Text Layers Editable' (text_only) option for the editable PPTX export feature. When enabled, the original slide image is kept as the background, and only detected text elements are overlaid as editable text boxes, skipping other elements like charts or tables. This change spans documentation, backend controllers, services, tasks, unit tests, frontend API endpoints, UI components, and E2E tests. The review feedback suggests a defensive programming improvement in backend/services/export_service.py to use getattr(elem, 'children', None) instead of directly accessing elem.children to prevent potential AttributeError exceptions.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
Code Review
This pull request introduces a new "Only Text Layers Editable" option for PPTX exports, allowing users to keep the original slide image as the background and overlay only detected text as editable text boxes. The changes include backend support, frontend UI integration, documentation updates, and new unit and E2E tests. Feedback was provided to handle potential background task submission failures in the export controller, ensuring that tasks do not get stuck in a PENDING state if submission fails.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new 'Only Text Layers Editable' (text_only) option for exporting editable PPTX presentations. When enabled, the full slide image is kept as the background, and only detected text elements are overlaid as editable text boxes, bypassing background inpainting and non-text element extraction. The changes span backend API endpoints, task management, and export services, along with corresponding frontend UI updates, localization, unit tests, and documentation. Additionally, a try-except block was added to handle task submission failures gracefully in the export controller. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the "Only Text Layers Editable" (text_only) option for editable PPTX exports. When enabled, the system generates a background that erases only detected text (with VLM verification and retries) while preserving non-text visuals, overlaying the detected text as editable text boxes. The changes span backend services, controllers, task management, frontend UI components, documentation, and tests. The review comments provide valuable feedback to improve robustness: preventing a potential AttributeError if _inpaint_registry is None, avoiding redundant inpainting attempts when VLM verification is unavailable, and resolving redundant parsing and log flooding in the verification loop.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
58d3a31 to
d7ab7a3
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the "Only Text Layers Editable" (text_only) option for PPTX exports, which erases only detected text from the background while preserving other visual elements, overlaying the text as editable text boxes. It also implements VLM verification to ensure background text erasure with automatic retries. Feedback focuses on preventing potential memory leaks in backend/services/export_service.py by properly managing the lifecycle of temporary PIL Image objects using context managers.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
Summary
text_onlythrough the frontend API, export controller, async task, and PPTX builder.FAILEDinstead of leaving it stuck inPENDING.E2E / Product Verification
text_only: trueonly after the user checks it.http://127.0.0.1:3462): opened preview, clicked Export -> Export Editable PPTX, confirmed 「仅文字层可编辑」 defaults unchecked, checked it, clicked Start Export, and verified the request body contained{ "text_only": true }.http://127.0.0.1:5630): exported project01fde026-1f13-45fa-a14c-ec024c9a3ed4withtext_only=true; task38030f02-0925-4883-b7ec-86705954ce01completed with warnings=0.text_only 底图验证结果: success=True missed=0 unwanted=0.ppt/media/contains exactly one image, and that media SHA equalstext_only_clean_background.pngbut not the original slide image;slide1.xmlhas 1 picture object, 3 text boxes, no chart/embedding/diagram objects.Tests
uv run python -m compileall backenduv run python -m py_compile backend/services/export_service.py backend/services/prompts.py backend/tests/unit/test_editable_pptx_equations.pyuv run python -m py_compile backend/services/export_service.py(after PIL lifecycle fix)uv run python -m py_compile backend/services/export_service.py backend/services/task_manager.py backend/controllers/export_controller.pyuv run python -m py_compile backend/services/export_service.py backend/services/image_editability/service.pyuv run python -m py_compile backend/controllers/export_controller.py backend/tests/unit/test_editable_pptx_export_controller.pyuv run python -m flake8 backend/ --count --select=E9,F63,F7,F82 --show-source --statisticsuv run pytest backend/tests/unit/test_editable_pptx_equations.py -quv run pytest backend/tests/unit/test_editable_pptx_equations.py -q(14 passed after PIL lifecycle fix)uv run pytest backend/tests/unit/test_editable_pptx_equations.py backend/tests/unit/test_icon_subject_extraction.py -quv run pytest backend/tests/unit/test_editable_pptx_equations.py backend/tests/unit/test_icon_subject_extraction.py -q(32 passed after rebase/review fixes)uv run pytest backend/tests/unit/test_editable_pptx_export_controller.py backend/tests/unit/test_editable_pptx_equations.py -quv run pytest backend/tests/unit/test_editable_pptx_equations.py backend/tests/unit/test_editable_pptx_export_controller.py -qSKIP_SERVICE_TESTS=true npm run test:backend(475 passed, 8 skipped)cd frontend && npm run lint(passes with existing warnings only)npm run test:frontend(127 passed)cd frontend && CI=1 BASE_URL=http://127.0.0.1:3462 npx playwright test e2e/editable-export-failure.spec.ts --reporter=list(3 passed)CI / Review
5ae3a29is passing: Quick Check, Docs Link Check, and Smoke Test are green; Mintlify is skipped for the final run.58d3a31andd7ab7a3were addressed and resolved; open review threads: 0. A fresh review was requested for5ae3a29, and no new inline thread is open.Note
npm run test:backendattempt earlier in this PR reported 2 failures inbackend/tests/integration/test_api_full_flow.pybecause those tests connect to a real external backend service. With noBACKEND_PORTexported they hit an old local service onlocalhost:5011, whose logs showedsqlite3.OperationalError: unable to open database file. The code-relevant backend suite passed with the test file'sSKIP_SERVICE_TESTS=truegate.