Skip to content

fix: failed image deletion dialog displays windows path (#1657) - #1672

Open
Prakhar1808 wants to merge 1 commit into
AOSSIE-Org:devfrom
Prakhar1808:fix/delete-images-windows-path
Open

Prakhar1808 wants to merge 1 commit into
AOSSIE-Org:devfrom
Prakhar1808:fix/delete-images-windows-path

Conversation

@Prakhar1808

@Prakhar1808 Prakhar1808 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Addressed Issues:

Fixes #1657
the path now separates at both path types

the fix

path.split(/[/\\]/).pop()

Screenshots/Recordings:

check the issue #1657 to understand and look at screenshots

AI Usage Disclosure:

  • This PR does not contain AI-generated code at all.

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions

Summary by CodeRabbit

  • Bug Fixes
    • Error dialogs now display the correct final path component for failed files, including paths that use Windows-style separators.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 5e30cb2 and 86b9a78.

Files selected for processing: 1
  • frontend/src/hooks/useDeleteImages.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Walkthrough

The failed-deletion dialog now extracts filenames from paths that use either forward slashes or backslashes.

Changes

Failed image path display

Layer / File(s) Summary
Path component extraction
frontend/src/hooks/useDeleteImages.ts
Failed paths are split on either / or \ before the dialog displays the final path component.

Priority: Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Possibly related issues

Suggested labels: TypeScript/JavaScript

Suggested reviewers: takitxt

Merge Risk: Minimal · up to 86b9a

The filename display fix matches the requested Windows and POSIX path behavior and is ready to merge.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: a fix so the failed image deletion dialog no longer shows a Windows path. The raw summary confirms the file path split now handles both / and \\, which matches the title…
Linked Issues check Passed The change satisfies #1657. In frontend/src/hooks/useDeleteImages.ts, the failed-path filename extraction now uses path.split(/[/\\\\]/).pop(). This extracts the final filename for both forward-slas…
Out of Scope Changes check Passed The diff contains one targeted change in frontend/src/hooks/useDeleteImages.ts. It changes only the path separator handling required by #1657. No unrelated changes are present.
Full details: Title check

Explanation

The title names the change: a fix so the failed image deletion dialog no longer shows a Windows path. The raw summary confirms the file path split now handles both / and \, which matches the title. The title is short, specific, and matches linked issue #1657. It does not cover every detail, which is acceptable.

Full details: Linked Issues check

Explanation

The change satisfies #1657. In frontend/src/hooks/useDeleteImages.ts, the failed-path filename extraction now uses path.split(/[/\\]/).pop(). This extracts the final filename for both forward-slash and Windows backslash paths in the failed-deletion dialog.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the path with care,
Finds the filename hiding there.
A slash, a backslash, either way,
The dialog shows the name today.
The long paths hop out of sight,
And filenames land just right.

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: PROD: v1.3.0-beta Failed image deletion dialog displays full Windows path instead of filename

1 participant