Skip to content

fix(pi): focus composer when clicking chat thread - #4049

Merged
trunk-io[bot] merged 1 commit into
mainfrom
fix/pi-thread-focus-chat
Jul 31, 2026
Merged

fix(pi): focus composer when clicking chat thread#4049
trunk-io[bot] merged 1 commit into
mainfrom
fix/pi-thread-focus-chat

Conversation

@jonathanlab

Copy link
Copy Markdown
Contributor

Problem

Clicking a Pi chat thread did not focus its composer, unlike ACP threads.

Changes

  • Focus the Pi composer after clicks on non-interactive thread content.
  • Share the ACP click guard so interactive elements and text selection retain their expected behavior.

How did you test this?

  • pnpm exec biome check packages/ui/src/features/pi-sessions/PiSessionView.tsx packages/ui/src/features/sessions/components/SessionView.tsx packages/ui/src/features/sessions/components/focusComposerOnPaneClick.ts packages/ui/src/features/sessions/components/focusComposerOnPaneClick.test.ts
  • pnpm --filter @posthog/ui exec vitest run src/features/sessions/components/focusComposerOnPaneClick.test.ts
  • pnpm --filter @posthog/ui typecheck

Automatic notifications

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

@trunk-io

trunk-io Bot commented Jul 31, 2026

Copy link
Copy Markdown

😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 42c63f4.

@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(pi): focus composer when clicking ch..." | Re-trigger Greptile

@jonathanlab
jonathanlab force-pushed the fix/pi-thread-focus-chat branch from a95c3ad to 42c63f4 Compare July 31, 2026 15:18
@jonathanlab jonathanlab added the Stamphog This will request an autostamp by stamphog on small changes label Jul 31, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Small, contained frontend fix that extracts and reuses an existing click-guard helper for composer focus, matches its description exactly, includes new tests, and touches no risky territory.

  • Author wrote 100% of the modified lines and has 10 merged PRs in these paths (familiarity STRONG).
  • 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 49L, 3F substantive, 102L/4F incl. docs/generated/snapshots — within ceiling
tier T1-agent / T1c-medium (102L, 4F, single-area, fix)
stamphog 2.0.0b3 .stamphog/policy.yml @ 0ed50b9 · reviewed head 42c63f4

@trunk-io
trunk-io Bot merged commit 436326e into main Jul 31, 2026
38 checks passed
@trunk-io
trunk-io Bot deleted the fix/pi-thread-focus-chat branch July 31, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant