Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(error-tracking): polish exception card details (#83096)

Hugues Pouillot265dc86eda17
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index b4e42b580ad4..a0999f07fbdc 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -2049,53 +2049,65 @@ snapshots:
errortracking-assigneedisplay--user-displays--light:
hash: v1.k794b7964.5e5ff02390ffcbf925829bc3cb5be1d12eeae84cbfd4a5d0fb52511d448b1405.LJ4jfnPIbSE2F6dWW90mnaD_cEkywysIZEHPl7RXAls
errortracking-contextdisplay--context-display-empty--dark:
- hash: v1.k794b7964.b437bae7921021394d97e101f32912ada240db17dcbb878ad537cf0873160e00.j-avoDFh_1oiJA-ftpgs7oljldbQxtDRN5lvDFgytTo
+ hash: v1.k794b7964.3516484d01487339ed46bb0e58427cdc5e90c39309321ecbb7f50460a9231f52.9a39dHevx4udYZ6fNqvmvAyi-dzSt1m5brQ5l0vBuzg
errortracking-contextdisplay--context-display-empty--light:
- hash: v1.k794b7964.b58e77fc59e0d4360b81aad91245b23052ab9723b195ca09179d0e1049faf039.z6LvBcgzbJEXWI7pJ-y8jg9hGXJ3SDLhx7DD9nFOVLQ
+ hash: v1.k794b7964.eac4520979a9007f2d94e2ad9a704fe093b1fa9311e7370282e308092d0d1c59.wARgh5VbJGcyoh38SzLc4eKg7H5lmtbJU5k9BzTB7xs
errortracking-contextdisplay--context-display-misc--dark:
- hash: v1.k794b7964.0ba796bc63d15af9255d17958011fded45335f7c51e33fc7786ea07a52d066a0.DLy6AzOvnPPQsFb_wnI3sQ6hRwXd0jVutBAH4CW97yM
+ hash: v1.k794b7964.817dd450dbb9b3d25293c586adb8dc14bc02554452db3b91cc2081c4f55e072b.MZ-idNoRNGBVu7DxIacdXHvlUy1QUyAxIHrKW61UhcA
errortracking-contextdisplay--context-display-misc--light:
- hash: v1.k794b7964.00799acd69df9d4178cc8e3a22396275da74af7e9ac3aa44230457a93ba1e6b0.Hw5Bm-xSzHlK5h1pGziquWyxHVAn4tsb_XN8IboLpCw
+ hash: v1.k794b7964.02b909198f7354398dd2d6d44ac213fd7be42417ba3794cf5f6251e2208f70d3._NpVxTBejQ4qrLdHM-DR5eZV3pciRsQW0NE-fFf2Fqc
errortracking-contextdisplay--context-display-with-stacktrace--dark:
- hash: v1.k794b7964.cb01ac0c8ec731bf6615682b42a02a4af6010dedc74a4e02f98682c00f89033d.r9ko2z5Ew7PiEmPRGAugMqp2sA7Pwv-vMMERAFGKuEA
+ hash: v1.k794b7964.cedf1eb23693d8d3aa5a8a6378776895a9b2ab1605676d43614394fb3f8aa5a0.KdXWP3BRWn1Kb8U2JlHFsrW0dwZ4DPgbKcOVTPlZ62A
errortracking-contextdisplay--context-display-with-stacktrace--light:
- hash: v1.k794b7964.2cb3491793b79cf90503fca5f272462570ca063baf084f4798ef855f560d5691.hVu_B8x0_P63Lnkqyk-syp8-LlqSbzw1GdRonGsH6W4
+ hash: v1.k794b7964.4647fc443f0df7cf2451a05f28fb95592b4c40e98d59ae289a5a3a2d54dba14f.y3p3Lw9_WVMCUVwR_8JJwjdkKaYBWgrJNzCa3e3Mu2I
errortracking-exceptioncard--exception-card-all-events--dark:
- hash: v1.k794b7964.9bd6ffba20a8f1432fc8cf487057fd0ff06ad49744ab97d01b3bf8fd468d6012.KJc10eGLvinHibe9V4LpHJ1fPlljrJDOqkd_gnryQYk
+ hash: v1.k794b7964.d8eeeb2edea49238f843906636f535de9d9bb972dfdb7b0a7d4996e2c90b8a09.x8dkCzh5Nu2XxKwjMs6ab8KHxvQaP9toxjiu3Cd0dNs
errortracking-exceptioncard--exception-card-all-events--light:
- hash: v1.k794b7964.4d4011917315714476d68bdd328ff89d594ac6e99b3416b222aa6ecd2d2afa54.NaFO5q9cRFGBMLugeaBEjE7lk3x9TL6GAZhZYzQygZc
+ hash: v1.k794b7964.c83f4ab40ac186ee8872b9e051f8eb74be9fe70a1f257d853bbbb8372f2d6db2.my2kxuXPuZRq6U3hYpzKMZOQiYOVGgYTFrYo97sltlo
errortracking-exceptioncard--exception-card-base--dark:
- hash: v1.k794b7964.ff03b4c4fdbf319431047031580393a81fac15d227964f99474c7e2b469f245a.5BBLG7jy0ZopdWyyAWtY4GTcXi7p9iVlLxUWFs3u-ow
+ hash: v1.k794b7964.3c350c23790195a5fc0dfb048f81f0a62dee7d84dab927e4b0fe318adce3443c.uWybQFWQBqnNXQnYT_PSKs0VNv5dVHNtDFIkDAa1Toc
errortracking-exceptioncard--exception-card-base--light:
- hash: v1.k794b7964.fe21533eaec36e38b0c52d716a4dbb27f4571d0736626f61da117c29f14f17df.zflE6pdzGHEDkBYCO8xbBByLNR4nYg9pY0OzY6pQ180
+ hash: v1.k794b7964.40a5fd88410919603dc60b886450c6011806a70502e144dfc559380eec5cd9cf.LXtqQwhm5OiXOmRO3LnQdS-BtoNHpRABg21xA3_FthY
errortracking-exceptioncard--exception-card-no-in-app--dark:
- hash: v1.k794b7964.c73d94ba545bc8ff6e2b1d47e2e6655370b96473a646f718394946a0db6ec588.p2DaYdsfeOj9MK-hPRgplH52Oq_EmzFowbdAsOcz_vc
+ hash: v1.k794b7964.dfe3f9887bc6d9a4dfe224d568112ce764e47fec5650c00a78858927e7286033.XpCzNrmb7acFXFqAix8ISjA_85Dcg_mEN90QGGSPaqE
errortracking-exceptioncard--exception-card-no-in-app--light:
- hash: v1.k794b7964.fc43207e0162cadb5fc008f9e046870993b65dd21ba37df14d2adeeef344400a.sDRvIKCTPq0JSGTYKEE1fquPNWeYnr4nrq00NsNzvxs
+ hash: v1.k794b7964.6bf5f16a4ad53b8e27dab8e8d1378f7731b8576c1c1d3eb93afea002c5169b4b.nWg3Um6I5RanwPFqFQYnlaNDZoV4c1kSCmD8B0Apvrs
errortracking-exceptioncard--exception-card-no-session-with-steps--dark:
- hash: v1.k794b7964.88f8b36cfc329078062eade9b0b893b7c445972de112b4d81622d4fe5f0a9463.38XUwR7Kpqy46eD0WsJu7h2_3atcRlk0XMem4k6TIOU
+ hash: v1.k794b7964.2c67f5577a9ae3066abf9ff5d7a5e269097a54821edb9ac31b10d09d4c14193f.Z56yUwOin21Cx-b62kB78xLQbbjivvhRcdtaCbNEto4
errortracking-exceptioncard--exception-card-no-session-with-steps--light:
- hash: v1.k794b7964.8c32ffeb5b6f0244f59b2b26908546cf3bef1c26d377f36a2960bc012c5f53be.yDxILiTfjJSLbhu5OAqHJmQ0EU3QhY7RulWm_4c9ZyA
+ hash: v1.k794b7964.80cded58fcc6cfc1c5aed65163aa05ca10e48bc33e7f1ff4736dac8461319ad1.xfq0uUv7zK5kj_Jlyy5GCc2ytA3ARDPNgnwCXcCnke4
errortracking-exceptioncard--exception-card-no-session-without-steps--dark:
- hash: v1.k794b7964.45e2ede752e2da6be50b9206bf3ec04c623c8dd6ee0205fb85a202ed198a3a35.Z-dO2FzbWgbgnV0Cj_aEXe34ENSeEQ4dwu_CFxa8T10
+ hash: v1.k794b7964.72fac178845770f81a572f60cb6543dc758ac45e398c87f4f80f8434116b45a8.f2IcFj63qmBuRq4McWUq-JHrAG6x4S4Po3hjS-iCSnU
errortracking-exceptioncard--exception-card-no-session-without-steps--light:
- hash: v1.k794b7964.16e6898ef25c4d3070cfbb7b409c88fd4e560be7ee8cd442a9374481ca331278.NT-GvLQ8llwGw9F7gWZKxwP_TNxwFoxc0ZyPSt6aHFo
+ hash: v1.k794b7964.c52b61b26faf6faf91a760db9c68a35c4c87bd8908e2e0a491d33909c1ef3df0.J9E608EiRs00rwDAHfSM6mRVRJ-ac2oV03bT578xO1w
errortracking-exceptioncard--exception-card-session-timeline-with-long-preview-texts--dark:
- hash: v1.k794b7964.d17141ef0922cf3fdc6dbd115ecd7a1d31f252fa079742622620c8fa12c0545a.MBOtdbnVCgnqeQY3ubC1egyqDacwRGlcuuA6kWiYdvA
+ hash: v1.k794b7964.8051c9343a46757332b4f2dcb5578a9b8e7dc624c206582c1a08f058e187d4d0.sY4-v26oV8Kc_bG78oylfD4r-TGhyHCC7su0PPZAYr4
errortracking-exceptioncard--exception-card-session-timeline-with-long-preview-texts--light:
- hash: v1.k794b7964.8a566d740304be6948717118b7a1d12ecdb15145b3ca5699fab0df2d4a6b4cc5.uHvHcTaosQCus6Igmieo_U8IfsLeqOKri8e-D_O9WGY
+ hash: v1.k794b7964.47993b2a28e321edf7f7e4c7db04d76e37bfe39765eb596d560c26f5766a1ad8.Dxc0F54UpFPHBFrXXy3_WmvnqNkWHSfRLbN63VnX1lk
errortracking-exceptioncard--exception-card-session-timeline-with-malformed-steps--dark:
- hash: v1.k794b7964.269f26f6a0608af8d29263a73c9ce1c9529b315798ddd96a74f3a7a2e499b1e8.zlhzzC8bRRLg4XJz3kLG0T6nsr7INsqQWRasH529rkw
+ hash: v1.k794b7964.83e62f1acebee7145d58a2ce0080c528e4e4076d30b30f912166d1479278e22f.JHO8jnFJrF3WRN4Ae9n5MqjJm8E0oDQrdeM9nDOEw-s
errortracking-exceptioncard--exception-card-session-timeline-with-malformed-steps--light:
- hash: v1.k794b7964.2901c9ab66f80963a7b699fbe8a330e42ee409b05574bb4c9e143191e1175bbc.wc28u07-U6mjHwvmPuVv_HqhbKkRuyQB4icH_E6E0mE
+ hash: v1.k794b7964.b2a3d950f6376037e93d70479285b65d3dbce2e982ff522e05b557152429be2a.m2y29oRWCyc10a7uX6pgUnGrdJrNvQ5SZ4pNFZ_vPc0
errortracking-exceptioncard--exception-card-session-timeline-with-steps--dark:
- hash: v1.k794b7964.b18b524a0938ccd76b8904093aedba6b993bdddd9d66bcba15d39291f4bf053c.fKOWgbie8gECYxOhQ4m4Zi_r6qyiXNeBKBUuflCI94g
+ hash: v1.k794b7964.be00b2c31b53c041489ec3c8ede215ee471a264ed3ecae0d2250594eb13d32fc.tOSaqIO9daP63OrPJxPf-cDItq4XSQ8z5r6Qj9SHbFk
errortracking-exceptioncard--exception-card-session-timeline-with-steps--light:
- hash: v1.k794b7964.143de2c00fda464db3becf0a1d87f8c7dae0676c35c0b81dfb37d06202a03b5d.FAtr9xoT_3f_w9ScFL8jJd6jVz-37tau8qlIBvb4szo
+ hash: v1.k794b7964.6ba862466a82dbe2ae0b8d75b5c9ef10205fa8bc0a10f101a38ed6e45336f087.s4gbbkky4SGGjGBm1q4dmcApTwhb3-QJzP29PwjGBq4
errortracking-exceptioncard--exception-card-session-timeline-without-steps--dark:
- hash: v1.k794b7964.9780bdf035a5bb22ce936937ce521d595eb15d7011129e7a1711de4b5474a360.XpzcHtsJC2xOCzqmbWID_XZ69gn1dQr--ugFlJ0uhaw
+ hash: v1.k794b7964.c7cae57a3389936a91a4860b7a23b54c2cbb64b9e99f81afbe110fe8f694576d.Dywj0rbbT9VUxnZLmHtIR5bakCgCeVk4LTm6IXojad0
errortracking-exceptioncard--exception-card-session-timeline-without-steps--light:
- hash: v1.k794b7964.d70d5f3dbdd36a4d42419973acec641ce0fde71a03abc6be8310f01a2c4dfe59.O6G9HRSQZkJp0TeO69qBJSDM20lECZtk-Dx67ZiC3kw
+ hash: v1.k794b7964.638735982d9901d6aa27dbe6affc87c1ec56d3260fa99dc2680045f3b0ec423a.MqdrzbQlSeSod_jU23rgJCkmbQWDowXHv_3Ds68-5Ww
+ errortracking-exceptioncard--exception-card-with-footer--dark:
+ hash: v1.k794b7964.5d91622107f82603e78adeb5238b4245e29e66e5185a873b90ee8df884e1da6c.GGksKImwPhKm472TGFj6SK35G88DwZumZEFuZUBY_fg
+ errortracking-exceptioncard--exception-card-with-footer--light:
+ hash: v1.k794b7964.1c6a6263fce61d823835d6d6e04f31ba040fcf8f2aee7620ed9b04064f0ae80b.80a7MjP_Dp-z18eNIp0bBrRJuO-OaHvehegDAhptYQQ
+ errortracking-exceptionpropertiestable--default--dark:
+ hash: v1.k794b7964.d3fe66e6fe85d6e4da00ee8f41e6aadd3b056ad0fd6669aa4803e527c6e4244b.WZyU9f9-17LRZgIlwsQcAB5W8UnklBqT0w1YT7_VOwI
+ errortracking-exceptionpropertiestable--default--light:
+ hash: v1.k794b7964.70ac7f67ce6bb85da4e77268e759683ea4ef62cfe41dac7d195ad6d1d76968c6.lM0z4cPnmTxWzhGeDAA7S8VKFG8zQE5AxgpCKIX7L-U
+ errortracking-exceptionpropertiestable--empty--dark:
+ hash: v1.k794b7964.daf1d61523fb4f9194c535437fc416212b831201df537bc6773eb297f65defd9.BOG2sX6hdQgIR6b5Bxaw61ivfxG5ciYSmYGa3M9Vqik
+ errortracking-exceptionpropertiestable--empty--light:
+ hash: v1.k794b7964.adefeb2d8c52b7fe9f5ade2cecb5894f3c8e6e92a92f117752da938b0addb43a.ZaYOt5aQ6lMzU6-6JMlS0P4hmvqG8TfUCJJqz2SZwQ4
errortracking-ratelimithistorychart--empty--dark:
hash: v1.k794b7964.ba7eeab8b8da615a5f0641fa228edd6495cdba345860cbe418d736c1d6fbf5ad.Y17RTMCD78FYAVkdyD82nihxohmoVy0ye_eyLjzeTxQ
errortracking-ratelimithistorychart--empty--light:
@@ -6141,41 +6153,41 @@ snapshots:
scenes-app-error-project-unavailable--no-selectable-projects--light:
hash: v1.k794b7964.25cba9f347696eb78fc20a05e5f37e514e17b483c0e7f2cbc2a0ff581eef2b72.Z1uJTP8R_ATm8aciECP4ScSzcSTFpYd7VQI6kVswSMg
scenes-app-errortracking--group-page--dark:
- hash: v1.k794b7964.535b839d5db78b5f0f8795138247d80510a424396dfcf4c0340879b1b648acc0.iMjTx1ns3YJ7xVddwdfL2laNWuyhwbgglZNI0yz3MJk
+ hash: v1.k794b7964.a09a2a5bf17e69e0681068b610130d21ce65ac0037db7f60527bec19a416f05f.ji1tqyiK8M8vjUevg_kMlxV7ZjZprSLSsrx6zwu39r4
scenes-app-errortracking--group-page--light:
- hash: v1.k794b7964.aa7c14dc58c672d210f74c8b4c9c608e3192b6e4bccf4e599185a2d42bc9bb27.5S5A2vxw6z0zUJQYKs0g0quETICkW1bq5iQ0u7sNGQ0
+ hash: v1.k794b7964.f1b77106d680720fda3429c10fbe9a1e1995caaca802c537f743f14780e41576.6u7L6xYNzRw066qfx0w15wkLxE5XjgUv2KKUAgROjWs
scenes-app-errortracking--group-page-breakdown-loading--dark:
- hash: v1.k794b7964.01db66903e15c4f8283753c71a80353c7042ec6e7b4873daaba7779cd612406b.yW-IzkeZrpTUmY8-1w5u7I1MLqdt1dBngnQarw90X24
+ hash: v1.k794b7964.905db5ee0a380bf49ce46663e5ba944da30555a59e5b30ad459faa07a75ba7fd.BC8aOud8jpikFflgjjp6HkL8xJ6wxD37RoyuP9YcL_w
scenes-app-errortracking--group-page-breakdown-loading--light:
- hash: v1.k794b7964.25bb3a13b57bfb6c6aee29e4f167fa6b80363f6d45413a1d39123f464f8a3c64.ELac92gY9t1xI8Abu5Jj8wF0g8fPa_Fko5JAW5AlR9Y
+ hash: v1.k794b7964.4e0f9baf66d9862363aa56b0fb5640baaa9e1def79a017d4363749bad336e40b.ueZa0D_FaOk4aN7tUMVwWmgOThr9XIJc12W0iK01a6Y
scenes-app-errortracking--group-page-breakdown-modal--dark:
- hash: v1.k794b7964.4fa717b9f5fda558b34d0162f6cea3910aef933081b3c58ff9c1de1226ecff02.cIJnIklFol34MtGhs_8j4N3A-kPN1ps5npX0KmLTVR4
+ hash: v1.k794b7964.4df823170b24e0170171c6841ef0126f6ef042f5f28173958959aa7469704087.86hvk1n6TWtaIk85RAMaygZ2pVsU4EsT6XlmevrrHt8
scenes-app-errortracking--group-page-breakdown-modal--light:
- hash: v1.k794b7964.5315145b31df6124c949df95da8db106750f6d618a4b0d7c18f595bcfb32731f.FfLGfyyvB5SRqLFL1wWhElc5ztIwlP16xIuGSjTFS4A
+ hash: v1.k794b7964.cdb93b62da6faf1e0f06917819a56a04c5d188aac2cf669c1fdc4cfc73ae8a98.6RLivUFUu42I6SypPnuTZoCIL5vbPtSZLsGcGr036is
scenes-app-errortracking--group-page-breakdown-modal-loading--dark:
- hash: v1.k794b7964.c22f13833d276440896ad2f86fc796810477e0cb643ef7f4fca31fbf15fe5f16.tcEdSoSs9KFCVtON7XiN7geVD59VFejjNJhIEfEudWk
+ hash: v1.k794b7964.e19707caf474d78777b1b88c8a03d4a6619d0a423d0db2553e24951161c266e6.EWf2MelREK7oDbF4-YW2sq5r9Cy6-gl5NNKxEwZx-GI
scenes-app-errortracking--group-page-breakdown-modal-loading--light:
- hash: v1.k794b7964.1bb5ab9fdc5011a442b9ab57469243a05890970824bad0a7e712e2dd8818b7cb.kA0pf0RgM0-IMze-cuAAJBPAo0oInmQgNA-IqTcfWnU
+ hash: v1.k794b7964.2a5809ecf92a1fcfe66c70345d60a90e205b4cb6a016a186a6269dfcc4f63bfa.QIvi7R5UJ2cHYGDdkJt-7KfevCSH2Yl0lnMQODvZfgs
scenes-app-errortracking--group-page-capped-breakdown-panel--dark:
- hash: v1.k794b7964.9ccee9ad68e3ede8c393148e320095abbb1149ccae67579896a9e29bc34fd3b3.Nv1AMYSVRBPdexhp7-vPT5FPtVxz7vVFFKjuwuY2tr0
+ hash: v1.k794b7964.dbc3c5fc98a15fa2f4e709a6a451cb769b28b935a306c764002f84dfa079bc22.MRahfxq0gyAUa23579zv69iW_QYRsTbijY6ccyZTpgw
scenes-app-errortracking--group-page-capped-breakdown-panel--light:
- hash: v1.k794b7964.4a7f2783ce0682c7f4ac03020388683f021a77249a1ee9ff5650236c4256336c.6OyLSmlED6PaLfpwYglRdbFViSfsR3Fmm-srGigFg0Y
+ hash: v1.k794b7964.ef5e3db90772e06510d061172fba490a85d5e1d0b30ff95fbfa5ed89271618eb.vBD2lchMSrNiW5DURoHY6nH1Xw61EABza6jjgHzEuYk
scenes-app-errortracking--group-page-content-sized-breakdown-panel--dark:
- hash: v1.k794b7964.9ccee9ad68e3ede8c393148e320095abbb1149ccae67579896a9e29bc34fd3b3.wwxRR0mrgoNXo2zrb6IJffG-5DlhqOkMFLHaOF2ppmc
+ hash: v1.k794b7964.dbc3c5fc98a15fa2f4e709a6a451cb769b28b935a306c764002f84dfa079bc22.lMWQoUcDpgvSjCKBSBa-iynOamKeOdy8CdNejw1_bLY
scenes-app-errortracking--group-page-content-sized-breakdown-panel--light:
- hash: v1.k794b7964.23c11585901a2f176686d2e6c6d4b9a1c92502abf9a96ffd3e46db1b914b30bb.5N-OGAvElIp7pSfsCWm6qEBvFClPyIa281sicWTMaIE
+ hash: v1.k794b7964.ebc2a3c8426bb4d1adf7a50adfd82fb099cb04ff7039148c19eb100356115d23.t2UFVlDb_zF1J9uE2nJJ7WCDmxAnkLdBz00TIEnAwYo
scenes-app-errortracking--group-page-empty-with-filter--dark:
- hash: v1.k794b7964.1f009b93a01130bd93accaeaa6ee55edc8c580e5cbad15087c1396c7e2294e7c.1Q1ckK6SJ-Zw_pwA_0l0sWUz2iAguRYg-KRrlgUfP0U
+ hash: v1.k794b7964.8af7a7f552f592c9bea2a3bf7bd687bace89246404cac7991973d2c760104f9d.DO0DLDoxcYidQZT32FkkgnuXCRQsmRuOUC3JR-TG8hI
scenes-app-errortracking--group-page-empty-with-filter--light:
- hash: v1.k794b7964.4be7b425ec908e8420f831610c88cc213521769413e9735b868469961481dec2.3sqduQwEKll-3OCsNz5QGLjnpY7wJ-AN3FoTQVGn4Ls
+ hash: v1.k794b7964.50372c3554997af22c6286d29899ed2dee7286543f9854a24369c82594827b4f.hm-F4CK6jtHzTcU9SNds3hfdGHucHAvoKl2inMnQA-A
scenes-app-errortracking--group-page-loading--dark:
- hash: v1.k794b7964.5cfd8c1f879bcd07eaf807dcebca2d59b4a891d82c393454ac97305b351a0bc1.qDhZGsjJQBMxq3aT5BqTIVTTmSy2E8-vK3LaJlkWU34
+ hash: v1.k794b7964.211fa2dc218f0004b4f6fb90be5accfd1cec678d8cf5d75f2aa0c06167dc9b8b.ZF3VTqeZ0v_HQxJZyMnn70EScvoUGGyQ-fjz4dw-ExA
scenes-app-errortracking--group-page-loading--light:
- hash: v1.k794b7964.72089c4bfe3afee3f5c9477a69f1420ae8c12d624b2a6c57411c637338b9fca4.NdsmnmKg09omRIkuY1mnjDfxXpbBc6To6kSP1mUFUlQ
+ hash: v1.k794b7964.bd5a0e6b76f520d53c3ae2c0ec45a5f56ac50f2af60c17362c5b631104a1cea1.--suvXltANT83FFHak4ie__7cy0WVIHrzvtQhZkxmJg
scenes-app-errortracking--group-page-with-self-driving--dark:
- hash: v1.k794b7964.dbd7d3f7f3255f3657098204f34b9b026888ce251843a42763ad1fd01b9516c0.1UCE29AB0s8X6ObQRp8Src1S0P7xT2R7ilA3EqPST4s
+ hash: v1.k794b7964.9a6d6984b93caf409a9f834d39c754800e691935d2431aca8bfcad5be30d9211.I9aVC4ZG1CfFrSucVWdwGfgLC33Y51VBTPP9BfcCj1Y
scenes-app-errortracking--group-page-with-self-driving--light:
- hash: v1.k794b7964.7c0d8cad2883cba67185a12f8c9d6bb930a9441dac9bc0ba161b0c00ff0b7f57.GHGSAxJO5d7BPYnc1GODWSE9AjPVQg4_oji_JgKrEok
+ hash: v1.k794b7964.8ea5cfbc986b02d616a31e797de8ba06f84f8d2bf6dc3cb1a1b1a1a7ed82bfa3.jCMsWupoerRB1Or40oe4e7O9h_4e3sjE93kMQl2ieWk
scenes-app-errortracking--list-page--dark:
hash: v1.k794b7964.f474d0d6caf49e7b9a4cfd469546ab9de031039030fb9da704293bc40d87e69a.WxsvGwytEdwdnq8_Ywy_dgGBBYoSYCX9hX72AB42bgs
scenes-app-errortracking--list-page--light:
diff --git a/frontend/src/lib/components/Errors/ExceptionList/ExceptionListRenderer.tsx b/frontend/src/lib/components/Errors/ExceptionList/ExceptionListRenderer.tsx
index e6a7a277e428..7191c83682d4 100644
--- a/frontend/src/lib/components/Errors/ExceptionList/ExceptionListRenderer.tsx
+++ b/frontend/src/lib/components/Errors/ExceptionList/ExceptionListRenderer.tsx
@@ -24,7 +24,7 @@ export function ExceptionListRenderer({
<div className="flex-1 border-t border-dashed border-border" />
</div>
)}
- <div className={cn(index > 0 && 'ml-4 border-l-2 border-warning-foreground pl-4')}>
+ <div className={cn(index > 0 && 'ml-4 border-l-2 border-[var(--warning-foreground)] pl-4')}>
{renderException(exception, index)}
</div>
</div>
diff --git a/frontend/src/lib/components/SessionTimeline/SessionTimeline.tsx b/frontend/src/lib/components/SessionTimeline/SessionTimeline.tsx
index dbbda4a3f98b..275b415b5dbc 100644
--- a/frontend/src/lib/components/SessionTimeline/SessionTimeline.tsx
+++ b/frontend/src/lib/components/SessionTimeline/SessionTimeline.tsx
@@ -16,6 +16,7 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
} from 'lib/ui/DropdownMenu/DropdownMenu'
+import { Button, Tooltip, TooltipContent, TooltipTrigger } from 'lib/ui/quill'
import { cn } from 'lib/utils/css-classes'
import { ItemCategory, ItemCollector, ItemRenderer, RendererProps, TimelineItem, TimelineMenuItem } from './timeline'
@@ -25,15 +26,26 @@ export interface SessionTimelineHandle {
scrollToItem: (itemId: string) => void
}
+export type TimelineMarkerColor = 'blue' | 'yellow' | 'red'
+
export interface SessionTimelineProps {
collector: ItemCollector
selectedItemId?: string
+ selectedItemMarkerColor?: TimelineMarkerColor
className?: string
onTimeClick?: (time: Dayjs) => void
+ categoryControlsPosition?: 'sidebar' | 'header'
}
export const SessionTimeline = forwardRef<SessionTimelineHandle, SessionTimelineProps>(function SessionTimeline(
- { collector, selectedItemId, className, onTimeClick }: SessionTimelineProps,
+ {
+ collector,
+ selectedItemId,
+ selectedItemMarkerColor = 'yellow',
+ className,
+ onTimeClick,
+ categoryControlsPosition = 'sidebar',
+ }: SessionTimelineProps,
ref
): JSX.Element {
const [activeCategories, setActiveCategories] = useState<ItemCategory[]>(() => collector.getAllCategories())
@@ -102,7 +114,7 @@ export const SessionTimeline = forwardRef<SessionTimelineHandle, SessionTimeline
if (activeCategories.length === 0) {
return {
title: 'No categories selected',
- description: 'Select at least one category from the left to show timeline items.',
+ description: 'Select at least one category to show timeline items.',
}
}
@@ -119,37 +131,103 @@ export const SessionTimeline = forwardRef<SessionTimelineHandle, SessionTimeline
}
}, [activeCategories.length, items.length])
- return (
- <div className={cn('flex h-full', className)}>
- <div className="flex flex-col justify-between items-center p-1 border-r border-gray-3 shrink-0">
- <CategoryToggleGroup>
- {allCategories.map((cat) => (
- <ItemCategoryToggle
- active={activeCategories.includes(cat)}
- key={cat}
- category={cat}
- onClick={() => toggleCategory(cat)}
- >
- {collector.getRenderer(cat)?.categoryIcon}
- </ItemCategoryToggle>
- ))}
- </CategoryToggleGroup>
- {hasVisibleSelectedItem && (
- <ButtonPrimitive
- tooltip="Scroll to item"
- tooltipPlacement="right"
- iconOnly
- size="xs"
- onClick={() => selectedItemId && scrollToItem(selectedItemId)}
+ const sidebarCategoryToggles = (
+ <CategoryToggleGroup>
+ {allCategories.map((cat) => (
+ <ItemCategoryToggle
+ active={activeCategories.includes(cat)}
+ key={cat}
+ category={cat}
+ onClick={() => toggleCategory(cat)}
+ >
+ {collector.getRenderer(cat)?.categoryIcon}
+ </ItemCategoryToggle>
+ ))}
+ </CategoryToggleGroup>
+ )
+
+ const headerCategoryToggles = (
+ <div
+ className="flex h-7 min-w-0 max-w-full items-center gap-1 overflow-x-auto overflow-y-hidden"
+ role="group"
+ aria-label="Timeline categories"
+ >
+ {allCategories.map((cat) => {
+ const active = activeCategories.includes(cat)
+ const categoryLabel = getCategoryLabel(cat)
+
+ return (
+ <Button
+ key={cat}
+ variant="default"
+ size="sm"
+ aria-pressed={active}
+ title={active ? `Hide ${categoryLabel.toLowerCase()}` : `Show ${categoryLabel.toLowerCase()}`}
+ className={cn(
+ 'shrink-0 gap-1.5 px-1.5 [&_svg]:size-3',
+ active ? 'text-[var(--primary)]' : 'text-[var(--muted-foreground)] opacity-60'
+ )}
+ data-attr={`session-timeline-category-toggle-${cat.replaceAll(' ', '-')}`}
+ onClick={() => toggleCategory(cat)}
>
- <IconVerticalAlignCenter />
- </ButtonPrimitive>
- )}
- </div>
+ {collector.getRenderer(cat)?.categoryIcon}
+ {categoryLabel}
+ </Button>
+ )
+ })}
+ </div>
+ )
+
+ const sidebarScrollToSelectedItemButton = hasVisibleSelectedItem ? (
+ <ButtonPrimitive
+ tooltip="Scroll to item"
+ tooltipPlacement="right"
+ iconOnly
+ size="xs"
+ onClick={() => selectedItemId && scrollToItem(selectedItemId)}
+ >
+ <IconVerticalAlignCenter />
+ </ButtonPrimitive>
+ ) : null
+
+ const headerScrollToSelectedItemButton = hasVisibleSelectedItem ? (
+ <Tooltip>
+ <TooltipTrigger
+ render={
+ <Button
+ variant="default"
+ size="icon-sm"
+ aria-label="Scroll to item"
+ onClick={() => selectedItemId && scrollToItem(selectedItemId)}
+ />
+ }
+ >
+ <IconVerticalAlignCenter />
+ </TooltipTrigger>
+ <TooltipContent side="bottom">Scroll to item</TooltipContent>
+ </Tooltip>
+ ) : null
+
+ return (
+ <div className={cn('flex h-full', categoryControlsPosition === 'header' && 'min-h-0 flex-col', className)}>
+ {categoryControlsPosition === 'header' ? (
+ <div className="flex h-9 shrink-0 items-center justify-between gap-2 border-b-1 bg-[var(--gray-1)] px-2">
+ {headerCategoryToggles}
+ {headerScrollToSelectedItemButton}
+ </div>
+ ) : (
+ <div className="flex flex-col justify-between items-center p-1 border-r border-gray-3 shrink-0">
+ {sidebarCategoryToggles}
+ {sidebarScrollToSelectedItemButton}
+ </div>
+ )}
<div
ref={setContainerRef}
data-attr="session-timeline-scroll-container"
- className="SessionTimeline__scroll-container h-full w-full overflow-y-auto relative"
+ className={cn(
+ 'SessionTimeline__scroll-container h-full w-full overflow-y-auto relative',
+ categoryControlsPosition === 'header' && 'min-h-0 flex-1'
+ )}
style={{ scrollbarGutter: 'stable both-edges' }}
>
<div className="pr-3">
@@ -166,6 +244,7 @@ export const SessionTimeline = forwardRef<SessionTimelineHandle, SessionTimeline
item={item}
sessionId={collector.sessionId}
selected={item.id === selectedItemId}
+ selectedMarkerColor={selectedItemMarkerColor}
onTimeClick={onTimeClick}
/>
)
@@ -181,11 +260,16 @@ export const SessionTimeline = forwardRef<SessionTimelineHandle, SessionTimeline
})
const itemContainer = cva({
- base: 'w-full',
+ base: "relative w-full border-b border-[var(--gray-2)] before:absolute before:inset-y-0 before:left-0 before:w-1 before:content-['']",
variants: {
selected: {
- true: 'bg-[var(--gray-1)] border-1 border-accent',
- false: 'border-b border-[var(--gray-2)]',
+ true: 'bg-fill-button-tertiary-active',
+ false: null,
+ },
+ markerColor: {
+ blue: 'before:bg-brand-blue',
+ yellow: 'before:bg-brand-yellow',
+ red: 'before:bg-brand-red',
},
},
})
@@ -205,6 +289,21 @@ function getCategoryTooltip(category: ItemCategory): string {
}
}
+function getCategoryLabel(category: ItemCategory): string {
+ switch (category) {
+ case ItemCategory.ERROR_TRACKING:
+ return 'Exceptions'
+ case ItemCategory.EXCEPTION_STEPS:
+ return 'Exception steps'
+ case ItemCategory.CUSTOM_EVENTS:
+ return 'Custom events'
+ case ItemCategory.PAGE_VIEWS:
+ return 'Pageviews'
+ case ItemCategory.CONSOLE_LOGS:
+ return 'Logs'
+ }
+}
+
function LoadingRow(): JSX.Element {
return (
<div className={cn(itemContainer({ selected: false }), 'flex items-center gap-2 px-2 h-[2rem]')}>
@@ -287,12 +386,13 @@ function TimelineRowMenu({ menuItems }: { menuItems: TimelineMenuItem[] }): JSX.
type SessionTimelineItemContainerProps = RendererProps<TimelineItem> & {
renderer: ItemRenderer<TimelineItem>
selected: boolean
+ selectedMarkerColor: TimelineMarkerColor
onTimeClick?: (timestamp: Dayjs) => void
}
const SessionTimelineItemContainer = forwardRef<HTMLDivElement, SessionTimelineItemContainerProps>(
function SessionTimelineItemContainer(
- { renderer, item, sessionId, selected, onTimeClick }: SessionTimelineItemContainerProps,
+ { renderer, item, sessionId, selected, selectedMarkerColor, onTimeClick }: SessionTimelineItemContainerProps,
ref
): JSX.Element {
const [expanded, setExpanded] = useState(false)
@@ -318,7 +418,11 @@ const SessionTimelineItemContainer = forwardRef<HTMLDivElement, SessionTimelineI
}
return (
- <div ref={ref} className={itemContainer({ selected })} data-item-id={item.id}>
+ <div
+ ref={ref}
+ className={itemContainer({ selected, markerColor: selected ? selectedMarkerColor : undefined })}
+ data-item-id={item.id}
+ >
<div className="flex justify-between pr-0 w-full h-[2rem] items-center">
<TimelineTimestampCell item={item} onTimeClick={onTimeClick} SourceIcon={renderer.sourceIcon} />
<div
diff --git a/products/error_tracking/frontend/components/Breakdowns/MiniBreakdowns.tsx b/products/error_tracking/frontend/components/Breakdowns/MiniBreakdowns.tsx
index f5efad148141..37321aa41acb 100644
--- a/products/error_tracking/frontend/components/Breakdowns/MiniBreakdowns.tsx
+++ b/products/error_tracking/frontend/components/Breakdowns/MiniBreakdowns.tsx
@@ -1,29 +1,32 @@
import { useValues } from 'kea'
-import { Text } from 'lib/ui/quill'
+import { Separator, Text } from 'lib/ui/quill'
+import { BUILT_IN_ERROR_TRACKING_PROPERTIES } from '../builtInProperties'
import { IssueFilterPreviewHeader } from '../IssueFilterPreview/IssueFilterPreviewHeader'
import { BreakdownDetailsDialog } from './BreakdownDetailsDialog'
import { BreakdownsTileButton } from './BreakdownsTileButton'
-import { BREAKDOWN_PRESETS, BreakdownPreset } from './consts'
+import { BreakdownPreset } from './consts'
import { miniBreakdownsLogic } from './miniBreakdownsLogic'
-const BUILT_IN_PROPERTY_NAMES = new Set(BREAKDOWN_PRESETS.map(({ property }) => property))
+const BUILT_IN_PROPERTY_NAMES = new Set(BUILT_IN_ERROR_TRACKING_PROPERTIES.map(({ property }) => property))
export function MiniBreakdowns(): JSX.Element {
- const { breakdownProperties } = useValues(miniBreakdownsLogic)
- const builtInProperties = breakdownProperties.filter(({ property }) => BUILT_IN_PROPERTY_NAMES.has(property))
- const customProperties = breakdownProperties.filter(({ property }) => !BUILT_IN_PROPERTY_NAMES.has(property))
+ const { visibleBreakdownProperties } = useValues(miniBreakdownsLogic)
+ const builtInProperties = visibleBreakdownProperties.filter(({ property }) => BUILT_IN_PROPERTY_NAMES.has(property))
+ const customProperties = visibleBreakdownProperties.filter(({ property }) => !BUILT_IN_PROPERTY_NAMES.has(property))
return (
<div className="flex flex-col">
<IssueFilterPreviewHeader preview="properties" title="Breakdown" />
<div className="grid content-start grid-cols-[fit-content(12rem)_minmax(0,1fr)] gap-y-px pb-6 pt-1">
- <BreakdownPropertySection
- id="built-in-breakdown-properties"
- title="Built-in properties"
- properties={builtInProperties}
- />
+ {builtInProperties.length > 0 && (
+ <BreakdownPropertySection
+ id="built-in-breakdown-properties"
+ title="Built-in properties"
+ properties={builtInProperties}
+ />
+ )}
{customProperties.length > 0 && (
<BreakdownPropertySection
id="custom-breakdown-properties"
@@ -48,16 +51,20 @@ function BreakdownPropertySection({
}): JSX.Element {
return (
<section aria-labelledby={id} className="contents">
- <Text
- id={id}
- size="xxs"
- variant="muted"
- weight="semibold"
- render={<h3 />}
- className="!mb-0 col-span-2 flex h-10 items-center justify-center px-2.5 text-center uppercase tracking-wide"
- >
- {title}
- </Text>
+ <div className="col-span-2 flex h-10 items-center gap-3 px-2.5">
+ <Separator className="min-w-0 flex-1" />
+ <Text
+ id={id}
+ size="xxs"
+ variant="muted"
+ weight="semibold"
+ render={<h3 />}
+ className="!mb-0 shrink-0 text-center uppercase tracking-wide"
+ >
+ {title}
+ </Text>
+ <Separator className="min-w-0 flex-1" />
+ </div>
{properties.map((item) => (
<BreakdownsTileButton key={item.property} item={item} />
))}
diff --git a/products/error_tracking/frontend/components/Breakdowns/consts.ts b/products/error_tracking/frontend/components/Breakdowns/consts.ts
index ce94ab4e8df1..72be08534fe7 100644
--- a/products/error_tracking/frontend/components/Breakdowns/consts.ts
+++ b/products/error_tracking/frontend/components/Breakdowns/consts.ts
@@ -1,3 +1,5 @@
+import { BUILT_IN_ERROR_TRACKING_PROPERTIES } from '../builtInProperties'
+
export interface BreakdownPreset {
property: string
title: string
@@ -9,14 +11,20 @@ export const BREAKDOWN_DETAILS_LIMIT = 100
// Each property adds an arrayJoin fan-out, so cap event-derived properties to keep query cost bounded.
export const MAX_SELECTED_EVENT_BREAKDOWN_PROPERTIES = 10
-export const BREAKDOWN_PRESETS: BreakdownPreset[] = [
- { property: '$browser', title: 'Browser' },
- { property: '$device_type', title: 'Device type' },
- { property: '$os', title: 'Operating system' },
- { property: '$pathname', title: 'Path' },
- { property: '$user_id', title: 'User ID' },
- { property: '$ip', title: 'IP address' },
-]
+const DEFAULT_BREAKDOWN_PROPERTY_NAMES = new Set([
+ '$browser',
+ '$device_type',
+ '$os',
+ '$pathname',
+ '$user_id',
+ '$ip',
+ '$geoip_country_name',
+ '$geoip_city_name',
+])
+
+export const BREAKDOWN_PRESETS: BreakdownPreset[] = BUILT_IN_ERROR_TRACKING_PROPERTIES.filter(({ property }) =>
+ DEFAULT_BREAKDOWN_PROPERTY_NAMES.has(property)
+).map(({ property, title }) => ({ property, title }))
export const BreakdownsEvents = {
MiniBreakdownsLoaded: 'error tracking mini breakdowns loaded',
diff --git a/products/error_tracking/frontend/components/Breakdowns/miniBreakdownsLogic.test.ts b/products/error_tracking/frontend/components/Breakdowns/miniBreakdownsLogic.test.ts
index 8ed0fe6a979a..72ff59087a8f 100644
--- a/products/error_tracking/frontend/components/Breakdowns/miniBreakdownsLogic.test.ts
+++ b/products/error_tracking/frontend/components/Breakdowns/miniBreakdownsLogic.test.ts
@@ -2,6 +2,7 @@ import { expectLogic } from 'kea-test-utils'
import api from 'lib/api'
import type { ErrorEventType } from 'lib/components/Errors/types'
+import { BREAKDOWN_NULL_STRING_LABEL } from 'scenes/insights/utils'
import { useMocks } from '~/mocks/jest'
import type {
@@ -55,6 +56,22 @@ describe('miniBreakdownsLogic', () => {
expect(breakdowns.values.responseError).toBeNull()
})
+ it('limits the default breakdown query to the configured presets', async () => {
+ await expectLogic(breakdowns).toFinishAllListeners()
+
+ const query = jest.mocked(api.query).mock.calls.at(-1)?.[0] as ErrorTrackingBreakdownsQuery
+ expect(query.breakdownProperties).toEqual([
+ '$browser',
+ '$device_type',
+ '$os',
+ '$pathname',
+ '$user_id',
+ '$ip',
+ '$geoip_country_name',
+ '$geoip_city_name',
+ ])
+ })
+
it('adds primitive properties from the selected event without duplicating configured breakdowns', async () => {
const properties = {
$browser: 'Chrome',
@@ -106,6 +123,21 @@ describe('miniBreakdownsLogic', () => {
)
})
+ it('hides breakdown properties without values after loading', () => {
+ expect(breakdowns.values.visibleBreakdownProperties).toEqual(BREAKDOWN_PRESETS)
+
+ breakdowns.actions.loadResponseSuccess({
+ results: {
+ $browser: { values: [{ value: 'Chrome', count: 2 }], total_count: 2 },
+ $os: { values: [{ value: BREAKDOWN_NULL_STRING_LABEL, count: 2 }], total_count: 2 },
+ },
+ })
+
+ expect(breakdowns.values.visibleBreakdownProperties).toEqual([
+ BREAKDOWN_PRESETS.find(({ property }) => property === '$browser'),
+ ])
+ })
+
it('loads the expanded value set when opening breakdown details', async () => {
await expectLogic(breakdowns).toFinishAllListeners()
const breakdown = BREAKDOWN_PRESETS[0]
diff --git a/products/error_tracking/frontend/components/Breakdowns/miniBreakdownsLogic.ts b/products/error_tracking/frontend/components/Breakdowns/miniBreakdownsLogic.ts
index b9aff6768bef..959150013275 100644
--- a/products/error_tracking/frontend/components/Breakdowns/miniBreakdownsLogic.ts
+++ b/products/error_tracking/frontend/components/Breakdowns/miniBreakdownsLogic.ts
@@ -8,7 +8,7 @@ import type { ErrorEventProperties, ErrorEventType } from 'lib/components/Errors
import { getAdditionalProperties } from 'lib/components/Errors/utils'
import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types'
import { preflightLogic } from 'lib/logic/preflightLogic'
-import { BREAKDOWN_OTHER_DISPLAY } from 'scenes/insights/utils'
+import { BREAKDOWN_NULL_STRING_LABEL, BREAKDOWN_OTHER_DISPLAY } from 'scenes/insights/utils'
import {
CachedErrorTrackingBreakdownsQueryResponse,
@@ -115,6 +115,7 @@ export interface miniBreakdownsLogicValues {
responseLoading: boolean
selectedBreakdownProperty: BreakdownPreset | null
selectedEventBreakdownProperties: BreakdownPreset[]
+ visibleBreakdownProperties: BreakdownPreset[]
}
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
@@ -178,6 +179,12 @@ export interface miniBreakdownsLogicMeta {
isCloudOrDev: boolean | undefined
) => BreakdownPreset[]
breakdownProperties: (selectedEventBreakdownProperties: BreakdownPreset[]) => BreakdownPreset[]
+ visibleBreakdownProperties: (
+ breakdownProperties: BreakdownPreset[],
+ response: ErrorTrackingBreakdownsQueryResponse | null,
+ responseLoading: boolean,
+ responseError: string | null
+ ) => BreakdownPreset[]
getBreakdownForProperty: (response: ErrorTrackingBreakdownsQueryResponse | null) => (property: string) => {
properties: BreakdownSinglePropertyStat[]
totalCount: number
@@ -303,6 +310,32 @@ export const miniBreakdownsLogic = kea<miniBreakdownsLogicType>([
(selectedEventBreakdownProperties: BreakdownPreset[]) =>
buildBreakdownProperties(selectedEventBreakdownProperties),
],
+ visibleBreakdownProperties: [
+ (selectors) => [
+ selectors.breakdownProperties,
+ selectors.response,
+ selectors.responseLoading,
+ selectors.responseError,
+ ],
+ (
+ breakdownProperties: BreakdownPreset[],
+ response: ErrorTrackingBreakdownsQueryResponse | null,
+ responseLoading: boolean,
+ responseError: string | null
+ ): BreakdownPreset[] => {
+ if (!response || responseLoading || responseError) {
+ return breakdownProperties
+ }
+
+ return breakdownProperties.filter(({ property }) => {
+ const { properties } = getBreakdownForPropertyFromResponse(response, property)
+ return !(
+ properties.length === 0 ||
+ (properties.length === 1 && properties[0].label === BREAKDOWN_NULL_STRING_LABEL)
+ )
+ })
+ },
+ ],
getBreakdownForProperty: [
(selectors) => [selectors.response],
(response: ErrorTrackingBreakdownsQueryResponse | null) =>
diff --git a/products/error_tracking/frontend/components/ContextDisplay/ContextDisplay.stories.tsx b/products/error_tracking/frontend/components/ContextDisplay/ContextDisplay.stories.tsx
index 896a08342107..f11d4b83b2d8 100644
--- a/products/error_tracking/frontend/components/ContextDisplay/ContextDisplay.stories.tsx
+++ b/products/error_tracking/frontend/components/ContextDisplay/ContextDisplay.stories.tsx
@@ -2,7 +2,7 @@ import { Meta } from '@storybook/react'
import { LemonCard } from '@posthog/lemon-ui'
-import { getAdditionalProperties, getExceptionAttributes } from 'lib/components/Errors/utils'
+import { getAdditionalProperties } from 'lib/components/Errors/utils'
import { TEST_EVENTS, TestEventName } from '../../__mocks__/events'
import { ContextDisplay, ContextDisplayProps } from './ContextDisplay'
@@ -20,7 +20,7 @@ export default meta
///////////////////// Context Display
export function ContextDisplayEmpty(): JSX.Element {
- return <ContextDisplay loading={false} exceptionAttributes={{}} additionalProperties={{}} />
+ return <ContextDisplay loading={false} properties={{}} additionalProperties={{}} />
}
export function ContextDisplayWithStacktrace(): JSX.Element {
@@ -31,7 +31,7 @@ export function ContextDisplayMisc(): JSX.Element {
return (
<ContextDisplay
loading={false}
- exceptionAttributes={{}}
+ properties={{}}
additionalProperties={{
undefined_value: undefined,
null_value: null,
@@ -49,10 +49,9 @@ export function ContextDisplayMisc(): JSX.Element {
function getProps(event_name: TestEventName): ContextDisplayProps {
const properties = event_name ? TEST_EVENTS[event_name].properties : {}
- const exceptionAttributes = properties ? getExceptionAttributes(properties) : null
const additionalProperties = getAdditionalProperties(properties, true)
- return { loading: false, exceptionAttributes, additionalProperties }
+ return { loading: false, properties, additionalProperties }
}
function ContextWrapperAllEvents({ children }: { children: (props: ContextDisplayProps) => JSX.Element }): JSX.Element {
diff --git a/products/error_tracking/frontend/components/ContextDisplay/ContextDisplay.tsx b/products/error_tracking/frontend/components/ContextDisplay/ContextDisplay.tsx
index f9cf1ad24608..9ef5f8201aa6 100644
--- a/products/error_tracking/frontend/components/ContextDisplay/ContextDisplay.tsx
+++ b/products/error_tracking/frontend/components/ContextDisplay/ContextDisplay.tsx
@@ -3,23 +3,22 @@ import { match } from 'ts-pattern'
import { Spinner } from '@posthog/lemon-ui'
-import { ExceptionAttributes } from 'lib/components/Errors/types'
-import { concatValues } from 'lib/components/Errors/utils'
-import { identifierToHuman } from 'lib/utils/strings'
-
+import { BUILT_IN_ERROR_TRACKING_PROPERTIES } from '../builtInProperties'
import { ERROR_TRACKING_ISSUE_SCENE_LOGIC_KEY, issueFiltersLogic } from '../IssueFilters/issueFiltersLogic'
-import { PropertiesTable } from '../PropertiesTable'
+import { ExceptionPropertiesTable } from './ExceptionPropertiesTable'
export type ContextDisplayProps = {
loading: boolean
- exceptionAttributes: ExceptionAttributes | null
+ properties?: Record<string, unknown>
additionalProperties: Record<string, unknown>
+ propertyNameFilter?: string
}
export function ContextDisplay({
loading,
- exceptionAttributes,
+ properties,
additionalProperties,
+ propertyNameFilter = '',
}: ContextDisplayProps): JSX.Element {
const { addPropertyFilter } = useActions(issueFiltersLogic({ logicKey: ERROR_TRACKING_ISSUE_SCENE_LOGIC_KEY }))
const onFilterValue = (key: string, value: string | number | boolean): void => {
@@ -28,42 +27,17 @@ export function ContextDisplay({
const additionalEntries = Object.entries(additionalProperties)
.sort(([leftKey], [rightKey]) => leftKey.localeCompare(rightKey, undefined, { sensitivity: 'base' }))
.map(([key, value]) => ({
- key: identifierToHuman(key, 'title'),
+ key,
value,
filterKey: key,
}))
- const exceptionEntries = exceptionAttributes
- ? [
- { key: 'Level', value: exceptionAttributes.level, filterKey: '$exception_level' },
- { key: 'Synthetic', value: exceptionAttributes.synthetic },
- {
- key: 'Library',
- value: concatValues(exceptionAttributes, 'lib', 'libVersion'),
- filterKey: '$lib',
- filterValue: exceptionAttributes.lib,
- },
- { key: 'Handled', value: exceptionAttributes.handled },
- {
- key: 'Browser',
- value: concatValues(exceptionAttributes, 'browser', 'browserVersion'),
- filterKey: '$browser',
- filterValue: exceptionAttributes.browser,
- },
- {
- key: 'App',
- value: concatValues(exceptionAttributes, 'appNamespace', 'appVersion'),
- filterKey: '$app_namespace',
- filterValue: exceptionAttributes.appNamespace,
- },
- {
- key: 'OS',
- value: concatValues(exceptionAttributes, 'os', 'osVersion'),
- filterKey: '$os',
- filterValue: exceptionAttributes.os,
- },
- { key: 'URL', value: exceptionAttributes.url, filterKey: '$current_url' },
- ]
- : []
+ const builtInEntries = BUILT_IN_ERROR_TRACKING_PROPERTIES.map(({ property, title, versionProperty }) => ({
+ key: title,
+ value: getBuiltInPropertyValue(properties, property, versionProperty),
+ filterKey: property,
+ filterValue: properties?.[property],
+ }))
+ const normalizedPropertyNameFilter = propertyNameFilter.trim().toLocaleLowerCase()
return (
<>
@@ -74,8 +48,20 @@ export function ContextDisplay({
</div>
))
.with(false, () => (
- <PropertiesTable
- entries={[...exceptionEntries, ...additionalEntries]}
+ <ExceptionPropertiesTable
+ sections={[
+ {
+ id: 'built-in-exception-properties',
+ title: 'Built-in properties',
+ entries: filterEntriesByPropertyName(builtInEntries, normalizedPropertyNameFilter),
+ },
+ {
+ id: 'custom-exception-properties',
+ title: 'Custom properties',
+ entries: filterEntriesByPropertyName(additionalEntries, normalizedPropertyNameFilter),
+ },
+ ]}
+ emptyMessage={normalizedPropertyNameFilter ? 'No matching properties' : 'No properties'}
onFilterValue={onFilterValue}
/>
))
@@ -83,3 +69,33 @@ export function ContextDisplay({
</>
)
}
+
+function filterEntriesByPropertyName<T extends { key: string; filterKey?: string }>(
+ entries: T[],
+ normalizedPropertyNameFilter: string
+): T[] {
+ if (!normalizedPropertyNameFilter) {
+ return entries
+ }
+
+ return entries.filter((entry) =>
+ [entry.key, entry.filterKey]
+ .filter((value): value is string => typeof value === 'string')
+ .some((value) => value.toLocaleLowerCase().includes(normalizedPropertyNameFilter))
+ )
+}
+
+function getBuiltInPropertyValue(
+ properties: Record<string, unknown> | undefined,
+ property: string,
+ versionProperty: string | undefined
+): unknown {
+ const value = properties?.[property]
+ if (!versionProperty) {
+ return value
+ }
+
+ const version = properties?.[versionProperty]
+ const parts = [value, version].filter((part) => part !== undefined && part !== null && part !== '')
+ return parts.length > 0 ? parts.join(' ') : undefined
+}
diff --git a/products/error_tracking/frontend/components/ContextDisplay/ExceptionPropertiesTable.stories.tsx b/products/error_tracking/frontend/components/ContextDisplay/ExceptionPropertiesTable.stories.tsx
new file mode 100644
index 000000000000..3222dc31c1cb
--- /dev/null
+++ b/products/error_tracking/frontend/components/ContextDisplay/ExceptionPropertiesTable.stories.tsx
@@ -0,0 +1,57 @@
+import type { Meta, StoryObj } from '@storybook/react'
+
+import { ExceptionPropertiesTable } from './ExceptionPropertiesTable'
+
+const meta: Meta<typeof ExceptionPropertiesTable> = {
+ title: 'ErrorTracking/ExceptionPropertiesTable',
+ component: ExceptionPropertiesTable,
+ parameters: {
+ layout: 'padded',
+ viewMode: 'story',
+ },
+ decorators: [
+ (Story) => (
+ <div className="max-w-3xl">
+ <Story />
+ </div>
+ ),
+ ],
+}
+
+export default meta
+
+type Story = StoryObj<typeof ExceptionPropertiesTable>
+
+export const Default: Story = {
+ args: {
+ sections: [
+ {
+ id: 'built-in-properties',
+ title: 'Built-in properties',
+ entries: [
+ { key: 'Level', value: 'error', filterKey: '$exception_level' },
+ { key: 'Library', value: 'web 1.234.6', filterKey: '$lib', filterValue: 'web' },
+ { key: 'Browser', value: 'Chrome 134', filterKey: '$browser', filterValue: 'Chrome' },
+ { key: 'OS', value: 'Mac OS X 10.15.7', filterKey: '$os', filterValue: 'Mac OS X' },
+ { key: 'URL', value: 'https://example.com/example/path', filterKey: '$current_url' },
+ ],
+ },
+ {
+ id: 'custom-properties',
+ title: 'Custom properties',
+ entries: [
+ ['Account plan', 'business'],
+ ['Attempt count', 3],
+ ['Feature enabled', true],
+ ],
+ },
+ ],
+ onFilterValue: () => {},
+ },
+}
+
+export const Empty: Story = {
+ args: {
+ sections: [],
+ },
+}
diff --git a/products/error_tracking/frontend/components/ContextDisplay/ExceptionPropertiesTable.tsx b/products/error_tracking/frontend/components/ContextDisplay/ExceptionPropertiesTable.tsx
new file mode 100644
index 000000000000..d21141d7f5e4
--- /dev/null
+++ b/products/error_tracking/frontend/components/ContextDisplay/ExceptionPropertiesTable.tsx
@@ -0,0 +1,62 @@
+import { LemonDivider } from '@posthog/lemon-ui'
+
+import { PropertiesTable } from '../PropertiesTable'
+import type { PropertyTableRow } from '../PropertiesTable'
+
+export interface ExceptionPropertySection {
+ id: string
+ title: string
+ entries: ([string, unknown] | PropertyTableRow)[]
+}
+
+export interface ExceptionPropertiesTableProps {
+ sections: ExceptionPropertySection[]
+ emptyMessage?: string
+ onFilterValue?: (key: string, value: string | number | boolean) => void
+}
+
+export function ExceptionPropertiesTable({
+ sections,
+ emptyMessage = 'No properties',
+ onFilterValue,
+}: ExceptionPropertiesTableProps): JSX.Element {
+ const populatedSections = sections
+ .map((section) => ({
+ ...section,
+ entries: section.entries.filter(hasValue),
+ }))
+ .filter((section) => section.entries.length > 0)
+
+ if (populatedSections.length === 0) {
+ return <div className="flex h-32 items-center justify-center text-sm text-secondary">{emptyMessage}</div>
+ }
+
+ return (
+ <div className="pb-6">
+ {populatedSections.map((section) => (
+ <section key={section.id} aria-labelledby={section.id}>
+ <div className="flex h-8 items-center gap-3 px-2.5">
+ <LemonDivider className="my-0 flex-1" />
+ <h3
+ id={section.id}
+ className="m-0 shrink-0 text-xs font-semibold uppercase tracking-wide text-secondary"
+ >
+ {section.title}
+ </h3>
+ <LemonDivider className="my-0 flex-1" />
+ </div>
+ <PropertiesTable
+ entries={section.entries}
+ firstColumnWidth="12rem"
+ tableLayout="fixed"
+ onFilterValue={onFilterValue}
+ />
+ </section>
+ ))}
+ </div>
+ )
+}
+
+function hasValue(entry: [string, unknown] | PropertyTableRow): boolean {
+ return (Array.isArray(entry) ? entry[1] : entry.value) !== undefined
+}
diff --git a/products/error_tracking/frontend/components/EventsTable/EventsTable.tsx b/products/error_tracking/frontend/components/EventsTable/EventsTable.tsx
index d355afd99ad8..833da632ffcc 100644
--- a/products/error_tracking/frontend/components/EventsTable/EventsTable.tsx
+++ b/products/error_tracking/frontend/components/EventsTable/EventsTable.tsx
@@ -4,6 +4,7 @@ import { Link } from '@posthog/lemon-ui'
import { ErrorEventType } from 'lib/components/Errors/types'
import { getExceptionTypeAndValue, getRuntimeFromLib } from 'lib/components/Errors/utils'
+import type { TimelineMarkerColor } from 'lib/components/SessionTimeline/SessionTimeline'
import { TZLabel } from 'lib/components/TZLabel'
import {
Button,
@@ -137,7 +138,9 @@ function EventRow({
className={cn(
'absolute inset-y-0 left-0 w-1',
selected
- ? getRowTimelineIndicatorColor(record.uuid, firstEventUuid, lastEventUuid)
+ ? EVENT_MARKER_COLOR_CLASS_NAMES[
+ getEventMarkerColor(record.uuid, firstEventUuid, lastEventUuid)
+ ]
: 'bg-transparent'
)}
/>
@@ -196,16 +199,18 @@ function EventMetadata({ record }: { record: ErrorEventType }): JSX.Element {
)
}
-function getRowTimelineIndicatorColor(
+const EVENT_MARKER_COLOR_CLASS_NAMES: Record<TimelineMarkerColor, string> = {
+ blue: 'bg-brand-blue',
+ yellow: 'bg-brand-yellow',
+ red: 'bg-brand-red',
+}
+
+export function getEventMarkerColor(
eventUuid: string,
firstEventUuid: string | undefined,
lastEventUuid: string | undefined
-): string {
- return eventUuid === firstEventUuid
- ? 'bg-brand-blue'
- : eventUuid === lastEventUuid
- ? 'bg-brand-red'
- : 'bg-brand-yellow'
+): TimelineMarkerColor {
+ return eventUuid === firstEventUuid ? 'blue' : eventUuid === lastEventUuid ? 'red' : 'yellow'
}
export function EventsTableLoading(): JSX.Element {
diff --git a/products/error_tracking/frontend/components/ExceptionAttributesPreview/ExceptionAttributesPreview.tsx b/products/error_tracking/frontend/components/ExceptionAttributesPreview/ExceptionAttributesPreview.tsx
index 739b461e6640..185da0584c2d 100644
--- a/products/error_tracking/frontend/components/ExceptionAttributesPreview/ExceptionAttributesPreview.tsx
+++ b/products/error_tracking/frontend/components/ExceptionAttributesPreview/ExceptionAttributesPreview.tsx
@@ -1,22 +1,18 @@
-import { Children } from 'react'
import { match } from 'ts-pattern'
-import { IconBug } from '@posthog/icons'
-import { LemonTag, Spinner, Tooltip } from '@posthog/lemon-ui'
+import { IconBug, IconCheckCircle, IconSparkles, IconWarning } from '@posthog/icons'
+import { LemonTag, Spinner } from '@posthog/lemon-ui'
import { ExceptionAttributes } from 'lib/components/Errors/types'
-import { PropertyIcon } from 'lib/components/PropertyIcon/PropertyIcon'
export interface ExceptionAttributesPreviewProps {
attributes: ExceptionAttributes | null
loading?: boolean
- iconOnly?: boolean
}
export function ExceptionAttributesPreview({
attributes,
loading = false,
- iconOnly = false,
}: ExceptionAttributesPreviewProps): JSX.Element {
return (
<>
@@ -32,15 +28,24 @@ export function ExceptionAttributesPreview({
() =>
attributes && (
<>
- <PropertyWrapper title="Unhandled" visible={!attributes.handled}>
- <IconBug className="text-sm text-secondary" />
- </PropertyWrapper>
- <PropertyWrapper title={attributes.browser} visible={!!attributes.browser}>
- <Property property="$browser" title={attributes.browser} iconOnly={iconOnly} />
- </PropertyWrapper>
- <PropertyWrapper title={attributes.os} visible={!!attributes.os}>
- <Property property="$os" title={attributes.os} iconOnly={iconOnly} />
- </PropertyWrapper>
+ {attributes.level ? (
+ <LemonTag className="gap-1.5 bg-fill-primary">
+ <IconWarning />
+ <span className="capitalize">{attributes.level}</span>
+ </LemonTag>
+ ) : null}
+ {attributes.handled !== undefined ? (
+ <LemonTag className="gap-1.5 bg-fill-primary">
+ {attributes.handled ? <IconCheckCircle /> : <IconBug />}
+ {attributes.handled ? 'Handled' : 'Unhandled'}
+ </LemonTag>
+ ) : null}
+ {attributes.synthetic ? (
+ <LemonTag className="gap-1.5 bg-fill-primary">
+ <IconSparkles />
+ Synthetic
+ </LemonTag>
+ ) : null}
</>
)
)
@@ -48,31 +53,3 @@ export function ExceptionAttributesPreview({
</>
)
}
-
-export function PropertyWrapper({
- title,
- visible = true,
- children,
-}: {
- title?: string
- visible?: boolean
- children: JSX.Element
-}): JSX.Element {
- if (Children.count(children) == 0 || title === undefined || !visible) {
- return <></>
- }
- return children
-}
-
-function Property({ property, title, iconOnly }: { property: string; title?: string; iconOnly: boolean }): JSX.Element {
- return iconOnly ? (
- <Tooltip title={title} delayMs={0}>
- <PropertyIcon property={property} value={title} className="text-sm text-secondary" />
- </Tooltip>
- ) : (
- <LemonTag className="bg-fill-primary">
- <PropertyIcon property={property} value={title} className="text-sm text-secondary" />
- <span className="capitalize">{title}</span>
- </LemonTag>
- )
-}
diff --git a/products/error_tracking/frontend/components/ExceptionCard/ExceptionCard.stories.tsx b/products/error_tracking/frontend/components/ExceptionCard/ExceptionCard.stories.tsx
index 2e417a1431db..d046487cebba 100644
--- a/products/error_tracking/frontend/components/ExceptionCard/ExceptionCard.stories.tsx
+++ b/products/error_tracking/frontend/components/ExceptionCard/ExceptionCard.stories.tsx
@@ -9,6 +9,7 @@ import { NodeKind } from '~/queries/schema/schema-general'
import { TEST_EVENTS } from '../../__mocks__/events'
import { results as batchGetResults } from '../../__mocks__/stack_frames/batch_get'
+import { ExceptionTag } from '../../hooks/use-error-tag-renderer'
import { StyleVariables } from '../StyleVariables'
import { ExceptionCard } from './ExceptionCard'
import { exceptionCardLogic } from './exceptionCardLogic'
@@ -46,20 +47,37 @@ export function ExceptionCardBase(): JSX.Element {
return (
<div className="w-[1000px] h-[700px]">
<BindLogic logic={exceptionCardLogic} props={{ issueId: 'issue-id' }}>
- <OpenSessionTab>
+ <OpenTimelineTab>
<ExceptionCard
issueId="issue-id"
issueName="Test Issue"
loading={false}
event={TEST_EVENTS['javascript_resolved'] as any}
/>
- </OpenSessionTab>
+ </OpenTimelineTab>
</BindLogic>
</div>
)
}
ExceptionCardBase.parameters = sessionTimelineParameters(asErrorEventType(TEST_EVENTS['javascript_resolved']))
+export function ExceptionCardWithFooter(): JSX.Element {
+ const event = asErrorEventType(TEST_EVENTS['javascript_resolved'])
+
+ return (
+ <div className="h-[700px] w-full max-w-5xl">
+ <ExceptionCard
+ issueId="issue-id"
+ issueName="Test Issue"
+ loading={false}
+ event={event}
+ label={<ExceptionTag color="red" label="Last Seen" />}
+ />
+ </div>
+ )
+}
+ExceptionCardWithFooter.parameters = sessionTimelineParameters(asErrorEventType(TEST_EVENTS['javascript_resolved']))
+
export function ExceptionCardNoInApp(): JSX.Element {
return (
<div className="w-[800px]">
@@ -216,9 +234,9 @@ function ExceptionCardSessionTimelineStory({
return (
<div className={containerClassName}>
<BindLogic logic={exceptionCardLogic} props={{ issueId: 'issue-id' }}>
- <OpenSessionTab>
+ <OpenTimelineTab>
<ExceptionCard issueId="issue-id" issueName="Test Issue" loading={false} event={event} />
- </OpenSessionTab>
+ </OpenTimelineTab>
</BindLogic>
</div>
)
@@ -529,11 +547,11 @@ function buildSessionTimelineEvent(
}
}
-function OpenSessionTab({ children }: { children: JSX.Element }): JSX.Element {
+function OpenTimelineTab({ children }: { children: JSX.Element }): JSX.Element {
const { setCurrentTab } = useActions(exceptionCardLogic({ issueId: 'issue-id' }))
useEffect(() => {
- setCurrentTab('session')
+ setCurrentTab('timeline')
}, [setCurrentTab])
return children
diff --git a/products/error_tracking/frontend/components/ExceptionCard/ExceptionCard.tsx b/products/error_tracking/frontend/components/ExceptionCard/ExceptionCard.tsx
index c6f92dd9b5ad..aa798c948b0c 100644
--- a/products/error_tracking/frontend/components/ExceptionCard/ExceptionCard.tsx
+++ b/products/error_tracking/frontend/components/ExceptionCard/ExceptionCard.tsx
@@ -1,24 +1,28 @@
import { BindLogic, useActions, useValues } from 'kea'
-import { useEffect, useMemo } from 'react'
+import { useEffect, useMemo, type CSSProperties } from 'react'
import { IconLogomark } from '@posthog/icons'
import { LemonCard } from '@posthog/lemon-ui'
import { ErrorPropertiesLogicProps, errorPropertiesLogic } from 'lib/components/Errors/errorPropertiesLogic'
import { ErrorEventType } from 'lib/components/Errors/types'
-import { TZLabel } from 'lib/components/TZLabel'
-import { TabsPrimitive, TabsPrimitiveList, TabsPrimitiveTrigger } from 'lib/ui/TabsPrimitive/TabsPrimitive'
+import type { TimelineMarkerColor } from 'lib/components/SessionTimeline/SessionTimeline'
+import { Tabs, TabsList, TabsTrigger } from 'lib/ui/quill'
+import { ViewLogsButton } from 'products/logs/frontend/components/ViewLogsButton'
+
+import { ExceptionCardFooter } from './ExceptionCardFooter'
import { exceptionCardLogic } from './exceptionCardLogic'
import { PropertiesTab } from './Tabs/PropertiesTab'
import { SessionTab } from './Tabs/SessionTab'
import { StackTraceTab } from './Tabs/StackTraceTab'
interface ExceptionCardContentProps {
+ eventId?: string
+ fingerprint?: string
timestamp?: string
+ eventMarkerColor?: TimelineMarkerColor
label?: JSX.Element
- /** Hide timestamp and label from the tab bar (e.g. when shown elsewhere on mobile) */
- hideEventMeta?: boolean
renderStackTraceActions?: () => JSX.Element | null
}
@@ -54,57 +58,92 @@ export function ExceptionCard({
// eslint-disable-next-line react-hooks/exhaustive-deps
[event?.uuid ?? issueId]
)
+ const fingerprint = event?.properties?.$exception_fingerprint
return (
<BindLogic logic={exceptionCardLogic} props={cardLogicProps}>
<BindLogic logic={errorPropertiesLogic} props={eventProps}>
- <ExceptionCardContent timestamp={event?.timestamp} {...contentProps} />
+ <ExceptionCardContent
+ eventId={event?.uuid}
+ fingerprint={typeof fingerprint === 'string' ? fingerprint : undefined}
+ timestamp={event?.timestamp}
+ {...contentProps}
+ />
</BindLogic>
</BindLogic>
)
}
function ExceptionCardContent({
+ eventId,
+ fingerprint,
timestamp,
+ eventMarkerColor,
renderStackTraceActions,
label,
- hideEventMeta,
}: ExceptionCardContentProps): JSX.Element {
const { currentTab } = useValues(exceptionCardLogic)
+ const { sessionId } = useValues(errorPropertiesLogic)
const { setCurrentTab } = useActions(exceptionCardLogic)
return (
<LemonCard hoverEffect={false} className="p-0 relative w-full h-full border-0 rounded-none flex flex-col">
- <TabsPrimitive value={currentTab} onValueChange={setCurrentTab} className="flex flex-col flex-1 min-h-0">
- <div className="flex justify-between h-[2rem] items-center w-full px-2 border-b shrink-0">
- <TabsPrimitiveList className="flex justify-between w-full h-full items-center">
- <div className="w-full h-full">
- <div className="flex items-center gap-1 text-lg h-full">
- <IconLogomark />
- <span className="text-sm">Exception</span>
- </div>
- </div>
- <div className="flex gap-2 w-full justify-center h-full">
- <TabsPrimitiveTrigger className="px-2 whitespace-nowrap" value="stack_trace">
- Stack Trace
- </TabsPrimitiveTrigger>
- <TabsPrimitiveTrigger className="px-2 whitespace-nowrap" value="properties">
- Properties
- </TabsPrimitiveTrigger>
- <TabsPrimitiveTrigger className="px-2 whitespace-nowrap" value="session">
- Session
- </TabsPrimitiveTrigger>
- </div>
- <div className="w-full flex gap-2 justify-end items-center">
- {!hideEventMeta && timestamp && <TZLabel className="text-muted text-xs" time={timestamp} />}
- {!hideEventMeta && label}
- </div>
- </TabsPrimitiveList>
+ <Tabs
+ value={currentTab}
+ onValueChange={(value) => setCurrentTab(String(value))}
+ className="flex min-h-0 flex-1 flex-col gap-0"
+ >
+ <div className="grid h-10 w-full shrink-0 grid-cols-[1fr_auto_1fr] items-center gap-2 border-b px-2">
+ <div className="flex h-full min-w-0 items-center gap-1 text-lg">
+ <IconLogomark />
+ <span className="text-sm">Exception</span>
+ </div>
+ <TabsList variant="line" aria-label="Exception details" className="h-full! self-stretch">
+ <TabsTrigger
+ value="stack_trace"
+ className="text-sm"
+ style={{ '--background': 'transparent' } as CSSProperties}
+ >
+ Stack Trace
+ </TabsTrigger>
+ <TabsTrigger
+ value="properties"
+ className="text-sm"
+ style={{ '--background': 'transparent' } as CSSProperties}
+ >
+ Properties
+ </TabsTrigger>
+ <TabsTrigger
+ value="timeline"
+ className="text-sm"
+ style={{ '--background': 'transparent' } as CSSProperties}
+ >
+ Timeline
+ </TabsTrigger>
+ <TabsTrigger
+ value="recording"
+ className="text-sm"
+ style={{ '--background': 'transparent' } as CSSProperties}
+ >
+ Recording
+ </TabsTrigger>
+ </TabsList>
+ <div className="flex justify-end">
+ {sessionId && (currentTab === 'timeline' || currentTab === 'recording') ? (
+ <ViewLogsButton
+ sessionId={sessionId}
+ timestamp={timestamp}
+ size="xsmall"
+ data-attr="error-tracking-session-view-logs"
+ />
+ ) : null}
+ </div>
</div>
<StackTraceTab value="stack_trace" renderActions={renderStackTraceActions} className="flex-1 min-h-0" />
<PropertiesTab value="properties" className="flex-1 min-h-0" />
- <SessionTab value="session" timestamp={timestamp} className="flex-1 min-h-0" />
- </TabsPrimitive>
+ <SessionTab timestamp={timestamp} eventMarkerColor={eventMarkerColor} />
+ <ExceptionCardFooter eventId={eventId} fingerprint={fingerprint} label={label} timestamp={timestamp} />
+ </Tabs>
</LemonCard>
)
}
diff --git a/products/error_tracking/frontend/components/ExceptionCard/ExceptionCardFooter.tsx b/products/error_tracking/frontend/components/ExceptionCard/ExceptionCardFooter.tsx
new file mode 100644
index 000000000000..0b6a7075d102
--- /dev/null
+++ b/products/error_tracking/frontend/components/ExceptionCard/ExceptionCardFooter.tsx
@@ -0,0 +1,71 @@
+import { TZLabel } from 'lib/components/TZLabel'
+import { Button } from 'lib/ui/quill'
+import { copyToClipboard } from 'lib/utils/copyToClipboard'
+import { midEllipsis } from 'lib/utils/strings'
+
+export interface ExceptionCardFooterProps {
+ eventId?: string
+ fingerprint?: string
+ label?: JSX.Element
+ timestamp?: string
+}
+
+export function ExceptionCardFooter({
+ eventId,
+ fingerprint,
+ label,
+ timestamp,
+}: ExceptionCardFooterProps): JSX.Element | null {
+ if (!eventId && !fingerprint && !label && !timestamp) {
+ return null
+ }
+
+ return (
+ <footer className="sticky bottom-0 z-10 flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-x-3 gap-y-1 border-t bg-surface-primary px-2 py-1 text-xs">
+ {label || timestamp ? (
+ <div className="flex min-w-0 items-center gap-2">
+ {label}
+ {timestamp ? <TZLabel className="shrink-0 text-muted text-xs" time={timestamp} /> : null}
+ </div>
+ ) : null}
+ {eventId || fingerprint ? (
+ <div className="ml-auto flex min-w-0 items-center gap-3">
+ {fingerprint ? (
+ <div className="flex min-w-0 items-center gap-1">
+ <span className="shrink-0 text-secondary">Fingerprint</span>
+ <Button
+ type="button"
+ variant="default"
+ size="xs"
+ aria-label="Copy fingerprint"
+ data-attr="exception-card-copy-fingerprint"
+ onClick={() => void copyToClipboard(fingerprint, 'fingerprint')}
+ >
+ <code className="truncate font-mono" title={fingerprint}>
+ {midEllipsis(fingerprint, 12)}
+ </code>
+ </Button>
+ </div>
+ ) : null}
+ {eventId ? (
+ <div className="flex min-w-0 items-center gap-1">
+ <span className="shrink-0 text-secondary">Exception ID</span>
+ <Button
+ type="button"
+ variant="default"
+ size="xs"
+ aria-label="Copy exception ID"
+ data-attr="exception-card-copy-id"
+ onClick={() => void copyToClipboard(eventId, 'exception ID')}
+ >
+ <code className="truncate font-mono" title={eventId}>
+ {midEllipsis(eventId, 12)}
+ </code>
+ </Button>
+ </div>
+ ) : null}
+ </div>
+ ) : null}
+ </footer>
+ )
+}
diff --git a/products/error_tracking/frontend/components/ExceptionCard/Tabs/PropertiesTab.tsx b/products/error_tracking/frontend/components/ExceptionCard/Tabs/PropertiesTab.tsx
index e603651d0cba..354cef5eb1af 100644
--- a/products/error_tracking/frontend/components/ExceptionCard/Tabs/PropertiesTab.tsx
+++ b/products/error_tracking/frontend/components/ExceptionCard/Tabs/PropertiesTab.tsx
@@ -1,87 +1,89 @@
import { useActions, useValues } from 'kea'
+import type { ChangeEvent, ComponentProps } from 'react'
-import { IconChevronDown } from '@posthog/icons'
+import { IconSearch } from '@posthog/icons'
import { errorPropertiesLogic } from 'lib/components/Errors/errorPropertiesLogic'
import { JSONViewer } from 'lib/components/JSONViewer'
-import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
-import {
- DropdownMenu,
- DropdownMenuCheckboxItem,
- DropdownMenuContent,
- DropdownMenuGroup,
- DropdownMenuItemIndicator,
- DropdownMenuTrigger,
-} from 'lib/ui/DropdownMenu/DropdownMenu'
-import { TabsPrimitiveContent, TabsPrimitiveContentProps } from 'lib/ui/TabsPrimitive/TabsPrimitive'
+import { InputGroup, InputGroupAddon, InputGroupInput, Label, Switch, TabsContent } from 'lib/ui/quill'
import { cn } from 'lib/utils/css-classes'
import { ContextDisplay } from '../../ContextDisplay/ContextDisplay'
import { exceptionCardLogic } from '../exceptionCardLogic'
import { SubHeader } from './SubHeader'
-export interface PropertiesTabProps extends TabsPrimitiveContentProps {}
+export type PropertiesTabProps = ComponentProps<typeof TabsContent>
export function PropertiesTab({ className, ...props }: PropertiesTabProps): JSX.Element {
- const { properties, exceptionAttributes, additionalProperties } = useValues(errorPropertiesLogic)
- const { loading, showJSONProperties, showAdditionalProperties } = useValues(exceptionCardLogic)
+ const { properties, additionalProperties } = useValues(errorPropertiesLogic)
+ const { loading, propertyNameFilter, showJSONProperties } = useValues(exceptionCardLogic)
+ const { setPropertyNameFilter, setShowJSONProperties } = useActions(exceptionCardLogic)
+ const filteredProperties = filterPropertiesByName(properties, propertyNameFilter)
return (
- <TabsPrimitiveContent {...props} className={cn('flex flex-col', className)}>
- <SubHeader className="justify-end shrink-0">
- <ShowDropDownMenu />
+ <TabsContent {...props} className={cn('flex flex-col', className)}>
+ <SubHeader className="shrink-0 justify-between gap-2">
+ <div className="w-64 max-w-full min-w-0">
+ <InputGroup className="h-6 border-muted-foreground/20 focus-within:border-ring/50">
+ <InputGroupAddon>
+ <IconSearch />
+ </InputGroupAddon>
+ <InputGroupInput
+ type="search"
+ value={propertyNameFilter}
+ onChange={(event: ChangeEvent<HTMLInputElement>) =>
+ setPropertyNameFilter(event.target.value)
+ }
+ placeholder="Filter properties"
+ aria-label="Filter properties"
+ />
+ </InputGroup>
+ </div>
+ <Label htmlFor="exception-properties-json-switch" className="cursor-pointer">
+ JSON
+ <Switch
+ id="exception-properties-json-switch"
+ checked={showJSONProperties}
+ onCheckedChange={setShowJSONProperties}
+ size="sm"
+ data-attr="exception-properties-json-switch"
+ />
+ </Label>
</SubHeader>
<div className="flex-1 min-h-0 overflow-y-auto">
{showJSONProperties ? (
- <JSONViewer src={properties} name="event" collapsed={1} collapseStringsAfterLength={80} sortKeys />
+ <JSONViewer
+ src={filteredProperties}
+ name="event"
+ collapsed={1}
+ collapseStringsAfterLength={80}
+ sortKeys
+ />
) : (
<ContextDisplay
loading={loading}
- exceptionAttributes={exceptionAttributes}
- additionalProperties={showAdditionalProperties ? additionalProperties : {}}
+ properties={properties}
+ additionalProperties={additionalProperties}
+ propertyNameFilter={propertyNameFilter}
/>
)}
</div>
- </TabsPrimitiveContent>
+ </TabsContent>
)
}
-function ShowDropDownMenu(): JSX.Element {
- const { showJSONProperties, showAdditionalProperties } = useValues(exceptionCardLogic)
- const { setShowJSONProperties, setShowAdditionalProperties } = useActions(exceptionCardLogic)
+function filterPropertiesByName(
+ properties: Record<string, unknown> | undefined,
+ propertyNameFilter: string
+): Record<string, unknown> {
+ const normalizedPropertyNameFilter = propertyNameFilter.trim().toLocaleLowerCase()
+ if (!normalizedPropertyNameFilter) {
+ return properties ?? {}
+ }
- return (
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <ButtonPrimitive size="sm" className="h-[1.4rem] px-2">
- Show
- <IconChevronDown />
- </ButtonPrimitive>
- </DropdownMenuTrigger>
- <DropdownMenuContent>
- <DropdownMenuGroup>
- <DropdownMenuCheckboxItem
- checked={showAdditionalProperties}
- onCheckedChange={setShowAdditionalProperties}
- asChild
- >
- <ButtonPrimitive menuItem size="sm">
- <DropdownMenuItemIndicator intent="checkbox" />
- Additional properties
- </ButtonPrimitive>
- </DropdownMenuCheckboxItem>
- <DropdownMenuCheckboxItem
- checked={showJSONProperties}
- onCheckedChange={setShowJSONProperties}
- asChild
- >
- <ButtonPrimitive menuItem size="sm">
- <DropdownMenuItemIndicator intent="checkbox" />
- As JSON
- </ButtonPrimitive>
- </DropdownMenuCheckboxItem>
- </DropdownMenuGroup>
- </DropdownMenuContent>
- </DropdownMenu>
+ return Object.fromEntries(
+ Object.entries(properties ?? {}).filter(([key]) =>
+ key.toLocaleLowerCase().includes(normalizedPropertyNameFilter)
+ )
)
}
diff --git a/products/error_tracking/frontend/components/ExceptionCard/Tabs/SessionTab/SessionRecordingTab.tsx b/products/error_tracking/frontend/components/ExceptionCard/Tabs/SessionTab/SessionRecordingTab.tsx
index 018c31e0cfa2..208109348871 100644
--- a/products/error_tracking/frontend/components/ExceptionCard/Tabs/SessionTab/SessionRecordingTab.tsx
+++ b/products/error_tracking/frontend/components/ExceptionCard/Tabs/SessionTab/SessionRecordingTab.tsx
@@ -1,33 +1,23 @@
import { useActions, useValues } from 'kea'
import { useEffect } from 'react'
-import { match } from 'ts-pattern'
-import { LemonBanner, Spinner } from '@posthog/lemon-ui'
+import { IconExternal } from '@posthog/icons'
+import { LemonBanner } from '@posthog/lemon-ui'
-import { TabsPrimitiveContent } from 'lib/ui/TabsPrimitive/TabsPrimitive'
+import { LinkPrimitive } from 'lib/lemon-ui/Link'
+import { Button, TabsContent } from 'lib/ui/quill'
import { SessionRecordingPlayer } from 'scenes/session-recordings/player/SessionRecordingPlayer'
import { SessionRecordingPlayerMode } from 'scenes/session-recordings/player/sessionRecordingPlayerLogic'
+import { urls } from 'scenes/urls'
-import { exceptionCardLogic } from '../../exceptionCardLogic'
+import { SubHeader } from '../SubHeader'
import { sessionTabLogic } from './sessionTabLogic'
export function SessionRecordingTab(): JSX.Element {
- const { loading } = useValues(exceptionCardLogic)
return (
- <TabsPrimitiveContent value="recording" className="min-h-0 min-w-0 flex-1 overflow-y-auto">
- {match(loading)
- .with(true, () => <SessionRecordingLoading />)
- .with(false, () => <SessionRecordingContent />)
- .exhaustive()}
- </TabsPrimitiveContent>
- )
-}
-
-export function SessionRecordingLoading(): JSX.Element {
- return (
- <div className="flex justify-center w-full h-[300px] items-center">
- <Spinner />
- </div>
+ <TabsContent value="recording" className="min-h-0 min-w-0 flex-1 overflow-y-auto">
+ <SessionRecordingContent />
+ </TabsContent>
)
}
@@ -38,6 +28,7 @@ export function SessionRecordingContent(): JSX.Element {
isNotFound,
sessionPlayerMetaDataLoading,
isTimestampOutsideRecording,
+ sessionId,
} = useValues(sessionTabLogic)
const { seekToTimestamp, setPlay } = useActions(sessionTabLogic)
@@ -51,8 +42,19 @@ export function SessionRecordingContent(): JSX.Element {
setPlay()
}, [seekToTimestamp, recordingTimestamp, setPlay, isNotFound, sessionPlayerMetaDataLoading])
+ const replayUrl = urls.replaySingle(
+ sessionId,
+ recordingTimestamp === null ? undefined : { unixTimestampMillis: recordingTimestamp }
+ )
+
return (
<div className="flex h-full min-w-0 flex-col overflow-hidden">
+ <SubHeader className="shrink-0 justify-end">
+ <Button variant="default" size="sm" render={<LinkPrimitive to={replayUrl} target="_blank" />}>
+ Open in session replay
+ <IconExternal />
+ </Button>
+ </SubHeader>
{isTimestampOutsideRecording && (
<LemonBanner type="info" className="m-2">
The exception occurred outside the recorded session timeframe. It is attached to a session but not
diff --git a/products/error_tracking/frontend/components/ExceptionCard/Tabs/SessionTab/index.tsx b/products/error_tracking/frontend/components/ExceptionCard/Tabs/SessionTab/index.tsx
index 9b0dbe7ad257..acae55cd6376 100644
--- a/products/error_tracking/frontend/components/ExceptionCard/Tabs/SessionTab/index.tsx
+++ b/products/error_tracking/frontend/components/ExceptionCard/Tabs/SessionTab/index.tsx
@@ -7,7 +7,11 @@ import { LemonBanner, Link, Spinner } from '@posthog/lemon-ui'
import { EmptyMessage } from 'lib/components/EmptyMessage/EmptyMessage'
import { errorPropertiesLogic } from 'lib/components/Errors/errorPropertiesLogic'
import { ErrorEventProperties } from 'lib/components/Errors/types'
-import { SessionTimeline, SessionTimelineHandle } from 'lib/components/SessionTimeline/SessionTimeline'
+import {
+ SessionTimeline,
+ SessionTimelineHandle,
+ type TimelineMarkerColor,
+} from 'lib/components/SessionTimeline/SessionTimeline'
import { ItemCategory, ItemCollector } from 'lib/components/SessionTimeline/timeline'
import { CombinedEventLoader } from 'lib/components/SessionTimeline/timeline/items/combined'
import { customItemRenderer } from 'lib/components/SessionTimeline/timeline/items/custom'
@@ -19,95 +23,75 @@ import {
import { ConsoleLogLoader, consoleLogRenderer } from 'lib/components/SessionTimeline/timeline/items/logs'
import { pageRenderer } from 'lib/components/SessionTimeline/timeline/items/page'
import { Dayjs, dayjs } from 'lib/dayjs'
-import {
- TabsPrimitive,
- TabsPrimitiveContent,
- TabsPrimitiveContentProps,
- TabsPrimitiveList,
- TabsPrimitiveTrigger,
-} from 'lib/ui/TabsPrimitive/TabsPrimitive'
-import { cn } from 'lib/utils/css-classes'
-
-import { ViewLogsButton } from 'products/logs/frontend/components/ViewLogsButton'
+import { TabsContent } from 'lib/ui/quill'
import { exceptionCardLogic } from '../../exceptionCardLogic'
-import { SubHeader } from '../SubHeader'
import { SessionRecordingTab } from './SessionRecordingTab'
import { sessionTabLogic } from './sessionTabLogic'
-export interface SessionTabProps extends TabsPrimitiveContentProps {
+export interface SessionTabProps {
timestamp?: string
+ eventMarkerColor?: TimelineMarkerColor
}
-export function SessionTab({ timestamp, className, ...props }: SessionTabProps): JSX.Element {
+export function SessionTab({ timestamp, eventMarkerColor }: SessionTabProps): JSX.Element {
const { sessionId } = useValues(errorPropertiesLogic)
- const { loading, currentSessionTab } = useValues(exceptionCardLogic)
- const { setCurrentSessionTab } = useActions(exceptionCardLogic)
+ const { loading } = useValues(exceptionCardLogic)
- return (
- <TabsPrimitiveContent {...props} className={cn('flex min-w-0 flex-col overflow-hidden', className)}>
- {match([loading, sessionId])
- .with([true, P.any], () => (
+ return match([loading, sessionId])
+ .with([true, P.any], () => (
+ <>
+ <TabsContent value="timeline" className="min-h-0 min-w-0 flex-1 overflow-hidden text-sm">
<div className="flex justify-center items-center h-[300px]">
<Spinner />
</div>
- ))
- .with([false, P.nullish], () => <NoSessionStepsView timestamp={timestamp} />)
- .with([false, P.string], ([_, sessionId]) => (
- <BindLogic logic={sessionTabLogic} props={{ timestamp, sessionId }}>
- <TabsPrimitive
- value={currentSessionTab}
- onValueChange={setCurrentSessionTab}
- className="flex min-h-0 min-w-0 flex-1 flex-col"
- >
- <SubHeader className="p-0 shrink-0">
- <TabsPrimitiveList className="flex justify-start gap-2 w-full h-full items-center">
- <TabsPrimitiveTrigger className="px-2 h-full" value="timeline">
- Timeline
- </TabsPrimitiveTrigger>
- <TabsPrimitiveTrigger className="px-2 h-full" value="recording">
- Recording
- </TabsPrimitiveTrigger>
- <div className="ml-auto pr-1">
- <ViewLogsButton
- sessionId={sessionId}
- timestamp={timestamp}
- size="xsmall"
- data-attr="error-tracking-session-view-logs"
- />
- </div>
- </TabsPrimitiveList>
- </SubHeader>
- <SessionTimelineTab />
- <SessionRecordingTab />
- </TabsPrimitive>
- </BindLogic>
- ))
- .exhaustive()}
- </TabsPrimitiveContent>
- )
+ </TabsContent>
+ <TabsContent value="recording" className="min-h-0 min-w-0 flex-1 overflow-hidden">
+ <div className="flex justify-center items-center h-[300px]">
+ <Spinner />
+ </div>
+ </TabsContent>
+ </>
+ ))
+ .with([false, P.nullish], () => (
+ <>
+ <TabsContent value="timeline" className="min-h-0 min-w-0 flex-1 overflow-hidden text-sm">
+ <NoSessionStepsView timestamp={timestamp} eventMarkerColor={eventMarkerColor} />
+ </TabsContent>
+ <TabsContent value="recording" className="min-h-0 min-w-0 flex-1 overflow-hidden">
+ <NoSessionIdFound />
+ </TabsContent>
+ </>
+ ))
+ .with([false, P.string], ([_, sessionId]) => (
+ <BindLogic logic={sessionTabLogic} props={{ timestamp, sessionId }}>
+ <SessionTimelineTab eventMarkerColor={eventMarkerColor} />
+ <SessionRecordingTab />
+ </BindLogic>
+ ))
+ .exhaustive()
}
-export function SessionTimelineTab(): JSX.Element {
+export function SessionTimelineTab({ eventMarkerColor }: { eventMarkerColor?: TimelineMarkerColor }): JSX.Element {
const { properties, uuid } = useValues(errorPropertiesLogic)
const sessionTimelineRef = useRef<SessionTimelineHandle>(null)
- const { currentSessionTab } = useValues(exceptionCardLogic)
+ const { currentTab } = useValues(exceptionCardLogic)
const { sessionId, timestamp } = useValues(sessionTabLogic)
const { setRecordingTimestamp } = useActions(sessionTabLogic)
- const { setCurrentSessionTab } = useActions(exceptionCardLogic)
+ const { setCurrentTab } = useActions(exceptionCardLogic)
useEffect(() => {
- if (currentSessionTab == 'timeline' && sessionTimelineRef.current) {
+ if (currentTab === 'timeline' && sessionTimelineRef.current) {
sessionTimelineRef.current.scrollToItem(uuid)
}
- }, [currentSessionTab, uuid])
+ }, [currentTab, uuid])
const onTimeClick = useCallback(
(time: Dayjs) => {
setRecordingTimestamp(time, 1000)
- setCurrentSessionTab('recording')
+ setCurrentTab('recording')
},
- [setRecordingTimestamp, setCurrentSessionTab]
+ [setRecordingTimestamp, setCurrentTab]
)
const collector = useMemo<ItemCollector | undefined>(() => {
@@ -118,20 +102,28 @@ export function SessionTimelineTab(): JSX.Element {
}, [properties, sessionId, timestamp, uuid])
return (
- <TabsPrimitiveContent value="timeline" className="min-h-0 min-w-0 flex-1 overflow-y-auto">
+ <TabsContent value="timeline" className="min-h-0 min-w-0 flex-1 overflow-y-auto text-sm">
{collector && (
<SessionTimeline
ref={sessionTimelineRef}
collector={collector}
selectedItemId={uuid}
+ selectedItemMarkerColor={eventMarkerColor}
onTimeClick={onTimeClick}
+ categoryControlsPosition="header"
/>
)}
- </TabsPrimitiveContent>
+ </TabsContent>
)
}
-function NoSessionStepsView({ timestamp }: { timestamp?: string }): JSX.Element {
+function NoSessionStepsView({
+ timestamp,
+ eventMarkerColor,
+}: {
+ timestamp?: string
+ eventMarkerColor?: TimelineMarkerColor
+}): JSX.Element {
const { properties, uuid } = useValues(errorPropertiesLogic)
const hasSteps = Array.isArray(properties?.$exception_steps) && properties.$exception_steps.length > 0
@@ -155,7 +147,12 @@ function NoSessionStepsView({ timestamp }: { timestamp?: string }): JSX.Element
</Link>
</LemonBanner>
<div className="flex-1 min-h-0 overflow-y-auto">
- <SessionTimeline collector={collector} selectedItemId={uuid} />
+ <SessionTimeline
+ collector={collector}
+ selectedItemId={uuid}
+ selectedItemMarkerColor={eventMarkerColor}
+ categoryControlsPosition="header"
+ />
</div>
</div>
)
diff --git a/products/error_tracking/frontend/components/ExceptionCard/Tabs/StackTraceTab/index.tsx b/products/error_tracking/frontend/components/ExceptionCard/Tabs/StackTraceTab/index.tsx
index a4fdc66c8835..dca6088ec20f 100644
--- a/products/error_tracking/frontend/components/ExceptionCard/Tabs/StackTraceTab/index.tsx
+++ b/products/error_tracking/frontend/components/ExceptionCard/Tabs/StackTraceTab/index.tsx
@@ -1,9 +1,10 @@
import { useActions, useValues } from 'kea'
+import type { ComponentProps } from 'react'
import { errorPropertiesLogic } from 'lib/components/Errors/errorPropertiesLogic'
import { CollapsibleExceptionList } from 'lib/components/Errors/ExceptionList/CollapsibleExceptionList'
import { LoadingExceptionList } from 'lib/components/Errors/ExceptionList/LoadingExceptionList'
-import { TabsPrimitiveContent, TabsPrimitiveContentProps } from 'lib/ui/TabsPrimitive/TabsPrimitive'
+import { TabsContent } from 'lib/ui/quill'
import { cn } from 'lib/utils/css-classes'
import { ExceptionAttributesPreview } from '../../../ExceptionAttributesPreview'
@@ -11,7 +12,7 @@ import { ReleasePreviewPill } from '../../../ReleasesPreview/ReleasePreviewPill'
import { exceptionCardLogic } from '../../exceptionCardLogic'
import { SubHeader } from './../SubHeader'
-export interface StackTraceTabProps extends Omit<TabsPrimitiveContentProps, 'children'> {
+export interface StackTraceTabProps extends Omit<ComponentProps<typeof TabsContent>, 'children'> {
onExplain?: () => void
renderActions?: () => JSX.Element | null
@@ -22,7 +23,7 @@ export function StackTraceTab({ className, renderActions, ...props }: StackTrace
const { exceptionAttributes, release } = useValues(errorPropertiesLogic)
return (
- <TabsPrimitiveContent {...props} className={cn('flex flex-col', className)}>
+ <TabsContent {...props} className={cn('flex flex-col', className)}>
<SubHeader className="justify-between shrink-0">
<div className="flex items-center gap-1">
<ExceptionAttributesPreview attributes={exceptionAttributes} loading={loading} />
@@ -33,7 +34,7 @@ export function StackTraceTab({ className, renderActions, ...props }: StackTrace
<div className="flex-1 min-h-0 overflow-y-auto">
<StacktraceIssueDisplay className="p-2" />
</div>
- </TabsPrimitiveContent>
+ </TabsContent>
)
}
diff --git a/products/error_tracking/frontend/components/ExceptionCard/exceptionCardLogic.ts b/products/error_tracking/frontend/components/ExceptionCard/exceptionCardLogic.ts
index 750d84d46a97..cd7a2ec8d656 100644
--- a/products/error_tracking/frontend/components/ExceptionCard/exceptionCardLogic.ts
+++ b/products/error_tracking/frontend/components/ExceptionCard/exceptionCardLogic.ts
@@ -8,20 +8,16 @@ export type ExceptionCardLogicProps = {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface exceptionCardLogicValues {
- currentSessionTab: string
currentTab: string
expandedFrameRawIds: Set<string>
issueId: string
loading: boolean
- showAdditionalProperties: boolean
+ propertyNameFilter: string
showJSONProperties: boolean
}
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface exceptionCardLogicActions {
- setCurrentSessionTab: (tab: string) => {
- tab: string
- }
setCurrentTab: (tab: string) => {
tab: string
}
@@ -35,8 +31,8 @@ export interface exceptionCardLogicActions {
setLoading: (loading: boolean) => {
loading: boolean
}
- setShowAdditionalProperties: (showProperties: boolean) => {
- showProperties: boolean
+ setPropertyNameFilter: (propertyNameFilter: string) => {
+ propertyNameFilter: string
}
setShowJSONProperties: (showJSON: boolean) => {
showJSON: boolean
@@ -65,9 +61,8 @@ export const exceptionCardLogic = kea<exceptionCardLogicType>([
actions({
setShowJSONProperties: (showJSON: boolean) => ({ showJSON }),
- setShowAdditionalProperties: (showProperties: boolean) => ({ showProperties }),
setLoading: (loading: boolean) => ({ loading }),
- setCurrentSessionTab: (tab: string) => ({ tab }),
+ setPropertyNameFilter: (propertyNameFilter: string) => ({ propertyNameFilter }),
setCurrentTab: (tab: string) => ({ tab }),
setFrameExpanded: (rawId: string, expanded: boolean) => ({ rawId, expanded }),
}),
@@ -97,10 +92,10 @@ export const exceptionCardLogic = kea<exceptionCardLogicType>([
setShowJSONProperties: (_, { showJSON }) => showJSON,
},
],
- showAdditionalProperties: [
- true,
+ propertyNameFilter: [
+ '',
{
- setShowAdditionalProperties: (_, { showProperties }) => showProperties,
+ setPropertyNameFilter: (_, { propertyNameFilter }) => propertyNameFilter,
},
],
loading: [
@@ -109,12 +104,6 @@ export const exceptionCardLogic = kea<exceptionCardLogicType>([
setLoading: (_, { loading }: { loading: boolean }) => loading,
},
],
- currentSessionTab: [
- 'timeline',
- {
- setCurrentSessionTab: (_, { tab }: { tab: string }) => tab,
- },
- ],
currentTab: [
'stack_trace',
{
diff --git a/products/error_tracking/frontend/components/PropertiesTable.tsx b/products/error_tracking/frontend/components/PropertiesTable.tsx
index b94d6702db18..246d085ebdc8 100644
--- a/products/error_tracking/frontend/components/PropertiesTable.tsx
+++ b/products/error_tracking/frontend/components/PropertiesTable.tsx
@@ -3,7 +3,7 @@ import { LemonButton, LemonTable, Link, Tooltip } from '@posthog/lemon-ui'
import { copyToClipboard } from 'lib/utils/copyToClipboard'
-type PropertyTableRow = {
+export type PropertyTableRow = {
key: string
value: unknown
filterKey?: string
@@ -13,12 +13,16 @@ type PropertyTableRow = {
export type PropertiesTableProps = {
entries: ([string, unknown] | PropertyTableRow)[]
alternatingColors?: boolean
+ firstColumnWidth?: string | number
+ tableLayout?: 'auto' | 'fixed'
onFilterValue?: (key: string, value: string | number | boolean) => void
}
export function PropertiesTable({
entries,
alternatingColors = true,
+ firstColumnWidth = 0,
+ tableLayout = 'auto',
onFilterValue,
}: PropertiesTableProps): JSX.Element {
const rows: PropertyTableRow[] = entries
@@ -34,6 +38,7 @@ export function PropertiesTable({
<LemonTable
embedded
size="small"
+ tableLayout={tableLayout}
dataSource={rows}
showHeader={false}
columns={[
@@ -41,7 +46,7 @@ export function PropertiesTable({
title: 'Key',
key: 'key',
dataIndex: 'key',
- width: 0,
+ width: firstColumnWidth,
className: 'font-medium bg-inherit',
render: (dataValue, record) => (
<div className="flex gap-x-2 justify-between items-center">
@@ -88,7 +93,14 @@ export function PropertiesTable({
dataIndex: 'value',
className: 'whitespace-nowrap',
render: (value) => {
- return <div className="whitespace-nowrap">{renderValue(value)}</div>
+ return (
+ <div
+ className={tableLayout === 'fixed' ? 'truncate' : 'whitespace-nowrap'}
+ title={tableLayout === 'fixed' ? copyValue(value) : undefined}
+ >
+ {renderValue(value)}
+ </div>
+ )
},
},
]}
diff --git a/products/error_tracking/frontend/components/builtInProperties.ts b/products/error_tracking/frontend/components/builtInProperties.ts
new file mode 100644
index 000000000000..851c8b6af268
--- /dev/null
+++ b/products/error_tracking/frontend/components/builtInProperties.ts
@@ -0,0 +1,20 @@
+export interface BuiltInErrorTrackingProperty {
+ property: string
+ title: string
+ versionProperty?: string
+}
+
+export const BUILT_IN_ERROR_TRACKING_PROPERTIES: BuiltInErrorTrackingProperty[] = [
+ { property: '$browser', title: 'Browser', versionProperty: '$browser_version' },
+ { property: '$device_type', title: 'Device type' },
+ { property: '$os', title: 'Operating system', versionProperty: '$os_version' },
+ { property: '$pathname', title: 'Path' },
+ { property: '$user_id', title: 'User ID' },
+ { property: '$ip', title: 'IP address' },
+ { property: '$geoip_country_name', title: 'Country' },
+ { property: '$geoip_city_name', title: 'City' },
+ { property: '$exception_level', title: 'Level' },
+ { property: '$lib', title: 'Library', versionProperty: '$lib_version' },
+ { property: '$app_namespace', title: 'App', versionProperty: '$app_version' },
+ { property: '$current_url', title: 'Current URL' },
+]
diff --git a/products/error_tracking/frontend/errorTrackingIssueNotebookWidgetViews.tsx b/products/error_tracking/frontend/errorTrackingIssueNotebookWidgetViews.tsx
index 6c5f644260a0..5e9753a662f3 100644
--- a/products/error_tracking/frontend/errorTrackingIssueNotebookWidgetViews.tsx
+++ b/products/error_tracking/frontend/errorTrackingIssueNotebookWidgetViews.tsx
@@ -11,7 +11,7 @@ import { defineNotebookWidgetViews } from 'scenes/notebooks/notebookWidgetCatalo
import { NotebookNodeProps } from 'scenes/notebooks/types'
import { eventsSourceLogic } from './components/EventsTable/eventsSourceLogic'
-import { EventsTable } from './components/EventsTable/EventsTable'
+import { EventsTable, getEventMarkerColor } from './components/EventsTable/EventsTable'
import { ExceptionCard } from './components/ExceptionCard'
import { errorTrackingIssueSceneLogic } from './scenes/ErrorTrackingIssueScene/errorTrackingIssueSceneLogic'
@@ -83,7 +83,8 @@ export function ErrorTrackingIssueDetail({
attributes,
}: NotebookNodeProps<ErrorTrackingIssueNotebookWidgetAttributes>): JSX.Element {
const logic = errorTrackingIssueSceneLogic({ id: attributes.id })
- const { initialEvent, initialEventLoading, issue, issueLoading, selectedEvent } = useValues(logic)
+ const { initialEvent, initialEventLoading, issue, issueLoading, selectedEvent, summary } = useValues(logic)
+ const detailEvent = selectedEvent || initialEvent || undefined
if (!issue && !issueLoading) {
return <NotFound object="error tracking issue" />
@@ -96,7 +97,12 @@ export function ErrorTrackingIssueDetail({
<ExceptionCard
issueId={attributes.id}
issueName={issue?.name || null}
- event={selectedEvent || initialEvent || undefined}
+ event={detailEvent}
+ eventMarkerColor={
+ detailEvent
+ ? getEventMarkerColor(detailEvent.uuid, summary?.first_event_uuid, summary?.last_event_uuid)
+ : undefined
+ }
loading={issueLoading || initialEventLoading}
/>
</div>
diff --git a/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene.tsx b/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene.tsx
index ab2710247526..a3d58c37d174 100644
--- a/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene.tsx
+++ b/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene.tsx
@@ -11,7 +11,6 @@ import { LemonButton } from '@posthog/lemon-ui'
import { Resizer } from 'lib/components/Resizer/Resizer'
import { ResizerLogicProps, resizerLogic } from 'lib/components/Resizer/resizerLogic'
import { SceneMenuBarFileItems } from 'lib/components/Scenes/SceneMenuBarFileItems'
-import { TZLabel } from 'lib/components/TZLabel'
import ViewRecordingsPlaylistButton from 'lib/components/ViewRecordingButton/ViewRecordingsPlaylistButton'
import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
import { useWindowSize } from 'lib/hooks/useWindowSize'
@@ -27,6 +26,7 @@ import { useAttachedContext } from 'products/posthog_ai/frontend/api/logics'
import { PostHogSDKIssueBanner } from '../../components/Banners/PostHogSDKIssueBanner'
import { miniBreakdownsLogic } from '../../components/Breakdowns/miniBreakdownsLogic'
+import { getEventMarkerColor } from '../../components/EventsTable/EventsTable'
import { ExceptionCard } from '../../components/ExceptionCard'
import { StackTraceActions } from '../../components/ExceptionCard/Tabs/StackTraceTab/StackTraceActions'
import { StatusIndicator } from '../../components/Indicators'
@@ -209,7 +209,7 @@ const RightHandColumn = ({
isOpen: boolean
onClose: () => void
}): JSX.Element | null => {
- const { issue, issueLoading, selectedEvent, initialEvent, initialEventLoading } =
+ const { issue, issueLoading, selectedEvent, initialEvent, initialEventLoading, summary } =
useValues(errorTrackingIssueSceneLogic)
const tagRenderer = useErrorTagRenderer()
const detailEvent = selectedEvent ?? initialEvent
@@ -228,13 +228,7 @@ const RightHandColumn = ({
)}
>
{isMobile && (
- <div className="flex items-center justify-between p-1 shrink-0">
- <div className="flex items-center gap-1 pl-1">
- {detailEvent?.timestamp && (
- <TZLabel className="text-muted text-xs" time={detailEvent.timestamp} />
- )}
- {tagRenderer(detailEvent)}
- </div>
+ <div className="flex shrink-0 justify-end p-1">
<LemonButton icon={<IconX />} size="small" onClick={onClose} aria-label="Close detail" />
</div>
)}
@@ -246,8 +240,12 @@ const RightHandColumn = ({
issueName={issue?.name ?? null}
loading={issueLoading || initialEventLoading}
event={detailEvent ?? undefined}
+ eventMarkerColor={
+ detailEvent
+ ? getEventMarkerColor(detailEvent.uuid, summary?.first_event_uuid, summary?.last_event_uuid)
+ : undefined
+ }
label={tagRenderer(detailEvent)}
- hideEventMeta={isMobile}
renderStackTraceActions={() => {
return issue ? <StackTraceActions issue={issue} /> : null
}}
diff --git a/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/LinkedReports.tsx b/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/LinkedReports.tsx
index 848e1e1ed324..5bbc29277552 100644
--- a/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/LinkedReports.tsx
+++ b/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/LinkedReports.tsx
@@ -52,9 +52,8 @@ function LinkedReportRow({ report }: { report: SignalReportApi }): JSX.Element {
* Reports the inbox grouped this issue's signals into, most recently updated first.
*
* This is a section of the right pane, not a card sitting on top of one, so it wears the pane's own
- * chrome: the same 2rem header strip the exception card below it uses, square corners, no outer border,
- * and rows that run the full width. The name takes the AI colour, which is how the app marks the work
- * its own software did.
+ * chrome: square corners, no outer border, and rows that run the full width. The name takes the AI
+ * color, which is how the app marks the work its own software did.
*/
export function LinkedReportsSection({ reports }: { reports: SignalReportApi[] }): JSX.Element | null {
if (reports.length === 0) {