Skip to content

lisa/fix-screenshots-only-as-image-types#234

Open
gusfcarvalho wants to merge 6 commits into
mainfrom
lisa/fix-screenshots-only-as-image-types
Open

lisa/fix-screenshots-only-as-image-types#234
gusfcarvalho wants to merge 6 commits into
mainfrom
lisa/fix-screenshots-only-as-image-types

Conversation

@gusfcarvalho
Copy link
Copy Markdown
Contributor

automated implementation by lisa.

Copilot AI review requested due to automatic review settings May 15, 2026 12:38
Copy link
Copy Markdown
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 updates the workflow evidence submission UI to restrict “screenshot” evidence uploads to image-only file extensions (instead of allowing documents like PDFs), and adds unit tests to verify the new behavior.

Changes:

  • Make the <input type="file"> accept attribute dynamic based on selected evidence type (document vs screenshot).
  • Add client-side validation to reject files whose extensions aren’t allowed for the selected evidence type (both on file selection and on submit).
  • Add Vitest coverage for screenshot-vs-document accepted extensions and validation messaging.

Reviewed changes

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

File Description
src/views/workflow-executions/partials/EvidenceSubmissionForm.vue Adds per-evidence-type file extension allowlists, dynamic accept, and validation error handling.
src/views/workflow-executions/partials/tests/EvidenceSubmissionForm.spec.ts Introduces tests validating screenshot-only image extensions and preserved document support.

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

Comment thread src/views/workflow-executions/partials/EvidenceSubmissionForm.vue
Comment thread src/views/workflow-executions/partials/EvidenceSubmissionForm.vue
Copy link
Copy Markdown
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 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread src/views/workflow-executions/partials/EvidenceSubmissionForm.vue
Comment thread src/views/workflow-executions/partials/EvidenceSubmissionForm.vue Outdated
Comment thread src/views/workflow-executions/partials/EvidenceSubmissionForm.vue
Copy link
Copy Markdown
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 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread src/views/workflow-executions/partials/EvidenceSubmissionForm.vue
Comment thread src/composables/workflows/__tests__/useStepExecutions.spec.ts
Copy link
Copy Markdown
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 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/composables/workflows/useStepExecutions.ts:165

  • The extension-based MIME type fallback map is missing entries for .doc/.docx, even though the UI allows those file types for document evidence. If a browser provides an empty/unknown File.type, document uploads will be sent as application/octet-stream instead of the expected Word MIME types. Add doc and docx mappings here (and any other supported extensions) to keep the inferred mediaType consistent with the upload constraints.
        } else if (ev.fileName) {
          // Guess from extension
          const ext = ev.fileName.split('.').pop()?.toLowerCase();
          const mimeTypes: Record<string, string> = {
            pdf: 'application/pdf',
            png: 'image/png',
            jpg: 'image/jpeg',
            jpeg: 'image/jpeg',
            gif: 'image/gif',
            webp: 'image/webp',
            txt: 'text/plain',
            json: 'application/json',
            xml: 'application/xml',
          };

Comment thread src/views/workflow-executions/partials/EvidenceSubmissionForm.vue
Copy link
Copy Markdown
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 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread src/composables/workflows/useStepExecutions.ts Outdated
Copy link
Copy Markdown
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 4 out of 4 changed files in this pull request and generated no new comments.

@gusfcarvalho
Copy link
Copy Markdown
Contributor Author

lisa: implementation done. no actionable copilot review threads found.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants