Skip to content

feat(inbox): swap report copy-link button for feedback - #72555

Merged
andrewm4894 merged 3 commits into
masterfrom
posthog-code/inbox-report-feedback-button
Jul 21, 2026
Merged

feat(inbox): swap report copy-link button for feedback#72555
andrewm4894 merged 3 commits into
masterfrom
posthog-code/inbox-report-feedback-button

Conversation

@andrewm4894

Copy link
Copy Markdown
Member

Problem

On a web app, a Copy link button on the report detail view isn't pulling much weight. In-app feedback is far more useful to us early on, and we want to make it dead easy for users to slap a quick thumbs up/down and a note onto a report.

Changes

  • Removed the Copy link action from the report detail view (Reports / Pull request / Not actionable).
  • Brought back the Feedback button and its dialog (thumbs sentiment + optional note), which was removed in feat(inbox): Replace report Feedback button with Discuss #68272 when the Discuss button landed. Discuss stays as-is; Feedback is restored alongside it as a shared detail-pane action, so it renders inline on wide layouts and inside the overflow menu on narrow ones.
  • Restored the Inbox report feedback analytics event and captureInboxReportFeedback helper.

The Copy link button on the Runs view (InboxDetailHeader) is untouched — this only affects the report detail view where Feedback and Discuss live.

How did you test this code?

I (the PostHog Slack app agent) wasn't able to run the frontend typecheck or linter in this environment — node_modules isn't installed here, so CI will run them. The change is a faithful restore of the pre-#68272 Feedback code paired with removing the copy-link action and its now-unused imports.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Authored by the PostHog Slack app (Claude) from a Slack thread. The request: drop the copy-link button on the report view and revert to the older Feedback button/modal that was swapped out when Discuss was added, to push in-app feedback early.

I located the removal commit (#68272), restored FeedbackReportDialog.tsx, the captureInboxReportFeedback analytics helper and REPORT_FEEDBACK event, and the feedback action across the three return paths in useReportDetailActions. Then I removed the copy-link entry from ReportDetail.tsx and cleaned up the imports (IconLink, copyToClipboard, ReportDetailAction) it left dangling. reportUrl stays since Discuss still uses it.


Created with PostHog from a Slack thread

Remove the Copy link action from the report detail view and bring back the
Feedback button + dialog that was removed in #68272 when Discuss was added.
Discuss stays; Feedback is restored alongside it as a shared detail-pane action.

Generated-By: PostHog Code
Task-Id: bb49e4f0-73ff-42e1-859f-daa8eabbc1d7
@github-actions

Copy link
Copy Markdown
Contributor

Hey @andrewm4894! 👋

It looks like your git author email on this PR isn't your @posthog.com address (andrewm4894@gmail.com). Since you're on the PostHog team, it's worth pointing your local git author email at your @posthog.com address. Why it matters:

  • Consistent work identity in git history — internal tooling that attributes commits to team members keys off your @posthog.com address.
  • Keeps team contributions easy to tell apart from external community ones when scanning history.

You can fix it for this repo with:

git config user.email "you@posthog.com"

Or set it globally with git config --global user.email "you@posthog.com". No need to redo this PR — just a nudge for next time. 🙂

@andrewm4894
andrewm4894 marked this pull request as ready for review July 21, 2026 12:25
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🦔 Hogbox preview · ✅ ready

▶ Open the preview

🔑 Login test@posthog.com / 12345678 (demo data)
🧩 Running this PR's backend and frontend, on the PostHog :master base
🔗 Link stable across rebuilds — a re-push swaps the box underneath, the URL stays
🔒 Access tailnet only (PostHog VPN)
🛠️ Admin inspect & debug state in hogland
💤 Idle sleeps after ~30 min idle (snapshot to S3, zero node cost) and wakes on your next visit in ~30s, behind a brief "waking up" screen

commit 72c7023 · box box-227173335b5e · ready in 873s (push → usable) · build log · rebuilds on every push, torn down on close

@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team July 21, 2026 12:26
@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
frontend/src/scenes/inbox/components/shell/FeedbackReportDialog.tsx:11
**Feedback Note Exceeds Event Limit**

This allows a 10,000-character note and forwards it as one analytics property without truncation. When the analytics client's configured property limit is lower, valid feedback can be silently truncated even though the dialog reports success; use the established 4,000-character limit used by nearby inbox text inputs.

```suggestion
const FEEDBACK_NOTE_MAX_LENGTH = 4000
```

Reviews (1): Last reviewed commit: "feat(inbox): swap report copy-link butto..." | Re-trigger Greptile

Comment thread frontend/src/scenes/inbox/components/shell/FeedbackReportDialog.tsx Outdated
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Bundle size — 🔺 +1.6 KiB (+0.0%)

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 64.47 MiB · 🔺 +1.6 KiB (+0.0%)

File Size Δ vs base
posthog-app/src/scenes/inbox/InboxScene.js 677.4 KiB 🔺 +1.6 KiB (+0.2%)

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

Eager graph — within budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1.23 MiB · 22 files no change ███░░░░░░░ 28.6% of 4.29 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
8.19 MiB · 2,999 files no change █████████░ 88.5% of 9.25 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.3 KiB src/RootErrorBoundary.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
789 B src/scenes/ChunkLoadErrorBoundary.tsx
762 B src/index.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
281.3 KiB ../node_modules/.pnpm/posthog-js@1.404.1/node_modules/posthog-js/dist/rrweb.js
267.7 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
235.8 KiB src/taxonomy/core-filter-definitions-by-group.json
223.4 KiB ../node_modules/.pnpm/posthog-js@1.404.1/node_modules/posthog-js/dist/module.js
167.1 KiB src/queries/validators.js
154.3 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
105.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
93.2 KiB ../packages/quill/packages/quill/dist/index.js

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479

Dist folder size — 🔺 +8.5 KiB (+0.0%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 1353.11 MiB · 🔺 +8.5 KiB (+0.0%)

Playwright — all passed

All tests passed.

View test results →

Align the feedback note limit with the sibling inbox dialogs (Dismiss, Refund,
Discuss), which all cap at 4000. The note rides along as an analytics property,
so a 10000-char note risked silent truncation by the client's per-property limit.

Generated-By: PostHog Code
Task-Id: bb49e4f0-73ff-42e1-859f-daa8eabbc1d7
@andrewm4894 andrewm4894 added the stamphog Request AI approval (no full review) label Jul 21, 2026
@andrewm4894
andrewm4894 enabled auto-merge (squash) July 21, 2026 15:33

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contained frontend-only change restoring a feedback button/dialog in the inbox scene, author owns the files; the sole review concern (note length exceeding analytics property limit) is already fixed in the diff (4000-char cap, matching the suggestion) and no in-flight review or hold exists.

  • Author wrote 0% of the modified lines and has 50 merged PRs in these paths (familiarity MODERATE).
  • 👍 on the PR from chatgpt-codex-connector[bot], greptile-apps[bot], hex-security-app[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 179L, 4F substantive — within ceiling
tier T1-agent / T1c-medium (179L, 4F, single-area, feat)
stamphog 2.0.0b3 .stamphog/policy.yml @ 4f6e54b · reviewed head 2f090a2

@andrewm4894
andrewm4894 merged commit 1f6e8a6 into master Jul 21, 2026
213 of 215 checks passed
@andrewm4894
andrewm4894 deleted the posthog-code/inbox-report-feedback-button branch July 21, 2026 16:56
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-21 17:31 UTC Run
prod-us ✅ Deployed 2026-07-21 17:52 UTC Run
prod-eu ✅ Deployed 2026-07-21 17:50 UTC Run

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

Labels

stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant