: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(inbox): add a dedicated sources tab (#124917)
Georgiy Tarasov3f5252c0460e
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 63c7188a813c..43e8fd4db2c2 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -12407,13 +12407,13 @@ snapshots:scenes-app-inbox-reportsourcesuggestion--logs--light:hash: v1.k794b7964.d5d1040cc778c947be775229c9b6158b5f836a533ed705da42df816071be1cdb.BhUT6qPcyyC9BegwxP3rKg3OcahAzfe1WffSJEOcd-sscenes-app-inbox-scene--empty--dark:- hash: v1.k794b7964.84ca5122b26e214bb2ea40b015f0bf55afd75cd6abec7e6d6cfe00de3b5ad8ea._GlqfH7tjBLXdxhchkhBD2clKmbEeDZULIdtixR_jFs+ hash: v1.k794b7964.fded9097d3e099bf6e86fcf360238d1363919389631880b8affc13c5e04c0e89.QP7E0u21YBfciOIAZABsp7BavUezL4XPTG6QBI0Q_e4scenes-app-inbox-scene--empty--light:- hash: v1.k794b7964.4cee88bf59c8c1b370ff46b4736e633840efa59c3838ffc2786cb93de6dbd243.W6FHb5RbypUEu_iic0_kjWiIn_nGVrGkrPBnMHmHAVk+ hash: v1.k794b7964.7f7ed546b5109366a4d0682df167f929eae747aaaf91cc7c2e734ea461903085.qK6mjdn6wzbIGiVz0DOc8snh3VnrWaO4_e-JS6O2CJAscenes-app-inbox-scene--empty-with-many-scouts--dark:- hash: v1.k794b7964.f317ce431f7683d0d3f243cce6a7431ccaace370e74c3d25c93339c00c9bad63.yDLBiHj337vJez3JG8kG__Fg6XNWkVyA8tGu9nPtn-I+ hash: v1.k794b7964.579bcc0e90bf409f71ead99910efbfa277f1197a5979a2893bb7d97818910655.r0jZhZTBwtQdzMHsQrTftEVwoI1KugogKRosQwO6an4scenes-app-inbox-scene--empty-with-many-scouts--light:- hash: v1.k794b7964.facecddc48f471398f32d48fed8287b91573105ddd2d2ce2adc18eaf649900e7.QVbf6XPS8aj7-Jrj-3T_o1fu7tZNl8ZCJqGw3yRl8Qw+ hash: v1.k794b7964.87922040826b927dae5d729020606fee2eb1b5e29c5b7e4b0e7c54881aa848f3.pjah0UU2pIMWKFsGjP0WBB5gXl0Vm27l9YPhas5KBxoscenes-app-inbox-scene--guided-onboarding-complete--dark:hash: v1.k794b7964.e6ecff68e551584f79fb2c0d24eaebdcc275f767663926734615d2301b57573b.ALsNaySutBbqP12IB12j3QWRIV3sQMLFxydymlSn40Uscenes-app-inbox-scene--guided-onboarding-complete--light:@@ -12423,9 +12423,9 @@ snapshots:scenes-app-inbox-scene--inbox--light:hash: v1.k794b7964.fa8e2cba7a0bae415b68b52e20fb1303df86873f478f04d4086e45d20000a947.oPApPbPc0gKHqS7Z7aeK0c5HomzhJTcUBdS9cslrTkUscenes-app-inbox-scene--installing-self-driving--dark:- hash: v1.k794b7964.9c63d0aec1e590c399c59a6d974d4c57c2aaba654944bc18065c43212ea67c20.Vcq4DkgtGa7JtssCwGJMnDbhspFmWkFUrEyZpBbhEII+ hash: v1.k794b7964.87993d57d709740d7f2d07aab031d9d421a2ac681304304df9e9aa7255db1d0d.1m4cewpnnNSjXa2oQklmImshZCzSyXNBSqeSSYypEvAscenes-app-inbox-scene--installing-self-driving--light:- hash: v1.k794b7964.8cfc123fae6e14b526a3c202050d2fe9cff47791f417466200c09887b9436143.ytlk3NbkM2J2hBovwE71l84_kmeMQqQAb6WwuSQ9uKU+ hash: v1.k794b7964.2f358bdbbf369097bae081b8bc5074763022565c93eb5068ee8c888fe489fed8.ayg_LGB-jgj29UyNem5VJZcujteNYY1R7Y-BWGMFBJcscenes-app-inbox-scene--report-with-many-evidence-items--dark:hash: v1.k794b7964.87b4023d1181af0c9f5d86706035c57b717b85fe9cefaa264eccbc7d63937c2a.Fc7NrUn6tbhkkGPOhgnqH55HuLQgVJfyEQjfMR_hWSkscenes-app-inbox-scene--report-with-many-evidence-items--light:@@ -12455,9 +12455,9 @@ snapshots:scenes-app-inbox-scene--self-driving-verdict-pending--light:hash: v1.k794b7964.96cdbec6c78e8daedb06be4a0134093efcd5838af69e6e7d1722a3892cf561b5.iJ2K0zNhOVgGAPY6JvduyhDBODMwk-CN7_mAdB8scOgscenes-app-inbox-scene--settings--dark:- hash: v1.k794b7964.29c22df959c46eea8ed7aca17ae08ed2baa06434debacc36dbc8fde60463a546.5tR2C3x_gzXCnAXzxIV0bVzkIZ3SCAKy7ZoVCWvINR0+ hash: v1.k794b7964.ba567cdfc6668f7a66217fc8da3c6faacea2a6e4c2e37986d35a86836a26b1f3.XazbMGtvFuUWHEdboMaSAp-s17euAesrh6MsHEWKnssscenes-app-inbox-scene--settings--light:- hash: v1.k794b7964.d1bc08b77d8d3d6c1a9c199ddf804dbed27ed4a41ffb6acac1510c1215f1ab02.0jNsBlhNTXyiOP7lSAxBBLBsEF3vzoXQl71PHtEr1o0+ hash: v1.k794b7964.28302953284a52a8528b3d1efcb4f2ad18810c5ce2e49b1ed3fd7e5ab47b96af.soB1jj05zglX_rXQ45t0UioivW6Ezm05GH9AtT5j7vQscenes-app-inbox-scene--triage--dark:hash: v1.k794b7964.77e43b36fdcd81befecf4de80e489050f525840924ec6ddef37c23a9179dbe8a.B3qkZFYBncFaPn2EBg4cBoYu_LIwW29imNwBdLXF5eoscenes-app-inbox-scene--triage--light:@@ -13046,58 +13046,6 @@ snapshots:hash: v1.k794b7964.86cf1ef2dc85a65910993d0a47c6cf055b6efb70ea81a4cf665dce88d0b0c140.0xM3XH8z7CJ32sAKvZ_xUnBEyuGf4eBf1SG2-SplZ5Ascenes-app-inbox-signal-cards--ticket-without-number--light:hash: v1.k794b7964.015ae3204d23d033c3a0b131e352122cbc3cfa019f66f8f230f059b100f8f2cc.ZMT3pKT2QFcOr116n_hOXdGWTMc0uwzvvfj8DVcWurM- scenes-app-inbox-signalsourcespanel--armed-but-products-off--dark:- hash: v1.k794b7964.3fca5271769b28e9dd438daea15374c0eaeb48fb0c410837abe14cd49405113c.AQNxOcFjiI12qmNuT8XFUa8lLcDw-0M90ek6Yfrq0nA- scenes-app-inbox-signalsourcespanel--armed-but-products-off--light:- hash: v1.k794b7964.9e0c4247b06eb6f81795eebf17fabcf97eb6a43de695fa832a06a14b08ddfd36.0IpgpcQMhel6LYGGrgvzzphI-_0LbilwfvFOHwjRE5Q- scenes-app-inbox-signalsourcespanel--arming-blocked--dark:- hash: v1.k794b7964.27bdcfc55aeed00e5e9897f803173dd5e400774320ec1af848c1c3c795c3189b.RP0oJQScotluRcqlgjHQGuKCD6mT21sCrxsbWnZu4Lo- scenes-app-inbox-signalsourcespanel--arming-blocked--light:- hash: v1.k794b7964.784faabfcb8007037d6799b7d2dae91943fef74763ad810ff71befff7ff6bf48.D5eqByskPTPE8q2iVo2Z8ACgAMqzstlgfGsstwAVrvU- scenes-app-inbox-signalsourcespanel--error-tracking-expanded--dark:- hash: v1.k794b7964.a0839fa0fb26c8a0581dd68ca484bc8643e2af6114da7e07347868739ed52f21.AdN3N9h810sVQw-h-zf3ro4Yhn8HDX88vQ68aRyfEhk- scenes-app-inbox-signalsourcespanel--error-tracking-expanded--light:- hash: v1.k794b7964.44fae06ba16b10327c6d038a633dda3127bbb7ba118e81890b98333b04789059.GM1N_dUTzLnkvJVZJ4ClWPavvzaPb104BOLC38GFVcY- scenes-app-inbox-signalsourcespanel--event-definitions-unavailable--dark:- hash: v1.k794b7964.13e6f7e5b4951e8ecf59eda646bca88f6754cf74c03618a61f762838c78ee377.J1WX3OFzITVT4oMxD5ZwQ9EBfjiEff2KsbGwDt6NaQQ- scenes-app-inbox-signalsourcespanel--event-definitions-unavailable--light:- hash: v1.k794b7964.738f49cf8a3fbde67ad7a5a778f00a5eb5b0f31c7d16b5bc8ba4ec0e69aa6aaa.mWWVP3af5YfB9iD6YYbaZBz5Tl2s6iDT_ovanI9Rft4- scenes-app-inbox-signalsourcespanel--everything-healthy--dark:- hash: v1.k794b7964.721e76e08aea0742286b822d3a5946bcc6f79f18325ad8fd34d4cdd76b837512.Np9JRKRWMTLZVNT7QCug-DxEeyQxk7SZJyrSKF6Yv5A- scenes-app-inbox-signalsourcespanel--everything-healthy--light:- hash: v1.k794b7964.b0173ec379ef4ae25fb5b7e76cc71e902226b924f7c32aeb310f4bf9b5a22eed.qrMcTRSwE1vZ2WHdNxcWTPROEQ4_VvbsDGGYZmoWBaY- scenes-app-inbox-signalsourcespanel--external-sources-connected--dark:- hash: v1.k794b7964.5ba434ed18fab56f3a359137663e711abd9bf381430a4f0ad89787b2eddaa4b4.MQrcKwjwMM2lT9ipaepSWS0vAZV011-oVWkmiJMknmY- scenes-app-inbox-signalsourcespanel--external-sources-connected--light:- hash: v1.k794b7964.a926c58ef67a5e74ed94130ad3f601746fa833b02766286836f20dacbba393ab.dAtaLvOklsZDoZ2TCDeqoISYFhCQS9bOCKxZmhPaIoI- scenes-app-inbox-signalsourcespanel--playground--dark:- hash: v1.k794b7964.bf110bfc524865eeca246465b9d77b2c459ef174adc30467846eb4da336e7d34.7c-aS8AlUPb7I6Kl0UZUMyTLlHb6RCAApiFNs0Hm2y4- scenes-app-inbox-signalsourcespanel--playground--light:- hash: v1.k794b7964.94f72a200e5f1bb4473a4898e797cb9204c09312c013115b4b9a6b0a26963c84.5SaEJhSjL_XmMORB0BEOCv8Ev0-agnQ4ihWFkkri9zk- scenes-app-inbox-signalsourcespanel--products-on-no-recent-data--dark:- hash: v1.k794b7964.52659244c3ef80d5c33a16a7d65e8421905f58de01727344317bb30229db837d.7AFDHv1nJGkdXqIf0nYNdAflka5_U70A91xEtoIVqgY- scenes-app-inbox-signalsourcespanel--products-on-no-recent-data--light:- hash: v1.k794b7964.72cbd2e313fc35be228cc8d59c35a8523ddec78d5aee442ef81acfd9204e88b5.CZwszynRpltH9_1D-WNG352VoCdEI4NG-XDL0HGp6WM- scenes-app-inbox-signalsourcespanel--replay-vision-expanded--dark:- hash: v1.k794b7964.ba0d4a995c904ca03cbb6dad663d6ba1e2abd4095b1a1f836d58fd75794e6fb0.KGmccMtnWXoZRmpecPVaEkIx0tPzenYRz6Il3KoJiQ8- scenes-app-inbox-signalsourcespanel--replay-vision-expanded--light:- hash: v1.k794b7964.02fe2dffc5449a718f2c1c42e1e8e6a4abd22794e26e62097843ebc115603646.8NKMbqb5bpr-AFMdyC-kc9IsJVZIN32FuH8fYXN25lA- scenes-app-inbox-signalsourcespanel--server-side-exceptions-only--dark:- hash: v1.k794b7964.bf110bfc524865eeca246465b9d77b2c459ef174adc30467846eb4da336e7d34.ZW_phUEs0NjXeJs57usDCZmho0FEu_uiUPmP9bxD1Jw- scenes-app-inbox-signalsourcespanel--server-side-exceptions-only--light:- hash: v1.k794b7964.94f72a200e5f1bb4473a4898e797cb9204c09312c013115b4b9a6b0a26963c84.h3aFSiKjy360WInAdpsftUNOxF9T_IFbYEyYslw0-Os- scenes-app-inbox-signalsourcespanel--source-catalog-connect-step--dark:- hash: v1.k794b7964.be0afcd2c78ebbcf5e9be1936f2afa60b104a521c37673792d7b1c2763c70eeb.9D-GQZ4BdzLnqkH-sfZqQjBQoleqJM4dhL1lgafAFnI- scenes-app-inbox-signalsourcespanel--source-catalog-connect-step--light:- hash: v1.k794b7964.306fb23c439334374b9ceae47f242edb0ba2cbf9313d255a6f0aac54fd038d16.829n9nWezXS75jPieMDpWOhWmkDuY5xq5I0OD4Mu5zA- scenes-app-inbox-signalsourcespanel--source-catalog-open--dark:- hash: v1.k794b7964.d1d1e6dbe2886ca6037e5032a3780c55d61203dedcde9a44bbc11c4392950183.ihA8W1Qd1GI4ohhlCSj5l4A4VqJsFbX61YGrQ4OLYg8- scenes-app-inbox-signalsourcespanel--source-catalog-open--light:- hash: v1.k794b7964.bf996b3d2892dc12ba820755e9fe066b738c4d96e6798d2245d81f2315957dc6.pNG6fgQY111Rnk_v-OcFz3UDQlo2s0geEXlWi2B5WKI- scenes-app-inbox-signalsourcespanel--source-configs-unavailable--dark:- hash: v1.k794b7964.db9d51d553a1b00cc491773f3eb1f200e8aed4c380649d5bf536ff424ab97d2d.SQ7oPEEK3Ndguww2v2PCgeBbURlHxtKheOjR0BQs_us- scenes-app-inbox-signalsourcespanel--source-configs-unavailable--light:- hash: v1.k794b7964.2c21e1c09151d0120c47387c405b130974fc7748614f5a6133953af502e6ffca.ASXnJaUcEqHGXTiflpitXSGM3P_CLT9cberwhmxnwlIscenes-app-inbox-slacknotificationssection--awaiting-target--dark:hash: v1.k794b7964.45b41fad1dd8b6146ff7465279bf86d9e32f5447d189a1c54f687a6d729ee1fc._HO_rqQTGcO42B-T57VXA3yJ8kNYSWXBP-VFz8iS690scenes-app-inbox-slacknotificationssection--awaiting-target--light:@@ -13122,6 +13070,58 @@ snapshots:hash: v1.k794b7964.6173461f72446f5c10eee14ecff6d2d1edfa157c29367c42ad0c181adf04f9e9.j7Kxo_30J_EWfGh3V89KDVcnFZfhgwORiwr_NSX4EN8scenes-app-inbox-slacknotificationssection--personal-channel--light:hash: v1.k794b7964.783c27989b223374df09dfed998a78ee30bc2445c5a5ce0eef388a433a4b4786.UGZTvAY_0az3KoRIdJDcLL5z8G-CO3UBroXkEs8Lu4I+ scenes-app-inbox-sourcestab--armed-but-products-off--dark:+ hash: v1.k794b7964.000e4d6cf6edac837a1aeecd7bbf1285d8cea1bd9ff4972080bba37b78eb8630.HTUQKR1qp3Fgx0-IjEc7e5EjbjNTaNjs-ShMoENOFdo+ scenes-app-inbox-sourcestab--armed-but-products-off--light:+ hash: v1.k794b7964.18439dbbcde183f48485108e0ee049242cc48a172710c196600073ec4e3afc23.3Jn7O8TxqtIACYi9yOBguzCsFI9uuzzGFScZkq7Ms8U+ scenes-app-inbox-sourcestab--arming-blocked--dark:+ hash: v1.k794b7964.20f5353d8bd7888470662a0f921718647aa02277e6b19e60c65dbe28e1831317.uMXIBw5SKBOWzJhPMarRK-3TUkDN3RuJ6p69deZT_-I+ scenes-app-inbox-sourcestab--arming-blocked--light:+ hash: v1.k794b7964.86f5ffbb2371f2f7e6f3030e155bab82d5edaf7e066433069796037e88e65806.WtrvfT6_GPJWNxI00B47-UZL1AIRcCF2Vrhr7wUZsjM+ scenes-app-inbox-sourcestab--error-tracking-expanded--dark:+ hash: v1.k794b7964.ef1b9b471a63b79122e6fb5c3ce5e123923ef9c1c5e4602070e2149be6441ab3.Yy5rf3G0M2f_I8Qq6QkcDmHxvlrLy_D6qLaTgLkFQ7E+ scenes-app-inbox-sourcestab--error-tracking-expanded--light:+ hash: v1.k794b7964.02eba09035a81826f0a9eb14b32d7b00f63853efd92494f7f2e73b6e673e2a68.dm0lPVcYf2k-tjp_2iYazUIEQxn74LxjuLEcCpuQm2Q+ scenes-app-inbox-sourcestab--event-definitions-unavailable--dark:+ hash: v1.k794b7964.658c4cf1b9ce6ed5d0493edd1224f571fc4ecfb3bf996233c4d9e6a7ad7288e2.X3MVXi8ZpevEKr_JW7MhrH79flGRy_XstZeAWKqPqCg+ scenes-app-inbox-sourcestab--event-definitions-unavailable--light:+ hash: v1.k794b7964.e13b14609be561ec031aa964b9757f65347573f0a775d0d80be722c8016858d4.I_tD2H_9agMz4Q1U5Bv0HQXaG7Xt1TC0bZo83Ht9rWM+ scenes-app-inbox-sourcestab--everything-healthy--dark:+ hash: v1.k794b7964.46e0ed022dfd1f5fb1a4c3779d3039c568157edab5626d501e28cd37f38a04de.ucXZm9IuDRdOKhGSEWHNHsav586qR7_EE9ldIJIBuAk+ scenes-app-inbox-sourcestab--everything-healthy--light:+ hash: v1.k794b7964.d507005d74f1e8227aa7d667d4efc79a5e4c61a130c4b0605eb5ddd5a259feba.I1h5J2cqozjzM_4HD3-Tg2RTG0_KaLxJACbVCVpfF5A+ scenes-app-inbox-sourcestab--external-sources-connected--dark:+ hash: v1.k794b7964.00dc7961ea6faf4ca3d26aa7016e7cb18974e8fc3e5526bfdf1690dc0168f07c.tycz6XGb_Fyo09GFPV0VqvZep_d2r1vofJfNHyTmxlA+ scenes-app-inbox-sourcestab--external-sources-connected--light:+ hash: v1.k794b7964.19605ed5e4f867bd7a8d42fe59e6a6a69e48df43d0611542e25d64c94358b5f6.PcIOfly9xIGfrpMdT1_aHSRRGciJ-rYpqv3vYrjQpQE+ scenes-app-inbox-sourcestab--playground--dark:+ hash: v1.k794b7964.b9f61fc3352fc01d9a568d90a1813a847a6b81809b6c8d12f185be96910228d2.OmeUTqZaX36J6OTiUfgbFV60a0VJECMHeLELQ0CO2e8+ scenes-app-inbox-sourcestab--playground--light:+ hash: v1.k794b7964.51e6677f69f405814a3f4e22804cef59fc1b92e0988aa9cba776be9df33688e7.hB3oKoj2x1M718VPH_1HQasMch_-7C_BAYgxWSDvM6w+ scenes-app-inbox-sourcestab--products-on-no-recent-data--dark:+ hash: v1.k794b7964.c5c9f989ccc928ad4766f8cf61282ead128064cc8830df269c3c8deba14e1d7e.AKv3LkTkB6U_3uM_k8JOChdd_f3BZT0jj1b_uv0wrHg+ scenes-app-inbox-sourcestab--products-on-no-recent-data--light:+ hash: v1.k794b7964.807a5c25d77c8ac1e728c6979c0491efe1e931f12b1a7bed548c30a4b077c224.5NI1okVMDA_FLcVlyV6fz-E165FRBQBS93-v5aMLVnc+ scenes-app-inbox-sourcestab--replay-vision-expanded--dark:+ hash: v1.k794b7964.c8ef0f87f57e4934968997c38da2aadc9786e7a0473737f8b0da4ac5b964265c.z5nwW-tC-IeNT3GLy8ZIXwnq7tbz-fvXIj793gF7sOE+ scenes-app-inbox-sourcestab--replay-vision-expanded--light:+ hash: v1.k794b7964.9576d0a61db416e5d9da4b3b623a06e97ef3723b1c4cffe1579a5e5da4d7b267.N0yTV866MSiQW7-oMOhg_SJfor7Lj5NGp92mguVD5HI+ scenes-app-inbox-sourcestab--server-side-exceptions-only--dark:+ hash: v1.k794b7964.b9f61fc3352fc01d9a568d90a1813a847a6b81809b6c8d12f185be96910228d2.4zTLBIS-aNQbZ6u-GDn0J3Lpc72amAaFyU8uQQGs29Y+ scenes-app-inbox-sourcestab--server-side-exceptions-only--light:+ hash: v1.k794b7964.51e6677f69f405814a3f4e22804cef59fc1b92e0988aa9cba776be9df33688e7.-pLO4X_frif9p--_HpH0RJrn_gnKYqzz0Qx5RwGG1sc+ scenes-app-inbox-sourcestab--source-catalog-filtered--dark:+ hash: v1.k794b7964.45347c276905a8d837a356c76ca28e7686bda2ada7ee740c9369da4d68326472.KjbvaDDTE6w7SFL-oRyLRKXqJCgxVCDqaRgzvpTolzI+ scenes-app-inbox-sourcestab--source-catalog-filtered--light:+ hash: v1.k794b7964.2364d840515290f02e8fe820159005b414a0a192dac84a609b79309c50881ada.cd84bs5e_Xo39-IKEgTQsqN3G8G2-JRaaUd2joBB9Mw+ scenes-app-inbox-sourcestab--source-configs-unavailable--dark:+ hash: v1.k794b7964.1852f74c62cdae46c8896ad30cef540596197873bcb8b54259dfc2965da51211.BKLi6L_SfKFXSYp_B2tgv9ZaD_xnGqiYgORhY5Ejylk+ scenes-app-inbox-sourcestab--source-configs-unavailable--light:+ hash: v1.k794b7964.0c4d55cae1897ba3807e6e6f5524833c6fa2ee10063674d63c62ca9e50b8be4d.4X2gyXTAjMgE-Xf0YPz9SbxnUkvN7kL2dM3-IQvOPQQ+ scenes-app-inbox-sourcestab--source-connection-form--dark:+ hash: v1.k794b7964.dadd6bf3a384aceec6a49b7806b8b9387784ab483a640c5b9cf802df57a45ec8.AgCaX9pjfLxXeG9c99OuqCzviUsqlYsB0FEA4Re1aPs+ scenes-app-inbox-sourcestab--source-connection-form--light:+ hash: v1.k794b7964.ecc114d6ccfc9212d3d377b551d3b84243ff7f8ede7fe463e8f22ba9ca906fcf.CvlH9FmwIj1xfC5a98WsCiwCsqO5CflourZdpvKnjCgscenes-app-inbox-sourcesteeringmodal--legacy-posture--dark:hash: v1.k794b7964.d8a52379e95bb0cabff2ab1ad8a4620d0f3ac91394cc057577f9a5c69cafb4d2.H8ZYcq__eOG2AMAmV26hDVqVtTuDsPY5dzZN1CkuwQkscenes-app-inbox-sourcesteeringmodal--legacy-posture--light:diff --git a/frontend/src/products.tsx b/frontend/src/products.tsxindex 7808b77d5bdd..6425e64cefb5 100644--- a/frontend/src/products.tsx+++ b/frontend/src/products.tsx@@ -2872,10 +2872,12 @@ export const getTreeItemsProducts = (): FileSystemImport[] => [category: ProductItemCategory.TOOLS,iconType: 'inbox' as FileSystemIconType,href: urls.inbox(),- searchKeywords: ['signals', 'triage', 'findings'],+ searchKeywords: ['signals', 'sources', 'triage', 'findings'],searchTabs: [{ name: 'Reports', href: urls.inbox('reports') },{ name: 'Scouts', href: urls.inbox('scouts') },+ { name: 'Sources', href: urls.inbox('sources') },+ { name: 'Settings', href: urls.inbox('settings') },],flag: FEATURE_FLAGS.PRODUCT_AUTONOMY,tags: ['beta'],diff --git a/products/inbox/manifest.tsx b/products/inbox/manifest.tsxindex bb3f60349bd6..4c8b52595dec 100644--- a/products/inbox/manifest.tsx+++ b/products/inbox/manifest.tsx@@ -19,10 +19,12 @@ export const manifest: ProductManifest = {category: ProductItemCategory.TOOLS,iconType: 'inbox' as FileSystemIconType,href: urls.inbox(),- searchKeywords: ['signals', 'triage', 'findings'],+ searchKeywords: ['signals', 'sources', 'triage', 'findings'],searchTabs: [{ name: 'Reports', href: urls.inbox('reports') },{ name: 'Scouts', href: urls.inbox('scouts') },+ { name: 'Sources', href: urls.inbox('sources') },+ { name: 'Settings', href: urls.inbox('settings') },],flag: FEATURE_FLAGS.PRODUCT_AUTONOMY,tags: ['beta'],diff --git a/products/signals/frontend/inbox/InboxScene.stories.tsx b/products/signals/frontend/inbox/InboxScene.stories.tsxindex 06bd30200056..947a96b2582a 100644--- a/products/signals/frontend/inbox/InboxScene.stories.tsx+++ b/products/signals/frontend/inbox/InboxScene.stories.tsx@@ -181,6 +181,11 @@ export const Settings: Story = {decorators: [routeTo(urls.inbox('settings'))],}+export const Sources: Story = {+ decorators: [routeTo(urls.inbox('sources'))],+ parameters: { testOptions: { snapshotBrowsers: [] } },+}+// Set up (sources enabled) but no reports yet – exercises the empty list states.export const Empty: Story = {decorators: [diff --git a/products/signals/frontend/inbox/InboxScene.tsx b/products/signals/frontend/inbox/InboxScene.tsxindex 1a02d60b0084..7f21ce65b115 100644--- a/products/signals/frontend/inbox/InboxScene.tsx+++ b/products/signals/frontend/inbox/InboxScene.tsx@@ -26,6 +26,7 @@ import { InboxValueSummary } from './components/shell/InboxValueSummary'import { ReportsTab } from './components/tabs/ReportsTab'import { RunsTab } from './components/tabs/RunsTab'import { SettingsTab } from './components/tabs/SettingsTab'+import { SourcesTab } from './components/tabs/SourcesTab'import { InboxTriageView } from './components/triage/InboxTriageView'import { captureInboxPanelViewed } from './inboxAnalytics'import { inboxSceneLogic } from './inboxSceneLogic'@@ -72,6 +73,8 @@ function ActiveTabBody({ tab }: { tab: InboxTabKey }): JSX.Element | null {return <ReportsTab />case 'scouts':return <ScoutsRoster />+ case 'sources':+ return <SourcesTab />case 'settings':return <SettingsTab />// Old-layout tab segments are redirected before they can become active.@@ -80,11 +83,6 @@ function ActiveTabBody({ tab }: { tab: InboxTabKey }): JSX.Element | null {}}-/**- * List view: the page tab bar (Reports / Scouts / Settings) over the active tab's body. The Reports- * tab owns its filters and keyed report lists; Scouts is the roster in the same column;- * Settings is every agent-setup control on one page.- */function InboxListView(): JSX.Element {const { activeTab } = useValues(inboxSceneLogic)const { onboardingMode } = useValues(inboxOnboardingLogic)@@ -95,11 +93,11 @@ function InboxListView(): JSX.Element {// what caused the normal inbox to flash in and get replaced by the welcome page.const pending = onboardingMode === 'pending'- // Settings renders no report list, so `Inbox viewed` never fires for it. Same once-per-visit- // guard as the report list. The panel name predates the tab's rename (see `InboxPanelName`).+ // These tabs render no report list, so `Inbox viewed` never fires for them.+ // Keep Settings attributed to `config` so existing panel breakdowns remain continuous.const panelViewFiredRef = useRef<InboxTabKey | null>(null)useEffect(() => {- if (activeTab !== 'settings' || onboarding || pending) {+ if ((activeTab !== 'settings' && activeTab !== 'sources') || onboarding || pending) {panelViewFiredRef.current = nullreturn}@@ -107,7 +105,7 @@ function InboxListView(): JSX.Element {return}panelViewFiredRef.current = activeTab- captureInboxPanelViewed({ panel: 'config' })+ captureInboxPanelViewed({ panel: activeTab === 'settings' ? 'config' : 'sources' })}, [activeTab, onboarding, pending])return (diff --git a/products/signals/frontend/inbox/components/config/AgentsRoster.test.tsx b/products/signals/frontend/inbox/components/config/AgentsRoster.test.tsxindex ca49fffd0fbd..b182f2fc718d 100644--- a/products/signals/frontend/inbox/components/config/AgentsRoster.test.tsx+++ b/products/signals/frontend/inbox/components/config/AgentsRoster.test.tsx@@ -1,6 +1,6 @@import '@testing-library/jest-dom'-import { cleanup, render, screen, waitFor, within } from '@testing-library/react'+import { cleanup, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { FEATURE_FLAGS } from 'lib/constants'@@ -10,6 +10,7 @@ import { useMocks } from '~/mocks/jest'import { initKeaTests } from '~/test/init'import { signalSourcesLogic } from '../../signalSourcesLogic'+import { SourcesTab } from '../tabs/SourcesTab'import { AgentsRoster } from './AgentsRoster'const SCANNERS = Array.from({ length: 10 }, (_, index) => ({@@ -66,9 +67,7 @@ describe('AgentsRoster', () => {})afterEach(cleanup)- // The roster lists what the project runs; the other forty tools wait in the catalog. A regression- // that lists the whole registry again, or loses a connected tool from the roster, fails here.- it('lists only connected external sources, and reaches the rest through the catalog', async () => {+ it('keeps connected sources in the roster and connects from the inline catalog without losing the search', async () => {useMocks({get: {'/api/environments/:team_id/external_data_sources/': () => [@@ -77,30 +76,27 @@ describe('AgentsRoster', () => {],},})- render(<AgentsRoster />)- signalSourcesLogic.actions.loadSources()+ render(<SourcesTab />)const jiraToggle = await screen.findByLabelText('Turn on Jira')expect(jiraToggle.closest('[data-attr="signal-source-row"]')).toHaveAttribute('data-source', 'jira')expect(document.querySelector('[data-attr="signal-source-row"][data-source="github"]')).toBeNull()- const recommendations = await screen.findByTestId('signal-source-recommendations')- expect(within(recommendations).getByText('Jira')).toBeInTheDocument()- expect(within(recommendations).getByText('Turn on')).toBeInTheDocument()-- await userEvent.click(screen.getByText('Add source'))- expect(await screen.findByText('Add a source')).toBeInTheDocument()+ expect(screen.getByText('Available sources')).toBeInTheDocument()+ expect(screen.queryByText('Add source')).not.toBeInTheDocument()const jiraTile = (): Element | null =>document.querySelector('[data-attr="signal-source-catalog-tile"][data-source="jira"]')- expect(jiraTile()).toBeInTheDocument()+ await screen.findByLabelText('Connect GitLab')+ expect(jiraTile()).not.toBeInTheDocument()await userEvent.type(screen.getByLabelText('Search sources'), 'GitLab')expect(jiraTile()).toBeNull()await userEvent.click(await screen.findByLabelText('Connect GitLab'))expect(signalSourcesLogic.values.dataSourceSetupSource).toBe('gitlab')expect(await screen.findByText('Connect GitLab')).toBeInTheDocument()- await userEvent.click(screen.getByText('All sources'))+ await userEvent.click(screen.getByText('Cancel'))expect(signalSourcesLogic.values.dataSourceSetupSource).toBeNull()- expect(await screen.findByText('Add a source')).toBeInTheDocument()+ expect(screen.getByLabelText('Search sources')).toHaveValue('GitLab')+ expect(screen.getByLabelText('Connect GitLab')).toBeInTheDocument()})it('lets a connection retry finish before another retry can start', async () => {@@ -121,13 +117,15 @@ describe('AgentsRoster', () => {},},})- render(<AgentsRoster />)- signalSourcesLogic.actions.loadSources()+ render(<SourcesTab />)const retry = (await screen.findAllByText('Retry'))[0].closest('button')!await userEvent.click(retry)expect(retry).toHaveAttribute('aria-disabled', 'true')+ expect(screen.queryByLabelText('Connect GitLab')).not.toBeInTheDocument()+ expect(screen.queryByText(/All available sources are connected/)).not.toBeInTheDocument()resolveRequest()await waitFor(() => expect(screen.queryByText(/Couldn't load your connections/)).not.toBeInTheDocument())+ expect(await screen.findByLabelText('Connect GitLab')).toBeInTheDocument()expect(requests).toBe(2)})@@ -150,22 +148,17 @@ describe('AgentsRoster', () => {// A failed load leaves every switch reading off and every import source reading unconnected.// A click then creates a row that may already exist, so the switches and tiles have to stay shut.- it('holds the source switches and catalog tiles shut while the source list has failed to load', async () => {+ it('holds the source switches and catalog shut while the source list has failed to load', async () => {useMocks({get: {'/api/projects/:team_id/signals/source_configs/': () => [500, { detail: 'Server error' }],},})- render(<AgentsRoster />)- signalSourcesLogic.actions.loadSources()+ render(<SourcesTab />)expect(await screen.findByText(/Couldn't load your signal sources/)).toBeInTheDocument()expect(screen.getByLabelText('Arm Support')).toBeDisabled()- expect(screen.queryByTestId('signal-source-recommendations')).not.toBeInTheDocument()- await userEvent.click(screen.getByText('Add source'))- await screen.findByText('Add a source')- await userEvent.type(screen.getByLabelText('Search sources'), 'GitHub issues')- expect(await screen.findByText('GitHub issues')).toBeInTheDocument()+ expect(await screen.findByText(/Couldn't load available sources/)).toBeInTheDocument()expect(screen.queryByLabelText('Connect GitHub issues')).not.toBeInTheDocument()expect(signalSourcesLogic.values.dataSourceSetupSource).toBeNull()})diff --git a/products/signals/frontend/inbox/components/config/AgentsRoster.tsx b/products/signals/frontend/inbox/components/config/AgentsRoster.tsxindex 3805620c0bdd..7350cc5167b0 100644--- a/products/signals/frontend/inbox/components/config/AgentsRoster.tsx+++ b/products/signals/frontend/inbox/components/config/AgentsRoster.tsx@@ -23,10 +23,9 @@ import { signalSourcesLogic } from '../../signalSourcesLogic'import type { SourceProductDataStatus, SourceProductStatus } from '../../signalSourcesLogic'import { SignalSourceConfig, SignalSourceConfigStatus, SignalSourceType, linearTeamIdsFromConfig } from '../../types'import { AGENT_ROSTER_GROUPS, AgentRosterDefinition, AgentRosterGroup, AgentRosterSource } from './agentRosterMeta'+import { DataSourceSetupModal } from './DataSourceSetupModal'import { LinearTeamsModal } from './LinearTeamsModal'import { SourceAgentIcon } from './SourceAgentIcon'-import { SourceCatalogModal } from './SourceCatalogModal'-import { SourceRecommendations } from './SourceRecommendations'import { SourceSteeringModal } from './SourceSteeringModal'type AgentRosterStatus = 'standby' | 'watching' | 'syncing' | 'sync_failed'@@ -613,8 +612,8 @@ export function AgentsRoster(): JSX.Element {const {externalSourceStates,rosterGroups,- visibleSourceRecommendations,sourcesLoadError,+ dataWarehouseSources,dataWarehouseSourcesLoading,conversationsConfig,evalReportsConfig,@@ -643,8 +642,6 @@ export function AgentsRoster(): JSX.Element {linearTeamsPicker,} = useValues(signalSourcesLogic)const {- openSourceCatalog,- hideSourceRecommendations,loadSources,openLinearTeamsPicker,closeLinearTeamsPicker,@@ -970,53 +967,22 @@ export function AgentsRoster(): JSX.Element {{rosterGroups.map((group) => (<div key={group.label} className="flex flex-col gap-2 pt-2">- <div className="flex flex-wrap items-center justify-between gap-2">- <AgentRosterGroupHeader group={group} />- {group.id === 'external' && (- <div className="flex flex-wrap items-center gap-1">- {group.agents.length === 0 && visibleSourceRecommendations.length > 0 && (- <LemonButton- type="tertiary"- size="xsmall"- onClick={hideSourceRecommendations}- data-attr="signal-source-recommendations-hide"- >- Hide recommendations- </LemonButton>- )}- <LemonButton- type="secondary"- size="xsmall"- icon={<IconPlus />}- onClick={openSourceCatalog}- data-attr="signal-source-catalog-open"- >- Add source- </LemonButton>- </div>- )}- </div>+ <AgentRosterGroupHeader group={group} />{group.agents.length > 0 && (<div className="-mx-2 divide-y divide-primary">{group.agents.map(renderAgent)}</div>)}- {group.id === 'external' && group.agents.length > 0 && visibleSourceRecommendations.length > 0 && (- <div className="flex flex-wrap items-center justify-between gap-2">- <h4 className="m-0 text-sm font-semibold">Recommended for you</h4>- <LemonButton- type="tertiary"- size="xsmall"- onClick={hideSourceRecommendations}- data-attr="signal-source-recommendations-hide"- >- Hide recommendations- </LemonButton>- </div>- )}- {group.id === 'external' && <SourceRecommendations />}+ {group.id === 'external' &&+ group.agents.length === 0 &&+ dataWarehouseSources !== null &&+ sourceConfigs !== null && (+ <p className="m-0 text-xs text-secondary">+ Connect external tools from the available sources below.+ </p>+ )}</div>))}- <SourceCatalogModal />+ <DataSourceSetupModal />{linearTeamsPicker && (<LinearTeamsModaldiff --git a/products/signals/frontend/inbox/components/config/DataSourceSetupModal.tsx b/products/signals/frontend/inbox/components/config/DataSourceSetupModal.tsxnew file mode 100644index 000000000000..5befb7f558cc--- /dev/null+++ b/products/signals/frontend/inbox/components/config/DataSourceSetupModal.tsx@@ -0,0 +1,33 @@+import { useActions, useValues } from 'kea'++import { LemonModal } from '@posthog/lemon-ui'++import { signalSourcesLogic } from '../../signalSourcesLogic'+import { DataSourceSetup } from './DataSourceSetup'++export function DataSourceSetupModal(): JSX.Element | null {+ const { dataSourceSetupSource, dataSourceSetupOAuthRedirectUrl, externalAgents } = useValues(signalSourcesLogic)+ const { closeDataSourceSetup, onDataSourceSetupComplete } = useActions(signalSourcesLogic)+ if (!dataSourceSetupSource) {+ return null+ }+ const agent = externalAgents.find((item) => item.source === dataSourceSetupSource)++ return (+ <LemonModal+ isOpen+ onClose={closeDataSourceSetup}+ width={760}+ title={`Connect ${agent?.label ?? dataSourceSetupSource}`}+ description={agent?.watches}+ >+ <DataSourceSetup+ source={dataSourceSetupSource}+ onComplete={onDataSourceSetupComplete}+ onCancel={closeDataSourceSetup}+ cancelLabel="Cancel"+ oauthRedirectUrl={dataSourceSetupOAuthRedirectUrl}+ />+ </LemonModal>+ )+}diff --git a/products/signals/frontend/inbox/components/config/SignalSourcesPanel.tsx b/products/signals/frontend/inbox/components/config/SignalSourcesPanel.tsxdeleted file mode 100644index 139c29321734..000000000000--- a/products/signals/frontend/inbox/components/config/SignalSourcesPanel.tsx+++ /dev/null@@ -1,23 +0,0 @@-import { useActions } from 'kea'-import { useEffect } from 'react'--import { signalSourcesLogic } from '../../signalSourcesLogic'-import { AgentsRoster } from './AgentsRoster'--/**- * Signal sources management: the per-source roster (each source watches for signals and- * spins up an agent to look into them). Adding a source opens the catalog modal from the- * roster. Hosted in the Signal sources setup modal and the Settings tab.- */-export function SignalSourcesPanel(): JSX.Element {- const { loadSources, loadSourceConfigs, loadVisionScanners, loadProductDataEvents } = useActions(signalSourcesLogic)-- useEffect(() => {- loadSources()- loadSourceConfigs()- loadVisionScanners()- loadProductDataEvents()- }, []) // eslint-disable-line react-hooks/exhaustive-deps-- return <AgentsRoster />-}diff --git a/products/signals/frontend/inbox/components/config/SourceCatalog.tsx b/products/signals/frontend/inbox/components/config/SourceCatalog.tsxnew file mode 100644index 000000000000..7d5fb7db7d43--- /dev/null+++ b/products/signals/frontend/inbox/components/config/SourceCatalog.tsx@@ -0,0 +1,102 @@+import { useActions, useValues } from 'kea'+import { useEffect, useRef } from 'react'++import { LemonBanner, LemonButton, LemonInput, LemonSelect, LemonSkeleton } from '@posthog/lemon-ui'++import { signalSourcesLogic } from '../../signalSourcesLogic'+import { SourceCatalogTile } from './SourceCatalogTile'++export function SourceCatalog(): JSX.Element {+ const {+ sourceCatalog,+ sourceSearchQuery,+ sourceCategory,+ sourceCategoryOptions,+ visibleSourceRecommendations,+ sourceConfigs,+ sourceConfigsLoadFailed,+ dataWarehouseSources,+ sourcesLoadError,+ integrationsLoading,+ onboardingStateLoading,+ } = useValues(signalSourcesLogic)+ const { setSourceSearchQuery, setSourceCategory, hideSourceRecommendations, sourceCatalogViewed } =+ useActions(signalSourcesLogic)+ const loading =+ (sourceConfigs === null && !sourceConfigsLoadFailed) || (dataWarehouseSources === null && !sourcesLoadError)+ const unavailable =+ (sourceConfigs === null && sourceConfigsLoadFailed) || (dataWarehouseSources === null && sourcesLoadError)+ const viewed = useRef(false)++ useEffect(() => {+ if (!loading && !unavailable && !integrationsLoading && !onboardingStateLoading && !viewed.current) {+ viewed.current = true+ sourceCatalogViewed()+ }+ }, [loading, unavailable, integrationsLoading, onboardingStateLoading, sourceCatalogViewed])++ return (+ <div className="flex flex-col gap-3">+ <div className="flex flex-wrap items-center gap-2">+ <LemonInput+ type="search"+ value={sourceSearchQuery}+ onChange={setSourceSearchQuery}+ placeholder="Search available sources"+ aria-label="Search sources"+ data-attr="signal-sources-search"+ className="min-w-40 flex-1"+ fullWidth+ />+ <LemonSelect+ value={sourceCategory}+ onChange={setSourceCategory}+ options={sourceCategoryOptions}+ data-attr="signal-sources-category"+ />+ </div>+ {unavailable ? (+ <LemonBanner type="warning">+ Couldn't load available sources. Retry loading your connections above.+ </LemonBanner>+ ) : loading ? (+ <LemonSkeleton className="h-40" />+ ) : sourceCatalog.length === 0 ? (+ <LemonBanner type="info">+ {sourceSearchQuery || sourceCategory+ ? 'No available sources match your search. Try another name or category.'+ : 'All available sources are connected. Manage them in Your sources above.'}+ </LemonBanner>+ ) : (+ sourceCatalog.map((group) => (+ <div+ key={group.category}+ className="flex flex-col gap-2 pt-2"+ data-attr={+ group.category === 'Recommended for you' ? 'signal-source-recommendations' : undefined+ }+ >+ <div className="flex flex-wrap items-center justify-between gap-2">+ <h4 className="m-0 text-sm font-semibold">{group.category}</h4>+ {group.category === 'Recommended for you' && visibleSourceRecommendations.length > 0 && (+ <LemonButton+ type="tertiary"+ size="xsmall"+ onClick={hideSourceRecommendations}+ data-attr="signal-source-recommendations-hide"+ >+ Hide recommendations+ </LemonButton>+ )}+ </div>+ <div className="grid grid-cols-[repeat(auto-fill,minmax(min(100%,13rem),1fr))] gap-2">+ {group.items.map((item) => (+ <SourceCatalogTile key={item.agent.source} item={item} />+ ))}+ </div>+ </div>+ ))+ )}+ </div>+ )+}diff --git a/products/signals/frontend/inbox/components/config/SourceCatalogModal.tsx b/products/signals/frontend/inbox/components/config/SourceCatalogModal.tsxdeleted file mode 100644index e34af7dc9533..000000000000--- a/products/signals/frontend/inbox/components/config/SourceCatalogModal.tsx+++ /dev/null@@ -1,197 +0,0 @@-import { useActions, useValues } from 'kea'--import { LemonBanner, LemonInput, LemonModal, LemonSelect, LemonTag, Spinner } from '@posthog/lemon-ui'--import { Tooltip } from 'lib/lemon-ui/Tooltip'--import { SourceCatalogItem, WarehouseBackedSource, signalSourcesLogic } from '../../signalSourcesLogic'-import { DataSourceSetup } from './DataSourceSetup'-import { SourceAgentIcon } from './SourceAgentIcon'--const TILE_CLASS =- 'flex min-h-20 items-start gap-3 rounded border border-primary bg-surface-primary p-3 text-left font-[inherit] text-default'--function tileDisabledReason(item: SourceCatalogItem): string | undefined {- if (item.blockedReason) {- return item.blockedReason- }- if (item.enabled) {- return 'Already on. Manage it from the roster.'- }- if (item.loading) {- return 'Saving'- }- return undefined-}--function SourceTile({- item,- onSelect,-}: {- item: SourceCatalogItem- onSelect: (source: WarehouseBackedSource) => void-}): JSX.Element {- const disabledReason = tileDisabledReason(item)- const tag = item.enabled- ? { label: 'On', type: 'success' as const }- : item.syncFailed- ? { label: 'Sync failed', type: 'danger' as const }- : item.connected- ? { label: 'Synced', type: 'completion' as const }- : null- const content = (- <>- <div className="mt-0.5 shrink-0">- <SourceAgentIcon agent={item.agent} size="medium" />- </div>- <div className="flex min-w-0 flex-1 flex-col gap-1">- <div className="flex flex-wrap items-center gap-1.5">- <span className="text-sm font-semibold leading-5">{item.agent.label}</span>- {item.agent.alpha && (- <LemonTag type="completion" size="small">- Alpha- </LemonTag>- )}- {tag && (- <LemonTag type={tag.type} size="small">- {tag.label}- </LemonTag>- )}- </div>- <span className="text-xs leading-4 text-secondary">{item.agent.watches}</span>- </div>- {item.loading && <Spinner className="text-base" />}- </>- )- if (disabledReason) {- return (- <Tooltip title={disabledReason}>- <div className={`${TILE_CLASS} cursor-not-allowed opacity-60`} aria-disabled>- {content}- </div>- </Tooltip>- )- }- return (- <button- type="button"- className={`${TILE_CLASS} cursor-pointer hover:border-bold`}- onClick={() => onSelect(item.agent.source as WarehouseBackedSource)}- aria-label={`${item.connected ? 'Turn on' : 'Connect'} ${item.agent.label}`}- data-attr="signal-source-catalog-tile"- data-source={item.agent.source}- >- {content}- </button>- )-}--function catalogGroupSummary(items: SourceCatalogItem[]): string {- const on = items.filter((item) => item.enabled).length- if (on === 0) {- return `${items.length} available`- }- return `${on} of ${items.length} on`-}--export function SourceCatalogModal(): JSX.Element {- const {- sourceCatalogOpen,- sourceCatalog,- sourceSearchQuery,- sourceCategory,- sourceCategoryOptions,- externalSourceCount,- dataSourceSetupSource,- dataSourceSetupOAuthRedirectUrl,- externalAgents,- } = useValues(signalSourcesLogic)- const {- closeSourceCatalog,- closeDataSourceSetup,- onDataSourceSetupComplete,- setSourceSearchQuery,- setSourceCategory,- selectCatalogSource,- } = useActions(signalSourcesLogic)- const setupAgent = dataSourceSetupSource- ? externalAgents.find((agent) => agent.source === dataSourceSetupSource)- : undefined-- return (- <LemonModal- isOpen={sourceCatalogOpen}- onClose={closeSourceCatalog}- width={760}- title={setupAgent ? `Connect ${setupAgent.label}` : 'Add a source'}- description={- setupAgent ? (- setupAgent.watches- ) : (- // The header never scrolls, so the search and the category filter live in it and stay- // put while the grid scrolls underneath.- <div className="flex flex-col gap-3">- <p className="mb-0">- Connect a tool you already use. Agents read it alongside your PostHog data, so a support- ticket and the error behind it land in one report.- </p>- <div className="flex flex-wrap items-center gap-2">- <LemonInput- type="search"- value={sourceSearchQuery}- onChange={setSourceSearchQuery}- placeholder={`Search ${externalSourceCount} sources`}- aria-label="Search sources"- data-attr="signal-sources-search"- className="min-w-40 flex-1"- fullWidth- autoFocus- />- <LemonSelect- value={sourceCategory}- onChange={setSourceCategory}- options={sourceCategoryOptions}- data-attr="signal-sources-category"- />- </div>- </div>- )- }- >- {dataSourceSetupSource ? (- <DataSourceSetup- source={dataSourceSetupSource}- onComplete={() => onDataSourceSetupComplete()}- onCancel={closeDataSourceSetup}- cancelLabel="All sources"- oauthRedirectUrl={dataSourceSetupOAuthRedirectUrl}- />- ) : (- <div className="flex flex-col gap-4">- {sourceCatalog.length === 0 && (- <LemonBanner type="info">- No sources match your search. Try another name or category.- </LemonBanner>- )}- {sourceCatalog.map((group) => (- <div key={group.category} className="flex flex-col gap-2">- <div className="flex items-baseline justify-between gap-2">- <h4 className="m-0 text-sm font-semibold">{group.category}</h4>- <span className="text-xs text-secondary">{catalogGroupSummary(group.items)}</span>- </div>- <div className="grid grid-cols-[repeat(auto-fill,minmax(13rem,1fr))] gap-2">- {group.items.map((item) => (- <SourceTile- key={item.agent.source}- item={item}- onSelect={(source) => selectCatalogSource(source, 'catalog')}- />- ))}- </div>- </div>- ))}- </div>- )}- </LemonModal>- )-}diff --git a/products/signals/frontend/inbox/components/config/SourceCatalogTile.tsx b/products/signals/frontend/inbox/components/config/SourceCatalogTile.tsxnew file mode 100644index 000000000000..fc12f1037739--- /dev/null+++ b/products/signals/frontend/inbox/components/config/SourceCatalogTile.tsx@@ -0,0 +1,54 @@+import { useActions } from 'kea'++import { LemonButton, LemonCard, LemonTag } from '@posthog/lemon-ui'++import { SourceCatalogItem, WarehouseBackedSource, signalSourcesLogic } from '../../signalSourcesLogic'+import { SourceAgentIcon } from './SourceAgentIcon'++export function SourceCatalogTile({ item }: { item: SourceCatalogItem }): JSX.Element {+ const { selectCatalogSource } = useActions(signalSourcesLogic)++ return (+ <LemonCard+ hoverEffect={false}+ className="flex flex-col gap-3 p-3"+ data-attr={item.recommendation ? 'signal-source-recommendation' : 'signal-source-catalog-tile'}+ data-source={item.agent.source}+ >+ <div className="flex items-start gap-2">+ <SourceAgentIcon agent={item.agent} size="medium" />+ <div className="flex min-w-0 flex-wrap items-center gap-1.5">+ <span className="text-sm font-semibold">{item.agent.label}</span>+ {item.agent.alpha && (+ <LemonTag type="completion" size="small">+ Alpha+ </LemonTag>+ )}+ </div>+ </div>+ <p className="mb-0 flex-1 text-xs text-secondary">+ {item.recommendation?.reason === 'integration'+ ? 'Already connected to PostHog. Agents can start reading it right away.'+ : (item.recommendation?.description ?? item.agent.watches)}+ </p>+ <LemonButton+ type="secondary"+ size="small"+ className="self-start"+ loading={item.loading}+ disabledReason={item.blockedReason}+ onClick={() =>+ selectCatalogSource(+ item.agent.source as WarehouseBackedSource,+ item.recommendation ? 'recommendation' : 'catalog'+ )+ }+ aria-label={`Connect ${item.agent.label}`}+ data-attr={item.recommendation ? 'signal-source-recommendation-action' : 'signal-source-catalog-tile'}+ data-source={item.agent.source}+ >+ Connect+ </LemonButton>+ </LemonCard>+ )+}diff --git a/products/signals/frontend/inbox/components/config/SourceRecommendations.tsx b/products/signals/frontend/inbox/components/config/SourceRecommendations.tsxdeleted file mode 100644index 4bb941044174..000000000000--- a/products/signals/frontend/inbox/components/config/SourceRecommendations.tsx+++ /dev/null@@ -1,75 +0,0 @@-import { useActions, useValues } from 'kea'--import { LemonButton, LemonTag } from '@posthog/lemon-ui'--import { isExternalSignalSource } from '../../externalSignalSources'-import { WarehouseBackedSource, signalSourcesLogic } from '../../signalSourcesLogic'-import { SourceRecommendation } from '../../sourceRecommendations'-import { SourceAgentIcon } from './SourceAgentIcon'--function recommendationDescription({ agent, reason, description }: SourceRecommendation): string {- switch (reason) {- case 'synced':- return 'Already syncing to your warehouse, so watching turns on with one click.'- case 'integration':- return 'Already connected to PostHog. Agents can start reading it right away.'- case 'default':- return description ?? agent.watches- }-}--export function SourceRecommendations(): JSX.Element | null {- const { visibleSourceRecommendations, externalSourceStates, isCiSignalsToggling } = useValues(signalSourcesLogic)- const { selectCatalogSource } = useActions(signalSourcesLogic)-- if (visibleSourceRecommendations.length === 0) {- return null- }-- return (- <div- className="grid grid-cols-[repeat(auto-fill,minmax(10rem,1fr))] gap-2"- data-attr="signal-source-recommendations"- >- {/* auto-fill keeps the empty tracks, so one or two cards stay card-sized rather than stretching across the row. */}- {visibleSourceRecommendations.map((recommendation) => {- const { agent, reason } = recommendation- const source = agent.source as WarehouseBackedSource- const state = isExternalSignalSource(source) ? externalSourceStates[source] : null- const loading = state ? state.loading : isCiSignalsToggling- return (- <div- key={agent.source}- className="flex flex-col gap-2 rounded border border-primary bg-surface-secondary p-3"- data-attr="signal-source-recommendation"- data-source={agent.source}- >- <div className="flex items-center gap-2">- <SourceAgentIcon agent={agent} />- <span className="truncate text-sm font-medium">{agent.label}</span>- {agent.alpha && (- <LemonTag type="completion" size="small">- Alpha- </LemonTag>- )}- </div>- <p className="mb-0 flex-1 text-xs leading-4 text-secondary">- {recommendationDescription(recommendation)}- </p>- <LemonButton- type="secondary"- size="xsmall"- className="self-start"- loading={loading}- disabledReason={state?.blockedReason}- onClick={() => selectCatalogSource(source, 'recommendation')}- data-attr="signal-source-recommendation-action"- >- {reason === 'synced' ? 'Turn on' : 'Connect'}- </LemonButton>- </div>- )- })}- </div>- )-}diff --git a/products/signals/frontend/inbox/components/emptyState/InboxWaitingForWork.tsx b/products/signals/frontend/inbox/components/emptyState/InboxWaitingForWork.tsxindex c88fcf1b2a63..0730df8992d5 100644--- a/products/signals/frontend/inbox/components/emptyState/InboxWaitingForWork.tsx+++ b/products/signals/frontend/inbox/components/emptyState/InboxWaitingForWork.tsx@@ -75,7 +75,7 @@ export function InboxWaitingForWork(): JSX.Element {<p className="m-0 max-w-xl text-sm text-tertiary">{completed? 'Your sources are listening and your scouts will run on their schedules. Reports appear here when they find something worth investigating.'- : 'Your signal sources and scouts are running in the background. When they find something actionable, a pull request will appear here.'}+ : 'Your sources and scouts are running in the background. When they find something actionable, a pull request will appear here.'}</p></div>)}@@ -84,7 +84,7 @@ export function InboxWaitingForWork(): JSX.Element {<section className="flex flex-col"><div className="flex items-center justify-between gap-2 border-b border-primary px-1 pb-3"><div>- <h3 className="m-0 text-sm font-semibold">Signal sources</h3>+ <h3 className="m-0 text-sm font-semibold">Sources</h3><p className="m-0 text-xs text-tertiary">Events that start an investigation</p></div><span@@ -112,12 +112,12 @@ export function InboxWaitingForWork(): JSX.Element {))}{isWizardRunning ? <InstallingFlowRow type="source" /> : null}{!sourcesLoading && !isWizardRunning && visibleSources.length === 0 ? (- <p className="m-0 p-3 text-xs text-tertiary">No signal sources are active.</p>+ <p className="m-0 p-3 text-xs text-tertiary">No sources are active.</p>) : null}</div>{enabledSources.length > MAX_VISIBLE_ITEMS ? (<Link- to={urls.inbox('settings')}+ to={urls.inbox('sources')}// pinned: analytics and UI tests can depend on these overflow-link selectors.data-attr="inbox-waiting-signal-sources-more"className="border-t border-primary px-1 pt-3 text-xs text-tertiary no-underline hover:text-primary focus-visible:text-primary"diff --git a/products/signals/frontend/inbox/components/onboarding/InboxActivationPanel.tsx b/products/signals/frontend/inbox/components/onboarding/InboxActivationPanel.tsxindex 86cdf02546de..2bd8f6438256 100644--- a/products/signals/frontend/inbox/components/onboarding/InboxActivationPanel.tsx+++ b/products/signals/frontend/inbox/components/onboarding/InboxActivationPanel.tsx@@ -81,7 +81,7 @@ export function InboxActivationPanel({ hasReports = false }: InboxActivationPane<LemonButtontype="secondary"size="small"- to={urls.inbox('settings')}+ to={urls.inbox('sources')}data-attr="inbox-activation-sources">Manage sourcesdiff --git a/products/signals/frontend/inbox/components/onboarding/InboxOnboardingBanner.tsx b/products/signals/frontend/inbox/components/onboarding/InboxOnboardingBanner.tsxindex 67146918eab5..841339b4f188 100644--- a/products/signals/frontend/inbox/components/onboarding/InboxOnboardingBanner.tsx+++ b/products/signals/frontend/inbox/components/onboarding/InboxOnboardingBanner.tsx@@ -23,7 +23,7 @@ export function InboxOnboardingBanner(): JSX.Element {onClick={dismissBanner}/></div>- <p className="mb-0.5 text-sm text-tertiary">Choose signals and scouts to start receiving reports again.</p>+ <p className="mb-0.5 text-sm text-tertiary">Choose sources and scouts to start receiving reports again.</p><LemonButton type="primary" className="w-fit" onClick={openSetup} data-attr="inbox-paused-set-up">Set up Self-Driving</LemonButton>diff --git a/products/signals/frontend/inbox/components/onboarding/InboxSetupFlow.tsx b/products/signals/frontend/inbox/components/onboarding/InboxSetupFlow.tsxindex a11453b65b54..2667860f7481 100644--- a/products/signals/frontend/inbox/components/onboarding/InboxSetupFlow.tsx+++ b/products/signals/frontend/inbox/components/onboarding/InboxSetupFlow.tsx@@ -45,7 +45,7 @@ export function InboxSetupFlow(): JSX.Element {<GuidedWizardSteppersteps={[{ step: 'signals', label: 'Sources' },- { step: 'scouts', label: 'Background agents' },+ { step: 'scouts', label: 'Scouts' },{ step: 'github', label: 'Review and activate' },]}currentStep={draft.step}diff --git a/products/signals/frontend/inbox/components/onboarding/LoopDiagram.tsx b/products/signals/frontend/inbox/components/onboarding/LoopDiagram.tsxindex 267d96b4748b..25e21c3a42d0 100644--- a/products/signals/frontend/inbox/components/onboarding/LoopDiagram.tsx+++ b/products/signals/frontend/inbox/components/onboarding/LoopDiagram.tsx@@ -54,7 +54,7 @@ export function LoopDiagram(): JSX.Element {<div className="@container/loop w-full"><div className="pointer-events-none select-none grid grid-cols-1 items-center gap-x-1.5 gap-y-4 text-left @2xl/loop:grid-cols-[1fr_34px_1fr_34px_1.2fr]"><div className="flex flex-col gap-2">- <StageLabel>Signal sources</StageLabel>+ <StageLabel>Sources</StageLabel><StageCard stage="signals" className="flex items-center gap-2 px-3 py-2.5"><span className="flex size-5 shrink-0 items-center justify-center"><IconRewindPlay className="text-sm text-[var(--color-product-session-replay-light)] dark:text-[var(--color-product-session-replay-dark)]" />diff --git a/products/signals/frontend/inbox/components/shell/InboxTabBar.tsx b/products/signals/frontend/inbox/components/shell/InboxTabBar.tsxindex 5bc2f8ee62c6..d9b24a16de84 100644--- a/products/signals/frontend/inbox/components/shell/InboxTabBar.tsx+++ b/products/signals/frontend/inbox/components/shell/InboxTabBar.tsx@@ -9,8 +9,8 @@ import { inboxSceneLogic } from '../../inboxSceneLogic'import { INBOX_TAB_KEYS, INBOX_TAB_LABEL, InboxTabKey } from '../../types'/**- * Page tab bar: Reports / Scouts / Settings. The report sections (Review and merge / Needs decision /- * Resolved) live inside the Reports tab, so no counts sit here.+ * The report sections (Review and merge / Needs decision / Resolved) live inside the Reports tab,+ * so no counts sit here.*/export function InboxTabBar(): JSX.Element {const { activeTab } = useValues(inboxSceneLogic)diff --git a/products/signals/frontend/inbox/components/tabs/SettingsTab.tsx b/products/signals/frontend/inbox/components/tabs/SettingsTab.tsxindex a6358c6cb725..7921402ac2a7 100644--- a/products/signals/frontend/inbox/components/tabs/SettingsTab.tsx+++ b/products/signals/frontend/inbox/components/tabs/SettingsTab.tsx@@ -5,24 +5,16 @@ import { GithubIntegration } from 'scenes/integrations/components/GithubIntegratimport { urls } from 'scenes/urls'import { inboxUsageLogic } from '../../logics/inboxUsageLogic'-import { signalSourcesLogic } from '../../signalSourcesLogic'import { AgentSteeringSection } from '../config/AgentSteeringSection'import { RepoRoutingRules } from '../config/RepoRoutingRules'import { SelfDrivingSection } from '../config/SelfDrivingSection'-import { SignalSourcesPanel } from '../config/SignalSourcesPanel'import { SlackNotificationsSection } from '../config/SlackNotificationsSection'import { InboxUsageWidget } from '../shell/InboxUsageWidget'import { InstallationSetupSection } from '../shell/InstallationSetupSection'import { SettingsSection } from './SettingsSection'-/**- * The Settings tab: every agent-setup control on one page, in the order a new team works through- * them. Signal sources and autonomy are edited most, so they lead; the connections and the usage- * meter follow.- */export function SettingsTab(): JSX.Element {useMountedLogic(integrationsLogic)- useMountedLogic(signalSourcesLogic)// The usage widget renders nothing without the billing product, so the section title// must hide with it rather than sit over an empty area.const { product: inboxUsageProduct, isLoading: inboxUsageLoading } = useValues(inboxUsageLogic)@@ -30,12 +22,6 @@ export function SettingsTab(): JSX.Element {return (<div className="mx-auto flex w-full max-w-4xl flex-col gap-8 px-6 py-6"><InstallationSetupSection />- <SettingsSection- title="Signal sources"- description="Each source watches for signals, and spins up an agent to look into them."- >- <SignalSourcesPanel />- </SettingsSection><SettingsSectiontitle="Autonomy"description="How much agents do on their own: opening pull requests, and how many reports arrive each day."diff --git a/products/signals/frontend/inbox/components/config/SignalSourcesPanel.stories.tsx b/products/signals/frontend/inbox/components/tabs/SourcesTab.stories.tsxsimilarity index 94%rename from products/signals/frontend/inbox/components/config/SignalSourcesPanel.stories.tsxrename to products/signals/frontend/inbox/components/tabs/SourcesTab.stories.tsxindex af757fe58dfa..c822c6f5029d 100644--- a/products/signals/frontend/inbox/components/config/SignalSourcesPanel.stories.tsx+++ b/products/signals/frontend/inbox/components/tabs/SourcesTab.stories.tsx@@ -14,9 +14,9 @@ import { availableSourcesLogic } from 'products/data_warehouse/frontend/scenes/Nimport { ERROR_TRACKING_SIGNAL_SOURCE_TYPES } from '../../signalSourcesLogic'import { SignalSourceConfig, SignalSourceProduct, SignalSourceType } from '../../types'-import { SignalSourcesPanel } from './SignalSourcesPanel'+import { SourcesTab } from './SourcesTab'-// Every axis the signal sources dialog renders from: which sources are armed+// Every axis the sources tab renders from: which sources are armed// (SignalSourceConfig rows), which PostHog products are on (team opt-ins), and which usage// events exist (event definitions). Each control drives one of the three mocks.interface PanelState {@@ -285,17 +285,17 @@ function PanelHarness(state: PanelState): JSX.Element {}, [stateKey, loadCurrentTeam, loadAvailableSources])return (- <div className="w-[760px] p-6 bg-surface-primary border rounded">- <SignalSourcesPanel key={stateKey} />+ <div className="w-full max-w-4xl bg-surface-primary">+ <SourcesTab key={stateKey} /></div>)}const meta: Meta<typeof PanelHarness> = {- title: 'Scenes-App/Inbox/SignalSourcesPanel',+ title: 'Scenes-App/Inbox/SourcesTab',component: PanelHarness,parameters: {- layout: 'centered',+ layout: 'fullscreen',viewMode: 'story',mockDate: '2024-03-20',},@@ -440,24 +440,21 @@ export const ErrorTrackingExpanded: Story = {},}-/** Connected tools in the roster, with Jira (synced but off) and two category gaps recommended under it. */+/** Connected tools stay in the roster even when they are off. */export const ExternalSourcesConnected: Story = {args: { externalConnections: true },}-/** The add-source catalog: every external source by category, with status tags for the ones already in use. */-export const SourceCatalogOpen: Story = {+export const SourceCatalogFiltered: Story = {args: { externalConnections: true },play: async ({ canvasElement }) => {- await userEvent.click(await within(canvasElement).findByText('Add source', { exact: true }))+ await userEvent.type(await within(canvasElement).findByLabelText('Search sources'), 'GitLab')},}-/** The connect step inside the catalog, reached by picking a source that is not synced yet. */-export const SourceCatalogConnectStep: Story = {+export const SourceConnectionForm: Story = {args: { externalConnections: true },play: async ({ canvasElement }) => {- await userEvent.click(await within(canvasElement).findByText('Add source', { exact: true }))- await userEvent.click(await within(document.body).findByLabelText('Connect GitLab'))+ await userEvent.click(await within(canvasElement).findByLabelText('Connect GitLab'))},}diff --git a/products/signals/frontend/inbox/components/tabs/SourcesTab.tsx b/products/signals/frontend/inbox/components/tabs/SourcesTab.tsxnew file mode 100644index 000000000000..defaad737a7c--- /dev/null+++ b/products/signals/frontend/inbox/components/tabs/SourcesTab.tsx@@ -0,0 +1,35 @@+import { useActions } from 'kea'+import { useEffect } from 'react'++import { signalSourcesLogic } from '../../signalSourcesLogic'+import { AgentsRoster } from '../config/AgentsRoster'+import { SourceCatalog } from '../config/SourceCatalog'+import { SettingsSection } from './SettingsSection'++export function SourcesTab(): JSX.Element {+ const { loadSources, loadSourceConfigs, loadVisionScanners, loadProductDataEvents } = useActions(signalSourcesLogic)++ useEffect(() => {+ loadSources()+ loadSourceConfigs()+ loadVisionScanners()+ loadProductDataEvents()+ }, []) // eslint-disable-line react-hooks/exhaustive-deps++ return (+ <div className="mx-auto flex w-full max-w-4xl flex-col gap-8 px-6 py-6">+ <SettingsSection+ title="Your sources"+ description="Each source watches for signals, and spins up an agent to look into them."+ >+ <AgentsRoster />+ </SettingsSection>+ <SettingsSection+ title="Available sources"+ description="Connect a tool so self-driving can investigate its signals alongside your PostHog data."+ >+ <SourceCatalog />+ </SettingsSection>+ </div>+ )+}diff --git a/products/signals/frontend/inbox/inboxAnalytics.ts b/products/signals/frontend/inbox/inboxAnalytics.tsindex ca23c9f82d31..179f40035c55 100644--- a/products/signals/frontend/inbox/inboxAnalytics.ts+++ b/products/signals/frontend/inbox/inboxAnalytics.ts@@ -230,7 +230,7 @@ export type InboxReportActionOutcome = 'success' | 'failure' | 'blocked' | 'limi* `config` is the Settings tab; the value predates the rename and stays so the panel breakdown* reads continuously. The onboarding panel can appear alongside the report list.*/-export type InboxPanelName = 'runs' | 'config' | 'scratchpad' | 'findings' | 'triage' | 'onboarding'+export type InboxPanelName = 'runs' | 'config' | 'sources' | 'scratchpad' | 'findings' | 'triage' | 'onboarding'/** A panel read that carries its own timeout, named so each one's stall rate reads separately. */export type InboxPanelLoad = 'scout_notes' | 'scout_memory'@@ -839,12 +839,13 @@ export function captureSignalSourceInterest(source: string): void {export type SignalSourceCatalogOrigin = 'catalog' | 'recommendation'-/** The add-source catalog opened. Pairs with {@link captureSignalSourceConnected} to show how many opens end in a connection. */+/** Pairs catalog visits with source connections; the event name stays fixed for existing funnels. */export function captureSignalSourceCatalogOpened(params: {recommendationCount: numberconnectedCount: number}): void {captureInboxEvent(INBOX_EVENTS.SOURCE_CATALOG_OPENED, {+ surface: 'sources_tab',recommendation_count: params.recommendationCount,connected_count: params.connectedCount,})diff --git a/products/signals/frontend/inbox/inboxSceneLogic.test.ts b/products/signals/frontend/inbox/inboxSceneLogic.test.tsindex 39c089248485..1403c7233fe9 100644--- a/products/signals/frontend/inbox/inboxSceneLogic.test.ts+++ b/products/signals/frontend/inbox/inboxSceneLogic.test.ts@@ -169,6 +169,42 @@ describe('inboxSceneLogic routing', () => {expect(logic.values.activeTab).toBe('reports')})+ it.each([null, 'report', 'scout'] as const)('opens sources from %s without selecting a report', (surface) => {+ mountLogic()+ if (surface === 'report') {+ router.actions.push(urls.inboxReport('reports', 'report-1'))+ } else if (surface === 'scout') {+ router.actions.push(urls.inboxScout('signals-scout-web-vitals'))+ }+ router.actions.push(urls.inbox('sources'))++ expect(router.values.location.pathname.endsWith('/inbox/sources')).toBe(true)+ expect(logic.values.activeTab).toBe('sources')+ expect(logic.values.selectedReportId).toBeNull()+ expect(logic.values.selectedScoutSkillName).toBeNull()+ })++ it.each(['/inbox', '/inbox/config', '/inbox/settings', '/inbox/sources'])(+ 'preserves source setup parameters when returning to %s',+ (path) => {+ mountLogic()+ const searchParams = {+ setup: 'signal-sources',+ signal_source: 'intercom',+ integration_id: '7',+ source: 'saved-filter',+ }+ const hashParams = { tab: 'details' }+ router.actions.push(path, searchParams, hashParams)++ expect(router.values.location.pathname.endsWith('/inbox/sources')).toBe(true)+ expect(logic.values.activeTab).toBe('sources')+ expect(logic.values.selectedReportId).toBeNull()+ expect(router.values.searchParams).toEqual(searchParams)+ expect(router.values.hashParams).toEqual(hashParams)+ }+ )+// The scout page's tabs live in the URL, so a link to a scout's runs has to survive a reload.// Selecting a scout resets the tab, so the URL's tab had to be applied after that reset.describe('the scout page tab in the URL', () => {diff --git a/products/signals/frontend/inbox/inboxSceneLogic.ts b/products/signals/frontend/inbox/inboxSceneLogic.tsindex 1a361c88fbd3..ff653f5744d9 100644--- a/products/signals/frontend/inbox/inboxSceneLogic.ts+++ b/products/signals/frontend/inbox/inboxSceneLogic.ts@@ -1258,7 +1258,12 @@ export const inboxSceneLogic = kea<inboxSceneLogicType>([actions.setTriageOpen(true)}},- [urls.inbox()]: (_, __, hashParams) => {+ [urls.inbox()]: (_, searchParams, hashParams) => {+ const redirectPath = inboxTabRedirectPath(undefined, searchParams)+ if (redirectPath) {+ router.actions.replace(redirectPath, searchParams, hashParams)+ return+ }markInboxListVisited()consumeScoutTemplateHash(actions, hashParams)closeAllSurfaces()@@ -1269,7 +1274,7 @@ export const inboxSceneLogic = kea<inboxSceneLogicType>([}// Tab segments from the old inbox layout still arrive from Slack messages and// bookmarks: send them to the surface that replaced them.- const redirectPath = inboxTabRedirectPath(tab)+ const redirectPath = inboxTabRedirectPath(tab, searchParams)if (redirectPath) {router.actions.replace(redirectPath, searchParams, hashParams)return@@ -1283,10 +1288,11 @@ export const inboxSceneLogic = kea<inboxSceneLogicType>([}markInboxListVisited()consumeScoutTemplateHash(actions, hashParams)+ // A selected report takes precedence in actionToUrl, so clear it before changing tabs.+ closeAllSurfaces()if (isInboxTabKey(tab) && values.activeTab !== tab) {actions.setActiveTab(tab)}- closeAllSurfaces()},[urls.inboxScout(':skillName')]: ({ skillName }: { skillName?: string },diff --git a/products/signals/frontend/inbox/signalSourcesLogic.test.ts b/products/signals/frontend/inbox/signalSourcesLogic.test.tsindex 7ef4b2f30b6e..c1f95a8b4433 100644--- a/products/signals/frontend/inbox/signalSourcesLogic.test.ts+++ b/products/signals/frontend/inbox/signalSourcesLogic.test.ts@@ -265,42 +265,64 @@ describe('signalSourcesLogic', () => {toastError.mockRestore()})- it('resumes Intercom setup after OAuth and enables signals on completion', async () => {- logic.unmount()- router.actions.push(- '/inbox',- { setup: 'signal-sources', signal_source: 'intercom', integration_id: '7', source: 'saved-filter' },- { tab: 'details' }- )- const callbackPath = router.values.location.pathname- const createConfig = jest.spyOn(api.signalSourceConfigs, 'create').mockResolvedValue({- ...githubIssuesConfig,- source_product: SignalSourceProduct.Intercom,- source_type: SignalSourceType.Ticket,- })- logic = signalSourcesLogic()- logic.mount()- logic.actions.loadSourceConfigsSuccess([])+ it.each(['/inbox', '/inbox/sources'])(+ 'resumes Intercom setup after OAuth on %s and enables signals on completion',+ async (path) => {+ logic.unmount()+ router.actions.push(+ path,+ { setup: 'signal-sources', signal_source: 'intercom', integration_id: '7', source: 'saved-filter' },+ { tab: 'details' }+ )+ const callbackPath = router.values.location.pathname+ const intercomConfig = {+ ...githubIssuesConfig,+ source_product: SignalSourceProduct.Intercom,+ source_type: SignalSourceType.Ticket,+ }+ let saved = false+ const createConfig = jest.spyOn(api.signalSourceConfigs, 'create').mockImplementation(async () => {+ saved = true+ return intercomConfig+ })+ useMocks({+ get: {+ '/api/projects/:team_id/signals/source_configs/': () => [+ 200,+ { results: saved ? [intercomConfig] : [] },+ ],+ },+ })+ logic = signalSourcesLogic()+ logic.mount()+ logic.actions.loadSourceConfigsSuccess([])- expect(logic.values.dataSourceSetupSource).toBe('intercom')- const redirect = new URL(logic.values.dataSourceSetupOAuthRedirectUrl!, 'https://example.com')- expect(redirect.pathname).toBe(callbackPath)- expect(redirect.searchParams.get('signal_source')).toBe('intercom')- expect(redirect.searchParams.get('source')).toBe('saved-filter')+ expect(logic.values.dataSourceSetupSource).toBe('intercom')+ const redirect = new URL(logic.values.dataSourceSetupOAuthRedirectUrl!, 'https://example.com')+ expect(redirect.pathname).toBe(callbackPath)+ expect(redirect.searchParams.get('signal_source')).toBe('intercom')+ expect(redirect.searchParams.get('source')).toBe('saved-filter')- await expectLogic(logic, () => logic.actions.onDataSourceSetupComplete()).toFinishAllListeners()+ await expectLogic(logic, () => logic.actions.onDataSourceSetupComplete()).toFinishAllListeners()- expect(createConfig).toHaveBeenCalledWith({- source_product: 'intercom',- source_type: 'ticket',- enabled: true,- config: {},- })- expect(logic.values.dataSourceSetupSource).toBeNull()- expect(router.values.searchParams.signal_source).toBeUndefined()- expect(router.values.searchParams.source).toBe('saved-filter')- createConfig.mockRestore()- })+ expect(createConfig).toHaveBeenCalledWith({+ source_product: 'intercom',+ source_type: 'ticket',+ enabled: true,+ config: {},+ })+ expect(logic.values.dataSourceSetupSource).toBeNull()+ expect(router.values.searchParams.signal_source).toBeUndefined()+ expect(router.values.searchParams.source).toBe('saved-filter')+ expect(+ logic.values.rosterGroups.find((group) => group.id === 'external')?.agents.map((agent) => agent.source)+ ).toContain('intercom')+ expect(+ logic.values.sourceCatalog.flatMap((group) => group.items.map((item) => item.agent.source))+ ).not.toContain('intercom')+ createConfig.mockRestore()+ }+ )it.each([{ status: 200, reason: 'integration' },@@ -374,10 +396,13 @@ describe('signalSourcesLogic', () => {expect(external()).toEqual(['jira', 'gitea'])expect(logic.values.externalSourceStates.jira).toMatchObject({ connected: true, requiresSetup: false })expect(logic.values.externalSourceStates.sentry).toMatchObject({ connected: false, requiresSetup: true })- expect(recommended()).toEqual([- ['gitea', 'synced'],- ['github', 'integration'],- ])+ expect(recommended()).toEqual([['github', 'integration']])+ const catalogSources = (): string[] =>+ logic.values.sourceCatalog.flatMap((group) => group.items.map((item) => item.agent.source))+ expect(catalogSources()).not.toContain('jira')+ expect(catalogSources()).not.toContain('gitea')+ expect(logic.values.sourceCatalog[0].category).toBe('Recommended for you')+ expect(catalogSources().filter((source) => source === 'github')).toHaveLength(1)const connectedSources = (['Gitea', 'Bugsnag', 'Honeybadger', 'Raygun'] as const).map((source_type) => ({...githubSource,@@ -385,7 +410,7 @@ describe('signalSourcesLogic', () => {source_type,}))sourcesDataLogic.actions.loadSourcesSuccess({ results: connectedSources, next: null, previous: null })- expect(recommended()).toHaveLength(4)+ expect(recommended()).toEqual([['github', 'integration']])logic.actions.hideSourceRecommendations()expect(recommended()).toEqual([])sourcesDataLogic.actions.loadSourcesSuccess({@@ -393,7 +418,8 @@ describe('signalSourcesLogic', () => {next: null,previous: null,})- expect(recommended()).toEqual([['rollbar', 'synced']])+ expect(recommended()).toEqual([])+ expect(external()).toContain('rollbar')featureFlagLogic.actions.setFeatureFlags([], { [FEATURE_FLAGS.ENGINEERING_ANALYTICS]: true })expect(logic.values.sourceCategoryOptions).toContainEqual({ label: 'Engineering', value: 'Engineering' })@@ -410,7 +436,12 @@ describe('signalSourcesLogic', () => {expect(logic.values.sourceCatalog.map((group) => [group.category, group.items.map((item) => item.agent.source)])).toEqual([['Error tracking', ['sentry']]])- logic.actions.closeSourceCatalog()+ logic.actions.openDataSourceSetup('sentry')+ logic.actions.closeDataSourceSetup()+ expect(logic.values.sourceSearchQuery).toBe('SENTRY')+ expect(logic.values.sourceCategory).toBe('Error tracking')+ logic.actions.setSourceSearchQuery('')+ logic.actions.setSourceCategory('')expect(logic.values.sourceCatalog.length).toBeGreaterThan(1)expect(logic.values.rosterGroups.find((group) => group.id === 'posthog')?.agents.length).toBeGreaterThan(0)})@@ -428,11 +459,11 @@ describe('signalSourcesLogic', () => {onboardingState = { draft: state.draft, completed_at: null }sourcesDataLogic.actions.loadSourcesSuccess({ results: warehouseSources, next: null, previous: null })await expectLogic(logic, () => logic.actions.loadSourceConfigs()).toFinishAllListeners()- expect(logic.values.visibleSourceRecommendations.map(({ agent }) => agent.source)).toEqual(['jira'])+ expect(logic.values.recommendedSources.map(({ agent }) => agent.source)).toEqual(['jira'])onboardingState = { ...onboardingState, completed_at: '2024-03-10T00:00:00Z' }await expectLogic(logic, () => logic.actions.loadSourceConfigs()).toFinishAllListeners()- expect(logic.values.visibleSourceRecommendations.map(({ agent }) => agent.source)).toEqual(state.expected)+ expect(logic.values.recommendedSources.map(({ agent }) => agent.source)).toEqual(state.expected)})it.each(['project', 'user'])('isolates recommendation dismissals by %s across reloads', (scope) => {diff --git a/products/signals/frontend/inbox/signalSourcesLogic.ts b/products/signals/frontend/inbox/signalSourcesLogic.tsindex 9d894873cf9a..bbd3dce098d2 100644--- a/products/signals/frontend/inbox/signalSourcesLogic.ts+++ b/products/signals/frontend/inbox/signalSourcesLogic.ts@@ -140,6 +140,7 @@ export interface SourceCatalogItem {syncFailed: booleanloading: booleanblockedReason?: string+ recommendation?: SourceRecommendation}export interface SourceCatalogGroup {@@ -335,7 +336,6 @@ export interface signalSourcesLogicValues {rosterGroups: AgentRosterGroup[]scannerInventoryKnown: booleansourceCatalog: SourceCatalogGroup[]- sourceCatalogOpen: booleansourceCategory: stringsourceCategoryOptions: {label: string@@ -365,9 +365,6 @@ export interface signalSourcesLogicActions {closeLinearTeamsPicker: () => {value: true}- closeSourceCatalog: () => {- value: true- }closeSourcesModal: () => {value: true}@@ -468,9 +465,6 @@ export interface signalSourcesLogicActions {source: WarehouseBackedSource}openLinearTeamsPicker: (state: LinearTeamsPickerState) => LinearTeamsPickerState- openSourceCatalog: () => {- value: true- }openSourcesModal: () => {value: true}@@ -527,6 +521,9 @@ export interface signalSourcesLogicActions {setSourceSearchQuery: (query: string) => {query: string}+ sourceCatalogViewed: () => {+ value: true+ }startDataWarehouseSourceToggle: (source: WarehouseBackedSource) => {source: WarehouseBackedSource}@@ -716,7 +713,8 @@ export interface signalSourcesLogicMeta {ciSignalsIsFullyEnabled: boolean,isCiSignalsToggling: boolean,sourceConfigs: SignalSourceConfig[] | null,- sourceConfigsLoading: boolean+ sourceConfigsLoading: boolean,+ visibleSourceRecommendations: SourceRecommendation[]) => SourceCatalogGroup[]sourceCategoryOptions: (externalAgents: AgentRosterDefinition[]) => {label: string@@ -1014,8 +1012,7 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([setScannerInventoryKnown: (known: boolean) => ({ known }),setSourceSearchQuery: (query: string) => ({ query }),setSourceCategory: (category: string) => ({ category }),- openSourceCatalog: true,- closeSourceCatalog: true,+ sourceCatalogViewed: true,selectCatalogSource: (source: WarehouseBackedSource, origin: SignalSourceCatalogOrigin) => ({source,origin,@@ -1164,21 +1161,8 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([null as boolean | null,{ setErrorTrackingHasIssues: (_, { hasIssues }) => hasIssues },],- sourceSearchQuery: ['', { setSourceSearchQuery: (_, { query }) => query, closeSourceCatalog: () => '' }],- sourceCategory: ['', { setSourceCategory: (_, { category }) => category, closeSourceCatalog: () => '' }],- // The connect form is a step inside the catalog, so resuming one after OAuth reopens the catalog- // around it. The Linear teams picker is a modal of its own, so the catalog yields to it.- sourceCatalogOpen: [- false,- {- openSourceCatalog: () => true,- openDataSourceSetup: () => true,- closeSourceCatalog: () => false,- openLinearTeamsPicker: () => false,- closeSourcesModal: () => false,- },- ],- // Remember existing synced sources so only a new connection can undo a dismissal.+ sourceSearchQuery: ['', { setSourceSearchQuery: (_, { query }) => query }],+ sourceCategory: ['', { setSourceCategory: (_, { category }) => category }],sourceRecommendationsDismissal: [null as string[] | null,{ ...buildUserScopedPersistenceConfig(), storageKey: SOURCE_RECOMMENDATIONS_DISMISSAL_STORAGE_KEY },@@ -1196,7 +1180,6 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([{openDataSourceSetup: (_, { source }) => source,closeDataSourceSetup: () => null,- closeSourceCatalog: () => null,closeSourcesModal: () => null,},],@@ -1383,6 +1366,7 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([s.isCiSignalsToggling,s.sourceConfigs,s.sourceConfigsLoading,+ s.visibleSourceRecommendations,],(agents: AgentRosterDefinition[],@@ -1393,7 +1377,8 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([ciEnabled: boolean,ciToggling: boolean,sourceConfigs: SignalSourceConfig[] | null,- sourceConfigsLoading: boolean+ sourceConfigsLoading: boolean,+ recommendations: SourceRecommendation[]): SourceCatalogGroup[] => {const needle = query.trim().toLowerCase()// Without the config rows a synced tool reads as never turned on, and a click would@@ -1403,7 +1388,7 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([? undefined: sourceConfigsLoading? 'Loading your signal sources'- : "Couldn't load your signal sources. Close this and select Retry."+ : "Couldn't load your signal sources. Select Retry above to try again."const items = agents.filter((agent) =>@@ -1420,6 +1405,7 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([syncFailed: state.config?.status === SignalSourceConfigStatus.FAILED,loading: state.loading,blockedReason: state.blockedReason ?? configsBlockedReason,+ recommendation: recommendations.find((item) => item.agent.source === agent.source),}}return {@@ -1428,12 +1414,22 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([enabled: ciEnabled,syncFailed: ciConfig?.sync_status === 'failed',loading: ciToggling,+ recommendation: recommendations.find((item) => item.agent.source === agent.source),}})- return CATALOG_CATEGORY_ORDER.map((groupCategory) => ({- category: groupCategory,- items: items.filter((item) => item.agent.category === groupCategory),- })).filter((group) => group.items.length > 0)+ .filter((item) => !item.connected && !item.enabled)+ return [+ {+ category: 'Recommended for you',+ items: recommendations.flatMap((recommendation) =>+ items.filter((item) => item.agent.source === recommendation.agent.source)+ ),+ },+ ...CATALOG_CATEGORY_ORDER.map((groupCategory) => ({+ category: groupCategory,+ items: items.filter((item) => !item.recommendation && item.agent.category === groupCategory),+ })),+ ].filter((group) => group.items.length > 0)},],sourceCategoryOptions: [@@ -1545,18 +1541,14 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([)},],- // Hidden means hidden, except for a tool synced after the person hid the strip: a fresh- // warehouse connection is the strongest hint the strip ever has.visibleSourceRecommendations: [(s) => [s.recommendedSources, s.sourceRecommendationsDismissal],(recommendations: SourceRecommendation[], dismissal: string[] | null): SourceRecommendation[] =>- (dismissal === null+ dismissal === null? recommendations- : recommendations.filter(- (recommendation) =>- recommendation.reason === 'synced' && !dismissal.includes(recommendation.agent.source)- )- ).slice(0, MAX_SOURCE_RECOMMENDATIONS),+ .filter((recommendation) => recommendation.reason !== 'synced')+ .slice(0, MAX_SOURCE_RECOMMENDATIONS)+ : [],],githubIssuesConfig: [(s) => [s.sourceConfigs],@@ -1908,19 +1900,14 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([return {closeDataSourceSetup: forgetResumedSetup,- closeSourceCatalog: forgetResumedSetup,- openSourceCatalog: () => {+ sourceCatalogViewed: () => {captureSignalSourceCatalogOpened({recommendationCount: values.visibleSourceRecommendations.length,connectedCount: values.rosterGroups.find((group) => group.id === 'external')?.agents.length ?? 0,})},hideSourceRecommendations: () => {- actions.setSourceRecommendationsDismissed(- values.recommendedSources- .filter((recommendation) => recommendation.reason === 'synced')- .map((recommendation) => recommendation.agent.source)- )+ actions.setSourceRecommendationsDismissed([])},selectCatalogSource: ({ source, origin }) => {const reason = values.recommendedSources.find(@@ -1933,18 +1920,6 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([actions.toggleCiSignals()}},- // A source that turned on from the catalog shows up in the roster, so the catalog gets out of- // the way. A connect form stays: its own completion closes the catalog below.- toggleSignalSourceSuccess: ({ params }) => {- if (params.enabled && values.sourceCatalogOpen && values.dataSourceSetupSource === null) {- actions.closeSourceCatalog()- }- },- loadCiSignalsConfigSuccess: ({ ciSignalsConfig }) => {- if (ciSignalsConfig.enabled && values.sourceCatalogOpen && values.dataSourceSetupSource === null) {- actions.closeSourceCatalog()- }- },loadSourceConfigs: () => {if (!values.onboardingStateLoading) {actions.loadOnboardingState()@@ -2014,7 +1989,7 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([},onDataSourceSetupComplete: () => {const source = values.dataSourceSetupSource- actions.closeSourceCatalog()+ actions.closeDataSourceSetup()actions.loadSources()if (source === null) {returndiff --git a/products/signals/frontend/inbox/types.ts b/products/signals/frontend/inbox/types.tsindex 00d9401a331f..972e16b713b9 100644--- a/products/signals/frontend/inbox/types.ts+++ b/products/signals/frontend/inbox/types.ts@@ -255,6 +255,7 @@ export function linearTeamIdsFromConfig(config: Record<string, any> | null | undexport type InboxTabKey =| 'reports'| 'scouts'+ | 'sources'| 'settings'| 'pulls'| 'not-actionable'@@ -263,11 +264,12 @@ export type InboxTabKey =| 'config'/** The page tabs the inbox renders. */-export const INBOX_TAB_KEYS: InboxTabKey[] = ['reports', 'scouts', 'settings']+export const INBOX_TAB_KEYS: InboxTabKey[] = ['reports', 'scouts', 'sources', 'settings']export const INBOX_TAB_LABEL: Record<InboxTabKey, string> = {reports: 'Reports',scouts: 'Scouts',+ sources: 'Sources',settings: 'Settings',pulls: 'Pull requests','not-actionable': 'Not actionable',@@ -279,8 +281,9 @@ export const INBOX_TAB_LABEL: Record<InboxTabKey, string> = {/** What each tab holds, surfaced as the scene description while that tab is active so new users can orient themselves. */export const INBOX_TAB_DESCRIPTION: Record<InboxTabKey, string> = {reports: 'Issues and opportunities found in your product, ready to review.',- scouts: 'Scheduled agents that sweep this project and file what they find.',- settings: 'Signal sources, PR generation, code access, and notifications.',+ scouts: 'Scouts run on a schedule and investigate the areas you choose.',+ sources: 'Sources send signals for self-driving to investigate.',+ settings: 'Configure autonomy, agent instructions, code access, and notifications.',pulls: 'Pull requests agents opened to resolve reports. Review and merge them on GitHub.','not-actionable':'Reports judged not actionable because they are too vague, lack supporting evidence, or describe expected behavior.',diff --git a/products/signals/frontend/inbox/utils/inboxReportUrls.test.ts b/products/signals/frontend/inbox/utils/inboxReportUrls.test.tsindex 70fa7925c303..3c1270668a71 100644--- a/products/signals/frontend/inbox/utils/inboxReportUrls.test.ts+++ b/products/signals/frontend/inbox/utils/inboxReportUrls.test.ts@@ -28,6 +28,7 @@ describe('inbox report urls', () => {// Live segments and bare report ids are left for their own route handlers.['reports', null],['scouts', null],+ ['sources', null],['settings', null],['0198a1b2-report-id', null],[undefined, null],diff --git a/products/signals/frontend/inbox/utils/inboxReportUrls.ts b/products/signals/frontend/inbox/utils/inboxReportUrls.tsindex 3964e932901a..2aa637e5d043 100644--- a/products/signals/frontend/inbox/utils/inboxReportUrls.ts+++ b/products/signals/frontend/inbox/utils/inboxReportUrls.ts@@ -21,7 +21,14 @@ export function inboxReportDetailUrl(reportId: string, backUrl?: string): string* The three old report lists (`pulls`, `archived`, `not-actionable`) are sections of one list, so* they all resolve to it.*/-export function inboxTabRedirectPath(tab: string | undefined): string | null {+export function inboxTabRedirectPath(+ tab: string | undefined,+ searchParams: Record<string, unknown> = {}+): string | null {+ // OAuth callbacks may still target the page where a source connection was started.+ if (searchParams.setup === 'signal-sources' && (tab === undefined || tab === 'config' || tab === 'settings')) {+ return urls.inbox('sources')+ }switch (tab) {case 'pulls':case 'archived':