Repository navigation
feat(attachments): add UI for full CRUD operations - #7333
Merged
Merged
Conversation
…est hook, and update metadata documentation
…support batch-process-attachments endpoint
…points and models while simplifying AttachmentManagerUI header
…able dependency injection
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a full “Manage Attachments” experience to Stirling-PDF, expanding the existing Add Attachments tool into a UI that supports listing, staging changes, and applying attachment CRUD operations in a single save flow, with supporting backend endpoints and engine/tool metadata updates.
Changes:
- Introduces a new attachment management UI (list/filter/rename/delete/extract/add + single “Save Changes”) and a frontend attachment service with legacy-backend fallbacks.
- Adds backend endpoints for batch attachment operations and single-attachment extraction, plus supporting request models and service interface updates.
- Updates tool registry metadata, tool IO/type models, tests, and user-facing copy/OG metadata to reflect “Manage Attachments”.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/editor/src/desktop/hooks/useGroupEnabled.test.tsx | Fixes useSyncExternalStore mocking to avoid infinite loop; adjusts offline assertions. |
| frontend/editor/src/core/ui/FilePicker.tsx | Adds inputProps passthrough to hidden file input (test selectors, etc.). |
| frontend/editor/src/core/types/toolIO.ts | Adds IO specs for new attachment endpoints. |
| frontend/editor/src/core/types/toolApiTypes.ts | Adds generated API param types/endpoints for new attachment operations. |
| frontend/editor/src/core/tools/AddAttachments.tsx | Switches tool behavior to inline “save” model by wiring AttachmentManager settings. |
| frontend/editor/src/core/tests/live/viewer-sidebar-add-buttons.spec.ts | Updates live test to click “Save Changes” and capture new endpoint response. |
| frontend/editor/src/core/services/attachmentService.ts | New client service for attachment list/extract/single-extract/batch ops + fallbacks. |
| frontend/editor/src/core/services/attachmentService.test.ts | Adds unit tests for filename truncation helper. |
| frontend/editor/src/core/hooks/tools/addAttachments/useAttachmentManager.ts | New state manager hook for staged attachment CRUD + save/discard/extract. |
| frontend/editor/src/core/data/useTranslatedToolRegistry.tsx | Renames tool to “Manage Attachments” and expands declared endpoint set. |
| frontend/editor/src/core/components/viewer/AttachmentSidebar.css | Changes filename display to ellipsis truncation. |
| frontend/editor/src/core/components/tooltips/useAddAttachmentsTips.ts | Updates tooltip copy to match “Manage Attachments” behavior. |
| frontend/editor/src/core/components/tools/addAttachments/AttachmentRow.tsx | New row component with rename/delete/restore/download actions. |
| frontend/editor/src/core/components/tools/addAttachments/AttachmentManagerUI.tsx | New attachment manager panel UI (filter, list, stage, extract, save/discard). |
| frontend/editor/src/core/components/tools/addAttachments/AddAttachmentsSettings.tsx | Replaces old “pick files” settings UI with AttachmentManagerUI integration. |
| frontend/editor/public/og-metadata.saas.json | Updates OG title/description for Manage Attachments. |
| frontend/editor/public/og-metadata.json | Updates OG title/description for Manage Attachments. |
| frontend/editor/public/locales/en-US/translation.toml | Updates attachment-related strings (new attachments.* keys, removes old ones). |
| engine/src/stirling/models/tool_models.py | Adds engine-side param models for new attachment endpoints. |
| engine/src/stirling/models/tool_io.py | Adds engine-side tool IO specs for new attachment endpoints. |
| app/core/src/main/java/stirling/software/SPDF/service/AttachmentServiceInterface.java | Adds extract-single API to service interface. |
| app/core/src/main/java/stirling/software/SPDF/service/AttachmentService.java | Implements single attachment extraction and improves name matching for rename/delete. |
| app/core/src/main/java/stirling/software/SPDF/model/api/misc/ExtractSingleAttachmentRequest.java | New request model for single attachment extraction endpoint. |
| app/core/src/main/java/stirling/software/SPDF/model/api/misc/BatchAttachmentRequest.java | New request model for batch attachment operations endpoint. |
| app/core/src/main/java/stirling/software/SPDF/controller/api/misc/AttachmentController.java | Adds /extract-single-attachment and /batch-process-attachments endpoints. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…st error handling, and UI refinements
…annotations Use a plain lombok import and Loader import instead of qualified names, and catch only the IOException and RuntimeException the batch ops can throw.
Frooodle
approved these changes
Oct 2, 2026
reecebrowne
approved these changes
Oct 2, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 2, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 4, 2026
balazs-szucs
had a problem deploying
to
ci-signing
October 4, 2026 18:07 — with
GitHub Actions
Failure
balazs-szucs
had a problem deploying
to
ci-signing
October 4, 2026 19:42 — with
GitHub Actions
Error
This branch was successfully deployed
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.
Description of Changes
Adds a full "Manage Attachments" UI for attachment CRUD operations in a single save flow
Changes:
/extract-single-attachmentendpoint to extract a specific attachment from a PDF by name, with the correspondingExtractSingleAttachmentRequestmodel and service method./batch-process-attachmentsendpoint to perform atomic batch renames, deletions, and additions of PDF attachments, with theBatchAttachmentRequestmodel and service logic for parsing and applying batch operations.AttachmentServiceto handle case-insensitive, simplified, and URL-decoded comparisons, making operations more robust.Checklist
General
Documentation
Translations (if applicable)
scripts/counter_translation.pyUI Changes (if applicable)
Testing (if applicable)
task checkto verify linters, typechecks, and tests passSummary by CodeRabbit