: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(customer-analytics): Open account notes in the side panel (#65813)
Arthur Moreira de Deusf4c1e4765996
diff --git a/products/customer_analytics/frontend/components/Accounts/AGENTS.md b/products/customer_analytics/frontend/components/Accounts/AGENTS.mdindex 8aca11927d91..a53ef499ca93 100644--- a/products/customer_analytics/frontend/components/Accounts/AGENTS.md+++ b/products/customer_analytics/frontend/components/Accounts/AGENTS.md@@ -60,6 +60,8 @@ Sort safety: removing the sorted column drops the sort (`clearSortIfColumnRemoveThe Usage tab renders an existing saved billing-usage insight — **point users to it, don't rebuild usage as a new insight.**+Clicking a note in the Notes tab opens it in the global notebook **side panel** (`notebookPanelLogic.selectNotebook`), keeping the Accounts list mounted — not the full `NotebookScene`. The note `<Link>` still points at `urls.notebook(shortId)` so cmd/ctrl-click opens the full page in a new tab; a plain click `preventDefault()`s the router push and opens the panel instead.+## Shareable view state`accountsLogic` mirrors the full view (search, tags, unassigned, assigned-to, sort, columns, tile filter) into the URL hash `#view=...` via `actionToUrl`/`urlToAction`, so a copied URL reproduces the exact list. Only non-default values are serialized. The "assigned to" filter persists as concrete `assignedTo` ids (not a `mine` flag), so a link shared with a colleague resolves to the **same** accounts for them as for the sharer; the legacy `mine: true` hash is still read and resolved to the current user's id for backward compatibility. A shared link's `columns` win over the per-user saved column config (`accountsColumnConfigLogic` enforces this when its async saved-config load resolves by checking the live URL).diff --git a/products/customer_analytics/frontend/components/Accounts/AccountNotebooksExpansion.tsx b/products/customer_analytics/frontend/components/Accounts/AccountNotebooksExpansion.tsxindex 748d64e2936e..57e9ef406633 100644--- a/products/customer_analytics/frontend/components/Accounts/AccountNotebooksExpansion.tsx+++ b/products/customer_analytics/frontend/components/Accounts/AccountNotebooksExpansion.tsx@@ -15,6 +15,7 @@ import {import { TZLabel } from 'lib/components/TZLabel'import { IconSlack } from 'lib/lemon-ui/icons'import { fullName } from 'lib/utils/strings'+import { notebookPanelLogic } from 'scenes/notebooks/NotebookPanel/notebookPanelLogic'import { urls } from 'scenes/urls'import type { AccountNotebookApi } from 'products/customer_analytics/frontend/generated/api.schemas'@@ -97,6 +98,7 @@ export function AccountNotebooksExpansion({const { notebooks, notebooksLoading } = useValues(logic)const { activeTabFor } = useValues(accountsExpansionLogic)const { setActiveTab } = useActions(accountsExpansionLogic)+ const { selectNotebook } = useActions(notebookPanelLogic)const activeTab = activeTabFor(accountId)const columns: LemonTableColumns<AccountNotebookApi> = [@@ -110,11 +112,13 @@ export function AccountNotebooksExpansion({<Linkto={urls.notebook(notebook.short_id)}className="font-medium"- onClick={() =>+ onClick={(event) => {posthog.capture(AccountsEvents.NoteClicked, {notebook_short_id: notebook.short_id,})- }+ event.preventDefault()+ selectNotebook(notebook.short_id)+ }}>{notebook.title || 'Untitled note'}</Link>