: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(heatmaps): simplify setup and historical views (#118202)
Jordan Mryyan1588d79e57c2
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 8582465b5206..310638b51301 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -7979,25 +7979,25 @@ snapshots:products-web-analytics-content-autopilot-workspace--site-settings--light:hash: v1.k794b7964.db7571e09c46c966f50fb87b8b34511803d4aef56c41faa405c2db039f17fa43.PUpkT3j7DpGmhBztUzWMk0vKk_5cA4nMK6WztMyXBREproducts-web-analytics-heatmaps-page-history-tile--captured--dark:- hash: v1.k794b7964.3881025c6495a4df5758fddd204376e5f589273afb0736c2467005013fb7db1e.JnN8qnMYkIRJDCnuutYXiHORM5IeymnAyeHzgOhTq6w+ hash: v1.k794b7964.f413577b9b77e5609dfd55b0d14582561ff63365e2f0f2fcbe3d8ece4c13002a.3l1GQMU3xn1wph28KJq3vuY3Z0Lg-FEpiDNug82yI68products-web-analytics-heatmaps-page-history-tile--captured--light:- hash: v1.k794b7964.1f051deb08f0684793ab4c368f61f0d2954482e907e4bf36f96cf46188de3e5e.5Mfyo0QNQtrQXn0FQLJWL4sG619U6KrmSTz-eJkTtdQ+ hash: v1.k794b7964.1f47ff157e70b02aa2be4c261f3f6c2f0bdb8d1dda0d50e1f3f39c0d710b4166.vmI18HlxomVIo3mz-iUMSXMa2HKl6yocInA7OI0WsYYproducts-web-analytics-heatmaps-page-history-tile--failed-replacement--dark:- hash: v1.k794b7964.41cc67fd2ca7954749a809171bfe4408246645265186cb30e7bed83237d85b8f.OnixNd4o0S1uBf8tibvjo9aR1LmLAcS4iEapEKHTETs+ hash: v1.k794b7964.741a25d0f1a1e6a3bec9925131c5c3ae0fd5b244b01e2759e6a0914e218bf92c.XlLpmPgNLS_EiXtIZ1onW3QHs1VTdBT1x9eBfaTjghwproducts-web-analytics-heatmaps-page-history-tile--failed-replacement--light:- hash: v1.k794b7964.22a4954721b94af4e0a5c30f68649a2d7b2124dcb1c60130cb653415df96a50d.KvqRcS4kG5VzsPlLglhBPS_SdbXGx0dbh_9571yzb_U+ hash: v1.k794b7964.f0a36c80b3d5c4dd38ed590d60d282208211755317e128445a31425540702183.65mDlRaQHMwI7-0FOKiJ_utl7Mse1LuYQnSvG75R5kcproducts-web-analytics-heatmaps-page-history-tile--first-capture-in-progress--dark:- hash: v1.k794b7964.fbc7ea2a46697130dbe9382c230189afda07dfaaa8a75fba1b0cffba1bf826c1.w5ppzkqjBeijdddhNYyone3GeKl8IWypGmYEMSkqsCA+ hash: v1.k794b7964.e8effc648820456c6985202fe539c6fe1264868ce20dea13c13b18e4973a6187.sJv9Lgwf7KRNDy_nHUmQqguvhlTYvvtpOVWAiJ95BM8products-web-analytics-heatmaps-page-history-tile--first-capture-in-progress--light:- hash: v1.k794b7964.43d9fc75e730eaa1625d7fd950d33052dee9d2124362de6365eeaf802968d0c0.E_I3dZnHJgMAB9dWW_GfR-0t7A8QKzVazpxJll60mAw+ hash: v1.k794b7964.420d8bdb18d4cf02b33ffdd664a400577ee3d64d12f34a04cf07c354734e281f.M6Rhq8ImVO98QQwEPwofeo8RAcUIJ06pfuDqgO0Eaaoproducts-web-analytics-heatmaps-page-history-tile--missing-thumbnail--dark:- hash: v1.k794b7964.d2c2d8b7ff56af22ad0e660a0c0e980eaa1507e028a5672c0ea11deb6ddae0a5.Xmj4QT0V1HKVw5uHABS-adxui7U8vaj7lRrN-LQmVSc+ hash: v1.k794b7964.0634b26c1d9ab762efb35b6e6935b5aa5aa3373c8a7e987787e6d8e314acfd3e.Zt4y62_5H_w9fhSAwV6jRjciolwfGx6rXXflx4-Mnxgproducts-web-analytics-heatmaps-page-history-tile--missing-thumbnail--light:- hash: v1.k794b7964.8e1f91f8d155b7a66ea393cf1895dd025176eea1635934f2be63cfaa4ad3b01c.6OBO6UhXyUZzrVyL0sGkvKLoVwdfEI3X_kGadCOGkCI+ hash: v1.k794b7964.8b53b16896b68d6f7dafae802b26786f1329e27f999b5fa2acc05ba1db5b6963.B4w7wj5hNLEf-kl8cePKmp6yCKi2SvoGXE33empOWBYproducts-web-analytics-heatmaps-page-history-tile--selected-background--dark:- hash: v1.k794b7964.8d3d7f4ba2a97212a0d1c68b16982ba71a902cf6d8889d48022f2cfe59ce9209.2MwScNH2wVIx6uK_QijfCBCFnw4z-KRihTOEpsITQgI+ hash: v1.k794b7964.c72c7e793f9f3725dc284ac6d8d8a8b39dc864a203eeb2383b23017c9f936612.B5aanH19C7nGRTh8ADjiMQk9BvBIs3dHvELe1DgzA5Uproducts-web-analytics-heatmaps-page-history-tile--selected-background--light:- hash: v1.k794b7964.3435d41444afd76282bbfd17dd3bc2d9d037846aa9270252a2b591b6a8ed1b10.u6-DZZ7Y9yreXXUYUtH-Cue2cQmxLhVfiN9Ipu7WUUA+ hash: v1.k794b7964.b1509fdc1297f04f188ca9d5827ffba9e5c3da92d95359ee35aced109390caac.F7J-6dxSL2B9uVIkexLuxAdzaL4wllQUoIVkkmsu3xwproducts-wizard-wizard-run-diff-viewer--default--dark:hash: v1.k794b7964.17c89495f75eed7f73f303b37e9871070e332d1f2b82ff0817f9d1ddd27828c0.bQzhC4f7HDdgFTn6hyiTj0toFWvU9TaivKJpUyOHcBIproducts-wizard-wizard-run-diff-viewer--default--light:@@ -10939,125 +10939,137 @@ snapshots:scenes-app-health-tables--web-analytics-empty--light:hash: v1.k794b7964.3597e7770e8308581101896e95346e2c84d09419cd39b92d5137ca1fa57adfa5.lpfx7m5tiYOuJWlnL6irM5RlG8w1xVzwDwLaR6ETEpYscenes-app-heatmap--blocked-preview--dark:- hash: v1.k794b7964.2bfcbcd59abe132d433765386aca9126fb991150dd85608ee31f8bd5de430af3.ur3NeHXyBkXHVq5IAS6P1FtnNjs_FVm5mmnOkaUvtEk+ hash: v1.k794b7964.9d1709fdaf1e1dcd6281be009b013443ac8ac8421e013054108c66b07ecfd53e.o0o_7yiAxZk53BezJ2TM9MGv3t0HLpruX7Ge73vxaZcscenes-app-heatmap--blocked-preview--light:- hash: v1.k794b7964.18f2ff5ac1ff3e1a1307539292d5437c25d4822fad8d2b048103d3020b285bf1.7qqrcfUk3mDvJKP7SSPfvr_mwoKu-ivUhn2oOK6xS8Y+ hash: v1.k794b7964.bc5025cbb8bc96ef6d46a5e7d831523a1400c9f4222cfce28d6a1cd1c94c8b89.z1nFgXOLiZgNAbw-9gNtEH0V4UDx-ohgt0FwH25R-hsscenes-app-heatmap--blocked-preview-narrow--dark:- hash: v1.k794b7964.37cf7e1adca49250d4f897857db29d76a66dc7cbb760544ef25f61bc6130b3b7.TF_emc4uFiR_iOQdgadWVFwc-SBVaHUQ9beOf8dPyV0+ hash: v1.k794b7964.22491e32c08ca800056e2cb85576d0a21c0f480774613978b1a3b76d41c6dd9e.kDFFUs8RfsqMsM_u7lWKIXd0q60Q9RZDz6pDXsqUVkQscenes-app-heatmap--blocked-preview-narrow--light:- hash: v1.k794b7964.2a26b4a7919f380c0652a40336fe0f6c081591c723a175fd9c6e27fb871a5af7.aENTH12b6uQfQpI_sKhhhrS4c0qSPPlY61EmZEdj7Uo+ hash: v1.k794b7964.7661668ccab3b84b51f3b4c678bc86d04442cd75a6b95cd4559eaaf1c4f67f65.GhDpNLdX9-dmYVxL6ggaB5LA7eNcBANCSvnDTsOmL5Escenes-app-heatmap--empty-with-data-at-another-width--dark:- hash: v1.k794b7964.ceb0ee9e077303c6859f2d5ef31cb974b2db546fe3ae736b40c025cdd9dd5ce1.IvEDL1NkmIslYJ8V5j6XsEK9k1P5ORPA-e0SlDcmIKk+ hash: v1.k794b7964.02e96a77d1709c2f15dad917f99c2aeb127c1acaf04706251f21285bcb1948a8.x6OVXUUdRm62mDqaFQZ5E0sdyRKuq7b-1NYcojE68gkscenes-app-heatmap--empty-with-data-at-another-width--light:- hash: v1.k794b7964.773927ab6dee60e47a84f30de223effb52dc3f57f7f7153d24807fcee0c92d1d.i0y3P_e1EoOCI3hd8nynrNVGRFMcCdJTNusJPiOzyew+ hash: v1.k794b7964.4c2a9900a81557bca8be7dd2b15d57906d63b3060f02c8fee7541f4d381b6748.i4Ma-bWC4Bktzpa2EsxTyFtcWE2dH5b4gWmsWXN7po8scenes-app-heatmap--empty-with-similar-urls--dark:- hash: v1.k794b7964.8b492692a483806a22e9fa2c676490faf557a7245134dddd868fec57bc0af21f.GB2J4ik1aoCgKvh5KH573sYMBv1bGxGmuzYpKnyAIrQ+ hash: v1.k794b7964.d108b5e93d12a70cc933a786b4a6eaac5e3026c80f882b12782054744c18e8c4.7HQ9wWxgqrXbmLAbJieaK6FhGWA3U3uFe63Mlvbaajwscenes-app-heatmap--empty-with-similar-urls--light:- hash: v1.k794b7964.cef018c7859bdc01e51614500656027d816a6db8b48dff269951b2d4e9caab5e.g2wPXw79i47pOxKOsUWC_kyeEqw-QyLkC_0g5Iy6sFs+ hash: v1.k794b7964.df8c776210c3e27b7ac043508fd530578d7fd51e6446783ffec74839ce9e7b5b.HMkVMXCFQaF_ICLqB27X7zXzYqhFsGrO1BiRlM8YDEoscenes-app-heatmap--generating--dark:- hash: v1.k794b7964.9d4260c0f995e7dab1dce843dea2bb4d65cde7985de37c3d9c22bc1076e99222.0K0DVWC3ZQ2Azz6yFsqNOS-6TDOAzN1irTWpegrFNks+ hash: v1.k794b7964.8003cb2d4c4ef9431e8dbb4e82ad6b870b6aeacfe088bf36fada5c9a1c8b652a.NwknZ4bL47QkPuPqVIEQOvud-9Y2zRzzxkoAv7ywW4cscenes-app-heatmap--generating--light:- hash: v1.k794b7964.3bb8caf591d48254690d88d7fd91f56d37f174fd436856e05068fc48b6447c8c.sj0fwc61KHPb3o_hlXH-J5n47Aa8TVTmCRmQvWWcaDM+ hash: v1.k794b7964.c0cd8928908fab30464cb146480c27d04e80843c4e8183492754f36dcdde4dee.gNjj8CsPbJypPeIhw1in8x0RIQNyN4iR5pkEtsPWBhsscenes-app-heatmap--historical-day--dark:- hash: v1.k794b7964.460c7aa2326c13351e8d42b737e8529f0d3557ba311bb097cd6a34c2d8ed38a8.brpuqdCaYi2TStnZvORDKkY6fx__AcDcPp9ai5NzZS8+ hash: v1.k794b7964.ba11bfaa9d62270a962e25b7663ffb58b7488c52e2c831f7646574e9156c28e0.iyWtpTIfBeYvKH6nubrOpQAUB6KuBLpP5tGz5AQsJaMscenes-app-heatmap--historical-day--light:- hash: v1.k794b7964.0a91a0dd93dd04277099c7b9fc39abedfcec062e5988f9692641c3d8ea61aff9.fibuxYBkpOd-KpkP-OugBCbxwbcxgaEUAUCeNBGFrLE+ hash: v1.k794b7964.0685ed777aa30187ab2ac78807388ed5b7d2dc9ef9a009740b8af60efb3f53b5.MvaKrlCzyh9IAhrH3GIa3nDM8YBcRhpjXZ6mr0F2Kv4scenes-app-heatmap--historical-day-narrow--dark:- hash: v1.k794b7964.d6e870a63d60094651d8aea51f67d8cc9f19aabdb308e932784079979c0d9ee3.y9kS46cisT8MHXTqwYa8CNXh5H9rbcJPEAwnsXD62bQ+ hash: v1.k794b7964.63b8262a178e9c9defecea8a768c938904f055accc8f104b5e70c512711c702c.F0UarFELYnCg1aUiDgNkufwTjjPSe5Kp8HfmapPckjAscenes-app-heatmap--historical-day-narrow--light:- hash: v1.k794b7964.df72a86e80079b5e0a0fd639a4c0645c70ab3f7f72bf7b016ecc72cce4c3c1a8.MihSk2xNk3DZNKYIW6D10yRFKTqlHFcPg3DaqYgOLto+ hash: v1.k794b7964.f6f9fa7db4f153060ceb5c8af27499e315f225eb2db9b07da6bf84d1a15e56ee.dOXAyJIFc5B-BaGob53tKYMyLKnlVFbtcnyN_UdFBpYscenes-app-heatmap--iframe-example--dark:- hash: v1.k794b7964.edc8641f41da1365aaa55e532b36b6fe272234b86f6ce1ef317d0d3d586eac79.kgs_gmdNN7IN2c8RZPsQrShFeZ8ChwmTy0atI73o1ws+ hash: v1.k794b7964.9dbc0f1f6cdc41fceef6c858718841c0d11bc589a9de9903b871941b9957257d.VbM3CQGHOhByDlAbPpJ7ltRHZXScQDk9KSnNX-xuCFkscenes-app-heatmap--iframe-example--light:- hash: v1.k794b7964.6fda90f06ebf5bbce69387216ff601333f61f245ae3d1b85ce44a550cf57d293.VbH_pBdTsLOFUYFRyAAextprvOpeuvmAqDeC-qHraFg+ hash: v1.k794b7964.64f2f3c154d063a657b4f62b775115b48cb6e690edb6b411d76efa79de44d5fd.Er8SfC22VYWAjo_fCf6FFbbhrCDDxJMNvDL2S-84b4sscenes-app-heatmap--iframe-example-with-event-filter--dark:- hash: v1.k794b7964.08c2dc775da48f30794ee09ecccc94f46128d266f61c21ab97ff27e8602b05b8.zHSrBS5hw2G4HsrcwUAPNUd1mFVXHYhNv3lwrp8NAoo+ hash: v1.k794b7964.204829c12554beca6c6b3e72f324213aa5ec06ef3bf0adb8a3f5f243a4090153.4fYW-XpZwxbVKqw1qmW7r44W2cx7x6YeTFzyhG2aqcEscenes-app-heatmap--iframe-example-with-event-filter--light:- hash: v1.k794b7964.171fb140a6c5d3bc5d62be40dc27f18f3bbaa1b742f29da071e7993c569f5886._zyomdb0yuLLhatWsYZgh481hj3CDOQf-wn_uyJ_MQM+ hash: v1.k794b7964.ebb6992b2e37945176db9576d48df99cefff7a0d19fd1f940040b1496dfe34c3.hYHkL8XMt-_ab9TRkhTy19z_-Q8dWf3pbNlVvp4VMGEscenes-app-heatmap--new--dark:hash: v1.k794b7964.cfd075c10189496c867372e36391cf5985948fe5a8137c434545f5825b15ac7e.IUvQTi7vHNPSGeWj-q6upJsHMLU3UpumxHwGBndOhYEscenes-app-heatmap--new--light:hash: v1.k794b7964.ec5a5410104285363cbd9367af0620e4e9674399712a898f32cc400fa7a993e7.I9v4DCi_Vj_NoXXOcFYninqMnCS3vrIk9uN6cBPEBtkscenes-app-heatmap--page-history--dark:- hash: v1.k794b7964.f76d7aa4688924fb38b129a7ef371bf056f45dfa662823cd394a5e29f2039015.V5cgLSSLk_vGCvcoN7TPnKbbn-VYRno8f0AefSYbqJg+ hash: v1.k794b7964.2469f262b3a7043a82649f7972b8132504a27776750f4c1813ad07794d70a95d.QQIaKJpQxLuXXZ_tLVAwYy0bCdiNzL9LjxMR7aJBfCEscenes-app-heatmap--page-history--light:- hash: v1.k794b7964.aa5526deff5fbfd96d91993227dd123a7fb6edcb2b3702f5b0e2ea0295969de2.xZfKHj2RTpsL-AJZ5bmN9iTqdigEP94NtDKmIwRLUUI+ hash: v1.k794b7964.d6c587e5b9c47c0b366d373e3c99a9ec206d3b4d2f463459dbe8c1b75a6c57af._Xf7Wnjak-mKKeNgRyvsfMB9WWoT7TPe6ve1Fl92Ozw+ scenes-app-heatmap--page-history-browser--dark:+ hash: v1.k794b7964.e73cfaad9d31496542eb2cbd0a6af9042fe64ba9d05620983a3ebdd119e57b2e.aysuIMz-P2k3kqqJ0mJM4geeO_oXq3xS8U7iMOdqaUg+ scenes-app-heatmap--page-history-browser--light:+ hash: v1.k794b7964.b00ebfb09be964373472bfed3f80d9696b2a8189fd67be27932e61a829799e5c.z9Kd7pyofBHicNZ4HaAZnPORWvtky-RATBrQ2bwdaUk+ scenes-app-heatmap--page-history-browser-narrow--dark:+ hash: v1.k794b7964.f43e4649a64c3836c6aadb183765e1fb58ffb2bc3f37dbe4cc72715cae21a8f4.5NCOPBNaOCkYxHN17sj05cKhrTlBDziUDGC0Go7bxwQ+ scenes-app-heatmap--page-history-browser-narrow--light:+ hash: v1.k794b7964.eb8960b55ce8a991edc3778a13f38abc93fb329f79609af170047ad24b0b6d52.PQ3Q8oMgvfrBr3K9Mu9wDPHglL2_LPBk1T4aV__8Cnsscenes-app-heatmap--page-settings-dialog--dark:- hash: v1.k794b7964.4ec34661c29e460870e68fb4e5c372b3df3dd26c62289881c2636aa9018e8fb7.wA3prs5fChc4NeAfoN2lJS1iM0HN5Wrp0s0-r9B0jzA+ hash: v1.k794b7964.6b6dc0879db209137f481b880cd7c2d18c32717d014bd05f4cbc76c38caed956.ENoU-tP2-WQjc8bj5UNZpRsak04vLfm6ddsX0Tl59Zcscenes-app-heatmap--page-settings-dialog--light:- hash: v1.k794b7964.bbd49afc0166048d488899000747149fce60df059a3c9f89110d1a89f0c80795.QDtUmw44ex7iWirnh2Mod5h9M1h7LGp4aGpYZkEymfw+ hash: v1.k794b7964.b8b530ba86fbc831d36f63860b25b5a9cc5f08efb930447c8702412767bec691.ynKbB_1kBmmDf-jdzpmbncCZCIFcLu_XZm56m9uuErwscenes-app-heatmap--page-settings-dialog-narrow--dark:- hash: v1.k794b7964.dc9236733578bf1b20f499de8c697575a9e115a505914c59e14988ed0dcea7af.w1S7AM2Bd1zMLvEvIK9-y9bBV922KqBN9zFS1M_TAok+ hash: v1.k794b7964.9e709dab001b95abd9a2abf3b532c57901b50a4f0439a48727d263a2bf65baf3.ZktPPq8ioQE3u6nN-TZvAYzskZybFi41xmXolNSUYBgscenes-app-heatmap--page-settings-dialog-narrow--light:- hash: v1.k794b7964.c6fdd505da1fa2bf151c3fa554e3a93175b83f43a383c6a34a895dde0d7a7f45.EROVhdTYOT9KVpt7vdZswHP-v3dg9XbRPD7tKVW3Oj8+ hash: v1.k794b7964.97f3e07797f42993c4e1ada6aca69c8b14f2936b31405680e43a50d5634d6e2a.dThE2YiQj0lYqbVd7b_EN38pDXdDFG2fCN7CJP7sIlgscenes-app-heatmap--save-failed--dark:- hash: v1.k794b7964.e57ce09d875faa5a71687924d5191b6179e05d7bd6259ad668d125652aa6bd35.acWCHIYblfCuUBXaFZVTLsSNcWc1DQ5x85EXTKkzaKc+ hash: v1.k794b7964.2a95d41ff49e0dc6d15e11090273e9a57233957cf5d83fe7f23a51f49b168e7e.LFXBRZ2BF_z5QcwAt8bb6aBD0LY00pfEB82tfbwENdoscenes-app-heatmap--save-failed--light:- hash: v1.k794b7964.e88e69f1b26d536373f325c4d1169091ce2e5c28b0ccceca978c547f7b33a6ff.Zg46pHfiUC6OgYMEvH0h1pjatreYfqUnFKiLijwlqZY+ hash: v1.k794b7964.dc19ec682c2171e9782215e852bf314dabbb2fae06bc4b08024ee18e051336e0.oG-Dl4JXR0i2WAYeMa3RMQaS1WzCaOyzoqTkka__ImYscenes-app-heatmap--saved-successfully--dark:- hash: v1.k794b7964.e314d67704def067476743c09ef3478e5c42dba7568b7d1692ac65058bfad0e6.QIipPIRgvThQuMQ3_myLIl7E5EmlzT7eUsa9hUmrB_I+ hash: v1.k794b7964.ad161afd1013ecabf2aefb59bd028f720ce25c06f012b2e02aba970e9d49f688.VOI0hq3UntI7gck8XM8kAt47D3hG84JBGloR0_XUvmcscenes-app-heatmap--saved-successfully--light:- hash: v1.k794b7964.6d7667be266698d790399d0e1d94049a271146040c8a22ac91668e915912581b.sK7xk20UTF2wVjajXvDM7DZuIcKTtkn4UCD3OU7AbbA+ hash: v1.k794b7964.ccf1c5743357fb79d243fae3cc53071da3dbf4df0e763c45360a6255b7bf092a.JiKBFmS6SXRoOObyQEcQxz1w1UdSO4bT1RLsBIPDdXkscenes-app-heatmap--saving--dark:- hash: v1.k794b7964.4137108dcc7db8b5e16dfd6111c8189c1bd11043ff68df1322d0f5e2c2c44563.RE6LdPOhuTVhXDYmpJHH9shjywgYiog7io7W15q3HSQ+ hash: v1.k794b7964.9fc2ccf04ac24d5dfb216ea065de550d2c92455e9ee951218f77e2874cf1428a.HY7-8o25JxewCO7NCnuwBF0ERsBYTexH1wqQxWUxAt8scenes-app-heatmap--saving--light:- hash: v1.k794b7964.fc2f22a4edd69c921d8d18fe4872612e54cf30d2e17a3f6db0e73cabbc0c06b8.fQcv8KIXV8aYIw0IwSFgqAPpuqFaSrcsp_CcrGmc-rs+ hash: v1.k794b7964.9ea993a1de124e0f964fa91958f53483c67b2464371a8aa0000284f748790c62.qtqGcvvd4Or8AZyrHfZMhh-pTQOH0Z7NNqQsZN8gq5Qscenes-app-heatmap--switched-to-screenshot--dark:- hash: v1.k794b7964.b214a15aca3b81c4ff73b8809f072975bbd431674c243e64e852f094c58cd296._MD7mE8e5TT33y0FDLPBEbIoZRpT7OYP_PLHuh1iJoE+ hash: v1.k794b7964.48dbd43a5c21fc7057a71c5cf688431f094b006827af4aa48bf0f5b3dec86b67.H92_CkVVVBqRvWlh5P0ghU9E9MJ2_Hq4EH4kRAtck_Ascenes-app-heatmap--switched-to-screenshot--light:- hash: v1.k794b7964.458e49e51823b6c7e44eeea9b9c2931b002ddc4664a6b1f189e96ff1d6e1ae76.tA_kAuZxPz81nTPb80j45HRmR5Qi_N8l9Up2sf1ajvU+ hash: v1.k794b7964.f5ccee9168c8a7ee38ff977ab8f90590143993334555013dc5a29af8dd56ebf3.nzMxrEi2ZEwn4j0qOb5-3JEmPZjIh-VGUeqiG8n6Tiwscenes-app-heatmap--unsaved-changes--dark:- hash: v1.k794b7964.e57ce09d875faa5a71687924d5191b6179e05d7bd6259ad668d125652aa6bd35.R1ttFz0wfhk9gMErB7eEUHWPzA8TdKMErVpDKLfNYcM+ hash: v1.k794b7964.2a95d41ff49e0dc6d15e11090273e9a57233957cf5d83fe7f23a51f49b168e7e.PN2GTbBrxbnH7tix7FST4CFMB1CbTrlP7Q3JfA_Xkj4scenes-app-heatmap--unsaved-changes--light:- hash: v1.k794b7964.e88e69f1b26d536373f325c4d1169091ce2e5c28b0ccceca978c547f7b33a6ff.oBwPYQgKlLhmRY5yQ_gq_O-JjbOlbq-pG-8C4vkvjnQ+ hash: v1.k794b7964.dc19ec682c2171e9782215e852bf314dabbb2fae06bc4b08024ee18e051336e0.ZdDb0pY5ZMAY-sXch60nvMqmJpFcOqAt66pOQ-iaHw4scenes-app-heatmap--unsaved-changes-narrow--dark:- hash: v1.k794b7964.5163b9515316006e9782b8bc3bfdd6ed1502adae085b8545aa4dd5453a500fde.Bi-9jv_5rHXUFUCGaG__5HvdyjZCzP0htzR2_lwCFjU+ hash: v1.k794b7964.980c29717323cb4423fadc548c2158fea3bac8d038898db99eded5ad83253cee.Em2NsYzzZ877Vne5Ngn6bYZkMM87kbBL9t0uiUoWgzoscenes-app-heatmap--unsaved-changes-narrow--light:- hash: v1.k794b7964.cb39ef97453abf79fbd308d4fd61891f187837ea05a2b2812ac8005ea8d967a4.wZgL8UFkr23EH3sZOeYXQF9tmTWdLt6R7Z1OA4D8pjo+ hash: v1.k794b7964.292259d47f23069982b4a8fdc8ea36e36c02546b716a205f7ad0e3c284bd43ae.A3BnmojzAZEZEOtwMSqzGZk0B_jfqqEIdgmr7eaBwnwscenes-app-heatmap-new--authenticated-review--dark:- hash: v1.k794b7964.631bc050a0445eb0018c9ec039bd86da951df11350757600c0ccc9f25b2f7d90.YMjSo9vcVG36wTfwJwv89REgXYgfZq3tRnVRzAgQIVE+ hash: v1.k794b7964.23ad5e208a3001a6415b90a9ba2402e483aab06938cc95fa7fe5d1ea5c496bcc.sZFsnhxz8q2n5R5WhX4eifoKj2C-UIdZM9Yv3Hp_G9Uscenes-app-heatmap-new--authenticated-review--light:- hash: v1.k794b7964.18064b40d625428a6dc26f718996003c59fc35de05454a30b2f3eba0e0151ebb.CmuNPtX4K6YUCcYYb053W8oXeeXMHN37CKID1YUTvkc+ hash: v1.k794b7964.61d6de77bd380e99500dae2f0a78057fec5603627b73f9eb7bd9054edac3266c.BU5AqsFGK7h4O8TAWLjEZXdNMSPz2sQpCmWjNvHGajkscenes-app-heatmap-new--authenticated-with-recordings--dark:- hash: v1.k794b7964.c0924947eb9d063368ce62afd12c52c1812d045398c81848c628a28af5cd000c.7DNGA7X6IAGMHJ7SKzC3SPLAIzJ3maXd5jDsXVGifiI+ hash: v1.k794b7964.442992a798205b41538d40ab3c5852395200d7d52fe23bd1059aed4c771b50ee.1nJ8Jqy6XLD1f94_Ynt--NV4WjG8B5DEVHmW88gBA5Mscenes-app-heatmap-new--authenticated-with-recordings--light:- hash: v1.k794b7964.e1ebc46620217c2755df13122fd9fc938e4c69e84baad83be48d149398336c21.fvm8_VJNE97DdR8nJAWM8RQJuDkLnSQUzsdeC4fI_ZE+ hash: v1.k794b7964.9d7dcf1084d75e9e25326aba9897ffe85d251d653f843749a03a3e7b1d9ce322.aTHZfM0VGv0WoZludhWlci65sdnkzTTK-g0Mekty_Gcscenes-app-heatmap-new--authenticated-without-recordings--dark:- hash: v1.k794b7964.8ff16d2dbebdbafbace58c2ef13b06d5c0ce2b35758656727adbbaca7c91adbc._l4JWP2DhvzGyHJt-jCJO_TOjccX9TY8FrJHDrShe-o+ hash: v1.k794b7964.61f88e43a5808d6c7814a5c6f5fa8fa5630b64749a536ba41b58c65702cbf7b2.aJqQ18IR5HtCuCMw4o2C3BCJuQvt2H7DqH-s_8a7mvkscenes-app-heatmap-new--authenticated-without-recordings--light:- hash: v1.k794b7964.e714ad0bd019576d41a3f47fffc9b90f55ca82f66cc73989456be385d82944d0.rn-M3lCxhB-ZnylYPJ7h0P_PupKg4NARYBrnw3hM_RI+ hash: v1.k794b7964.0e92ce188bfdb8dfcd60a8d8c847707a7d4e8289e916982f556bcf87a1d37e46._QjWyLJSiwfdC9VoJcGVrfav41ffYsH-QMt9ctgvsBsscenes-app-heatmap-new--capture-disabled-admin--dark:- hash: v1.k794b7964.ac5251f9e41ea5601cf375a1076ce3e52bf95174296f680a46d872b809b97ccd.giJoaDBZCDL1tmQEfzpN-PWbcGUTRVWsQOn_LZ3A3SE+ hash: v1.k794b7964.cebfc411190305e3f02407a61b9674ae18add222d51e0c959424515833890aca.khdylBhYA1V9iAiPUV2Vm8Z9UYlEa9U9hYSyt5cYA2wscenes-app-heatmap-new--capture-disabled-admin--light:- hash: v1.k794b7964.f7c89b15aefa1e7260c58b7a3a7419c4e9f8387f743385603cc9eb894404a3de.JEiEnnkOEtepNkn8kCAQzUl4-ArZxWcYYz4MTem8fJ0+ hash: v1.k794b7964.c5d2b077499d2008797741a3525148675943add2c29373f1aab9c3ccc5ec6749.QzoSQcphn2d6VtK91gcZoM57FGGHPexChWkBzixoN3cscenes-app-heatmap-new--capture-disabled-member--dark:- hash: v1.k794b7964.ac5251f9e41ea5601cf375a1076ce3e52bf95174296f680a46d872b809b97ccd.gIGN9IpVYsx8NrGimNpSoTblTbzljgv23uwERdARI1U+ hash: v1.k794b7964.cebfc411190305e3f02407a61b9674ae18add222d51e0c959424515833890aca.He-DCbLb24E-UQp-FJ6t_6HqFBLz5upAE7ODddzCLKsscenes-app-heatmap-new--capture-disabled-member--light:- hash: v1.k794b7964.f7c89b15aefa1e7260c58b7a3a7419c4e9f8387f743385603cc9eb894404a3de.IvOKKo0QN1JinxtoXoIrMYeTPmySS3MxB3BHBa5bO5o+ hash: v1.k794b7964.c5d2b077499d2008797741a3525148675943add2c29373f1aab9c3ccc5ec6749.4i-_eOw5vI7vkLp1eK8Cc_M6tlK5NHwDyTfMwH4KCiAscenes-app-heatmap-new--no-matching-data--dark:- hash: v1.k794b7964.ccf485e676cc528e032cdca9e030f2ad54221a9a73999b7e50a8c6c08015f3a9.6y-R8TbeloDJEApiNZptKFU-vxO-VlabrKpttiP4cvI+ hash: v1.k794b7964.a69636ff1bec72291fd72d54422203ca9f25dae61da39868d35953168ec8d236.RXe1PHCiR4U7TiTkMWqWFDt3S4oFBxHAoOOBs9Z96eIscenes-app-heatmap-new--no-matching-data--light:- hash: v1.k794b7964.33d4b183e99f26afe383dd18daedfd49eecaa2f3e9054d6f95666e973611258e.cq7TTsPEj0ETSYPIDf3jlvtMkIh8_t9SdEorBd8AgmY+ hash: v1.k794b7964.b4eac089e29707b1ab8588db4817542ea714ad82ed61721a708f3a7d80ed3971.nJ6_MppsIuAbzxF27LNKS-z3DOMrYvGb8owFcdpqxYQscenes-app-heatmap-new--public-screenshot--dark:- hash: v1.k794b7964.ab6845b090ef0c57c6afe3ed6964e3ad04273535e3deadece59d00b445e4bf48.K367lHq8Vl1__P-rJZBdRsho91rdspJPEsA_t9-XAvw+ hash: v1.k794b7964.8ce67270538492e317a22b54faeec46d768ce9efa53ced7f15c2ee1fcb42e69b.kZniVpwKLpivLs9OgT0zwUpV_6YDBdi1GvEkvP1wubIscenes-app-heatmap-new--public-screenshot--light:- hash: v1.k794b7964.4ee1f96da3401371b7048527a383804fc3c8adc4f0f9aedfbb30e79a5d54a829.OPySJzygG_yI_F5QdfVQNLAIuFr56EyXaDI2malOgWc+ hash: v1.k794b7964.3b9f7faeb323dfb0731f5297108c520b4708aacd6c6413065f8d14534efbf508.myxGeRItobmID6Yk254JhueUjEg2INXrPP1enqwFIAYscenes-app-heatmap-new--review--dark:- hash: v1.k794b7964.9f674de81b32084faef93230a2c8c5d987ddb6c5bf3a21b5074e000feea345cb.9r4DBoDJFmnqnQarpE00qV-psXUtOGXho2dhUOhuXFY+ hash: v1.k794b7964.879acf3664ce8ac92689443f0eec00316749d00df026330d4a89cf293ee8f98a.f4KpAV2qirc-1RupHC64tUsjVfuYJRCFxRZwjKdxajYscenes-app-heatmap-new--review--light:- hash: v1.k794b7964.64e5b7d8f5669ac8b81afb758145c783d73cdb71c7fb7d67058900a787363202.g4OVRxMORtJEI3_IUqvIEdHmzB5RkjxLDZ0yWtdoobc+ hash: v1.k794b7964.bd0bd0025911a98fb2e1dfbc2f65247ffdf352805e6d9e51eea1538cf82966c0.cHwj-RQhZaioNBWk-a7v_k19i6QPtV6JVuq-wiiMQwoscenes-app-heatmap-new--unauthorized-iframe--dark:- hash: v1.k794b7964.de6135123e8e9fbd0e8181e01e9aeabee32eb961bd67be61d7f6a1c9016ffbd8.qlF96W3DdEz1OlAOJuNDv4RYHepZLq9F7IPdwG2b4YM+ hash: v1.k794b7964.04a174d604ff8b91abd9e68974506d8c50c5e468d7d79ac7dbc46aa8d49ed7a0.48ww4mjmMgSU8TRpAf5ohd0EipT2DwR1j3z933ksR7sscenes-app-heatmap-new--unauthorized-iframe--light:- hash: v1.k794b7964.8e355023754bf9c2c1dc31cbadba79e6b524ad9a66528c649ab150f7eaf0cc05.yqUC0NlgolBVjXQsucJcRfdlu5npQvynKZSy7oAnd_8+ hash: v1.k794b7964.1832b8f72d0c7b5a2c8e3f475774f6658918e1c55e036f71c932a82f4d5b27c8.dQWEm2zDVqVFrhv4bh0ywXe_phEHZfevmLGhei-_eLUscenes-app-heatmap-recording--recording-mode-with-clickmap--dark:- hash: v1.k794b7964.e457e617751f0e20d54d0fb1615d93adf7ac6708a194fdc7114343524fdf989c.J9zCJZt9g1m_F9yoYmznRkzD5djJcj-OWhAsF3WHUWA+ hash: v1.k794b7964.7f0dc855cf686e8d17fab9bad42b5bfaee8901b219fce16ba9ecc4928954cae8.0vJAjeCvGf0_Qlxgd-bPRui9I13ZzaMriz7kNZAAU44scenes-app-heatmap-recording--recording-mode-with-clickmap--light:- hash: v1.k794b7964.0bad4a5d714365ad844ff79b48384739ef8390ca40d7f241196e7d0e274da07e.udqznHrwtw3P4SDGDshCPEzVaZZABAhXJ6E-TKllQnU+ hash: v1.k794b7964.34ba3c4e04923597e94338b0f39938798af161111bc9b502650af84925910525.11tEY2ExhcQxjFMLnRrFFGeY1HqEQkQN8mVRpJd-V2cscenes-app-heatmaps-saved--list--dark:- hash: v1.k794b7964.e3164483cd3e2072dcd38300fb0d78f37e289e2978edda9e1502f812426d0b7b.GO0zd9fKlfpYxQiz8cbwsjEF1dzHXnAyW041KXDacNo+ hash: v1.k794b7964.9fb045fabe9133013804adcd784315d6971bd076439b73e3a2a72792832a7690.M6mq4d0AE6JGgc9fEYKGsy3Al9a_M8gZRtjHMP2rClIscenes-app-heatmaps-saved--list--light:- hash: v1.k794b7964.c1c002f27568ade97a8ef0b2c5d2346bc13a3871c59c87ebac2cdf6b3f32ba13.US5kk6X-qDeJIYRETZwoUZTSDN-9GEthkQq4eR-Kkug+ hash: v1.k794b7964.1a0b2ff23e19ba51fb9e7c91d71dcec588d53f151318064654371ad8921c4349.azP7mG6V3C12qOFJpMpOJoSrleIYycN9lWRrHl1AT8U+ scenes-app-heatmaps-saved--list-narrow--dark:+ hash: v1.k794b7964.251fde9690025bcc597cf81ac207155e8b93607d1c2f3ebdae4637696d257b8b.YAp0N42YsLd9w-tt3ItYabMTFLYc7uEpuyo9_zq6iVk+ scenes-app-heatmaps-saved--list-narrow--light:+ hash: v1.k794b7964.7158b81beca70c9219940e5d8be7363027693b297303f97e0c94421eeb431b85.5VDWnPeJL3TqcFpV83roqsjKHJlCJ2EhlLqR4X4VWYoscenes-app-hogfunctions-destination--backfills-empty--dark:hash: v1.k794b7964.eb67efee739a283813a4a3389e86262a7e41ac1eeba32bb186f06fa8bfb1f825.eNxwQSwo8ogShZXZ-XuOi-T0AIJb-dNi0a032U9oBpYscenes-app-hogfunctions-destination--backfills-empty--light:diff --git a/products/web_analytics/frontend/heatmaps/components/FilterPanel.tsx b/products/web_analytics/frontend/heatmaps/components/FilterPanel.tsxindex 5ecc17d88477..2d554fa98b24 100644--- a/products/web_analytics/frontend/heatmaps/components/FilterPanel.tsx+++ b/products/web_analytics/frontend/heatmaps/components/FilterPanel.tsx@@ -1,8 +1,8 @@-import { useActions, useValues } from 'kea'+import { useActions, useMountedLogic, useValues } from 'kea'import { useState } from 'react'import { IconFilter, IconGear, IconLaptop, IconPhone, IconTabletLandscape, IconTabletPortrait } from '@posthog/icons'-import { LemonBadge, LemonButton, LemonSelect } from '@posthog/lemon-ui'+import { LemonBadge, LemonButton, LemonLabel, LemonSelect } from '@posthog/lemon-ui'import { DateFilter } from 'lib/components/DateFilter/DateFilter'import { HEATMAP_LOADING_DEBOUNCE_MS, heatmapDataLogic } from 'lib/components/heatmaps/heatmapDataLogic'@@ -68,10 +68,11 @@ export function ViewportChooser({ lockedWidth }: { lockedWidth?: number }): JSX.}return (- <div className="flex justify-center items-center gap-2">- <span>Screen width:</span>+ <div className="flex items-center gap-2"><LemonSelectsize="small"+ aria-label="Screen width"+ tooltip="Screen width"onChange={setWindowWidthOverride}value={lockedWidth ?? widthOverride}disabledReason={lockedWidth ? 'This capture is saved at a fixed viewport width' : undefined}@@ -108,6 +109,7 @@ export function FilterPanel({lockedWidth?: numberdateControl?: JSX.Element}): JSX.Element {+ useMountedLogic(heatmapCoverageLogic)const [isSettingsOpen, setIsSettingsOpen] = useState(false)const [isEventFilterOpen, setIsEventFilterOpen] = useState(false)const {@@ -141,7 +143,7 @@ export function FilterPanel({className="h-1 rounded-none"/>)}- <div className="flex flex-wrap justify-between items-center gap-2 my-2">+ <div className="flex flex-wrap justify-between items-center gap-2"><div className="flex flex-wrap items-center gap-2 min-w-0">{dateControl ?? (<DateFilter@@ -151,6 +153,7 @@ export function FilterPanel({setCommonFilters?.({ ...commonFilters, date_from: fromDate, date_to: toDate })}}dateOptions={heatmapDateOptions}+ type="tertiary"/>)}{cohortFilterEnabled && (@@ -233,6 +236,10 @@ export function FilterPanel({<Popoveroverlay={<div className="p-2 w-80 max-h-96 overflow-y-auto">+ <div className="mb-3">+ <LemonLabel>Screen width</LemonLabel>+ <ViewportChooser lockedWidth={lockedWidth} />+ </div><HeatmapsSettingsheatmapFilters={heatmapFilters}patchHeatmapFilters={patchHeatmapFilters}@@ -266,20 +273,21 @@ export function FilterPanel({placement="bottom"><LemonButton- type="secondary"+ type="tertiary"size="small"onClick={() => setIsSettingsOpen(!isSettingsOpen)}icon={<IconGear />}- tooltip="Heatmap settings"+ tooltip="Heatmap display settings"+ aria-label="Heatmap display settings"+ active={isSettingsOpen}data-attr="heatmap-settings">- Heatmap settings+ Display</LemonButton></Popover></div>{clickmapSettings ? <div className="min-w-0">{clickmapSettings}</div> : null}</div>- <ViewportChooser lockedWidth={lockedWidth} /></div>{heatmapEmpty && !rawHeatmapLoading && !previewUnavailable ? (<HeatmapEmptyState lockedWidth={lockedWidth} />diff --git a/products/web_analytics/frontend/heatmaps/components/HeatmapHeader.tsx b/products/web_analytics/frontend/heatmaps/components/HeatmapHeader.tsxindex e84407c98d2a..4c1beb7be76f 100644--- a/products/web_analytics/frontend/heatmaps/components/HeatmapHeader.tsx+++ b/products/web_analytics/frontend/heatmaps/components/HeatmapHeader.tsx@@ -1,13 +1,11 @@import { useActions, useValues } from 'kea'-import { IconRefresh } from '@posthog/icons'-import { LemonButton, LemonInput, LemonLabel, LemonModal, LemonSegmentedButton, LemonTag } from '@posthog/lemon-ui'+import { IconBrowser, IconPencil, IconRefresh } from '@posthog/icons'+import { LemonButton, LemonInput, LemonLabel, LemonModal, LemonSegmentedButton } from '@posthog/lemon-ui'import { heatmapLogic } from '../scenes/heatmap/heatmapLogic'import { HeatmapPageFields } from './HeatmapPageFields'-import { heatmapsBrowserLogic } from './heatmapsBrowserLogic'import { HeatmapScreenshotAccessNotice } from './HeatmapScreenshotAccessNotice'-import { HeatmapsForbiddenURL } from './HeatmapsForbiddenURL'export function HeatmapHeader(): JSX.Element {const {@@ -29,7 +27,6 @@ export function HeatmapHeader(): JSX.Element {screenshotError,displayUrl,} = useValues(heatmapLogic)- const { dataUrl, isBrowserUrlAuthorized } = useValues(heatmapsBrowserLogic)const {setPageUrlDraft,regenerateScreenshot,@@ -51,26 +48,13 @@ export function HeatmapHeader(): JSX.Element {return (<div>- <div className="flex flex-wrap gap-2 items-center">- <LemonLabel htmlFor="heatmap-page-url">Page URL</LemonLabel>- <LemonInput- id="heatmap-page-url"- className="flex-1 min-w-48"- size="small"- placeholder="https://www.example.com/pricing"- value={pageUrlDraft}- onChange={setPageUrlDraft}- onPressEnter={updateHeatmap}- disabledReason={urlEditDisabledReason}- status={pageUrlDraft && !isPageUrlDraftValid ? 'danger' : undefined}- data-attr="heatmap-page-url"- />- <LemonButton type="secondary" size="small" onClick={openPageSettings} data-attr="heatmap-page-settings">- Page settings- </LemonButton>- {source === 'toolbar' && <LemonTag>Captured from toolbar</LemonTag>}+ <div className="flex gap-1 items-center min-w-0">+ <IconBrowser className="text-muted shrink-0" />+ <span className="min-w-0 truncate ph-no-capture text-sm text-muted" title={displayUrl ?? undefined}>+ {displayUrl}+ </span><LemonButton- type="secondary"+ type="tertiary"size="small"icon={<IconRefresh />}aria-label={refreshPreview.label}@@ -80,14 +64,16 @@ export function HeatmapHeader(): JSX.Element {disabledReason={refreshPreview.disabledReason}data-attr="heatmap-refresh-preview"/>+ <LemonButton+ type="tertiary"+ size="small"+ icon={<IconPencil />}+ aria-label="Page settings"+ tooltip="Page settings"+ onClick={openPageSettings}+ data-attr="heatmap-page-settings"+ /></div>- {pageUrlDraft && !isPageUrlDraftValid && (- <p className="text-xs text-danger mt-1 mb-0">- {pageUrlDraftIsPattern- ? 'Enter a page URL without wildcards. Use the heatmap data URL in Page settings to match multiple pages.'- : 'Enter a valid URL, including https:// or http://.'}- </p>- )}<LemonModalisOpen={pageSettingsOpen}onClose={closePageSettings}@@ -116,6 +102,28 @@ export function HeatmapHeader(): JSX.Element {}><div className="flex flex-col gap-6" data-attr="heatmap-page-settings-content">+ <div>+ <LemonLabel htmlFor="heatmap-page-url">Page URL</LemonLabel>+ <LemonInput+ id="heatmap-page-url"+ className="w-full"+ size="small"+ placeholder="https://www.example.com/pricing"+ value={pageUrlDraft}+ onChange={setPageUrlDraft}+ onPressEnter={updateHeatmap}+ disabledReason={urlEditDisabledReason}+ status={pageUrlDraft && !isPageUrlDraftValid ? 'danger' : undefined}+ data-attr="heatmap-page-url"+ />+ {pageUrlDraft && !isPageUrlDraftValid && (+ <p className="text-xs text-danger mt-1 mb-0">+ {pageUrlDraftIsPattern+ ? 'Enter a page URL without wildcards. Use the heatmap data URL in Page settings to match multiple pages.'+ : 'Enter a valid URL, including https:// or http://.'}+ </p>+ )}+ </div><div><LemonLabel>Page background</LemonLabel><LemonSegmentedButton@@ -143,7 +151,6 @@ export function HeatmapHeader(): JSX.Element {/></div></LemonModal>- {dataUrl && !isBrowserUrlAuthorized ? <HeatmapsForbiddenURL /> : null}</div>)}diff --git a/products/web_analytics/frontend/heatmaps/components/HeatmapRecordingFallback.tsx b/products/web_analytics/frontend/heatmaps/components/HeatmapRecordingFallback.tsxindex 24eb1443a115..641fdc206b1b 100644--- a/products/web_analytics/frontend/heatmaps/components/HeatmapRecordingFallback.tsx+++ b/products/web_analytics/frontend/heatmaps/components/HeatmapRecordingFallback.tsx@@ -39,8 +39,7 @@ export function HeatmapRecordingFallback({<LemonBanner type="info"><div className="flex flex-col gap-2"><p className="mb-0">- We didn't find a recent recording that visited this page. Open Session replay with the- visited-page filter applied to broaden your search or wait for a new recording.+ No recordings of this page in the last 30 days. Try a wider date range in Session replay.</p><ViewRecordingsPlaylistButtonfilters={buildRecordingFiltersForUrl(url)}@@ -57,36 +56,34 @@ export function HeatmapRecordingFallback({}return (- <LemonBanner type="info">- <div className="flex flex-col gap-2">- <p className="mb-0">- {guidedSelection- ? "Choose a recording below. We'll open it here, pause at the first matching page event, and return the background you choose here for review."- : 'We found recent recordings that visited this page. Open one and choose “View heatmap” at the page state you want to analyze.'}- </p>- <div className="flex flex-wrap gap-2">- {matchingRecordings.map((recording) => (- <LemonButton- key={recording.id}- data-attr="heatmap-recording-fallback-open-recording"- type="secondary"- size="small"- icon={<IconRewindPlay />}- onClick={() => openRecording(recording)}- >- <span className="flex items-center gap-1">- {guidedSelection ? <span>Choose moment ·</span> : null}- <TZLabel time={recording.start_time} />- {recording.recording_duration ? (- <span className="text-muted">- · {colonDelimitedDuration(recording.recording_duration)}- </span>- ) : null}- </span>- </LemonButton>- ))}- </div>+ <div className="flex flex-col gap-3">+ <p className="mb-0">+ {guidedSelection+ ? 'Choose a recording, then pause at the moment you want to analyze.'+ : 'Open a recording and choose “View heatmap” at the moment you want to analyze.'}+ </p>+ <div className="flex flex-wrap gap-2">+ {matchingRecordings.map((recording) => (+ <LemonButton+ key={recording.id}+ data-attr="heatmap-recording-fallback-open-recording"+ type="secondary"+ size="small"+ icon={<IconRewindPlay />}+ onClick={() => openRecording(recording)}+ >+ <span className="flex items-center gap-1">+ {guidedSelection ? <span>Choose moment ·</span> : null}+ <TZLabel time={recording.start_time} />+ {recording.recording_duration ? (+ <span className="text-muted">+ · {colonDelimitedDuration(recording.recording_duration)}+ </span>+ ) : null}+ </span>+ </LemonButton>+ ))}</div>- </LemonBanner>+ </div>)}diff --git a/products/web_analytics/frontend/heatmaps/history/PageHistoryDateControls.tsx b/products/web_analytics/frontend/heatmaps/history/PageHistoryDateControls.tsxindex ca8c31caa08b..bfa1d5c7b144 100644--- a/products/web_analytics/frontend/heatmaps/history/PageHistoryDateControls.tsx+++ b/products/web_analytics/frontend/heatmaps/history/PageHistoryDateControls.tsx@@ -1,95 +1,49 @@import { useActions, useValues } from 'kea'-import { IconChevronLeft, IconChevronRight } from '@posthog/icons'-import { LemonButton, LemonSelect } from '@posthog/lemon-ui'+import { LemonButton } from '@posthog/lemon-ui'-import { isUsableCapture, pageHistoryLogic } from './pageHistoryLogic'-import { formatCaptureDay, formatHistoryDateRange } from './pageHistoryUtils'+import { DateFilter } from 'lib/components/DateFilter/DateFilter'++import { pageHistoryLogic } from './pageHistoryLogic'+import { formatCaptureDay } from './pageHistoryUtils'export function PageHistoryDateControls({ id }: { id: string }): JSX.Element {const logic = pageHistoryLogic({ id })- const {- captures,- selectedBackground,- selectedDateRange,- isCombinedRange,- previousCapture,- nextCapture,- historyBrowseDisabledReason,- } = useValues(logic)- const { browseCapture, navigateCapture, openRangeEditor } = useActions(logic)+ const { usableCaptures, selectedDateRange, isCombinedRange, historyBrowseDisabledReason } = useValues(logic)+ const { browseCapture, openRangeEditor } = useActions(logic)return (<div className="flex flex-wrap items-center gap-1" aria-label="Historical interaction dates">- {isCombinedRange && selectedDateRange ? (- <LemonButton- size="small"- type="secondary"- onClick={openRangeEditor}+ <div data-attr={isCombinedRange ? 'heatmap-page-history-range' : 'heatmap-page-history-dates'}>+ <DateFilter+ type="tertiary"+ dateFrom={selectedDateRange?.date_from}+ dateTo={isCombinedRange ? selectedDateRange?.date_to : null}+ isFixedDateMode={!isCombinedRange}+ dateOptions={[...usableCaptures].reverse().map((capture) => ({+ key: formatCaptureDay(capture.captured_on),+ values: [capture.captured_on],+ }))}+ showCustomRangeOptions={false}+ showRollingRangePicker={false}disabledReason={historyBrowseDisabledReason}- data-attr="heatmap-page-history-range"- >- {formatHistoryDateRange(selectedDateRange)}- </LemonButton>- ) : (- <>- <LemonButton- size="small"- icon={<IconChevronLeft />}- onClick={() => navigateCapture('previous')}- aria-label={- previousCapture- ? `Previous available capture: ${formatCaptureDay(previousCapture.captured_on, 'long')}`- : 'Previous available capture'- }- disabledReason={- historyBrowseDisabledReason ||- (!previousCapture ? 'This is the oldest available screenshot.' : undefined)- }- tooltip={- previousCapture ? `Inspect ${formatCaptureDay(previousCapture.captured_on)}` : undefined- }- data-attr="heatmap-page-history-previous-day"- />- <LemonSelect- size="small"- value={selectedBackground?.id}- onSelect={browseCapture}- aria-label="Historical interaction day"- disabledReason={historyBrowseDisabledReason}- options={[...captures].reverse().map((capture) => ({- value: capture.id,- label: `${formatCaptureDay(capture.captured_on)}${isUsableCapture(capture) ? '' : ' (no screenshot)'}`,- }))}- data-attr="heatmap-page-history-dates"- />- <LemonButton- size="small"- icon={<IconChevronRight />}- onClick={() => navigateCapture('next')}- aria-label={- nextCapture- ? `Next available capture: ${formatCaptureDay(nextCapture.captured_on, 'long')}`- : 'Next available capture'- }- disabledReason={- historyBrowseDisabledReason ||- (!nextCapture ? 'This is the newest available screenshot.' : undefined)+ onChange={(fromDate) => {+ const capture = usableCaptures.find((capture) => capture.captured_on === fromDate)+ if (capture) {+ browseCapture(capture.id)}- tooltip={nextCapture ? `Inspect ${formatCaptureDay(nextCapture.captured_on)}` : undefined}- data-attr="heatmap-page-history-next-day"- />- <LemonButton- size="small"- type="tertiary"- onClick={openRangeEditor}- disabledReason={historyBrowseDisabledReason}- data-attr="heatmap-page-history-combine"- >- Combine days- </LemonButton>- </>- )}+ }}+ />+ </div>+ <LemonButton+ size="small"+ type="tertiary"+ onClick={openRangeEditor}+ disabledReason={historyBrowseDisabledReason}+ data-attr="heatmap-page-history-combine"+ >+ Combine days+ </LemonButton></div>)}diff --git a/products/web_analytics/frontend/heatmaps/history/PageHistoryRangeEditor.tsx b/products/web_analytics/frontend/heatmaps/history/PageHistoryRangeEditor.tsxindex 76ce67ee4c21..e2d7f62b423b 100644--- a/products/web_analytics/frontend/heatmaps/history/PageHistoryRangeEditor.tsx+++ b/products/web_analytics/frontend/heatmaps/history/PageHistoryRangeEditor.tsx@@ -43,8 +43,7 @@ export function PageHistoryRangeEditor({ id }: { id: string }): JSX.Element | nu}data-attr="heatmap-page-history-range-editor">- <p>View several days of interactions on one saved screenshot.</p>- <div className="flex flex-wrap gap-3 mb-3">+ <div className="grid grid-cols-2 gap-3 mb-4"><div><LemonLabel htmlFor="heatmap-history-from">From</LemonLabel><LemonSelect@@ -68,14 +67,14 @@ export function PageHistoryRangeEditor({ id }: { id: string }): JSX.Element | nu</div>{rangeDraftBackground ? (<div- className="rounded border bg-surface-secondary p-3 mb-3"+ className="rounded border bg-surface-secondary p-3 mb-4"data-attr="heatmap-page-history-range-preview"><strong><span>{`Interactions: ${formatHistoryDateRange({ date_from: rangeDraftCaptures[0].captured_on, date_to: rangeDraftBackground.captured_on })}`}</span></strong><div className="flex items-center gap-3 mt-2">- <div className="relative w-24 h-16 shrink-0 rounded bg-surface-primary flex items-center justify-center overflow-hidden">+ <div className="relative w-32 h-24 shrink-0 rounded bg-surface-primary flex items-center justify-center overflow-hidden"><IconCamera className="text-muted text-xl" />{rangeDraftBackground.thumbnail_url ? (<img@@ -103,12 +102,8 @@ export function PageHistoryRangeEditor({ id }: { id: string }): JSX.Element | nu</LemonBanner>)}<LemonBanner type="warning">- All interactions will be positioned on this screenshot. Page changes can move older clicks onto- different elements. Inspect individual days if the layout changed.+ Page changes may misalign clicks across these days. View individual days if the layout changed.</LemonBanner>- <p className="text-xs text-muted mt-2 mb-0">- Range endpoints need an available screenshot with the same screen width and timezone.- </p></LemonModal>)}diff --git a/products/web_analytics/frontend/heatmaps/history/PageHistoryStrip.tsx b/products/web_analytics/frontend/heatmaps/history/PageHistoryStrip.tsxindex 45a6aad7a4cf..d2f641a42430 100644--- a/products/web_analytics/frontend/heatmaps/history/PageHistoryStrip.tsx+++ b/products/web_analytics/frontend/heatmaps/history/PageHistoryStrip.tsx@@ -1,20 +1,26 @@import { useActions, useValues } from 'kea'-import { useCallback, useLayoutEffect, useRef, useState } from 'react'-import useResizeObserver from 'use-resize-observer'+import { useCallback, useRef } from 'react'-import { IconCamera, IconChevronLeft, IconChevronRight, IconEllipsis, IconRefresh } from '@posthog/icons'+import {+ IconCamera,+ IconChevronLeft,+ IconChevronRight,+ IconClock,+ IconEllipsis,+ IconInfo,+ IconRefresh,+ IconX,+} from '@posthog/icons'import { LemonBanner, LemonButton, LemonCard, LemonMenu, Spinner, Tooltip } from '@posthog/lemon-ui'-import { heatmapDataLogic } from 'lib/components/heatmaps/heatmapDataLogic'import { dayjs } from 'lib/dayjs'import { LemonSkeleton } from 'lib/lemon-ui/LemonSkeleton'-import { dateFilterToText } from 'lib/utils/dateFilters'import { pageHistoryCaptureLogic } from './pageHistoryCaptureLogic'import { pageHistoryLogic } from './pageHistoryLogic'import { PageHistoryRangeEditor } from './PageHistoryRangeEditor'import { PageHistoryTile } from './PageHistoryTile'-import { formatCaptureDay, formatCaptureTimestamp, formatHistoryDateRange } from './pageHistoryUtils'+import { formatCaptureDay, formatCaptureTimestamp } from './pageHistoryUtils'export function PageHistoryStrip({ id }: { id: string }): JSX.Element {const logic = pageHistoryLogic({ id })@@ -49,31 +55,6 @@ export function PageHistoryStrip({ id }: { id: string }): JSX.Element {const { capturing, captureError, captureStatusUnknown, completedCapture, captureNowDisabledReason, todaysCapture } =useValues(captureLogic)const { requestCapture, setCompletedRequestId } = useActions(captureLogic)- const { effectiveCommonFilters } = useValues(heatmapDataLogic({ context: 'in-app' }))- const contextRef = useRef<HTMLElement | null>(null)- const [browserMaxHeight, setBrowserMaxHeight] = useState(640)- const measureBrowserSpace = useCallback((): void => {- const top = contextRef.current?.getBoundingClientRect().top- if (top !== undefined) {- setBrowserMaxHeight(Math.max(280, window.innerHeight - Math.max(0, top) - 16))- }- }, [])- const { ref: observeContext } = useResizeObserver<HTMLElement>({ onResize: measureBrowserSpace })- const setContextRef = useCallback(- (node: HTMLElement | null): void => {- contextRef.current = node- observeContext(node)- },- [observeContext]- )- useLayoutEffect(() => {- if (!historyExpanded) {- return- }- measureBrowserSpace()- window.addEventListener('resize', measureBrowserSpace)- return () => window.removeEventListener('resize', measureBrowserSpace)- }, [measureBrowserSpace, historyExpanded])const browseRef = useRef<HTMLButtonElement | null>(null)const focusCloseButton = useCallback((node: HTMLButtonElement | null): void => {node?.focus({ preventScroll: true })@@ -86,7 +67,6 @@ export function PageHistoryStrip({ id }: { id: string }): JSX.Element {return (<section- ref={setContextRef}className="@container/history p-3 border-b"aria-label="Page history"data-attr="heatmap-page-history"@@ -97,43 +77,45 @@ export function PageHistoryStrip({ id }: { id: string }): JSX.Element {}}}>- <div className="flex flex-wrap items-start justify-between gap-2">- <div className="min-w-0">- <div- className="text-sm font-semibold"- aria-live="polite"- data-attr="heatmap-page-history-selection"+ <div className="flex flex-wrap items-center justify-between gap-2">+ <div className="flex flex-wrap items-center gap-2 min-w-0">+ <IconCamera className="text-muted shrink-0" />+ <span className="text-sm font-medium" aria-live="polite" data-attr="heatmap-page-history-selection">+ {selectedBackground+ ? `Screenshot · ${formatCaptureDay(selectedBackground.captured_on)}`+ : 'Current screenshot'}+ </span>+ <Tooltip+ title={+ <div className="max-w-xs">+ <p>+ {selectedBackground+ ? `Captured ${formatCaptureTimestamp(selectedBackground)} at ${selectedBackground.width}px.`+ : 'Showing the current saved screenshot.'}+ </p>+ <p>+ Daily screenshots may differ from later changes or personalized pages. Some days may+ be missing.+ </p>+ <p className="mb-0">{`Screenshots are kept for ${history?.retention_days ?? 90} days. Historical views aren't saved in shared links and can't be exported.`}</p>+ </div>+ }>- <span>- {selectedDateRange- ? `Interactions: ${formatHistoryDateRange(selectedDateRange)}`- : `Interactions: ${dateFilterToText(effectiveCommonFilters?.date_from, effectiveCommonFilters?.date_to, 'Current date filters')}`}- </span>- {selectedBackground ? (- <span className="sr-only">{`. Screenshot captured ${formatCaptureTimestamp(selectedBackground)}.`}</span>- ) : null}- </div>- <div className="text-xs text-muted mt-1">- <Tooltip- title={- selectedBackground- ? 'Daily screenshots show the page at capture time. They may not reflect later changes or personalized versions.'- : 'This saved screenshot may differ from the pages seen during your interaction dates. Browse screenshots to inspect a past day.'- }- >- <span className="cursor-help border-b border-dashed">- {selectedBackground- ? `Screenshot captured ${formatCaptureTimestamp(selectedBackground)} · ${selectedBackground.width}px`- : 'Current saved screenshot'}- </span>- </Tooltip>- </div>+ <LemonButton+ size="xsmall"+ icon={<IconInfo />}+ aria-label="About page history"+ data-attr="heatmap-page-history-info"+ />+ </Tooltip></div><div className="flex flex-wrap items-center gap-1"><LemonButtonref={browseRef}size="small"type="secondary"+ icon={<IconClock />}+ active={historyExpanded}onClick={() => {if (historyExpanded) {closeBrowser()@@ -146,7 +128,7 @@ export function PageHistoryStrip({ id }: { id: string }): JSX.Element {disabledReason={historyBrowseDisabledReason}data-attr="heatmap-page-history-toggle">- Browse screenshots+ Page history</LemonButton>{selectedDateRange ? (<LemonButton@@ -195,7 +177,7 @@ export function PageHistoryStrip({ id }: { id: string }): JSX.Element {type="warning"className="mt-2"action={{- children: 'Review days individually',+ children: 'View one day',onClick: () => {if (selectedBackground) {selectCapture(selectedBackground.id)@@ -203,8 +185,7 @@ export function PageHistoryStrip({ id }: { id: string }): JSX.Element {},}}>- All interactions are positioned on this screenshot. Page changes during this period can move clicks- onto different elements.+ Page changes across these days may misalign clicks on this screenshot.</LemonBanner>) : null}{historyLoadFailed ? (@@ -230,8 +211,7 @@ export function PageHistoryStrip({ id }: { id: string }): JSX.Element {className="mt-2"action={{ children: 'Check capture', onClick: () => loadHistory(), loading: historyLoading }}>- Couldn't check the capture's status. It may still be running. Check again before starting- another.+ Couldn't check this capture. Check its status before starting another.</LemonBanner>) : captureError ? (<LemonBanner@@ -248,7 +228,7 @@ export function PageHistoryStrip({ id }: { id: string }): JSX.Element {) : capturing ? (<div className="flex items-center gap-2 text-sm mt-2"><Spinner className="shrink-0" />- <span>Capturing today's page. You can keep exploring history.</span>+ <span>Capturing today's screenshot…</span></div>) : completedCapture ? (<LemonBanner@@ -270,10 +250,9 @@ export function PageHistoryStrip({ id }: { id: string }): JSX.Element {</div>{missingCaptureDate ? (<LemonBanner type="info" className="mt-2" onClose={() => setMissingCaptureDate(null)}>- <p className="mb-1">- <span>{`No screenshot was saved for ${formatCaptureDay(missingCaptureDate)}. ${selectedBackground ? `Still viewing the ${dayjs(selectedBackground.captured_on).format('MMM D')} screenshot${isCombinedRange ? ' with your combined interaction dates' : ' and its interaction day'}.` : 'Your current view is unchanged.'}`}</span>+ <p className="mb-2">+ <span>{`No screenshot for ${formatCaptureDay(missingCaptureDate)}. Your current view is unchanged. Interaction data may still be available.`}</span></p>- <p className="text-xs mb-2">A missing screenshot does not indicate whether interactions exist.</p><div className="flex flex-wrap gap-2">{missingDateAlternatives.map((capture) => (<LemonButton@@ -299,7 +278,7 @@ export function PageHistoryStrip({ id }: { id: string }): JSX.Element {<div className="mt-3" data-attr="heatmap-page-history-empty"><p className="text-sm mb-2">{history.storage_available- ? "Automatic captures build history for recently viewed pages. Earlier page designs can't be recovered."+ ? 'No page history yet. Capture this page to start saving daily screenshots.': 'Screenshot storage is unavailable on this installation. Ask your administrator to configure it.'}</p><LemonButton@@ -313,104 +292,80 @@ export function PageHistoryStrip({ id }: { id: string }): JSX.Element {>Capture today's screenshot</LemonButton>- <p className="text-xs text-muted mb-0 mt-2">- <span>{`Saved screenshots are kept for ${history.retention_days} days. Some days may be missing.`}</span>- </p></div>) : null}- {selectedDateRange ? (- <p className="text-xs text-muted mt-2 mb-0">- This history view is temporary. The heatmap link opens the current view; historical export is- unavailable.- </p>- ) : null}{historyExpanded ? (- <div- className="absolute top-0 inset-x-3 h-full pointer-events-none z-20"- style={{ maxHeight: browserMaxHeight }}- >- <div- className="absolute bottom-3 inset-x-0 max-w-lg ml-auto pointer-events-auto"- id="heatmap-history-browser"- role="dialog"- aria-labelledby="heatmap-history-browser-title"- >- <LemonCard hoverEffect={false} className="p-3 shadow-lg">- <div className="flex justify-between items-center gap-2">+ <LemonCard hoverEffect={false} className="mt-3 p-3 bg-surface-secondary">+ <div id="heatmap-history-browser" role="region" aria-labelledby="heatmap-history-browser-title">+ <div className="flex flex-wrap justify-between items-center gap-2 mb-3">+ <div className="flex flex-wrap items-baseline gap-x-2 gap-y-1"><h3 id="heatmap-history-browser-title" className="text-sm mb-0">- Browse screenshots+ Page history</h3>+ <span className="text-xs text-muted">+ {history ? `${usableCaptures.length} screenshots` : 'Loading screenshots…'}+ </span>+ </div>+ <LemonButton+ ref={focusCloseButton}+ size="small"+ icon={<IconX />}+ onClick={closeBrowser}+ aria-label="Close screenshot browser"+ />+ </div>+ {visibleCaptures.length > 0 ? (+ <div+ className="grid grid-cols-2 @min-[32rem]/history:grid-cols-4 gap-2 max-h-64 overflow-y-auto p-1"+ aria-label="Available screenshot dates"+ >+ {visibleCaptures.map((capture) => (+ <PageHistoryTile+ key={capture.id}+ capture={capture}+ selected={selectedBackground?.id === capture.id}+ disabledReason={historyBrowseDisabledReason}+ onSelect={() => browseCapture(capture.id)}+ />+ ))}+ </div>+ ) : (+ <p className="text-sm">+ {historyLoadFailed+ ? "Couldn't load screenshots. Use Try again above."+ : historyLoading+ ? 'Loading screenshots…'+ : 'No screenshots are available yet.'}+ </p>+ )}+ {historyPageCount > 1 ? (+ <div className="flex justify-between gap-2 mt-2">+ <LemonButton+ size="small"+ icon={<IconChevronLeft />}+ onClick={() => setHistoryPage(historyPage + 1)}+ disabledReason={+ historyPage >= historyPageCount - 1+ ? 'These are the oldest captures.'+ : undefined+ }+ data-attr="heatmap-page-history-older"+ >+ Older+ </LemonButton><LemonButton- ref={focusCloseButton}size="small"- onClick={closeBrowser}- aria-label="Close screenshot browser"+ sideIcon={<IconChevronRight />}+ onClick={() => setHistoryPage(historyPage - 1)}+ disabledReason={historyPage === 0 ? 'These are the newest captures.' : undefined}+ data-attr="heatmap-page-history-newer">- Close+ Newer</LemonButton></div>- <p className="text-xs text-muted mt-2 mb-2">- Choose a day to inspect its interactions and captured screenshot.- </p>- {visibleCaptures.length > 0 ? (- <div className="grid grid-cols-4 gap-2" aria-label="Available screenshot dates">- {visibleCaptures.map((capture) => (- <PageHistoryTile- key={capture.id}- capture={capture}- selected={selectedBackground?.id === capture.id}- disabledReason={historyBrowseDisabledReason}- onSelect={() => browseCapture(capture.id)}- />- ))}- </div>- ) : (- <p className="text-sm">- {historyLoadFailed- ? "Couldn't load screenshots. Use Try again above."- : historyLoading- ? 'Loading screenshots…'- : 'No screenshots are available yet.'}- </p>- )}- {historyPageCount > 1 ? (- <div className="flex justify-between gap-2 mt-2">- <LemonButton- size="small"- icon={<IconChevronLeft />}- onClick={() => setHistoryPage(historyPage + 1)}- disabledReason={- historyPage >= historyPageCount - 1- ? 'These are the oldest captures.'- : undefined- }- data-attr="heatmap-page-history-older"- >- Older- </LemonButton>- <LemonButton- size="small"- sideIcon={<IconChevronRight />}- onClick={() => setHistoryPage(historyPage - 1)}- disabledReason={- historyPage === 0 ? 'These are the newest captures.' : undefined- }- data-attr="heatmap-page-history-newer"- >- Newer- </LemonButton>- </div>- ) : null}- <p className="text-xs text-muted mb-0 mt-2">- <span>- {usableCaptures.length- ? `${usableCaptures.length} captured ${usableCaptures.length === 1 ? 'day' : 'days'} between ${dayjs(usableCaptures[0].captured_on).format('MMM D')} and ${formatCaptureDay(usableCaptures.at(-1)!.captured_on)}. Kept for ${history?.retention_days} days; some days may be missing.`- : 'Earlier page designs cannot be recovered.'}- </span>- </p>- </LemonCard>+ ) : null}</div>- </div>+ </LemonCard>) : null}<PageHistoryRangeEditor id={id} /></section>diff --git a/products/web_analytics/frontend/heatmaps/history/PageHistoryTile.tsx b/products/web_analytics/frontend/heatmaps/history/PageHistoryTile.tsxindex e4d196383101..929821dc59b3 100644--- a/products/web_analytics/frontend/heatmaps/history/PageHistoryTile.tsx+++ b/products/web_analytics/frontend/heatmaps/history/PageHistoryTile.tsx@@ -56,9 +56,7 @@ export function PageHistoryTile({: 'Failed': !usable? 'Unavailable'- : selected- ? 'Displayed'- : (capturedTime ?? 'Captured')+ : (capturedTime ?? 'Captured')const details = pending? usable? 'A new capture is in progress. You can view the previous screenshot.'@@ -73,6 +71,7 @@ export function PageHistoryTile({<LemonButtontype="secondary"fullWidth+ active={selected}noPaddingaria-pressed={selected}aria-label={`Inspect ${formatCaptureDay(capture.captured_on, 'long')}${selected ? ', displayed screenshot' : ''}${failed && usable ? ', previous screenshot kept' : !usable ? ', no screenshot' : ''}`}@@ -88,7 +87,7 @@ export function PageHistoryTile({className={cn('min-w-0 overflow-hidden rounded', selected && 'ring-2 ring-accent')}><div className="w-full min-w-0 font-normal">- <div className="h-16 overflow-hidden bg-surface-secondary flex items-center justify-center">+ <div className="h-20 overflow-hidden bg-surface-secondary flex items-center justify-center">{usable && capture.thumbnail_url && capture.thumbnail_url !== failedThumbnailUrl ? (<imgsrc={capture.thumbnail_url}diff --git a/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapNewScene.tsx b/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapNewScene.tsxindex 1321a6914d70..a347f4b84377 100644--- a/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapNewScene.tsx+++ b/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapNewScene.tsx@@ -1,15 +1,22 @@import { useActions, useValues } from 'kea'import useResizeObserver from 'use-resize-observer'-import { IconCheckCircle, IconWarning } from '@posthog/icons'-import { LemonBanner, LemonButton, LemonCard, LemonLabel, Spinner } from '@posthog/lemon-ui'+import { IconBrowser, IconCheckCircle, IconImage, IconWarning } from '@posthog/icons'+import {+ LemonBanner,+ LemonButton,+ LemonCard,+ LemonCollapse,+ LemonLabel,+ LemonSegmentedButton,+ Spinner,+} from '@posthog/lemon-ui'import { AccessControlAction } from 'lib/components/AccessControlAction'import { appEditorUrl } from 'lib/components/AuthorizedUrlList/authorizedUrlListLogic'import { hasWildcard } from 'lib/components/heatmaps/heatmapUrlMatch'import { FEATURE_FLAGS } from 'lib/constants'import { LemonInputSelect } from 'lib/lemon-ui/LemonInputSelect/LemonInputSelect'-import { LemonRadio } from 'lib/lemon-ui/LemonRadio'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { cn } from 'lib/utils/css-classes'import { teamLogic } from 'scenes/teamLogic'@@ -21,6 +28,7 @@ import { AccessControlLevel, AccessControlResourceType, HeatmapType } from '~/tyimport { HeatmapAdvancedSettings } from '../../components/HeatmapAdvancedSettings'import { heatmapCaptureSettingsLogic, isUrlCoveredByAllowlist } from '../../components/heatmapCaptureSettingsLogic'+import { HeatmapPageFields } from '../../components/HeatmapPageFields'import { HeatmapRecording } from '../../components/HeatmapRecording'import { HeatmapRecordingFallback } from '../../components/HeatmapRecordingFallback'import { heatmapsBrowserLogic } from '../../components/heatmapsBrowserLogic'@@ -33,9 +41,9 @@ import { heatmapLogic } from './heatmapLogic'import { HeatmapNewSceneLegacy } from './HeatmapNewSceneLegacy'const CREATION_STEPS: { key: HeatmapCreationStep; label: string }[] = [- { key: 'page', label: 'Choose page' },- { key: 'background', label: 'Choose background' },- { key: 'review', label: 'Review and create' },+ { key: 'page', label: 'Page' },+ { key: 'background', label: 'Background' },+ { key: 'review', label: 'Review' },]function HeatmapCreationStepper(): JSX.Element {@@ -45,60 +53,32 @@ function HeatmapCreationStepper(): JSX.Element {const furthestIndex = CREATION_STEPS.findIndex(({ key }) => key === furthestStep)return (- <nav className="flex items-center justify-center mb-6" aria-label="Heatmap creation progress">+ <nav+ className="flex flex-wrap items-center gap-2 border-b pb-4 max-w-3xl"+ aria-label="Heatmap creation progress"+ >{CREATION_STEPS.map((step, index) => {- const isCompleted = index < currentIndexconst isCurrent = step.key === currentStep- const isAvailable = index <= furthestIndexconst label =step.key === 'review' && recordingHeatmapOpen- ? 'Explore heatmap'+ ? 'Explore': step.key === 'review' && pageAccess === 'login'? 'Review background': step.labelreturn (- <div key={step.key} className="flex items-center">- {index > 0 ? (- <div- className={cn(- 'w-6 h-px transition-colors',- index <= currentIndex ? 'bg-success' : 'bg-border-primary'- )}- />- ) : null}- <button- type="button"- onClick={() => navigateToStep(step.key)}- disabled={!isAvailable}- className={cn(- 'flex items-center gap-1.5 px-2 py-1 rounded transition-colors',- isAvailable && 'hover:bg-fill-button-tertiary-hover cursor-pointer',- !isAvailable && 'cursor-not-allowed opacity-60'- )}- aria-current={isCurrent ? 'step' : undefined}- >- {isCompleted ? (- <IconCheckCircle className="size-5 text-success" />- ) : (- <span- className={cn(- 'flex items-center justify-center size-5 rounded-full text-xs font-semibold',- isCurrent- ? 'bg-accent text-primary-inverse ring-2 ring-accent/25'- : 'bg-surface-secondary text-secondary border border-primary'- )}- >- {index + 1}- </span>- )}- <span- className={cn('text-sm', isCurrent ? 'font-semibold text-primary' : 'text-secondary')}- >- {label}- </span>- </button>- </div>+ <LemonButton+ key={step.key}+ type={isCurrent ? 'primary' : 'tertiary'}+ size="small"+ onClick={() => navigateToStep(step.key)}+ disabled={index > furthestIndex}+ aria-current={isCurrent ? 'step' : undefined}+ data-attr={`heatmap-creation-step-${step.key}`}+ icon={index < currentIndex ? <IconCheckCircle /> : <span>{index + 1}</span>}+ >+ {label}+ </LemonButton>)})}</nav>@@ -109,17 +89,14 @@ function CaptureReadiness(): JSX.Element {const { captureEnabled } = useValues(heatmapCreationLogic)return captureEnabled ? (- <div className="flex items-center gap-2 text-success">+ <div className="flex items-center gap-2 text-secondary text-sm"><IconCheckCircle className="size-5 shrink-0" />- <span>Heatmap capture is enabled for this project.</span>+ <span>Capture enabled</span></div>) : (<LemonBanner type="warning"><div className="flex flex-col gap-3">- <div>- Heatmap capture is off for this project. You can still create this heatmap, but it will remain empty- until capture is enabled.- </div>+ <div>Capture is off. Enable it to start collecting interactions.</div><HeatmapsEnableCapture /></div></LemonBanner>@@ -140,9 +117,9 @@ function CaptureUrlReadiness(): JSX.Element | null {if (covered) {return (- <div className="flex items-center gap-2 text-success">+ <div className="flex items-center gap-2 text-secondary text-sm"><IconCheckCircle className="size-5 shrink-0" />- <span>This page is covered by your heatmap capture URLs.</span>+ <span>Page included in capture URLs</span></div>)}@@ -167,7 +144,7 @@ function MatchingDataReadiness(): JSX.Element {if (pageDataCheckLoading) {return (<div className="flex items-center gap-2 text-muted">- <Spinner /> Checking for matching heatmap data from the last 30 days+ <Spinner /> Checking for interactions…</div>)}@@ -176,18 +153,18 @@ function MatchingDataReadiness(): JSX.Element {return (<div className="flex items-center gap-2 text-muted"><IconWarning className="size-5 shrink-0" />- Enter a valid page and heatmap data URL to check for matching data.+ Choose a page to check for interactions.</div>)}if (currentPageDataCheck.outcome === 'detected') {return (- <div className="flex items-center gap-2 text-success">+ <div className="flex items-center gap-2 text-secondary text-sm"><IconCheckCircle className="size-5 shrink-0" /><span>- Found {currentPageDataCheck.count?.toLocaleString()} matching interaction- {currentPageDataCheck.count === 1 ? '' : 's'} from the last 30 days.+ {currentPageDataCheck.count?.toLocaleString()} interaction+ {currentPageDataCheck.count === 1 ? '' : 's'} in the last 30 days</span></div>)@@ -201,8 +178,8 @@ function MatchingDataReadiness(): JSX.Element {return (<LemonBanner type="warning" action={checkAgain}>{currentPageDataCheck.outcome === 'none'- ? 'No matching heatmap data was found in the last 30 days. You can create the heatmap now and collect data later.'- : "We couldn't check for matching data. You can try again or continue creating the heatmap."}+ ? 'No interactions in the last 30 days. You can create this heatmap and collect data later.'+ : "Couldn't check for interactions. Try again or continue creating your heatmap."}</LemonBanner>)}@@ -216,14 +193,11 @@ function ChoosePageStep(): JSX.Element {const { continueFromPage } = useActions(heatmapCreationLogic)return (- <LemonCard hoverEffect={false} className="max-w-3xl mx-auto">+ <LemonCard hoverEffect={false} className="max-w-3xl w-full"><div className="flex flex-col gap-6"><div><h2 className="mb-1">Choose a page</h2>- <p className="text-muted mb-0">- Pick the page to display behind the heatmap. We'll also check whether it is ready to collect and- show interaction data.- </p>+ <p className="text-muted mb-0">See where visitors click, move, and scroll on your website.</p></div><div><LemonLabel>Page URL</LemonLabel>@@ -265,25 +239,23 @@ function ChoosePageStep(): JSX.Element {) : null}</div>- <div className="flex flex-col gap-3">- <h3 className="mb-0">Readiness</h3>- <CaptureReadiness />- <CaptureUrlReadiness />- <MatchingDataReadiness />- </div>-<HeatmapAdvancedSettingsdataUrlPlaceholderFallback="https://www.example.com/*"dataUrlHelp="Defaults to the page URL. Add * to combine data from multiple pages, for example https://www.example.com/users/*."consentHelp={null}showDataUrlshowConsent={false}- header="Heatmap data URL"+ header="Combine data from multiple pages"/>{dataUrl && pageStepBlockReason?.includes('heatmap data URL') ? (<LemonBanner type="error">Enter a complete URL including http:// or https://.</LemonBanner>) : null}+ <div className="flex flex-col gap-3 border-t pt-4" aria-live="polite">+ <CaptureReadiness />+ <CaptureUrlReadiness />+ <MatchingDataReadiness />+ </div><div className="flex justify-end"><LemonButtontype="primary"@@ -309,24 +281,33 @@ function PublicBackgroundChoice(): JSX.Element {return (<div className="flex flex-col gap-4">- <LemonRadio- options={[- {- label: 'Screenshot',- value: 'screenshot',- description:- 'A headless browser captures the public page. Pages that require login may show the login screen.',- },- {- label: 'Iframe',- value: 'iframe',- description:- 'Loads the page live. It must allow embedding and cannot use your signed-in browser session.',- },- ]}- value={type}- onChange={(value: HeatmapType) => setType(value)}- />+ <div>+ <LemonLabel>Display page as</LemonLabel>+ <LemonSegmentedButton+ options={[+ {+ label: 'Screenshot',+ value: 'screenshot',+ icon: <IconImage />,+ 'data-attr': 'heatmap-background-screenshot',+ },+ {+ label: 'Live page',+ value: 'iframe',+ icon: <IconBrowser />,+ 'data-attr': 'heatmap-background-iframe',+ },+ ]}+ value={type}+ onChange={(value: HeatmapType) => setType(value)}+ size="small"+ />+ <p className="text-muted text-sm mt-2 mb-0">+ {type === 'screenshot'+ ? 'Capture the full page as a static background.'+ : 'Load your website directly. The page must allow embedding.'}+ </p>+ </div>{type === 'iframe' && !isDisplayUrlAuthorized ? (<LemonBanner type="warning">@@ -365,17 +346,26 @@ function PublicBackgroundChoice(): JSX.Element {) : null}{type === 'screenshot' ? (- <>- <HeatmapScreenshotAccessNotice url={displayUrl} />- <HeatmapAdvancedSettings- dataUrlPlaceholderFallback=""- dataUrlHelp={null}- consentHelp="Ask the browser to close cookie or consent popups before capturing the screenshot. This can slow down or fail the render on some sites, so it is off by default."- showDataUrl={false}- showConsent- header="Screenshot options"- />- </>+ <LemonCollapse+ panels={[+ {+ key: 'screenshot-options',+ header: 'Screenshot options',+ content: (+ <div className="flex flex-col gap-4">+ <HeatmapPageFields+ dataUrlPlaceholderFallback=""+ dataUrlHelp={null}+ consentHelp="Close cookie and consent banners before capturing. This may take longer."+ showDataUrl={false}+ showConsent+ />+ <HeatmapScreenshotAccessNotice url={displayUrl} />+ </div>+ ),+ },+ ]}+ />) : null}</div>)@@ -389,54 +379,52 @@ function ChooseBackgroundStep(): JSX.Element {useActions(heatmapCreationLogic)return (- <LemonCard hoverEffect={false} className="max-w-3xl mx-auto">+ <LemonCard hoverEffect={false} className="max-w-3xl w-full"><div className="flex flex-col gap-6"><div><h2 className="mb-1">Choose a background</h2>- <p className="text-muted mb-0">- Tell us whether visitors need to sign in before they can see this page.- </p>+ <p className="text-muted mb-0">Choose how to display the page beneath your heatmap.</p></div>- <LemonRadio- options={[- {- label: 'No, this page is public',- value: 'public',- description: 'Create a saved heatmap using a screenshot or live iframe.',- },- {- label: 'Yes, this page requires login',- value: 'login',- description: 'Use a session recording so the signed-in page state is available.',- },- ]}- value={pageAccess ?? undefined}- onChange={setPageAccess}- />+ <div>+ <LemonLabel>Page access</LemonLabel>+ <LemonSegmentedButton+ options={[+ { label: 'Public page', value: 'public', 'data-attr': 'heatmap-page-access-public' },+ { label: 'Requires login', value: 'login', 'data-attr': 'heatmap-page-access-login' },+ ]}+ value={pageAccess ?? undefined}+ onChange={setPageAccess}+ size="small"+ />+ </div>{pageAccess === 'public' ? <PublicBackgroundChoice /> : null}{pageAccess === 'login' && displayUrl ? (<div className="flex flex-col gap-4">- <LemonBanner- type="info"- action={{- children: 'Open in toolbar',- to: appEditorUrl(displayUrl, { userIntent: 'heatmaps' }),- targetBlank: true,- type: 'primary',- 'data-attr': 'heatmap-creation-toolbar-capture',- }}- >- Open your site with the toolbar, turn on Heatmaps, then choose "Save to PostHog". It- captures the signed-in page from your browser and saves the heatmap here, with no session- recording needed.- </LemonBanner>- <LemonBanner type="info">- Session recordings preserve the signed-in page state. Choose a recording and we will guide- you through selecting the exact moment to use as the background. We will bring that state- back here for review before opening the heatmap. Recording backgrounds are not saved.- </LemonBanner>+ <div className="flex flex-wrap items-center justify-between gap-3 border-b pb-4">+ <div className="flex-1 min-w-48">+ <h3 className="mb-1">Capture from your browser</h3>+ <p className="text-muted text-sm mb-0">+ Save the signed-in page using the toolbar's “Save to PostHog” action.+ </p>+ </div>+ <LemonButton+ type="secondary"+ icon={<IconBrowser />}+ to={appEditorUrl(displayUrl, { userIntent: 'heatmaps' })}+ targetBlank+ data-attr="heatmap-creation-toolbar-capture"+ >+ Open in toolbar+ </LemonButton>+ </div>+ <div>+ <h3 className="mb-1">Use a session recording</h3>+ <p className="text-muted text-sm mb-0">+ Choose a recorded moment for a temporary heatmap. Recording backgrounds aren't saved.+ </p>+ </div><HeatmapRecordingFallbackurl={displayUrl}showEmptyState@@ -446,7 +434,7 @@ function ChooseBackgroundStep(): JSX.Element {</div>) : null}- <div className="flex justify-between">+ <div className="flex flex-wrap justify-between gap-2 border-t pt-4"><LemonButton type="secondary" onClick={goBack}>Back</LemonButton>@@ -472,7 +460,7 @@ function ChooseBackgroundStep(): JSX.Element {function ReviewStatus({ warning, children }: { warning?: boolean; children: React.ReactNode }): JSX.Element {return (- <div className={cn('flex items-center gap-2', warning ? 'text-warning' : 'text-success')}>+ <div className={cn('flex items-center gap-2 text-sm', warning ? 'text-warning' : 'text-secondary')}>{warning ? <IconWarning className="size-5 shrink-0" /> : <IconCheckCircle className="size-5 shrink-0" />}<span>{children}</span></div>@@ -547,34 +535,34 @@ function ReviewStep(): JSX.Element {const usesRecordingBackground = pageAccess === 'login' && !!recordingBackgroundDatareturn (- <LemonCard hoverEffect={false} className={cn('mx-auto', usesRecordingBackground ? 'max-w-5xl' : 'max-w-3xl')}>+ <LemonCard hoverEffect={false} className={cn('w-full', usesRecordingBackground ? 'max-w-5xl' : 'max-w-3xl')}><div className="flex flex-col gap-6"><div><h2 className="mb-1">{usesRecordingBackground ? 'Review background' : 'Review and create'}</h2><p className="text-muted mb-0">{usesRecordingBackground? 'Confirm the page state you selected before opening the heatmap.'- : 'Readiness warnings will not stop creation. The heatmap will start showing interactions as data arrives.'}+ : 'Your heatmap will show interactions as data arrives.'}</p></div>- <dl className="grid grid-cols-[minmax(8rem,auto)_1fr] gap-x-4 gap-y-3">- <dt className="font-semibold">Page</dt>+ <dl className="grid grid-cols-1 @min-[32rem]/main-content:grid-cols-[8rem_minmax(0,1fr)] gap-x-4 gap-y-2 mb-0">+ <dt className="text-muted">Page</dt><dd className="ph-no-capture break-all">{displayUrl}</dd>- <dt className="font-semibold">Matching rule</dt>+ <dt className="text-muted">Heatmap data</dt><dd><span className="font-medium">{hasWildcard(effectiveDataUrl ?? '') ? 'Pattern' : 'Exact URL'}:</span>{' '}<span className="ph-no-capture break-all">{effectiveDataUrl}</span></dd>- <dt className="font-semibold">Background</dt>+ <dt className="text-muted">Background</dt><dd>{usesRecordingBackground? 'Session recording': type === 'screenshot'? 'Screenshot'- : 'Iframe'}+ : 'Live page'}</dd></dl>@@ -586,7 +574,7 @@ function ReviewStep(): JSX.Element {/>) : null}- <div className="flex flex-col gap-2">+ <div className="flex flex-col gap-2 border-t pt-4"><ReviewStatus warning={!captureEnabled}>{captureEnabled ? 'Heatmap capture is enabled.' : 'Heatmap capture is disabled.'}</ReviewStatus>@@ -599,7 +587,7 @@ function ReviewStep(): JSX.Element {</ReviewStatus></div>- <div className="flex justify-between">+ <div className="flex flex-wrap justify-between gap-2 border-t pt-4"><LemonButton type="secondary" onClick={goBack} disabled={!usesRecordingBackground && loading}>Back</LemonButton>@@ -644,11 +632,10 @@ function RecordingHeatmapStep(): JSX.Element {<div><h2 className="mb-1">Explore your heatmap</h2><p className="text-muted mb-0">- This temporary heatmap uses the session recording moment you selected. It won't be added to- your saved heatmaps.+ This heatmap uses your selected recording moment and isn't saved.</p></div>- <div className="flex gap-2">+ <div className="flex flex-wrap gap-2"><LemonButton type="secondary" onClick={closeRecordingHeatmap}>Back to review</LemonButton>diff --git a/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapScene.stories.tsx b/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapScene.stories.tsxindex 149f0599e30c..eba1145b6891 100644--- a/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapScene.stories.tsx+++ b/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapScene.stories.tsx@@ -459,7 +459,13 @@ export const PageHistory: Story = {render: () => <HistoryAfterLoad />,}-function HistoryAfterLoad({ initialCapture }: { initialCapture?: string }): JSX.Element {+function HistoryAfterLoad({+ initialCapture,+ browserOpen = false,+}: {+ initialCapture?: string+ browserOpen?: boolean+}): JSX.Element {const scene = heatmapLogic({ id: 'hm_history' })const { savedSettings, loading } = useValues(scene)const historyLogic = pageHistoryLogic({ id: 'hm_history' })@@ -476,8 +482,11 @@ function HistoryAfterLoad({ initialCapture }: { initialCapture?: string }): JSX.if (history && !selected.current && initialCapture) {selected.current = truehistoryLogic.actions.selectCapture(initialCapture)+ if (browserOpen) {+ historyLogic.actions.setHistoryExpanded(true)+ }}- }, [history, historyLogic, initialCapture])+ }, [browserOpen, history, historyLogic, initialCapture])return <App />}@@ -497,3 +506,13 @@ export const HistoricalDayNarrow: Story = {testOptions: { waitForLoadersToDisappear: true, viewport: loadedNarrowViewport },},}++export const PageHistoryBrowser: Story = {+ ...HistoricalDay,+ render: () => <HistoryAfterLoad initialCapture="cap-17" browserOpen />,+}++export const PageHistoryBrowserNarrow: Story = {+ ...HistoricalDayNarrow,+ render: () => <HistoryAfterLoad initialCapture="cap-17" browserOpen />,+}diff --git a/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapScene.tsx b/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapScene.tsxindex e30ec50d8686..512a49e95dc1 100644--- a/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapScene.tsx+++ b/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapScene.tsx@@ -24,6 +24,7 @@ import { AccessControlLevel, AccessControlResourceType } from '~/types'import { FilterPanel } from '../../components/FilterPanel'import { HeatmapHeader } from '../../components/HeatmapHeader'import { HeatmapRecordingFallback } from '../../components/HeatmapRecordingFallback'+import { HeatmapsForbiddenURL } from '../../components/HeatmapsForbiddenURL'import { HeatmapsPricingNotice } from '../../components/HeatmapsPricingNotice'import { PageHistoryDateControls } from '../../history/PageHistoryDateControls'import { pageHistoryLogic } from '../../history/pageHistoryLogic'@@ -47,6 +48,8 @@ export function HeatmapScene({ id }: { id: string }): JSX.Element {name,loading,displayUrl,+ dataUrl,+ isBrowserUrlAuthorized,widthOverride,heightOverride,screenshotUrl,@@ -215,12 +218,19 @@ export function HeatmapScene({ id }: { id: string }): JSX.Element {}/><HeatmapsPricingNotice />- <HeatmapHeader />- <FilterPanel- lockedWidth={lockedWidth ?? undefined}- previewUnavailable={previewUnavailable}- dateControl={historySelectionActive ? <PageHistoryDateControls id={id} /> : undefined}- />+ <div className="flex flex-wrap items-center gap-x-4 gap-y-1">+ <div className="flex-1 basis-64 min-w-0">+ <HeatmapHeader />+ </div>+ <div className="min-w-0">+ <FilterPanel+ lockedWidth={lockedWidth ?? undefined}+ previewUnavailable={previewUnavailable}+ dateControl={historySelectionActive ? <PageHistoryDateControls id={id} /> : undefined}+ />+ </div>+ </div>+ {dataUrl && !isBrowserUrlAuthorized ? <HeatmapsForbiddenURL /> : null}{isHeightCapped && (<LemonBanner type="info" className="mb-2">This heatmap is capped at {MAX_HEATMAP_HEIGHT.toLocaleString()}px tall to keep rendering fast,@@ -235,19 +245,18 @@ export function HeatmapScene({ id }: { id: string }): JSX.Element {{pageHistoryEnabled && heatmapId && previewType === 'screenshot' && source === 'server' ? (<PageHistoryStrip id={id} />) : null}- <div className="p-2 border-b text-muted-foreground gap-2 flex flex-wrap items-center">- <IconBrowser />{' '}- <span className="min-w-0 flex-1 truncate" title={displayUrl ?? undefined}>- {displayUrl}- </span>- {previewScale < 1 ? (+ {previewScale < 1 ? (+ <div className="flex justify-end px-2 py-1 border-b"><Tooltiptitle={`Scaled from ${widthOverride}px to ${Math.round(effectiveWidth as number)}px to fit the preview`}>- <span className="text-xs text-muted">{scalePercent}%</span>+ <span className="text-xs text-muted">+ <span>Fit to width · </span>+ <span>{scalePercent}%</span>+ </span></Tooltip>- ) : null}- </div>+ </div>+ ) : null}{previewError ? (<divclassName="min-h-80 flex flex-col items-center justify-center gap-3 p-6 text-center"diff --git a/products/web_analytics/frontend/heatmaps/scenes/heatmaps/HeatmapsScene.stories.tsx b/products/web_analytics/frontend/heatmaps/scenes/heatmaps/HeatmapsScene.stories.tsxindex b7a4cf221992..624408fd8c47 100644--- a/products/web_analytics/frontend/heatmaps/scenes/heatmaps/HeatmapsScene.stories.tsx+++ b/products/web_analytics/frontend/heatmaps/scenes/heatmaps/HeatmapsScene.stories.tsx@@ -63,6 +63,14 @@ const meta: Meta = {mswDecorator({get: {'/api/environments/:team_id/saved/': savedList,+ '/api/projects/:team_id/heatmap_capture/settings/': {+ capture_mode: 'all',+ url_allowlist: [],+ enforcement_enabled: false,+ can_capture_all_urls: true,+ capture_url_limit: null,+ },+ '/api/projects/:team_id/heatmap_capture/pages/': { pages: [] },},}),],@@ -72,3 +80,13 @@ export default metatype Story = StoryObj<{}>export const List: Story = {}++export const ListNarrow: Story = {+ decorators: [+ (Story) => (+ <div className="[&_main]:max-w-[520px]">+ <Story />+ </div>+ ),+ ],+}diff --git a/products/web_analytics/frontend/heatmaps/scenes/heatmaps/HeatmapsScene.tsx b/products/web_analytics/frontend/heatmaps/scenes/heatmaps/HeatmapsScene.tsxindex 29323865080b..fb3a70cf931d 100644--- a/products/web_analytics/frontend/heatmaps/scenes/heatmaps/HeatmapsScene.tsx+++ b/products/web_analytics/frontend/heatmaps/scenes/heatmaps/HeatmapsScene.tsx@@ -1,15 +1,7 @@import { useActions, useValues } from 'kea'-import { IconHide, IconPlusSmall } from '@posthog/icons'-import {- LemonButton,- LemonInput,- LemonTable,- LemonTableColumn,- LemonTableColumns,- Link,- Tooltip,-} from '@posthog/lemon-ui'+import { IconBrowser, IconHide, IconImage, IconPlusSmall } from '@posthog/icons'+import { LemonButton, LemonInput, LemonTable, LemonTableColumns, LemonTag, Link, Tooltip } from '@posthog/lemon-ui'import { AccessControlAction } from 'lib/components/AccessControlAction'import { MemberSelect } from 'lib/components/MemberSelect'@@ -17,7 +9,6 @@ import { Shortcut } from 'lib/components/Shortcuts/Shortcut'import { keyBinds } from 'lib/components/Shortcuts/shortcuts'import { TZLabel } from 'lib/components/TZLabel'import { More } from 'lib/lemon-ui/LemonButton/More'-import { createdByColumn } from 'lib/lemon-ui/LemonTable/columnUtils'import { sceneConfigurations } from 'scenes/scenes'import { Scene, SceneExport } from 'scenes/sceneTypes'import { teamLogic } from 'scenes/teamLogic'@@ -55,63 +46,53 @@ export function HeatmapsScene(): JSX.Element {const columns: LemonTableColumns<HeatmapScreenshotType> = [{- title: 'Name',+ title: 'Heatmap',dataIndex: 'name',- render: (_, row) => (- <Link to={urls.heatmap(row.short_id)}>- <span className="truncate max-w-[32rem] inline-block align-middle">{row.name}</span>- </Link>- ),- },- {- title: 'Page',- dataIndex: 'url',render: (_, row) => {const wontCapture = showCaptureStatus && !!row.url && !isUrlCoveredByAllowlist(row.url, urlAllowlist)return (- <div className="flex items-center gap-2">- <Link to={urls.heatmap(row.short_id)}>- <span className="truncate max-w-[28rem] inline-block align-middle">{row.url}</span>- </Link>- {wontCapture && (- <Tooltip title={wontCaptureTooltip}>- <IconHide className="text-muted shrink-0" />- </Tooltip>+ <div className="flex flex-col gap-1 min-w-0">+ <div className="flex items-center gap-2 min-w-0">+ <Link to={urls.heatmap(row.short_id)} className="font-semibold truncate" title={row.name}>+ {row.name}+ </Link>+ {wontCapture && (+ <Tooltip title={wontCaptureTooltip}>+ <IconHide className="text-muted shrink-0" />+ </Tooltip>+ )}+ </div>+ <span className="text-xs text-muted truncate ph-no-capture" title={row.url ?? undefined}>+ {row.url}+ </span>+ {row.data_url && row.data_url !== row.url && (+ <span className="text-xs text-muted truncate ph-no-capture" title={row.data_url}>+ <span>Data: </span>+ <span>{row.data_url}</span>+ </span>)}+ <span className="text-xs text-muted flex flex-wrap gap-x-1">+ {row.created_at && <TZLabel time={row.created_at} />}+ {row.created_by && (+ <span className="truncate ph-no-capture">{`by ${row.created_by.first_name || row.created_by.email}`}</span>+ )}+ </span></div>)},},{- title: 'Heatmap data URL',- dataIndex: 'data_url',+ title: 'Background',+ dataIndex: 'type',+ width: 140,render: (_, row) => (- <Link to={urls.heatmap(row.short_id)}>- <span className="truncate max-w-[32rem] inline-block align-middle">{row.data_url}</span>- </Link>+ <LemonTag icon={row.type === 'iframe' ? <IconBrowser /> : <IconImage />}>+ {row.type === 'iframe' ? 'Live page' : 'Screenshot'}+ </LemonTag>),},{- title: 'Type',- dataIndex: 'type',- render: (_, row) => row.type.charAt(0).toUpperCase() + row.type.slice(1),- },- {- title: 'Created',- dataIndex: 'created_at',- render: function Render(created_at) {- return <div>{created_at && typeof created_at === 'string' && <TZLabel time={created_at} />}</div>- },- },- {- ...(createdByColumn<HeatmapScreenshotType>() as LemonTableColumn<- HeatmapScreenshotType,- keyof HeatmapScreenshotType | undefined- >),- width: 0,- },- {- width: 0,+ width: 48,render: function Render(_, row) {return (<More@@ -141,7 +122,6 @@ export function HeatmapsScene(): JSX.Element {return (<SceneContent>- <HeatmapsWarnings /><SceneTitleSectionname={sceneConfigurations[Scene.Heatmaps].name}description={sceneConfigurations[Scene.Heatmaps].description}@@ -184,6 +164,7 @@ export function HeatmapsScene(): JSX.Element {</>}/>+ <HeatmapsWarnings /><HeatmapsPricingNotice /><div className="flex justify-between gap-2 items-center flex-wrap"><Shortcut@@ -201,7 +182,7 @@ export function HeatmapsScene(): JSX.Element {/></Shortcut>- <div className="flex items-center gap-2">+ <div className="flex flex-wrap items-center gap-2"><span>Created by:</span><MemberSelectvalue={filters.createdBy === 'All users' ? null : (filters.createdBy as string | number | null)}@@ -215,6 +196,12 @@ export function HeatmapsScene(): JSX.Element {loading={savedHeatmapsLoading}columns={columns}rowKey="id"+ tableLayout="fixed"+ emptyState={+ filters.search+ ? 'No heatmaps match your search.'+ : 'Create a heatmap to explore how visitors interact with a page.'+ }pagination={{controlled: true,pageSize: HEATMAPS_PER_PAGE,