feat(inbox): swap report copy-link button for feedback - #72555
Conversation
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
|
Hey @andrewm4894! 👋 It looks like your git author email on this PR isn't your
You can fix it for this repo with: git config user.email "you@posthog.com"Or set it globally with |
🦔 Hogbox preview · ✅ ready▶ Open the preview
commit |
Prompt To Fix All With AIFix 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 |
🤖 CI report
|
| 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%)
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
There was a problem hiding this comment.
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 |
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
Inbox report feedbackanalytics event andcaptureInboxReportFeedbackhelper.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_modulesisn'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
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, thecaptureInboxReportFeedbackanalytics helper andREPORT_FEEDBACKevent, and thefeedbackaction across the three return paths inuseReportDetailActions. Then I removed thecopy-linkentry fromReportDetail.tsxand cleaned up the imports (IconLink,copyToClipboard,ReportDetailAction) it left dangling.reportUrlstays since Discuss still uses it.Created with PostHog from a Slack thread