Skip to content

Conversation

@krystian-panek-vmltech
Copy link
Collaborator

@krystian-panek-vmltech krystian-panek-vmltech commented Nov 25, 2025

fixes #221

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the RepoResource.saveFile() method to simplify file saving logic by always deleting and recreating files, rather than updating them in place. The changes propagate through the codebase to remove now-redundant explicit file deletion calls.

Key changes:

  • Simplified saveFileInternal() to always delete existing files before creating new ones
  • Removed explicit thumbnail deletion in example script since saveFile() now handles it
  • Enabled direct text input in PathPicker component
  • Fixed import ordering in Script.java

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
core/src/main/java/dev/vml/es/acm/core/repo/RepoResource.java Refactored saveFileInternal() to delete-then-create approach, simplifying the conditional logic for file creation vs. update
ui.content.example/src/main/content/jcr_root/conf/acm/settings/script/manual/example/ACME-202_page-thumbnail.groovy Removed explicit thumbnail deletion since saveFile() now handles it internally
ui.frontend/src/components/PathPicker.tsx Added onChange handler to TextField to allow manual path input
core/src/main/java/dev/vml/es/acm/core/script/Script.java Reordered imports alphabetically (Executable before ExecutableMetadata)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@krystian-panek-vmltech krystian-panek-vmltech merged commit ce3120f into main Nov 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repo save file update

2 participants