feat(sessions): remove stale-conversation cost notice#3189
Conversation
The large-idle-conversation cost warning replaced the composer with an ActionSelector, forcing staff to choose compact / continue / new session before they could type again. Turn it into a slim, dismissible banner pinned above the composer so the input box stays usable — you can fire off one more prompt or dismiss the notice and deal with compaction later. Compact stays a one-click action; the dismiss (X) acknowledges the warning for the session so it doesn't keep nagging. Generated-By: PostHog Code Task-Id: f70fc300-9167-4c69-b96b-3e34fe03588e
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
|
The `spent` assignment exceeded the line width; `biome ci` (which checks formatting) flagged it. Wrap it as the formatter expects to turn the quality check green. Generated-By: PostHog Code Task-Id: f70fc300-9167-4c69-b96b-3e34fe03588e
- Use the shared `@posthog/ui/primitives/Tooltip` instead of the Radix Themes one, so the banner's tooltips match the rest of the UI (dark theme, padding, shadow) like other Quill-button tooltips. - Rename the gate-choice analytics value "continue" -> "dismiss" to match the redesigned UX (the "Continue anyway" button is now a dismiss ✕), keeping the event vocabulary consistent for dashboards. Generated-By: PostHog Code Task-Id: f70fc300-9167-4c69-b96b-3e34fe03588e
Remove the staff-only stale-conversation gate/notice entirely. As a non-blocking banner it was just visual noise: it didn't change user behaviour, and compacting isn't the right recommendation anyway — the next message pays the same uncached input cost whether or not you compact, then warms the cache for the following turns regardless. Removes the banner component and stories, the gate hook and store (+test), the `shouldWarnStaleCostlyConversation` / `extractLastActivityAt` helpers and their tests in core, and the `STALE_CONVERSATION_GATE_CHOICE` analytics event. Generated-By: PostHog Code Task-Id: f70fc300-9167-4c69-b96b-3e34fe03588e
|
Reviews (2): Last reviewed commit: "feat(sessions): remove stale-conversatio..." | Re-trigger Greptile |
|
Reviews (3): Last reviewed commit: "feat(sessions): remove stale-conversatio..." | Re-trigger Greptile |
There was a problem hiding this comment.
Gates denied this PR because it exceeds the automated review size ceiling (673 lines, 9 files). While the change is mostly deletions (removing the stale-conversation cost notice feature), the scale requires a human reviewer to confirm no dependent code paths were missed. Request a review from a teammate before re-requesting auto-approval.
Problem
When PostHog staff returned to a large, idle conversation, a cost notice appeared warning that the prompt cache had likely expired. It started as a blocking prompt over the composer; this PR first made it a small non-blocking banner, but the conclusion from discussion is that the notice shouldn't exist at all.
As a non-blocking banner it's just visual noise — it doesn't change behaviour, and it's only shown to staff. And compacting isn't the right recommendation: you pay the same uncached full-price input cost on the next message whether or not you compact, and a normal message re-warms the cache for subsequent turns regardless. So the "compact" call-to-action was misleading.
Changes
Remove the stale-conversation notice/gate entirely:
shouldWarnStaleCostlyConversation/extractLastActivityAthelpers and their thresholds/tests from core.STALE_CONVERSATION_GATE_CHOICEanalytics event and its properties.SessionView.Net ~630 lines deleted; no behavioural change for users (the notice was staff-only).
How did you test this?
pnpm --filter @posthog/core --filter @posthog/ui --filter @posthog/shared typecheck— cleanpnpm --filter @posthog/core test contextUsage— passingbiome ci .— clean (exit 0)Automatic notifications
Created with PostHog from a Slack thread