Support pasting images into the 'Report Feedback' copilot window - #106
Merged
Conversation
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.
Resolves danthebaker/gatewaze-roadmap#28
Gates
Spec
Let me explore the actual code to ground the spec.I have a complete picture. Let me verify one portal detail — whether the portal already renders remote images (for the thumbnail lint concern) and confirm the module widget's UI imports.I now have everything needed. Writing the spec.Spec written to
SPEC-issue-28-paste-images-report-feedback.md. Summary:Memory check
Searched project memory first. Found and read three relevant pages:
specs/issue-7— paste images into the live run chat (builtuploadChatImage+ the reusabledownloadAttachmentUrls).specs/issue-16— images silently dropped on issue create (built the honestattachmentsAttached/attachmentsDroppedresponse + client warnings).This spec builds on #7 and #16 and does not contradict them: their server + upload machinery already exists; #28 just wires it into the two feedback widgets that never sent
attachments.Resolving the blocking review
Every objection is addressed:
admin-routes.ts/attachments.tschange.se-feedback/prefix passes SSRF → confirmedisAllowedAttachmentUrlis host/origin-only; answers the "where stored" question (existingmediabucket, new path).gatewaze-modules(admin widget) andgatewaze(packages/portal/components/admin/ReportFeedbackWidget.tsx, live-mounted inapp/(main)/layout.tsx). It states plainly that fixing only the module leaves portal reporters broken — correcting the earlier "no change in gatewaze" claim.The change
Port the existing IssuesView paste→upload→thumbnail→
attachmentspattern into both widgets. Open questions answered inline (publicmediabucket /se-feedback/prefix; 15 MB,image/*; up to the server's cap of 8). Flags portal-specific rules (next/imagenot raw<img>, hooks above thereturn nullguard, no direct@radix-ui/themes), a test plan for both widgets, mandatory/security-review, and the localhost-drop UX carried from #16.I explored read-only and did not implement anything. Verify the acceptance criteria against the file before implementation kicks off.