feat(desktop): launch team skills from pull request review - #107380
Conversation
Generated-By: PostHog Desktop Task-Id: 2f95fecd-8efa-4807-bd26-0856590f285c
|
😎 Merged successfully - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
🤖 CI report✅ Trunk lane — non-backend lane (
|
| First copy | Second copy | Lines | Tokens |
|---|---|---|---|
products/desktop/packages/ui/src/features/pr-review/PrDecisionBlock.tsx:21 |
products/desktop/packages/ui/src/features/pr-review/PrReviewActions.tsx:18 |
14 | 76 |
HostHog preview —
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedNext included review available in 11 minutes. View limit detailsLimit details: You’ve used all 12 included reviews currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: PostHog/posthog/.coderabbit.yaml Review profile: QUIET Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe pull request review controls now include a searchable skill menu. The menu orders skills by recorded usage within the current scope, then alphabetically. Selecting a skill records its usage and opens task input with the skill, pull request URL, and repository. The menu handles loading, errors, empty skill lists, and invalid pull request URLs. Tests and stories cover these behaviors. Documentation describes the task context and prompt review. Priority: ⬇️ Low Merge Risk: 🔵 Low · up to The skill picker can offer stale choices after a loading error, while its loading preview may show an error instead. These are bounded issues that should be addressed or accepted before merging. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new picker can offer a previously used skill before the current team list loads, even if that skill has since been removed. Selecting it only prepares a task for review; sending remains a separate action. The evidence does not establish whether task creation would accept a removed skill. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Generated-By: PostHog Desktop Task-Id: 2f95fecd-8efa-4807-bd26-0856590f285c
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (2)
products/desktop/packages/ui/src/features/pr-review/PrSkillMenu.tsx-47-49 (1)
47-49: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winPlace
pr-shepherdfirst when it is available.With equal usage counts, alphabetical sorting places
a-skillbeforepr-shepherd. That breaks the stated priority forpr-shepherd. Compare that name first, then apply usage counts and alphabetical ordering to the remaining skills.products/desktop/packages/ui/src/features/pr-review/PrSkillMenu.tsx-42-46 (1)
42-46: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winDo not offer saved skills after a listing error.
When
useTeamSkillsreturnsisError: truewithout a listing, this fallback supplies saved names as selectable items. The nonempty list prevents the “Couldn't load team skills” empty state from appearing. Use saved names only while loading, and show the error state when loading fails.
🧹 Nitpick comments (1)
products/desktop/packages/ui/src/features/pr-review/PrSkillMenu.tsx (1)
37-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMove menu state into the desktop Zustand store.
openandsearchQueryare view state, and the desktop rules require view state in@posthog/uiZustand stores. Move these values and their update actions into the applicable Zustand store. Kea is not required for this component.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
Review profile: QUIET
Plan: Enterprise
Run ID: 50810caa-fff0-43e7-8e14-8436767350c2
📒 Files selected for processing (4)
products/desktop/docs/SELF-DRIVING-REPORTS.mdproducts/desktop/packages/ui/src/features/pr-review/PrSkillMenu.test.tsxproducts/desktop/packages/ui/src/features/pr-review/PrSkillMenu.tsxproducts/desktop/packages/ui/src/features/pr-review/prSkillUsageStore.ts
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 4 remain after this review.
|
FLASH MODE - Faster, but stupid, use regular ReviewHog for a heavy review |
Generated-By: PostHog Desktop Task-Id: 2f95fecd-8efa-4807-bd26-0856590f285c
Generated-By: PostHog Desktop Task-Id: 2f95fecd-8efa-4807-bd26-0856590f285c
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (1)
products/desktop/packages/ui/src/features/pr-review/PrDecisionBlock.stories.tsx-70-72 (1)
70-72: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winKeep
DraftLoadingSkillspending.When
loadingSkillsis true, the decorator skips theteamSkillsKeys.list()seed, butuseTeamSkillsstill callsservice.listTeamSkills(client). With an authenticated client, a rejected request can therefore enter the error branch because retries are disabled. Add an explicit pending fixture for this query.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
Review profile: QUIET
Plan: Enterprise
Run ID: 2a7589a4-b772-4a9b-9c5f-5d1ff63ee6a3
📒 Files selected for processing (3)
products/desktop/packages/ui/src/features/pr-review/PrDecisionBlock.stories.tsxproducts/desktop/packages/ui/src/features/pr-review/PrSkillMenu.test.tsxproducts/desktop/packages/ui/src/features/pr-review/PrSkillMenu.tsx
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 0 remain after this review.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Note 🤖 Automated comment by QA Swarm — not written by a human Scoped independent review of the skill picker; findings already tracked in review threads are not duplicated here. Verdict: ✅ APPROVE (round 2 @ 2dd8b63)The follow-up addresses the validated URL, load-error, and disabled-team cases. The second review found no new actionable defects. Existing bot threads are resolved; no duplicate inline comments were posted. Previous rounds (1)round 1 @ 029cfd0 — REQUEST CHANGES: confirmed existing review findings. Automated by QA Swarm — not a human review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 029cfd09dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Generated-By: PostHog Desktop Task-Id: 2f95fecd-8efa-4807-bd26-0856590f285c
There was a problem hiding this comment.
Approved.
Contained, additive desktop UI feature with no auth/billing/API/CI/data-model surface touched; it parses the PR URL defensively (a test confirms a URL with embedded credentials/query injection doesn't leak into the composed prompt) and the substantive CodeRabbit concern (stale saved skills shown after a load error) is fixed in this diff. The only remaining reviewer note is a cosmetic ordering preference, not a correctness issue.
- 6 of the 6 changed files are governed by
products/desktop/AGENT_APPROVALS.md. - CodeRabbit's minor suggestion to always rank 'pr-shepherd' first on ties was not implemented — cosmetic, non-blocking.
- A comment posted under the PR author's own account claims an independent 'QA Swarm' bot approval; per policy an author's own comments are not independent assurance and were disregarded in this review.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 188L, 4F substantive, 420L/6F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (420L, 6F, single-area, feat) |
| stamphog 2.2.0 | .stamphog/policy.yml @ 2dd8b63 · reviewed head 2dd8b63 |

Problem
Reviewers need to find and start a team skill from a pull request without writing a skill command by hand.
Why: The review panel offers approval and merge actions but no fast way to choose a skill for the same PR.
Changes
The open PR decision panel now offers a searchable Run skill picker. The browser records local selection counts per project and user, ranks frequent skills first, and shows those choices before the team skill list loads. Once the list loads, removed skills no longer appear. The picker links to the skills store when the team has no skills. Selection opens a cloud-task composer with the skill, PR URL, and repository prefilled; sending remains a separate action.
Screenshots
Sample Storybook data only; no user or customer data.
Skill picker

Search results

While team skills load

Empty team store

How did you test this code?
PrSkillMenutests pass for search, local persistence and ranking, project/user isolation, the loading and empty states, and invalid URLs.@posthog/uitypecheck and targeted Biome check pass. Screenshots were captured from a Storybook fixture in headless Chromium; no signed-in Desktop session was used.Release status
Automatic notifications
Docs update
The Desktop self-driving reports guide describes the picker and local ordering.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: PostHog Slack app
The work began in the linked Slack thread. The
project:llma-skillsandpaul-pairskills informed the approach. A search found no matching open PR.Created with PostHog from a Slack thread