Skip to content

fix(frontend): don't read attachment name after delete modal closes - #3737

Merged
kolaente merged 1 commit into
mainfrom
fix-attachment-delete-null
Sep 4, 2026
Merged

fix(frontend): don't read attachment name after delete modal closes#3737
kolaente merged 1 commit into
mainfrom
fix-attachment-delete-null

Conversation

@tink-bot

@tink-bot tink-bot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Attachment delete modal read attachmentToDelete.file.name unguarded in #text slot. Modal.vue keep <dialog> and slot mounted through 150ms close transition, so slot re-render after setAttachmentToDelete(null) and throw TypeError: Cannot read properties of null (reading 'file'). Sentry FRONTEND-OSS-2AY, ~212 events.

Fix: v-if="attachmentToDelete" on the <p>. Text unchanged. Modal.vue untouched. Unit test cover close-during-transition path.

How to verify

  1. Open any task detail view that has at least one attachment.
  2. Click the trash icon on an attachment to open the delete confirmation modal.
  3. Click "Cancel" (or confirm the delete) and watch the browser console while the modal fades out.
  4. Expected: the modal fades out cleanly and no error appears in the console.

Before this PR: TypeError: Cannot read properties of null (reading 'file') was thrown during the fade-out.

@github-actions github-actions Bot added area/attachments File attachments on tasks: upload, preview, download area/frontend Frontend-only code or UI work labels Sep 4, 2026
@kolaente
kolaente enabled auto-merge (rebase) September 4, 2026 21:01
@github-actions github-actions Bot added the auto-merge PR has GitHub auto-merge enabled label Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Preview Deployment

Preview deployments for this PR are available at:

URL Tag Commit
https://pr-3737.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:pr-3737 latest
https://sha-c5523d4ea844009a539c37f109341c0f96c30317.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:sha-c5523d4ea844009a539c37f109341c0f96c30317 c5523d4

The preview environment will start automatically on first visit. Subsequent pushes to this PR will update the pr-3737 image — the preview picks up the new version on restart. The per-commit URLs point to a specific version and will not change.

Run locally with Docker
docker pull ghcr.io/go-vikunja/vikunja:pr-3737
docker run -p 3456:3456 ghcr.io/go-vikunja/vikunja:pr-3737

Last updated for commit c5523d4

@kolaente
kolaente merged commit 43d009b into main Sep 4, 2026
45 checks passed
@kolaente
kolaente deleted the fix-attachment-delete-null branch September 4, 2026 21:28
@github-actions github-actions Bot removed the auto-merge PR has GitHub auto-merge enabled label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/attachments File attachments on tasks: upload, preview, download area/frontend Frontend-only code or UI work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants