feat(feedback): add screenshot and console log attachments#3544
feat(feedback): add screenshot and console log attachments#3544rebelchris merged 6 commits intomainfrom
Conversation
- Add screenshotUrl, screenshotId, and consoleLogs columns to Feedback entity - Add ContentImageUsedByType.Feedback for image tracking - Create migration for new feedback attachment columns - Update GraphQL schema to accept screenshot Upload and consoleLogs string - Add consoleLogs validation (max 50KB) to input schema - Handle screenshot upload with Cloudinary FreeformImage preset - Create ContentImage record linking screenshot to feedback - Update Slack notification to display screenshot and console logs indicator - Update Linear issue description with screenshot image and collapsible console logs - Pass screenshot/consoleLogs from feedbackClassify worker to Linear integration - Enhance zombie image cleanup to handle feedback-linked images Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
🍹 The Update (preview) for dailydotdev/api/prod (at 753ac83) was successful. Resource Changes Name Type Operation
~ vpc-native-personalized-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-trending-cron kubernetes:batch/v1:CronJob update
~ vpc-native-sync-subscription-with-cio-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-db-migration-d4720fd6 kubernetes:batch/v1:Job create
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
~ vpc-native-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-bg-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-post-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-post-analytics-history-day-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-gifted-plus-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tag-recommendations-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-images-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-private-deployment kubernetes:apps/v1:Deployment update
- vpc-native-api-db-migration-ba872008 kubernetes:batch/v1:Job delete
~ vpc-native-expire-super-agent-trial-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-opportunities-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generic-referral-reminder-cron kubernetes:batch/v1:CronJob update
~ vpc-native-validate-active-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-analytics-history-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-check-analytics-report-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-public-threshold-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-updated-sync-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-current-streak-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-stale-user-transactions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-daily-digest-cron kubernetes:batch/v1:CronJob update
- vpc-native-api-clickhouse-migration-ba872008 kubernetes:batch/v1:Job delete
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-posts-analytics-refresh-cron kubernetes:batch/v1:CronJob update
~ vpc-native-temporal-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-ws-deployment kubernetes:apps/v1:Deployment update
+ vpc-native-api-clickhouse-migration-d4720fd6 kubernetes:batch/v1:Job create
~ vpc-native-update-source-tag-view-cron kubernetes:batch/v1:CronJob update
~ vpc-native-hourly-notification-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-highlighted-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generate-search-invites-cron kubernetes:batch/v1:CronJob update
... and 1 other changes |
src/cron/cleanZombieImages.ts
Outdated
| // Clean feedback images where: | ||
| // 1. The feedback no longer exists (orphaned), OR | ||
| // 2. The feedback is in a terminal state (Completed, Cancelled, Spam) and older than 30 days | ||
| const feedbackOrphanCleanup = await con.query( |
There was a problem hiding this comment.
Why raw query here, rather use getRepo with params?
src/integrations/linear/index.ts
Outdated
| ? `\n### Screenshot\n\n\n` | ||
| : ''; | ||
|
|
||
| // Build console logs section if present (using details tag for collapsible) |
There was a problem hiding this comment.
Let's lee the console log out for slack it will spam too much, we have it in Linear it's fine.
src/schema/feedback.ts
Outdated
| feedbackInputSchema.parse({ | ||
| category: input.category, | ||
| description: input.description, | ||
| pageUrl: input.pageUrl, | ||
| userAgent: input.userAgent, | ||
| consoleLogs: input.consoleLogs, | ||
| }); |
There was a problem hiding this comment.
Why not just parse(input) ?
rebelchris
left a comment
There was a problem hiding this comment.
@claude see my feedback. Make sure lints pass and you respect the agents.md files.
|
Claude finished @rebelchris's task in 2m 24s —— View job Addressing Review FeedbackAll review comments from @rebelchris have been addressed:
Changes Made1. src/cron/cleanZombieImages.ts
2. src/workers/feedbackUpdatedSlack.ts
3. src/schema/feedback.ts
Note on LintingThe linter requires --- | Branch |
- Replace raw SQL query with TypeORM repository methods in cleanZombieImages cron - Remove console logs indicator from Slack notifications (kept in Linear only) - Simplify Zod validation to parse entire input object directly Co-authored-by: Chris Bongers <rebelchris@users.noreply.github.com>
…og-to-feedback' into eng-595-screenshot-and-console-log-to-feedback
Summary
screenshotUrl,screenshotId, andconsoleLogscolumns to the Feedback entity with migrationscreenshot(Upload) andconsoleLogs(string, max 50KB) in the GraphQLsubmitFeedbackmutationFeedbackusedByTypeCloses ENG-595
Created by Huginn 🐦⬛