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.

feat(review_hog): split the settings tab into Standard and Deep areas (#114857)

Julian Bezb41cf9571ca0
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 63c598f95ace..e209b74cba06 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -14517,33 +14517,33 @@ snapshots:
scenes-app-workflows-createaitaskconnectors--unavailable-connector--light:
hash: v1.k794b7964.c4fdab3ab5190ace67d354d7010b49cbd37e9ec72feaa3fab9760d1f1010c8b0.S5qBDGrQNUo7qygcV1_MG_nu9RWeaMnoOFrYdhnV97E
scenes-code-review--default--dark:
- hash: v1.k794b7964.26b2a9ccdfeb46f046c6d2caebd8c7ea3ec38717b21ac5e286d275a54d9c88e8.2taQjxsp5Ghzsi2NHa7T4gGeLzILDTz1vhH6Jae69uI
+ hash: v1.k794b7964.bc9f861ae414c77c708f83bcce1d75dd8e80a0ee047c460b5f9fc5237cef9553.ikrttudHPdJsnmv_6RaTTSycICrnK3Qzpd2LyTyzEBw
scenes-code-review--default--light:
- hash: v1.k794b7964.a3b8f7ed2c6e1650be2a70b83cc057f0c5268c26f694e873ad9a9c54df8843da.2f9sqMQluNLN-TDVXouIvVMhwHntcpKLb87unaTUo_U
+ hash: v1.k794b7964.c77495f653dd58b7f416382d1dd00d955693da7158132495cb0a11b1ec498934.AVOYB9lL8QLhGEBF2keAhwqcomgKmg7gajLvh9cq2No
scenes-code-review--flag-disabled-for-staff--dark:
hash: v1.k794b7964.af1b6736f5a6e6ffb329599ed7407d25dbee0939861cd554e0c94b84b2970a7c.HwLX1pgZqjpFAoG4ni16T0wtf1PJQkw0Evr2jBw2vG4
scenes-code-review--flag-disabled-for-staff--light:
hash: v1.k794b7964.a71251e301794f51a0a9140ab1442fada37b1cc0fb54095a5eb19499e0cb1b34.3GhhJCqNfLkY2WdBTTn0LHJifxiCqyEJ7viaHaoCoGA
scenes-code-review--narrow--dark:
- hash: v1.k794b7964.63649dd285864639be3334f1450409dd32ffb381f643a5399e16c7b48f794d68.4xKhrVrw_gEjmbdN5mWEDTj9gTuStyD0Cqne2ezG_Hw
+ hash: v1.k794b7964.f41e442041cfbc73be732a84d6e2084588c1feb432feb29f241ce8fe95e61fb3.oA5ZbVIlc4hgY5lbsFa5YIlslR7ZX5DFESr3UPaPKe0
scenes-code-review--narrow--light:
- hash: v1.k794b7964.7e0bbeeffb4b8d8372dbdfe90686b2becc1991df2b78af2a0a2b6a0b3a41aadf.7Z4Aht9zbaWjsS8W-Yd9wCOuUjU5-A9Xb6Xpg__bgMs
+ hash: v1.k794b7964.91f0cae5764c91e6cdedcce4a07b79733f7a838485a72ab62c37cb4030cdcc0d.-fxrrp8Nk5gjXCEVSe0l19hr70rF3Ppkk-8zb3P8X18
scenes-code-review--narrow-settings--dark:
- hash: v1.k794b7964.ea1ab4cb3b3f2eca6d22db2f5b58fc024cb19c5c96f8ae354aa68bf2003c5520.d3e5PopQypbF4oe7Gv_EqYPh98oGYO7tz44dblKGoGY
+ hash: v1.k794b7964.4915e50e10d92c8a8de6fb866ed0c84957755bf697c14ddcf0c89fa4e3c42fc3.hK9NIz9WmU3FcyybsjSyDjqV0WYm8xX7dKZLVqk-ae8
scenes-code-review--narrow-settings--light:
- hash: v1.k794b7964.7c763ae64e60bb61482e3b53df6d21227df686bea08a5de80272d0ac3de7312a.xrwQQUb_yhA6F7_vOESqzzw0ZTbOXxFOB36cRLFVBwY
+ hash: v1.k794b7964.6330bb0c674df7ffa1e641ff1df1c7b0d43885bd9d65f42fda60c6535f81e982.AE0nB-RzRbceU66fS5H-JmTcmbCzrkIOmPMsjVyRmHI
scenes-code-review--saved-inbox-opt-ins--dark:
- hash: v1.k794b7964.0e1463d77ed24eadd4f5d00b50c9d9e77997e167418983dfcb8c1e40b7782ded.U9p-YAGiFB8YYOdhgcMoJIVtozh9CnG-HMqz0pKElSc
+ hash: v1.k794b7964.c1da22d095e5481ed16125bd172a410790d52ff3d5e9651a0a3eb6d28f83a7fe.6njlJdHdWDVYZOJWkOb-ltM6tKiwniZRIxD8QxVGR9A
scenes-code-review--saved-inbox-opt-ins--light:
- hash: v1.k794b7964.df02b2abaab38458bf332492c6110bca0376c9d3b03625f4c46e59965d66e70c.nE8ZWovrxPZuTj4MbJo9Sr6n64NF1oMOBrn_n51XIlw
+ hash: v1.k794b7964.1323464d848f9a4c494ae82dc11c5e4a8557d24d31189ba85acbc194c54d8e03.NukUiRZTAl4q0NhfEfjlQRNpvC-uUHIj8d8E_Mc8RtY
scenes-code-review--settings--dark:
- hash: v1.k794b7964.9249a99f7968ef84d09b9100a6cd03d0589d31762110d1b38353ed7fb75825d0.yG6MkHb1oyKDaQxRJRVmxiGBefroaBhkgDwr1PdDrcI
+ hash: v1.k794b7964.31c633188668a8959c48383954add69c55863bd1a06e4d6bf99490e4b2e27e13.KlFojAzg2OyoQQcu_l7VrZsHk78svbWFs5a4h2OQpmw
scenes-code-review--settings--light:
- hash: v1.k794b7964.da6367d1ac33f7005399a0cc4505a731c7e8833c700ddd2207b58cf33001bcf6.kvOy4se9NHqG7MqyT1OUp6RmutLM7P-EzHkBR_mnhqs
+ hash: v1.k794b7964.c45aec95c2766a50cc821fbd6578bafbc3177fa05e82f5cd3e0b9a6f4c9c7786.gAWuTdvo9aOCN0UqfctrPfdUb20GE3KdYz9GiPwZD9w
scenes-code-review--settings-for-member--dark:
- hash: v1.k794b7964.da417e515dd9263a7b096680e231bd3c09e5616ada85f426793365e028f7daf5.wQfduw1MRkVcr-ow0On3If-ckzaY0cY1wxYCBIF23zg
+ hash: v1.k794b7964.9309e9727b71c82a158fd8b36819da94d0c7184d2063cdaea2b85308ad15bc22.ibh6Z9RNKO0LenVknk9kmDi-Ne1tp9_DpkRuN_Iui9I
scenes-code-review--settings-for-member--light:
- hash: v1.k794b7964.eab7f9bd03c0fb668da6298385837cd261eadb153483b1504cf1e3b30209232d.VGYff3AUfiUGek3T1ecLUzVHsF3RqXwqNjxZjliy6RE
+ hash: v1.k794b7964.e962fa6164788ce3d9f8d45961423790130dd1c008d267fef27c9d4e8d97a90f.XpI1S2zNNGTlnIFi1V3gfRZy0lESTM9Bi8WNpe8hcMA
scenes-dashboards-customize-breakdown-colors--customize-breakdown-colors--dark:
hash: v1.k794b7964.cf89a12669d5221b2441fbfb4439b8b1b38191943438a2c1a220444148329954.B4ew6uW3gZCbPU_3vTOggsOyHojRlyvuXxh5FZnlO-0
scenes-dashboards-customize-breakdown-colors--customize-breakdown-colors--light:
diff --git a/products/review_hog/frontend/CodeReviewScene.stories.tsx b/products/review_hog/frontend/CodeReviewScene.stories.tsx
index 183249ba1164..f062aca696e1 100644
--- a/products/review_hog/frontend/CodeReviewScene.stories.tsx
+++ b/products/review_hog/frontend/CodeReviewScene.stories.tsx
@@ -593,7 +593,8 @@ export const Default: Story = {
await expect(await canvas.findByText('Review a pull request')).toBeVisible()
await expect(await canvas.findByText('Add retry to the export job')).toBeVisible()
await expect(canvas.getByText('Mine')).toBeVisible()
- await expect(canvas.queryByText('Deep review settings')).not.toBeInTheDocument()
+ await expect(canvas.queryByText('Review skills')).not.toBeInTheDocument()
+ await expect(canvas.getByText('How we review your PRs')).toBeVisible()
},
}
@@ -607,8 +608,8 @@ export const Settings: Story = {
await expect(await canvas.findByText('example-org/web')).toBeVisible()
await expect(canvas.getByText('Reviewed in the Billing project')).toBeVisible()
await expect(canvas.getByText('You can edit: project admin')).toBeVisible()
- await expect(canvas.getByText('Deep review settings')).toBeVisible()
await expect(canvas.getByText('Review skills')).toBeVisible()
+ await expect(canvas.getByText('Kept counts: your last 10 Deep reviews')).toBeVisible()
await expect(canvas.queryByText('Review a pull request')).not.toBeInTheDocument()
await expect(canvas.getByLabelText('Resolve comments on my pull requests')).toBeVisible()
},
diff --git a/products/review_hog/frontend/CodeReviewScene.tsx b/products/review_hog/frontend/CodeReviewScene.tsx
index 95ec8f812cc8..e3c676c64cf7 100644
--- a/products/review_hog/frontend/CodeReviewScene.tsx
+++ b/products/review_hog/frontend/CodeReviewScene.tsx
@@ -30,7 +30,6 @@ import { SceneTitleSection } from '~/layout/scenes/components/SceneTitleSection'
import type {
ReviewFindingApi,
ReviewIssuePriorityEnumApi,
- ReviewPerspectiveStatItemApi,
ReviewRecentReviewApi,
ReviewResolutionStatusApi,
} from 'products/review_hog/frontend/generated/api.schemas'
@@ -41,73 +40,13 @@ import {
import { AdoptSkillModal } from './AdoptSkillModal'
import { PipelineDetailModal } from './PipelineDetailModal'
-import { InstallationClaims } from './repositories/InstallationClaims'
-import { RepositoriesPanes } from './repositories/RepositoriesPanes'
import { CodeReviewTab, REVIEWS_PAGE_SIZE, ReviewDrawerTab, reviewHogSettingsLogic } from './reviewHogSettingsLogic'
import { SectionHeader } from './SectionHeader'
-import { FullReviewSettingsSection } from './settings/FullReviewSettingsSection'
+import { DeepArea } from './settings/DeepArea'
import { InboxSection } from './settings/InboxSection'
-import { ReviewSkillsPanel } from './settings/ReviewSkillsPanel'
+import { StandardArea } from './settings/StandardArea'
import { prettifySkillName } from './skillNames'
-// Step numbering and names match the detailed-view modal (PipelineDetailModal) — keep them in sync.
-const PIPELINE_PHASES: { name: string; hint: string; steps: { number: string; title: string; caption: string }[] }[] = [
- {
- name: 'Prepare',
- hint: 'get the diff ready to read',
- steps: [
- {
- number: '01',
- title: 'Meaningful diff',
- caption: "we fetch the PR's diff; generated files, lock files, and snapshots are skipped",
- },
- {
- number: '02',
- title: 'Split into chunks',
- caption: 'larger PRs are split into logically reviewable chunks',
- },
- ],
- },
- {
- name: 'Review',
- hint: 'pick the lenses, read in parallel',
- steps: [
- {
- number: '03',
- title: 'Pick perspectives',
- caption: 'each chunk gets only the perspectives it actually needs',
- },
- { number: '04', title: 'Perspectives', caption: 'specialist reviewers read each chunk in parallel' },
- { number: '05', title: 'Blind spots', caption: 'one more sweep for what every perspective missed' },
- ],
- },
- {
- name: 'Refine & publish',
- hint: 'clean up and ship the review',
- steps: [
- { number: '06', title: 'Dedupe', caption: 'overlapping findings are merged' },
- { number: '07', title: 'Validate', caption: 'each finding is checked against your quality bar' },
- { number: '08', title: 'Publish', caption: 'a cleaned-up review lands on the pull request' },
- ],
- },
- {
- name: 'Resolve',
- hint: 'settle the review comments',
- steps: [
- {
- number: '09',
- title: 'Triage threads',
- caption: 'every unresolved comment thread is judged against your resolution criteria',
- },
- {
- number: '10',
- title: 'Fix & reply',
- caption: 'worth-and-safe asks land on the branch, and every thread gets a reply',
- },
- ],
- },
-]
-
// The Mine tooltip states what the backend's `mine` scope matches: the PR author OR the user who started the run.
const REVIEWS_SCOPE_OPTIONS: {
value: ReviewHogReviewsListScope
@@ -206,6 +145,7 @@ function ProofCard(): JSX.Element | null {
)
}
+/** Where the review pipeline is explained: the full walk-through lives in the Detailed view. */
function PipelineSection(): JSX.Element {
const { openPipelineDetail } = useActions(reviewHogSettingsLogic)
return (
@@ -227,31 +167,6 @@ function PipelineSection(): JSX.Element {
Every review runs through the same steps before it's published, then works through the comment threads
it leaves open.
</SectionHeader>
- <div className="flex flex-wrap items-stretch gap-2.5">
- {PIPELINE_PHASES.map((phase, i) => (
- <div key={phase.name} className="flex min-w-52 flex-1 items-center gap-2.5">
- {i > 0 && <span className="shrink-0 text-lg text-tertiary">→</span>}
- <LemonCard hoverEffect={false} className="flex h-full flex-1 flex-col gap-3 p-4">
- <div className="flex flex-col">
- <span className="text-sm font-semibold">{phase.name}</span>
- <span className="text-xs text-tertiary">{phase.hint}</span>
- </div>
- <div className="flex flex-col gap-2.5">
- {phase.steps.map((step) => (
- <div key={step.number} className="flex items-baseline gap-2">
- <span className="font-mono text-xxs text-warning">{step.number}</span>
- <div className="flex flex-col">
- <span className="text-xs font-semibold">{step.title}</span>
- <span className="text-xxs text-tertiary">{step.caption}</span>
- </div>
- </div>
- ))}
- </div>
- </LemonCard>
- </div>
- ))}
- </div>
- <PipelineDetailModal />
</section>
)
}
@@ -1092,170 +1007,6 @@ function ReviewDetailDrawer(): JSX.Element {
)
}
-function EffectivenessRows({
- items,
- maxRaised,
-}: {
- items: ReviewPerspectiveStatItemApi[]
- maxRaised: number
-}): JSX.Element {
- return (
- <div className="flex flex-col gap-2">
- {items.map((stat) => (
- <Tooltip
- key={stat.skill_name}
- title={`${stat.raised} raised · ${stat.kept} kept · ${stat.dismissed} dismissed by validation`}
- >
- <div className="flex items-center gap-3">
- <span className="w-44 shrink-0 truncate text-xs">{prettifySkillName(stat.skill_name)}</span>
- <div className="flex h-2 flex-1 items-center">
- {stat.kept > 0 && (
- <div
- className="h-2 rounded-sm bg-success"
- style={{ width: `${(stat.kept / maxRaised) * 100}%` }}
- />
- )}
- {stat.dismissed > 0 && (
- <div
- className="ml-0.5 h-2 rounded-sm bg-fill-highlight-100"
- style={{ width: `${(stat.dismissed / maxRaised) * 100}%` }}
- />
- )}
- </div>
- <span className="w-24 shrink-0 text-right text-xs tabular-nums text-secondary">
- {stat.kept} of {stat.raised} kept
- </span>
- </div>
- </Tooltip>
- ))}
- </div>
- )
-}
-
-/**
- * Aggregate effectiveness across the in-scope recent reviews for one reviewer kind: per skill, a
- * bar of findings it raised split into validator-kept (green) vs dismissed (muted). Rendered once
- * for perspectives and once for blind spots, under the review skills panel; both cards share one
- * scale so bar lengths stay comparable. Hidden until there is data for the kind. On the Everyone
- * scope this can list skills beyond the user's own rows above — the stats describe the project,
- * while the toggles stay per-user.
- */
-function EffectivenessCard({ kind }: { kind: 'perspectives' | 'blind_spots' }): JSX.Element | null {
- const { perspectiveStats } = useValues(reviewHogSettingsLogic)
-
- if (!perspectiveStats?.perspectives.length) {
- return null
- }
- const items = perspectiveStats.perspectives.filter(
- (p) => p.skill_name.startsWith('review-hog-blind-spots-') === (kind === 'blind_spots')
- )
- if (!items.length) {
- return null
- }
- const maxRaised = Math.max(...perspectiveStats.perspectives.map((p) => p.raised))
- const noun = kind === 'blind_spots' ? 'sweep' : 'perspective'
-
- return (
- <LemonCard hoverEffect={false} className="flex flex-col gap-3 p-4">
- {/* Overline header: this card is an instrument panel about the skills below, not one of
- them — it must not share the skill cards' title style. */}
- <div className="flex flex-col gap-1">
- <div className="flex flex-wrap items-baseline gap-x-2">
- <span className="text-xxs font-semibold uppercase tracking-wide text-tertiary">Effectiveness</span>
- <span className="ml-auto">
- <StatsWindowLabel reportCount={perspectiveStats.report_count} />
- </span>
- </div>
- <p className="m-0 text-xs text-secondary">
- Findings each {noun} raised in these reviews, and how many survived validation.
- </p>
- </div>
- <EffectivenessRows items={items} maxRaised={maxRaised} />
- <div className="flex items-center gap-4 text-xs text-tertiary">
- <span className="flex items-center gap-1.5">
- <span className="inline-block h-2 w-2 rounded-sm bg-success" /> Kept
- </span>
- <span className="flex items-center gap-1.5">
- <span className="inline-block h-2 w-2 rounded-sm bg-fill-highlight-100" /> Dismissed by validation
- </span>
- </div>
- </LemonCard>
- )
-}
-
-/**
- * The validator's flip side of the effectiveness cards: one bar for the whole quality bar (verdicts
- * aren't attributed to a validator skill), with dismissals as the headline — its job is filtering.
- */
-function ValidatorEffectivenessCard(): JSX.Element | null {
- const { perspectiveStats, reviewsScope } = useValues(reviewHogSettingsLogic)
- const everyone = reviewsScope === ReviewHogReviewsListScope.Everyone
-
- if (!perspectiveStats?.perspectives.length) {
- return null
- }
- const kept = perspectiveStats.perspectives.reduce((sum, p) => sum + p.kept, 0)
- const dismissed = perspectiveStats.perspectives.reduce((sum, p) => sum + p.dismissed, 0)
- const judged = kept + dismissed
- if (judged === 0) {
- return null
- }
-
- return (
- <LemonCard hoverEffect={false} className="flex flex-col gap-3 p-4">
- <div className="flex flex-col gap-1">
- <div className="flex flex-wrap items-baseline gap-x-2">
- <span className="text-xxs font-semibold uppercase tracking-wide text-tertiary">Effectiveness</span>
- <span className="ml-auto">
- <StatsWindowLabel reportCount={perspectiveStats.report_count} />
- </span>
- </div>
- <p className="m-0 text-xs text-secondary">
- Of the <span translate="no">{judged}</span> findings reviewers raised in these reviews, this is how
- much noise validation kept off pull requests.
- </p>
- </div>
- <Tooltip
- title={`${judged} judged · ${kept} kept · ${dismissed} dismissed by ${everyone ? 'validation' : 'your quality bar'}`}
- >
- {/* Unlike the reviewer cards, green here is the DISMISSED share — this card celebrates noise removed. */}
- <div className="flex items-center gap-3">
- <span className="w-44 shrink-0 truncate text-xs">
- {/* Project scope aggregates every author's active validator, not one user's bar. */}
- {everyone ? 'Validation' : 'Your quality bar'}
- </span>
- <div className="flex h-2 flex-1 items-center">
- {dismissed > 0 && (
- <div
- className="h-2 rounded-sm bg-success"
- style={{ width: `${(dismissed / judged) * 100}%` }}
- />
- )}
- {kept > 0 && (
- <div
- className="ml-0.5 h-2 rounded-sm bg-fill-highlight-100"
- style={{ width: `${(kept / judged) * 100}%` }}
- />
- )}
- </div>
- <span className="w-24 shrink-0 text-right text-xs tabular-nums text-secondary">
- <span translate="no">{`${dismissed} of ${judged} dismissed`}</span>
- </span>
- </div>
- </Tooltip>
- <div className="flex items-center gap-4 text-xs text-tertiary">
- <span className="flex items-center gap-1.5">
- <span className="inline-block h-2 w-2 rounded-sm bg-success" />{' '}
- {everyone ? 'Dismissed by validation' : 'Dismissed by your bar'}
- </span>
- <span className="flex items-center gap-1.5">
- <span className="inline-block h-2 w-2 rounded-sm bg-fill-highlight-100" /> Kept
- </span>
- </div>
- </LemonCard>
- )
-}
-
export const scene: SceneExport = {
component: CodeReviewScene,
logic: reviewHogSettingsLogic,
@@ -1266,49 +1017,25 @@ function ActivityTab(): JSX.Element {
<>
<TriggerReviewSection />
<RecentReviewsSection />
+ <PipelineSection />
</>
)
}
-const REVIEW_SKILLS_ANCHOR = 'review-hog-skills'
-
function SettingsTab(): JSX.Element {
return (
<>
- <section className="flex flex-col gap-3">
- <p className="m-0 text-sm text-secondary">
- Standard runs automatically on every push, following the rules below. Deep runs only when someone
- asks for it: the Review button, the reviewhog label, or the Inbox. No Standard review runs on a pull
- request after it had a Deep review.
- </p>
- <InstallationClaims />
- <RepositoriesPanes />
- </section>
- <FullReviewSettingsSection
- onEditSkills={() =>
- document
- .getElementById(REVIEW_SKILLS_ANCHOR)
- ?.scrollIntoView({ behavior: 'smooth', block: 'start' })
- }
- />
+ <StandardArea />
+ <DeepArea />
<InboxSection />
- <section className="flex flex-col gap-8 border-t border-primary pt-8">
- <PipelineSection />
- <div id={REVIEW_SKILLS_ANCHOR} className="flex flex-col gap-4 border-t border-primary pt-8">
- <ReviewSkillsPanel />
- <EffectivenessCard kind="perspectives" />
- <EffectivenessCard kind="blind_spots" />
- <ValidatorEffectivenessCard />
- </div>
- </section>
</>
)
}
/**
* The "Code review" scene: ReviewHog's activity and settings page, split into an Activity tab
- * (trigger a review, recent reviews) and a Settings tab (repositories and who gets automatic Flash,
- * Full review settings, Inbox, review skills).
+ * (trigger a review, recent reviews, the pipeline) and a Settings tab (the Standard area with who gets
+ * automatic reviews, the Deep area with its settings and review skills, then Inbox).
* Every control is live from load, no save step. See `reviewHogSettingsLogic` for the data flow.
* Access is gated on FEATURE_FLAGS.REVIEW_HOG, the same flag that shows the menu entry, so whoever
* discovers the entry can open the page.
@@ -1349,6 +1076,7 @@ export function CodeReviewScene(): JSX.Element {
{/* Overlays stay mounted on both tabs, so a `?review=` deep link opens on either. */}
<AdoptSkillModal />
+ <PipelineDetailModal />
<ReviewDetailDrawer />
</div>
</SceneContent>
diff --git a/products/review_hog/frontend/reviewHogSettingsLogic.test.ts b/products/review_hog/frontend/reviewHogSettingsLogic.test.ts
index 82fb8f42a96f..0a2c5ff8122f 100644
--- a/products/review_hog/frontend/reviewHogSettingsLogic.test.ts
+++ b/products/review_hog/frontend/reviewHogSettingsLogic.test.ts
@@ -301,7 +301,7 @@ describe('reviewHogSettingsLogic', () => {
})
})
- it('the scope switch rescopes the effectiveness stats along with the list', async () => {
+ it('the scope switch rescopes the effectiveness stats along with the list, never the skill counts', async () => {
// The page-level switch must move the stat cards and the reviews list together — dropping
// the stats reload from the scope listeners (or the scope param from the request) would
// show one scope's list over the other scope's numbers, the exact confusion the switch
@@ -319,8 +319,13 @@ describe('reviewHogSettingsLogic', () => {
await expectLogic(logic)
.toDispatchActions(['loadRecentReviewsSuccess', 'applyDefaultReviewsScope', 'loadRecentReviewsSuccess'])
.toFinishAllListeners()
+ // The Settings tab's skill counts read the viewer's own Deep reviews, so the Activity switch
+ // must never reload or rescope them.
+ const ownDeepLoads = statsScopes.filter((scope) => scope === 'own_deep').length
+ expect(ownDeepLoads).toBe(1)
+ const listScopes = (): (string | null)[] => statsScopes.filter((scope) => scope !== 'own_deep')
// The mount-time auto-default to Entire project already rescoped the stats.
- expect(statsScopes[statsScopes.length - 1]).toBe(ReviewHogReviewsListScope.Everyone)
+ expect(listScopes()[listScopes().length - 1]).toBe(ReviewHogReviewsListScope.Everyone)
logic.actions.setReviewsScope(ReviewHogReviewsListScope.Mine)
// Old data drops synchronously so neither the cards nor the list ever show the other
@@ -328,7 +333,8 @@ describe('reviewHogSettingsLogic', () => {
expect(logic.values.perspectiveStats).toBeNull()
expect(logic.values.recentReviews).toBeNull()
await expectLogic(logic).toDispatchActions(['loadPerspectiveStatsSuccess'])
- expect(statsScopes[statsScopes.length - 1]).toBe(ReviewHogReviewsListScope.Mine)
+ expect(listScopes()[listScopes().length - 1]).toBe(ReviewHogReviewsListScope.Mine)
+ expect(statsScopes.filter((scope) => scope === 'own_deep')).toHaveLength(ownDeepLoads)
})
it('respects an explicit scope choice even when that scope is empty', async () => {
diff --git a/products/review_hog/frontend/reviewHogSettingsLogic.ts b/products/review_hog/frontend/reviewHogSettingsLogic.ts
index 442177a99657..32e3a60e67c1 100644
--- a/products/review_hog/frontend/reviewHogSettingsLogic.ts
+++ b/products/review_hog/frontend/reviewHogSettingsLogic.ts
@@ -35,6 +35,7 @@ import type {
ReviewFindingApi,
ReviewIssuePriorityEnumApi,
ReviewPerspectiveConfigApi,
+ ReviewPerspectiveStatItemApi,
ReviewPerspectiveStatsApi,
ReviewRecentReviewApi,
ReviewRecentReviewsPageApi,
@@ -44,6 +45,7 @@ import type {
} from 'products/review_hog/frontend/generated/api.schemas'
import {
ReviewHogReviewsListScope,
+ ReviewHogReviewsPerspectiveStatsRetrieveScope,
ReviewTriggerRequestRunModeEnumApi,
} from 'products/review_hog/frontend/generated/api.schemas'
import { llmSkillsList, llmSkillsNameDuplicateCreate } from 'products/skills/frontend/generated/api'
@@ -242,6 +244,13 @@ export interface reviewHogSettingsLogicValues {
blindSpots: ReviewBlindSpotsConfigApi[] | null
blindSpotsLoading: boolean
creatingSkillKind: ReviewSkillKind | null
+ deepSkillKept: Record<string, ReviewPerspectiveStatItemApi> | null
+ deepSkillStats: ReviewPerspectiveStatsApi | null
+ deepSkillStatsLoading: boolean
+ deepValidationKept: {
+ judged: number
+ kept: number
+ } | null
expandedReviewIds: string[]
hasUserChosenReviewsScope: boolean
initialLoadFailed: boolean
@@ -340,6 +349,21 @@ export interface reviewHogSettingsLogicActions {
blindSpots: ReviewBlindSpotsConfigApi[]
payload?: any
}
+ loadDeepSkillStats: () => any
+ loadDeepSkillStatsFailure: (
+ error: string,
+ errorObject?: any
+ ) => {
+ error: string
+ errorObject?: any
+ }
+ loadDeepSkillStatsSuccess: (
+ deepSkillStats: ReviewPerspectiveStatsApi,
+ payload?: any
+ ) => {
+ deepSkillStats: ReviewPerspectiveStatsApi
+ payload?: any
+ }
loadPerspectiveStats: (_?: any) => any
loadPerspectiveStatsFailure: (
error: string,
@@ -579,6 +603,13 @@ export interface reviewHogSettingsLogicActions {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface reviewHogSettingsLogicMeta {
__keaTypeGenInternalSelectorTypes: {
+ deepSkillKept: (
+ deepSkillStats: ReviewPerspectiveStatsApi | null
+ ) => Record<string, ReviewPerspectiveStatItemApi> | null
+ deepValidationKept: (deepSkillStats: ReviewPerspectiveStatsApi | null) => {
+ judged: number
+ kept: number
+ } | null
adoptSkillGroups: (
adoptableSkills: LLMSkillListApi[] | null,
adoptSkillKind: ReviewSkillKind | null,
@@ -813,6 +844,18 @@ export const reviewHogSettingsLogic = kea<reviewHogSettingsLogicType>([
},
},
],
+ // The review skills on the Settings tab: the viewer's own last Deep reviews, whatever the
+ // Activity tab's Mine / Everyone switch says, because only the person who starts a Deep
+ // review picks its skills.
+ deepSkillStats: [
+ null as ReviewPerspectiveStatsApi | null,
+ {
+ loadDeepSkillStats: async () =>
+ await reviewHogReviewsPerspectiveStatsRetrieve(currentProjectId(), {
+ scope: ReviewHogReviewsPerspectiveStatsRetrieveScope.OwnDeep,
+ }),
+ },
+ ],
})),
reducers({
@@ -1054,6 +1097,25 @@ export const reviewHogSettingsLogic = kea<reviewHogSettingsLogicType>([
}),
selectors({
+ deepSkillKept: [
+ (s) => [s.deepSkillStats],
+ (deepSkillStats: ReviewPerspectiveStatsApi | null): Record<string, ReviewPerspectiveStatItemApi> | null =>
+ deepSkillStats
+ ? Object.fromEntries(deepSkillStats.perspectives.map((item) => [item.skill_name, item]))
+ : null,
+ ],
+ // Verdicts carry no validator name, so the active validator gets the total over every skill.
+ deepValidationKept: [
+ (s) => [s.deepSkillStats],
+ (deepSkillStats: ReviewPerspectiveStatsApi | null): { kept: number; judged: number } | null => {
+ if (!deepSkillStats) {
+ return null
+ }
+ const kept = deepSkillStats.perspectives.reduce((sum, item) => sum + item.kept, 0)
+ const dismissed = deepSkillStats.perspectives.reduce((sum, item) => sum + item.dismissed, 0)
+ return { kept, judged: kept + dismissed }
+ },
+ ],
// The adopt picker's two groups: teammates' ready-made skills of the kind (store rows with
// the kind's prefix that aren't already cards above, i.e. not canonicals or own customs),
// then every other team skill. Cross-kind review-hog skills land in the second group on
@@ -1275,6 +1337,7 @@ export const reviewHogSettingsLogic = kea<reviewHogSettingsLogicType>([
.map(([id]) => id)
if (finishedIds.length) {
actions.loadPerspectiveStats()
+ actions.loadDeepSkillStats()
if (
values.reviewDrawerOpen &&
values.openedReviewId &&
@@ -1330,6 +1393,7 @@ export const reviewHogSettingsLogic = kea<reviewHogSettingsLogicType>([
actions.loadResolutionSkills()
actions.loadRecentReviews()
actions.loadPerspectiveStats()
+ actions.loadDeepSkillStats()
},
followProjectDefault: ({ key }) => {
const projectDefaults = values.settings?.project_defaults
diff --git a/products/review_hog/frontend/settings/AreaHeader.tsx b/products/review_hog/frontend/settings/AreaHeader.tsx
new file mode 100644
index 000000000000..12290ad710ce
--- /dev/null
+++ b/products/review_hog/frontend/settings/AreaHeader.tsx
@@ -0,0 +1,19 @@
+/** The large heading that opens one area of the Settings tab, with the area's intro under it. */
+export function AreaHeader({
+ title,
+ subtitle,
+ children,
+}: {
+ title: string
+ subtitle: string
+ children: React.ReactNode
+}): JSX.Element {
+ return (
+ <header className="flex max-w-220 flex-col gap-1.5">
+ <h2 className="m-0 text-xl font-bold">
+ {title} <span className="font-normal text-secondary">· {subtitle}</span>
+ </h2>
+ {children}
+ </header>
+ )
+}
diff --git a/products/review_hog/frontend/settings/DeepArea.tsx b/products/review_hog/frontend/settings/DeepArea.tsx
new file mode 100644
index 000000000000..5f9b2ae993d9
--- /dev/null
+++ b/products/review_hog/frontend/settings/DeepArea.tsx
@@ -0,0 +1,24 @@
+import { AreaHeader } from './AreaHeader'
+import { FullReviewSettingsSection } from './FullReviewSettingsSection'
+import { ReviewSkillsPanel } from './ReviewSkillsPanel'
+
+export function DeepArea(): JSX.Element {
+ return (
+ <section className="flex flex-col gap-3 border-t border-primary pt-6">
+ <AreaHeader title="Deep" subtitle="only when someone asks">
+ <p className="m-0 text-sm">
+ Deep is a longer review for changes that need extra care: the Review button, the reviewhog label, or
+ an Inbox report assigned to you. It adds the perspectives, quality bar and threshold you pick here,
+ and can fix review comments on your branch if you turn Resolve on. It takes longer and costs several
+ times more than Standard.
+ </p>
+ <p className="m-0 text-xs text-secondary">
+ Everything in this area applies only to Deep reviews. A review someone else starts on your PR uses
+ their settings, but only your own Resolve choice can push to your branch.
+ </p>
+ </AreaHeader>
+ <FullReviewSettingsSection />
+ <ReviewSkillsPanel />
+ </section>
+ )
+}
diff --git a/products/review_hog/frontend/settings/FullReviewSettingsSection.tsx b/products/review_hog/frontend/settings/FullReviewSettingsSection.tsx
index 9faf85cdb647..e3976a2e3dbe 100644
--- a/products/review_hog/frontend/settings/FullReviewSettingsSection.tsx
+++ b/products/review_hog/frontend/settings/FullReviewSettingsSection.tsx
@@ -1,6 +1,6 @@
import { useActions, useValues } from 'kea'
-import { LemonButton, LemonSelect, LemonSwitch } from '@posthog/lemon-ui'
+import { LemonSelect, LemonSwitch } from '@posthog/lemon-ui'
import type { UrgencyThresholdEnumApi } from 'products/review_hog/frontend/generated/api.schemas'
import { reviewHogProjectSettingsLogic } from 'products/review_hog/frontend/repositories/reviewHogProjectSettingsLogic'
@@ -11,9 +11,9 @@ import { SettingRow } from './SettingRow'
import { SettingsTable } from './SettingsTable'
const THRESHOLD_OPTIONS: { value: UrgencyThresholdEnumApi; label: string }[] = [
- { value: 'consider', label: 'Consider (all)' },
- { value: 'should_fix', label: 'Should fix' },
- { value: 'must_fix', label: 'Must fix' },
+ { value: 'consider', label: 'All findings' },
+ { value: 'should_fix', label: 'Should fix and above' },
+ { value: 'must_fix', label: 'Must fix only' },
]
type OnOff = 'on' | 'off'
@@ -30,7 +30,7 @@ const ON_OFF_OPTIONS: { value: OnOff; label: string }[] = [
/**
* "Mine" offers the project value as a follow option plus every other value. The project value
* shows twice only while an own value equals it: one saved before the project value changed.
- * Picking "(project)" then clears it.
+ * Picking "Same as project" then clears it.
*/
function mineOptions<T extends string>(
options: { value: T; label: string }[],
@@ -39,12 +39,13 @@ function mineOptions<T extends string>(
): { value: T | 'project'; label: string }[] {
const projectLabel = options.find((option) => option.value === projectValue)?.label ?? projectValue
return [
- { value: 'project', label: `${projectLabel} (project)` },
+ { value: 'project', label: `Same as project (${projectLabel})` },
...options.filter((option) => option.value !== projectValue || option.value === ownValue),
]
}
-export function FullReviewSettingsSection({ onEditSkills }: { onEditSkills: () => void }): JSX.Element {
+/** The Deep review settings with a project value: Resolve, the threshold, and the celebration. */
+export function FullReviewSettingsSection(): JSX.Element {
const { settings, settingsLoading } = useValues(reviewHogSettingsLogic)
const { updateSettings, followProjectDefault } = useActions(reviewHogSettingsLogic)
const { projectSettings, editDisabledReason } = useValues(reviewHogProjectSettingsLogic)
@@ -64,10 +65,7 @@ export function FullReviewSettingsSection({ onEditSkills }: { onEditSkills: () =
: undefined
return (
- <SettingsTable
- title="Deep review settings"
- description="Deep reviews use these. Standard reads none of them. A review someone else starts on your PR uses their settings, but only your own Resolve choice can push to your branch."
- >
+ <SettingsTable>
<SettingRow
title="Resolve comments on my pull requests"
description="Applies on your PRs. After a Deep review, ReviewHog pushes fix commits to your branch. Only your own opt-in counts, whoever starts the review. Never commits while the pull request is in the merge queue or has another pull request stacked on it. Without a PostHog account behind a PR, nothing is pushed."
@@ -87,7 +85,7 @@ export function FullReviewSettingsSection({ onEditSkills }: { onEditSkills: () =
/>
<SettingRow
title="Post findings at or above"
- description="Applies to Deep reviews you start. Lower findings stay in the report on the PostHog side."
+ description="Applies to Deep reviews you start. Findings below this stay in the review report in PostHog."
project={
<LemonSelect<UrgencyThresholdEnumApi>
size="small"
@@ -151,24 +149,6 @@ export function FullReviewSettingsSection({ onEditSkills }: { onEditSkills: () =
</>
}
/>
- <SettingRow
- title="Perspectives, blind spots, validation and resolution criteria"
- description="Applies to Deep reviews you start. Resolution criteria also pick how fixes work: default, big gaps only, or small fixes only."
- project={<span className="text-xs text-secondary">Skills shared in this project</span>}
- mine={
- <>
- <YouMark shown={false} />
- <LemonButton
- size="small"
- type="secondary"
- onClick={onEditSkills}
- data-attr="review-hog-edit-skills"
- >
- Edit my skills
- </LemonButton>
- </>
- }
- />
</SettingsTable>
)
}
diff --git a/products/review_hog/frontend/settings/ReviewSkillsPanel.tsx b/products/review_hog/frontend/settings/ReviewSkillsPanel.tsx
index 0beb1cd1874b..e3c1704121f3 100644
--- a/products/review_hog/frontend/settings/ReviewSkillsPanel.tsx
+++ b/products/review_hog/frontend/settings/ReviewSkillsPanel.tsx
@@ -1,7 +1,7 @@
import { useActions, useValues } from 'kea'
import { IconPlus, IconSearch } from '@posthog/icons'
-import { LemonButton, LemonMenu, LemonSelect, LemonSkeleton, LemonTag } from '@posthog/lemon-ui'
+import { LemonButton, LemonMenu, LemonSelect, LemonSkeleton, LemonTag, Link } from '@posthog/lemon-ui'
import {
REVIEW_SKILL_KIND_LABELS,
@@ -12,7 +12,7 @@ import { prettifySkillName } from 'products/review_hog/frontend/skillNames'
import { SingleActiveSkillGroup } from './SingleActiveSkillGroup'
import { SkillGroupHeader } from './SkillGroupHeader'
-import { SkillRow } from './SkillRow'
+import { SkillKept, SkillRow } from './SkillRow'
const SKILL_KINDS: ReviewSkillKind[] = ['perspective', 'blind_spots', 'validator', 'resolution']
@@ -20,10 +20,21 @@ function capitalize(text: string): string {
return text.charAt(0).toUpperCase() + text.slice(1)
}
-/** The viewer's review skills for the Deep reviews they start, always open. */
+/**
+ * The viewer's review skills for the Deep reviews they start, always open. Kept counts come from the
+ * viewer's own last Deep reviews, never from the Activity tab's Mine / Everyone switch.
+ */
export function ReviewSkillsPanel(): JSX.Element {
- const { perspectives, blindSpots, validators, resolutionSkills, savingSkillNames, creatingSkillKind } =
- useValues(reviewHogSettingsLogic)
+ const {
+ perspectives,
+ blindSpots,
+ validators,
+ resolutionSkills,
+ deepSkillKept,
+ deepValidationKept,
+ savingSkillNames,
+ creatingSkillKind,
+ } = useValues(reviewHogSettingsLogic)
const {
togglePerspective,
selectBlindSpots,
@@ -31,9 +42,14 @@ export function ReviewSkillsPanel(): JSX.Element {
selectResolutionSkill,
startSkillAuthorTask,
openAdoptSkillModal,
+ openPipelineDetail,
} = useActions(reviewHogSettingsLogic)
+ const keptFor = (skillName: string): SkillKept | null => deepSkillKept?.[skillName] ?? null
const enabledCount = perspectives?.filter((perspective) => perspective.enabled).length ?? 0
+ const validationKept: SkillKept | null = deepValidationKept
+ ? { kept: deepValidationKept.kept, raised: deepValidationKept.judged }
+ : null
return (
<section className="@container flex flex-col overflow-hidden rounded border border-primary bg-surface-primary">
@@ -50,6 +66,7 @@ export function ReviewSkillsPanel(): JSX.Element {
and reads none of these. Switch a skill on or off for the Deep reviews you start.
</p>
</div>
+ <span className="text-xs text-secondary">Kept counts: your last 10 Deep reviews</span>
</header>
<div className="hidden grid-cols-[minmax(0,1fr)_minmax(0,16rem)] gap-3 border-t border-primary px-4 py-1.5 text-xxs font-semibold uppercase tracking-wide text-secondary @min-[48rem]:grid">
<span>Skill</span>
@@ -70,6 +87,7 @@ export function ReviewSkillsPanel(): JSX.Element {
key={perspective.skill_name}
skillName={perspective.skill_name}
description={perspective.description}
+ kept={deepSkillKept === null ? undefined : keptFor(perspective.skill_name)}
mine={
<LemonSelect<'on' | 'off'>
size="small"
@@ -97,12 +115,14 @@ export function ReviewSkillsPanel(): JSX.Element {
<SingleActiveSkillGroup
title="Blind-spot check"
skills={blindSpots}
+ keptFor={deepSkillKept === null ? undefined : keptFor}
onSelect={selectBlindSpots}
dataAttr="review-hog-blind-spots-mine"
/>
<SingleActiveSkillGroup
title="Validation criteria"
skills={validators}
+ keptFor={deepSkillKept === null ? undefined : () => validationKept}
onSelect={selectValidator}
dataAttr="review-hog-validator-mine"
/>
@@ -142,6 +162,13 @@ export function ReviewSkillsPanel(): JSX.Element {
Use an existing skill
</LemonButton>
</LemonMenu>
+ <span className="text-xs text-secondary">
+ How the pipeline uses skills:{' '}
+ <Link onClick={() => openPipelineDetail()} data-attr="review-hog-skills-pipeline-detail">
+ Activity › Detailed view
+ </Link>
+ .
+ </span>
</footer>
</section>
)
diff --git a/products/review_hog/frontend/settings/SettingsTable.tsx b/products/review_hog/frontend/settings/SettingsTable.tsx
index 19ac1895248b..fe458458cd01 100644
--- a/products/review_hog/frontend/settings/SettingsTable.tsx
+++ b/products/review_hog/frontend/settings/SettingsTable.tsx
@@ -1,20 +1,22 @@
-/** A titled table of settings rows with the Setting / Project / Mine column header. */
+/** A table of settings rows with the Setting / Project / Mine column header, and an optional title. */
export function SettingsTable({
title,
description,
children,
}: {
- title: string
- description: string
+ title?: string
+ description?: string
children: React.ReactNode
}): JSX.Element {
return (
<section className="@container overflow-hidden rounded border border-primary bg-surface-primary">
- <header className="flex flex-col gap-0.5 px-4 py-3">
- <h3 className="m-0 text-base font-semibold">{title}</h3>
- <p className="m-0 text-xs text-secondary">{description}</p>
- </header>
- <div className="hidden grid-cols-[minmax(0,1fr)_minmax(0,14rem)_minmax(0,16rem)] gap-3 border-t border-primary px-4 py-1.5 text-xxs font-semibold uppercase tracking-wide text-secondary @min-[48rem]:grid">
+ {title && (
+ <header className="flex flex-col gap-0.5 border-b border-primary px-4 py-3">
+ <h3 className="m-0 text-base font-semibold">{title}</h3>
+ {description && <p className="m-0 text-xs text-secondary">{description}</p>}
+ </header>
+ )}
+ <div className="hidden grid-cols-[minmax(0,1fr)_minmax(0,14rem)_minmax(0,16rem)] gap-3 px-4 py-1.5 text-xxs font-semibold uppercase tracking-wide text-secondary @min-[48rem]:grid">
<span>Setting</span>
<span>Project</span>
<span>Mine</span>
diff --git a/products/review_hog/frontend/settings/SingleActiveSkillGroup.tsx b/products/review_hog/frontend/settings/SingleActiveSkillGroup.tsx
index 2cf4dca9b2ed..13ec2423960e 100644
--- a/products/review_hog/frontend/settings/SingleActiveSkillGroup.tsx
+++ b/products/review_hog/frontend/settings/SingleActiveSkillGroup.tsx
@@ -6,7 +6,7 @@ import { reviewHogSettingsLogic } from 'products/review_hog/frontend/reviewHogSe
import { prettifySkillName } from 'products/review_hog/frontend/skillNames'
import { SkillGroupHeader } from './SkillGroupHeader'
-import { SkillRow } from './SkillRow'
+import { SkillKept, SkillRow } from './SkillRow'
interface SingleActiveSkill {
skill_name: string
@@ -19,12 +19,15 @@ export function SingleActiveSkillGroup({
title,
note,
skills,
+ keptFor,
onSelect,
dataAttr,
}: {
title: string
note?: string
skills: SingleActiveSkill[] | null
+ /** Undefined hides the kept count, for skills that raise no findings of their own. */
+ keptFor?: (skillName: string) => SkillKept | null
onSelect: (skillName: string) => void
dataAttr: string
}): JSX.Element {
@@ -66,7 +69,12 @@ export function SingleActiveSkillGroup({
{select}
</div>
) : (
- <SkillRow skillName={active.skill_name} description={active.description} mine={select} />
+ <SkillRow
+ skillName={active.skill_name}
+ description={active.description}
+ kept={keptFor ? keptFor(active.skill_name) : undefined}
+ mine={select}
+ />
)}
</>
)
diff --git a/products/review_hog/frontend/settings/SkillRow.tsx b/products/review_hog/frontend/settings/SkillRow.tsx
index 80ec1dd57ef3..e5c43e173dca 100644
--- a/products/review_hog/frontend/settings/SkillRow.tsx
+++ b/products/review_hog/frontend/settings/SkillRow.tsx
@@ -5,14 +5,41 @@ import { urls } from 'scenes/urls'
import { prettifySkillName } from 'products/review_hog/frontend/skillNames'
-/** One review skill: its name, what it does, and the viewer's control for it. */
+/** "kept" of "raised" findings, or null when the skill has no findings in the viewer's last Deep reviews. */
+export interface SkillKept {
+ kept: number
+ raised: number
+}
+
+function KeptCount({ kept }: { kept: SkillKept | null }): JSX.Element {
+ if (kept === null || kept.raised === 0) {
+ return <span className="text-xs text-secondary">No findings in your last 10</span>
+ }
+ return (
+ <span className="flex items-center gap-2 text-xs text-secondary">
+ <span className="flex h-1.5 w-16 overflow-hidden rounded-sm bg-fill-highlight-100" aria-hidden>
+ <span className="h-full bg-success" style={{ width: `${(kept.kept / kept.raised) * 100}%` }} />
+ </span>
+ <span className="tabular-nums">
+ <span className="font-semibold text-default">{`${kept.kept} of ${kept.raised}`}</span> findings kept
+ </span>
+ </span>
+ )
+}
+
+/**
+ * One review skill: its name, what it does, what it kept in the viewer's own last Deep reviews, and
+ * the viewer's control for it. `kept` undefined hides the count, for skills that raise no findings.
+ */
export function SkillRow({
skillName,
description,
+ kept,
mine,
}: {
skillName: string
description: string
+ kept?: SkillKept | null
mine: JSX.Element
}): JSX.Element {
return (
@@ -21,6 +48,7 @@ export function SkillRow({
<span className="text-sm font-semibold">{prettifySkillName(skillName)}</span>
<span className="text-xs text-secondary">{description}</span>
<div className="flex flex-wrap items-center gap-x-3 gap-y-1">
+ {kept !== undefined && <KeptCount kept={kept} />}
<Link
to={urls.skill(skillName)}
target="_blank"
diff --git a/products/review_hog/frontend/settings/StandardArea.tsx b/products/review_hog/frontend/settings/StandardArea.tsx
new file mode 100644
index 000000000000..64c7c5c5f7de
--- /dev/null
+++ b/products/review_hog/frontend/settings/StandardArea.tsx
@@ -0,0 +1,23 @@
+import { InstallationClaims } from 'products/review_hog/frontend/repositories/InstallationClaims'
+import { RepositoriesPanes } from 'products/review_hog/frontend/repositories/RepositoriesPanes'
+
+import { AreaHeader } from './AreaHeader'
+
+// The Standard wording is still under test, so it lives in one place to swap.
+const STANDARD_DEFINITION =
+ 'Standard runs automatically on every push. The same set of reviewers reads the whole change and comments with issues for you to fix. It never pushes to your branch and has no settings of its own.'
+
+export function StandardArea(): JSX.Element {
+ return (
+ <section className="flex flex-col gap-3">
+ <AreaHeader title="Standard" subtitle="who gets automatic reviews">
+ <p className="m-0 text-sm">
+ {STANDARD_DEFINITION} The rules below decide who gets it. No automatic review runs on a pull request
+ after it had a Deep review.
+ </p>
+ </AreaHeader>
+ <InstallationClaims />
+ <RepositoriesPanes />
+ </section>
+ )
+}