Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(navigation): update starred product flow in sidebar skill (#108093)

posthog[bot]9167e8c6d89d
diff --git a/.agents/skills/styling-sidebar-products/SKILL.md b/.agents/skills/styling-sidebar-products/SKILL.md
index fe9148ed18d5..bf5df7f5fb4f 100644
--- a/.agents/skills/styling-sidebar-products/SKILL.md
+++ b/.agents/skills/styling-sidebar-products/SKILL.md
@@ -39,8 +39,17 @@ The sidebar row uses the manifest color. Scene titles, search and other surfaces
When the two disagree, the product shows two colors across the app.
Always give both a light and a dark variable, because a single value is reused for dark mode and reads poorly there.
-**Starred entries follow the product.** A star stores only `iconType || type` and `href`.
-The file tree looks up the product by `href` (`getProductIcon` in `defaultTree.tsx`) and uses its icon and color, and it wraps custom icons in `ProductIconWrapper`.
+**Starred entries follow the product.** A star is a `FileSystemShortcut` row. It stores only the product name as `path`, `iconType || type` as `type`, and `href`.
+Stars come from two writers:
+
+- The frontend (`shortcutFromEntry` in `ProjectTree/utils.tsx`) sets `href`. The customize dialog saves all its changes in one `file_system_shortcut/bulk_update/` call.
+- The backend (`star_custom_products` in `posthog/models/file_system/starred_products.py`) stars new custom products for simple sidebar users. It sets no `href`, because product URLs exist only in the frontend.
+
+When shortcuts load, `withProductShortcutHref` in `defaultTree.tsx` fills in a missing `href` by product name.
+The file tree then looks up the product by `href` (`getSidebarProduct` in `defaultTree.tsx`) and uses its current name, tags, icon and color. It wraps custom icons in `ProductIconWrapper`.
+The sidebar rows and the customize dialog match a star to a product by name or `href` (`findProductShortcut` in `ProjectTree/utils.tsx`).
+A star keeps the name it had when it was created. When you rename a product, keep its `href` stable, so frontend-created stars still match by `href`.
+Backend-created stars get an `href` only while their stored name matches the current product name. A stable `href` does not keep these stars after a rename.
Do not add a per-surface icon override. Fix the manifest and the map, and the star follows.
**Pinned rows stay neutral.** Home, Self-driving and Activity and people have no color on purpose.