feat(inbox): Add slug suffix to inbox report deep links#2298
Open
Twixes wants to merge 1 commit into
Open
Conversation
Sharable deep links now include a human-readable slug of the report title after the UUID — e.g. `posthog-code://inbox/<uuid>/fix-inbox--Add-foo`. The slug is purely cosmetic; the receiver only reads the UUID, so the suffix is ignored at runtime.
Contributor
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
apps/code/src/shared/deeplink.test.ts:7-71
**Prefer parameterised tests**
Several blocks in this file bundle multiple distinct input→output cases into a single `it` (e.g. `null`/`undefined`/`""` in "returns just the UUID when no title is given" at lines 7–15, and `":::"` / `" "` in "omits the slug when the title slugifies to empty" at lines 32–40). The whole suite is essentially a table of `(title, expectedSlug)` pairs, which is exactly what `it.each` is designed for. A single parameterised block would make adding further cases trivial and give each case its own labelled failure message.
Reviews (1): Last reviewed commit: "feat(inbox): add slug suffix to inbox re..." | Re-trigger Greptile |
sortafreel
approved these changes
May 22, 2026
Contributor
|
if the goal is better human-readable, i have two thoughts:
|
Member
Author
|
Hmm, I don't think we can drop the UUID. Well, perhaps the thing is a UUID is too verbose here, and a serial ID would in fact be better (words I never thought I'd say). Then, posthog.com/code/open makes perfect sense. I'll actually move the logic there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
People are sharing PostHog Code inbox links like
posthog-code://inbox/01928f7a-…- problem is the link tells you nothing about what's on the other side. When pasted into Slack, a PR, or a doc, the recipient has no signal whether the link is worth clicking.Changes
Deep links now include a human-readable slug of the report title after the UUID, like Graphite PRs:
The slug is cosmetic-only, and slug-less are links are supported as always. (Did not test if slugful links work on older PH Code, likely not).
Slugification rules:
café→cafe) via NFD normalization_ . ~) kept verbatim, case preserved-, except runs that mix a colon with other unsafe chars collapse to--(so the title-like break infix(inbox): Add fooreads asfix-inbox--Add-foo)Updated the "Copy link" button to use this.
How did you test this?
Very pleasant to unit-test the slugification, it's now in
apps/code/src/shared/deeplink.test.ts. Also updatedbuildDiscussReportPrompt.test.ts. Finally, clicked around manually.Publish to changelog?
Yes - PostHog Inbox sharing links now include human-readable titles for easy sharing.