Skip to content

fix(sessions): clarify "PostHog products used" bar and drop misleading Code link#2545

Draft
k11kirky wants to merge 2 commits into
mainfrom
posthog-code/clarify-resources-bar
Draft

fix(sessions): clarify "PostHog products used" bar and drop misleading Code link#2545
k11kirky wants to merge 2 commits into
mainfrom
posthog-code/clarify-resources-bar

Conversation

@k11kirky

@k11kirky k11kirky commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Problem

Users hit the bar above the message composer and didn't understand it (per a Slack thread). Two specific issues:

  • The header "PostHog resources used" doesn't explain what it's telling you.
  • The "Code" chip linked to the posthog.com/code marketing landing page — a dead-end destination. It only means "the agent read files from your repository", not a PostHog data product.

Changes

  • Renamed the header to "PostHog products used" with a tooltip explaining it lists the PostHog products the agent drew on this session.
  • The "Code" chip no longer links to the /code landing page; it now shows an explanatory tooltip instead.
  • Every chip now has a hover tooltip (docs link for product chips, a short explanation for informational ones).

No behavioural change to what gets tracked — only how the bar is labelled and what the chips do on click/hover.

How did you test this?

  • tsc -p tsconfig.web.json --noEmit (renderer typecheck) — passes.
  • vitest run accumulateSessionResources — 3 tests pass (accumulation logic unchanged).
  • biome check on the changed file — clean.

Automatic notifications

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

Created with PostHog Code from a Slack thread

…g Code link

The session resources bar above the composer was confusing: the header
"PostHog resources used" gave no explanation, and the "Code" chip linked to
the posthog.com/code marketing page even though it just means the agent read
files from the user's repo.

- Rename the header to "PostHog products used" and add a tooltip explaining
  it lists products the agent drew on this session.
- Stop the "Code" chip linking to the /code landing page; it now shows an
  explanatory tooltip instead of a misleading destination.
- Give every chip a hover tooltip (docs link or explanation).

Generated-By: PostHog Code
Task-Id: 39a13701-8317-4824-82b7-6558a1af8f3e
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 982e091.

@greptile-apps

greptile-apps Bot commented Jun 9, 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
apps/code/src/renderer/features/sessions/components/SessionResourcesBar.tsx:118-120
The tooltip fallback for products with no `docUrl` and no `PRODUCT_TOOLTIP` entry is `product.label`, which is the same text already visible in the badge. For `apm` this means hovering the chip shows a tooltip that adds no information. Either add an `apm` entry to `PRODUCT_TOOLTIP` (mirroring the `code` treatment) or omit the tooltip when there's nothing extra to say, to avoid a superfluous interaction.

```suggestion
            const tooltip =
              PRODUCT_TOOLTIP[product.id] ??
              (docUrl ? `Open ${product.label} docs` : undefined);
```

Reviews (1): Last reviewed commit: "fix(sessions): clarify "PostHog products..." | Re-trigger Greptile

Comment on lines +118 to +120
const tooltip =
PRODUCT_TOOLTIP[product.id] ??
(docUrl ? `Open ${product.label} docs` : product.label);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 The tooltip fallback for products with no docUrl and no PRODUCT_TOOLTIP entry is product.label, which is the same text already visible in the badge. For apm this means hovering the chip shows a tooltip that adds no information. Either add an apm entry to PRODUCT_TOOLTIP (mirroring the code treatment) or omit the tooltip when there's nothing extra to say, to avoid a superfluous interaction.

Suggested change
const tooltip =
PRODUCT_TOOLTIP[product.id] ??
(docUrl ? `Open ${product.label} docs` : product.label);
const tooltip =
PRODUCT_TOOLTIP[product.id] ??
(docUrl ? `Open ${product.label} docs` : undefined);
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/sessions/components/SessionResourcesBar.tsx
Line: 118-120

Comment:
The tooltip fallback for products with no `docUrl` and no `PRODUCT_TOOLTIP` entry is `product.label`, which is the same text already visible in the badge. For `apm` this means hovering the chip shows a tooltip that adds no information. Either add an `apm` entry to `PRODUCT_TOOLTIP` (mirroring the `code` treatment) or omit the tooltip when there's nothing extra to say, to avoid a superfluous interaction.

```suggestion
            const tooltip =
              PRODUCT_TOOLTIP[product.id] ??
              (docUrl ? `Open ${product.label} docs` : undefined);
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Per review: chips with no docs link and no explanation (e.g. apm) were
getting a tooltip that just repeated the label text. Extract a ResourceChip
component that renders such chips bare and only wraps in a Tooltip when there's
something extra to say (a docs hint or a per-product explanation).

Generated-By: PostHog Code
Task-Id: 39a13701-8317-4824-82b7-6558a1af8f3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant