feat(max): open a new chat when selecting the Chat nav tab#60970
Conversation
|
Hey @pauldambra! 👋 It looks like your git author email on this PR isn't your
You can fix it for this repo with: git config user.email "you@posthog.com"Or set it globally with |
|
Size Change: 0 B Total Size: 81 MB ℹ️ View Unchanged
|
|
Note 🤖 Automated comment by QA Swarm — not written by a human Multi-perspective review run via PR Shepherd: qa-team specialists (frontend, performance, copy), two generalist reviewers, and security-audit. paul-reviewer and xp-reviewer were unavailable in this environment and skipped. Verdict: 💬 APPROVE WITH NITSOne substantive issue was found and fixed in Key findings
ConvergenceThe new-chat-on-tab-switch gap was independently flagged by frontend, generalist-a, and generalist-b — highest-confidence finding, now addressed. Reviewer summaries
Automated by QA Swarm — not a human review |
|
✅ Visual changes approved by @pauldambra — baseline updated in 12 changed, 4 new. |
7ee8cef to
4b0d7a6
Compare
|
Reviews (1): Last reviewed commit: "fix(max): open a new chat on every Chat ..." | Re-trigger Greptile |
|
Note 🤖 Automated comment by QA Swarm — not written by a human Multi-perspective review: qa-team (frontend, security, performance, copy + 2 generalists), paul-reviewer, xp-reviewer, security-audit Verdict: 💬 APPROVE WITH NITSCorrect, narrowly scoped client-side nav change. The core claim ("clicking Chat always opens a fresh chat") was verified against Convergence (highest confidence — flagged by 2+ reviewers independently)
Non-blocking
Reviewer summaries
Automated by QA Swarm — not a human review |
|
Note 🤖 Automated comment by PR Shepherd — not written by a human Triaged the qa-swarm review. Actioned the three convergent findings in
Deferred to the author (judgement call, not auto-actioned): paul's measurement-strategy point — clicking an already-active Chat tab fires no named The identical-URL re-click no-op (qa-team) is harmless — no change. |
New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.
Switching to the Chat tab (e.g. from Browse) now navigates to a fresh chat at /ai while keeping the chat history panel open, so a single click lands you ready to type and you can still switch to a past conversation from the panel. The collapsed-nav Chat button does the same when opening the panel. Clicking the Chat tab while already on the chat page is a no-op - the "+" New chat button is the explicit affordance for starting a fresh chat. Navigation is driven from the Tabs onValueChange so it fires only when the active tab changes, not on every re-click. Added data-attrs so autocapture can distinguish starting a new chat (nav-tab-chat, nav-tab-chat-collapsed, nav-chat-new) from resuming an old one (nav-chat-history-conversation). Generated-By: PostHog Code Task-Id: b373d2b4-d1ec-4de0-a55b-55c1ed56752d
6215556 to
2e147dc
Compare
|
Note 🤖 Automated comment by PR Shepherd — not written by a human Behaviour change + history cleanup (now a single commit, The Chat tab now opens a fresh chat only when switching to it (driven from This also resolves the earlier review notes: the Warning The branch was squashed, so earlier comments referencing intermediate SHAs (e.g. |
|
🎭 Playwright report · View test results →
These issues are not necessarily caused by your changes. |

Problem
Reaching the full AI chat interface takes two clicks today: selecting the "Chat" tab in the nav sidebar only swaps the panel to show chat history, so users then have to click again (the
+button or a conversation) to actually start chatting. Data showed that ~64% of users who click the Chat tab click+to start a new chat within 10 seconds — so the common intent is "start a new chat", and the extra click is pure friction.Changes
data-attr="nav-tab-chat") now navigates to a fresh chat at/aiwhile still showing the chat history panel, so a single click lands you in the AI chat ready to type — and you can still switch to a past conversation from the panel.data-attr="nav-chat-history-conversation"to the past-conversation links so autocapture can distinguish "started a new chat" from "loaded an old conversation".How did you test this code?
I'm an agent and did not perform manual testing. There were no existing tests covering this nav behavior, and the frontend toolchain (oxlint/oxfmt) was not installed in this environment. The change is a small, self-contained navigation tweak in
Nav.tsxplus adata-attraddition inNavTabChat.tsx; edits were hand-formatted to match the surrounding style. Recommend a quick manual smoke test: click the Chat tab from the Browse tab and confirm it lands on a new chat with history still visible.Automatic notifications
Docs update
No docs changes needed.
🤖 Agent context
Authored by PostHog Code (Claude). The request originated from a Slack discussion about reducing friction to reach the AI chat interface. Explored the nav under
frontend/src/layout/panel-layout/ai-first/to locate thenav-tab-chatTabs control and itsonValueChangehandler. Chose to pushurls.ai()(a new chat) on selecting the Chat tab rather than adding a separate+entry point, since the panel already keeps history visible for switching. Applied the same behavior to the collapsed-nav Chat button for consistency, and added adata-attron history links so autocapture can measure the new-chat-vs-resume-old split going forward.Created with PostHog Code