: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(wizard): refresh runs UI with quill (#98678)
Fernando Gomes5b3fdbf84203
diff --git a/docs/internal/wizard-runs.md b/docs/internal/wizard-runs.mdindex efd02b0f0d70..f6dc2309c773 100644--- a/docs/internal/wizard-runs.md+++ b/docs/internal/wizard-runs.md@@ -58,6 +58,8 @@ PATCH /api/projects/{project_id}/wizard/runs/{run_id}/GET /api/projects/{project_id}/wizard/runs/{run_id}/artifacts/```+Run responses include the creator ID and basic creator details for attribution in project-level run lists.+The PATCH request accepts a terminal `status`: `completed`, `failed`, or `cancelled`.Failed runs can also include an `error_code`.Local agents can create runs and update runs they created.diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 4ae2b47b9a05..6c25d2a89926 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -4977,7 +4977,7 @@ snapshots:logs-logsfiltervolumesparkline--with-rate-limit-threshold--light:hash: v1.k794b7964.90511b5879e111bf4d4b3f7b31f5d24159de7590de35e110bc4d510f763cfa1a.l4VDaP9QZZgd9RbT-nWeHb00FGgojPia3OHP-Bq-pfUmcp-apps-actions--list--light:- hash: v1.k794b7964.780ee2787e03d18e28952f15ba1063d3561bf506c3f27370e111aa00b6840480.kyd4ZfOZOnVnvs4zzuHttn7iaRk1OSRVc4UGm-myJEA+ hash: v1.k794b7964.1404bf36ee039ef64d978fb4ff825a04ebe55ea2bc4c04ba6bc2a4252d5b8657.eOwPJ0UYuP-Cwmz1wqPf0gbtNVQx6r-6JTyhx75dhZ8mcp-apps-actions--multi-step--light:hash: v1.k794b7964.d337199f83a8416e91c20175f60dfe52b0a445270b34efea8c2c2ee14620d7a1.ARITfWNtggFg_eKCPLLur4JoSqx0Zx2nYvMg8TvoK3gmcp-apps-actions--simple--light:@@ -4987,9 +4987,9 @@ snapshots:mcp-apps-ai-observability--empty--light:hash: v1.k794b7964.142f371a27cf39712117a43bdfbd712d2a8a14966fd593b03096e7f26251a3cc.i-3gjDyAAdVus9xh-3EgnJSLzPOYYpqbmLmcNb6Sz-wmcp-apps-ai-observability--multi-model--light:- hash: v1.k794b7964.8d7b111f362b6382b7ab0f8b2faa9896a414b3410378070a6da3fff8df8c4617.X8hju5T08Nzt0NX65InDdmyuCNi6g111Jd27Mk7_OOU+ hash: v1.k794b7964.a1cf1368fafc0b2d9647d5f908fd374b8e390f77b48c1b35060dd0d0cdd5ce28.YuA6_WRwLFU1b9JRoOdiNHKqXmbNzVH2EWMu0-k3dm4mcp-apps-ai-observability--single-model--light:- hash: v1.k794b7964.d9666eafee0eb265527f39de0189f04df01fc001ae7ff2d8f30e7f4eb8bf78b8.tKK0r3f4eUdwxXF1CNsBMdifJyq5jKOGjlgBgjGq9oI+ hash: v1.k794b7964.f369cbd2764217e18148ac569e236f6eaa2f637b430528cfb2b7970a36bb03fa.-rFx_DH0t95Dvm6XrXqjbB0pfjfUBO3u1kMLq3kkZxEmcp-apps-app-states--loading--light:hash: v1.k794b7964.808d990515fe588731d2986ab719a071f0125a7f8cb8e68efbef88deabb2a47a.86Huz6TbAd6glstvcl_q_Fjbqq4kUnzMPIMO8KZTx9Imcp-apps-app-states--no-results--light:@@ -4999,7 +4999,7 @@ snapshots:mcp-apps-cohorts--dynamic--light:hash: v1.k794b7964.d76eb7a46408f957fbe3110f8f2cae3476af6966e8bbcf2aa4b45ff5ed6428b0.8GHvx1vMpvHvssDcbkZoHMWvnUQCS_idgnNbkKmXT7omcp-apps-cohorts--list--light:- hash: v1.k794b7964.055d227fe3eafe82ebbf2474e06b81537e40b4e5ded9ddfdf1bdaabee5ae5219.1icZdzBnGISqBikNHqlcqgQtlYsD4sySjazHd218-hg+ hash: v1.k794b7964.812825e83a8c3f9c82a0e189ce445c867f445db9b801fa4a7b43fe9d81bcfd5a.P2snQCtSzl9YhIAAkw5mZtOHo8yyyz_IoBrIMfnplNUmcp-apps-cohorts--static--light:hash: v1.k794b7964.7a0889e7d21c79da2f04c4a187ab6d2b63158edd0e8737cda5a6254197eb3822.Qz8oGpJlwUIi5k43JRBxSAAJo-2fB-qceXOSk8SqTWImcp-apps-email-template--plain-text-fallback--light:@@ -5013,7 +5013,7 @@ snapshots:mcp-apps-error-tracking--error-details--light:hash: v1.k794b7964.115fc29fefb183de94ac95a3e950aeb03077f023b1784847ab65685fda533d35.Qr-CBJXrSn2ime3BNJ-Xk0rvryl7mDgRARc-nOdzusMmcp-apps-error-tracking--list--light:- hash: v1.k794b7964.a13e49936f5d76437853d424d895f1b85721ed78b9fd757a92ad52603e5f3a9c.dTJPFO3ehqlGJaqugjvbwwoCFBZIuWR7bTLdFCnTbK8+ hash: v1.k794b7964.35fd10f418e6dee1a39ec7fbb681a78d034e8efa1e7b779c78a7cf99a3e58f2e.TzaHZvW-ZWrQuPPFcThhp0pM5EPHRl4yk9vn_syQ__Qmcp-apps-error-tracking--python-stack-trace--light:hash: v1.k794b7964.d80733b9a543cc59a61a99b8515eaf35fa17b95a4d7d282c469c5ddf49be5cb5.2hXi52twI4RVs4FegK34kQf5bGN26uKyur7GeBeXuREmcp-apps-error-tracking--resolved--light:@@ -5023,23 +5023,23 @@ snapshots:mcp-apps-error-tracking--with-external-links--light:hash: v1.k794b7964.1c438b81ddecf6cd51016c53d57b3a80c7a60aab20f69a4629f52d9366452c72.alkUqUY-JcNO_PquFIaJSqBh0hBs4BbMf4NNbwjkHI4mcp-apps-experiments--completed--light:- hash: v1.k794b7964.3ca416adde36359603e91e578bd21cbb6e6f7591ec714b01b238c1be7c4e6b16.zcsJMCqHzsQbmRSEk2sNm5Al4-GGWV3oXLfmzMpKd6U+ hash: v1.k794b7964.439e28bcf664fda23030d73f704d1db8823f900b7a41e541e514668fee0ff339.LUb3HLR4pfWQjeAKjUXkttMrqVfVkXHF-XlVqrYQkesmcp-apps-experiments--draft--light:- hash: v1.k794b7964.cab299172819b5734979578ea079a09e0284b46261a4d5488d7e20ab8ab19512.XqNSWnK-HfhUqTbWpMFq8UUZu4Uc6UJAA1FLaP6mMHE+ hash: v1.k794b7964.0b2952205a0aaa1c944e447332d987365945c3fe368e2aec4b62cea7c801d2b5.c9C0-0d_7asF4oYDha0WRY4sRB6XJR0JHhvH-_KqnWcmcp-apps-experiments--list--light:- hash: v1.k794b7964.40bd9bc7d43e74ed28706715dfec390a4250a4dc4a966a7580379c9a1a8fe0eb.gQANaHDKe6QOO3bq9F9w2itrbKemByDyISXPAUktMD4+ hash: v1.k794b7964.4efc50aa68e09577c5e0961f22089219592948decac7cfa93aac2e13bf687d65.ywktkAWNVLyk7Ng1HOXstSe17pEK-eraT54DAyMnAUomcp-apps-experiments--results--light:- hash: v1.k794b7964.2f3c6d29850f6767f05ec4a362ab9ae84d84def94f165a4cc7307545fb2621db.WVcM4x4J38Y4ES2E3KTeB7648EOBEB2gVlHPhkhAcuE+ hash: v1.k794b7964.8680719ba84ba75b9d68ea881c66c9066aefcebe5a1e2d657dc78313895a6940.UbiXQd7vvkoCmptGcsoRDicaN6tk6HvpRQcBaH1g12wmcp-apps-experiments--results-fallback--light:- hash: v1.k794b7964.e5f8a1cb1d0c73834b3bf2484cd14dc9b988197b27eca2960f91bc8d4b657f4e.jYEA-aySKwzIefra2rGACPIGyZqDIp5JWORlKQSa50U+ hash: v1.k794b7964.c5d60d098d1203ce5cc03b0552d3f79bf1db6f2db373b1f8b7034a50344718a0.vgfpovKXBGN7oBqyutXpuBjPQLbGSL0TklZUsn10g0Imcp-apps-experiments--results-legacy--light:- hash: v1.k794b7964.b90b8cd3c6338cf566c6e3f568d070c290f8440ebb88b94a59ea1748705f7cd9.Ui2V8hbeYFQd_5e6UO77oFGxemyHwgPR4TqhWInxT28+ hash: v1.k794b7964.ece0fd851029d71a4cbcba6fe74cb242a008c5dfcb64f8e11c5da7f06b20cae8._VYTA_aDL1rOFlduVD0jjMpN9fstOeM0vNZSY-fgWkUmcp-apps-experiments--running--light:- hash: v1.k794b7964.bace41ea6ab40cf1a59b52cc012efa30d43cb801876c9e5337c69358baa3d3b6.k6CFBF4vp0ooKcJu9O3sFqWJP_YgMoJHBDT-Hw-C_WM+ hash: v1.k794b7964.08060c96db8ace6a454c9216638348b0ea3b8acea49650abac87750188481be9.ucwYV4DoZt03teJRqaXVTYVn-9q-cmObNRWyyxmMYCgmcp-apps-feature-flags--boolean-flag--light:hash: v1.k794b7964.f3ee0e724e30f350166b5a87d46cd36ba9f982735aa9d7e322aeaf28bc4c9b1c.KzlRVALZdoWS2mlKcnTJRTOo4SmFvIZzKhj6SodWt3Imcp-apps-feature-flags--flag-list--light:- hash: v1.k794b7964.1e43c59de291c5481b541e08e0d19d1eb07801f6d60fafb47a4303ff174c3da2.7LSDsKi9to178G2XNT9NhPujfzlrpflYQyfk-_m_Brk+ hash: v1.k794b7964.ba1925bd8ea8aa364de272e5716d66b7aabfb6c0092b7208d9a37f1dd64eecf1.LWlkcoa8WE3Z1LXzowRsSbAPdyLRPm3Va9aUbl3LpXAmcp-apps-feature-flags--inactive-flag--light:hash: v1.k794b7964.0ea041efd8df37c742028aa46ff65a4036840f462fe1f3cde4da318552f57e61.tD2LfrilewqSsRK4Gtu2nKFDPoyUaDERRF5vN6ht1oMmcp-apps-feature-flags--multivariate-flag--light:@@ -5055,11 +5055,11 @@ snapshots:mcp-apps-funnels--three-step--light:hash: v1.k794b7964.b310746f305747895df2adcd3eeb517128d3d7a6dc37ff9b029ffeb403d6c706.fFlazDVp-SsP7lZsOsfB6qBTlfiJsA7mfF06Ui5Ki-Umcp-apps-insight-actors--event-counts--light:- hash: v1.k794b7964.f0b17778c7d50e26542186c2a6758796a67334f35a1269cbe10e3269cec66b87.qSfkrh0qKHklQNE_y-fxq5ZSlGUoK6N16jfxvKHvZrA+ hash: v1.k794b7964.5078d1d857d3252f0d50ce8f73148fd775cdd73ae24f33356ff5d3af75421252.Z2SUxkKOWLvvo6ilbKYYKUo1Ez-TEgF8i2xGft-y9yEmcp-apps-insight-actors--membership-only--light:- hash: v1.k794b7964.380d44591c986f45785c5a333b7c54a790a99cb65709e6bf8e32fe4e85a9373d.gVnlH6Lc6h27krJUWQNKiZAdoolFbMxTjFXRVVaJJTM+ hash: v1.k794b7964.d11e0490aedd0f29a1129c4663e64c47180ffd972ee3e649a5476376c695a1c8.-eTQeIPh8hZSfd0ESBU2HoqoZOQGgJip6gcJbQQfueYmcp-apps-insight-actors--with-recordings--light:- hash: v1.k794b7964.6bc38bc90689750e45b0eefa5974ce2e0fee05f581a64552835accca3914ded3.5ZInU5bxqbu_rkPp-prY1W5D2hsW8hn21EAwNfRjf_g+ hash: v1.k794b7964.b60a206c44a2c52e938cdfd74a29745ef8997c40eb0da89467ffc9e05a050b8e.mmU1gowjrutTcPXl9Vkzk-EUpCHN18A8sUDHodhGn1Imcp-apps-lifecycle--grouped--light:hash: v1.k794b7964.f6b81da6dbf0a63ddb55f3fc72b96ac5f72716698f914d73edb124e8ea17b0d1.2FXYB8hKUiO_FXveQuHw5J4O8WTK5bzOeiwCE9MUT4Qmcp-apps-lifecycle--stacked--light:@@ -5073,7 +5073,7 @@ snapshots:mcp-apps-replay-vision--ineligible-observation--light:hash: v1.k794b7964.97cd87311e3b647f567456c5874b0fd660c9f74143895624a68cb4da6047a6c8.4Tfag7PUinnbUZAc3SYFTn_sB1NNb0XKZXjUyAPaeaImcp-apps-replay-vision--observation-list--light:- hash: v1.k794b7964.d77b67b04cc90f24ee5cad8851a5bcb3b736d087ce2155ac92d221c5e59afdc2.Y5LTeRkQB6y8azdEvTjo09CgLErrb_ONlEnsmOiuVOk+ hash: v1.k794b7964.e9bdfc7fc957f1918b0c9793dd9f0e928bafeb2103fdd3aa46239f26cce12f6b.RMt6EG-w2TfOB4HMxg1_w8d7-8rNeF8ncznm_4iAFl8mcp-apps-replay-vision--scan-out-of-credits--light:hash: v1.k794b7964.db60de687fb8c2fec37705eb89023c7cc8afa908b1a668bbd06289a240841260.4-CWSMVDR5Bh1hST20uW5dmE3amfHdqPd5Ey15sZMjQmcp-apps-replay-vision--scan-started--light:@@ -5081,7 +5081,7 @@ snapshots:mcp-apps-replay-vision--summarized-observation--light:hash: v1.k794b7964.4cab768380511d0083520c47d343fada2a450dd3481e8a6f27c9632119c93ded.Ux_0QD283XWD6HQMyP_BxbJE_LEaVzXx_gvyvML2QD8mcp-apps-retention-actors--daily--light:- hash: v1.k794b7964.98ed364bc169b666ee69ff6e44c7fa385360df9410875c5ee3cd85ff2e53104f.-p5rL3gbD8LRZ-kriXkNM3NHeYm8nf0v0VfVq5XWZFs+ hash: v1.k794b7964.2f8c8ca0b357211a7abb6bd3a33bc6d893afb5db8acb430a5bb5c084a158dec2.NY6AHnA78rwSAccP8QoIA-nkiJUyPjR1WjdIOb4HJtAmcp-apps-stickiness--multiple-series--light:hash: v1.k794b7964.a4ad323750293fa0c01110bf9917810fb25267601a6dc046b7a1e642bc55b389.dHjcaN_5s_NPzhlRklHYAuUd-DzrkYgyh3Vh4TjGVE0mcp-apps-stickiness--single-series--light:@@ -5093,9 +5093,9 @@ snapshots:mcp-apps-surveys--draft-multi-question--light:hash: v1.k794b7964.3bc65ee531d96f097f879099aea773797b4a0f7388522b5558d16832ff25e20c.yCVcDShukwPldlWmDSxnB6id2U6W1znLrneypeCl9RImcp-apps-surveys--list--light:- hash: v1.k794b7964.a038d8668b289f1fdd1fc6793e9de3a28207c22ae12271f71e05769163baba83.7aAN-WBraQDc9xv3J42dUvO_1mJLEqJDEfQideY8sLQ+ hash: v1.k794b7964.ccdaed77d70a69482ffa453abe1a604312e4797ffacc249407710dc5549c261b.6qNXbw-J0PmQNpMsXRoN_sbLE4QwgqZfbXMgpj_Lzlsmcp-apps-surveys--stats--light:- hash: v1.k794b7964.50ebbffe0817c92d431f7398c6a266e43f2e5b4a84ba7264284be6468a07d498.8FDJduexLk3r96zjs0y_Mf9vlGw-BN8-dhILqG67AcQ+ hash: v1.k794b7964.6cb7751e458d25e28e6813fcdbdf057ac64f337f1ae272aca85b96df54b5d813.Q8BceVfn0ZA8IY_kmFjaKI0s1ImCgEhb2ssvy3a5ZPImcp-apps-trends--area-chart--light:hash: v1.k794b7964.882bc8f3cfa559c576507d6e6b220d7529dba42feb57d6ece5cab60efbe2dd1e.BC7U9S7KPAt30fXGSCMjAFbuqe6vtap1pxGO7wiW2Wgmcp-apps-trends--bar-value-few-series--light:@@ -5115,7 +5115,7 @@ snapshots:mcp-apps-workflows--draft-state--light:hash: v1.k794b7964.4cbfe20c626f0f7912dbd47b41a152c9c30f92d12a3f599476fb10043d7f7e70.9NI9FaMch59lt8xO3Xhp9ruHKLyDcvupNp20dZrR8_Ymcp-apps-workflows--list--light:- hash: v1.k794b7964.be90744e325436d750fce312670f5c51a56c644dc3a3bf19530ef9048949c582.d3khUwRyG0RQam6nQxhrXKPacHNSmMrWPN_TOwaMoEQ+ hash: v1.k794b7964.477017f5e06d957b8cebbbe9105e96e82c52bdf7ff512ec84d13f4db71f7916c.-hG1WABHKvQyC5AFOmyjA9Lj2lWdnz67KScAAuRz_Psposthog-3000-keyboard-shortcut--default--dark:hash: v1.k794b7964.a5fc5a426df52137d3fb6377a06c7b39c36b041280de154cf2b95cbe46932b8d.f2HHu2jv6bztshqmrVtHpiuuv3PJZNskIh7SbZRgIpkposthog-3000-keyboard-shortcut--default--light:@@ -5823,11 +5823,11 @@ snapshots:products-wizard-wizard-run-diff-viewer--default--dark:hash: v1.k794b7964.38b0f793a49f8277d977bddcbd3edfc90f92e38e98d8b54c13e05c6d7e1b28b4.Kvklfi80aA5M9V1X9FgSiqiA_Vj0h-5JL3qj-UiLO_Iproducts-wizard-wizard-run-diff-viewer--default--light:- hash: v1.k794b7964.b71c04e98905a5859ed80f4662a76e93ab0952d129f7aed177555bfcc59e11df.wIj6xU2WrUOoIYYGaGaxFrarlbvHXGkNpL52lVzq6lY+ hash: v1.k794b7964.97f13f6be2554ea41d7006e27ce4534e027b45fcc782a08ecf44e1e7b04d4ad8.AD2vutSuBEBOO1W29WUbyMcVf_DimcWTmbvxyQAMhr0products-wizard-wizard-run-diff-viewer--narrow--dark:- hash: v1.k794b7964.51f791d9535f2640bdbb6de0e85a0e78aba8009dd61358b3656cd827f3cf3011.tYWRUI0IhtTNhxt99LRyhJ-v2FwuS8uBA7_12QfvEB4+ hash: v1.k794b7964.86d0cbd8d6aff26f2592a2b564534fb53fd5c0bb89c1383f0cc4e1c4029e6ad0.RjTbwWkbD4SNVNNM83vresibkwUxkliGjKwl5_LCWMEproducts-wizard-wizard-run-diff-viewer--narrow--light:- hash: v1.k794b7964.704115354c970d7d0556406b7aa40937696c8d7d9586945d5007020108adab39.k2QTkiw86U8z8unsFf9sXAfzgMzaui-7D55GLUlsFEA+ hash: v1.k794b7964.2ea84850b2a15dfe74254e4439305686f9718b0627f1bc8ca05a0fd428fcebba.qvBX7qTpArw7bMv-azF7FL1HSBhsl9BhNblAoqlGpi8products-workflows-customerioimportmodal--all-steps-completed--dark:hash: v1.k794b7964.da9d1ebf1836700267307224631511bd8fe3b9fb0906654a383e545e1c6f98f1.lPijIVizKAMxsGEVt28x0Y5izfhcfnbjbPhoHzriWFgproducts-workflows-customerioimportmodal--all-steps-completed--light:diff --git a/frontend/vite.config.mts b/frontend/vite.config.mtsindex 6c43b2e7d401..5d4bf3e1cf3a 100644--- a/frontend/vite.config.mts+++ b/frontend/vite.config.mts@@ -44,7 +44,9 @@ export default defineConfig(({ mode }) => {},],resolve: {- dedupe: ['@base-ui/react'],+ // Linked workspace packages (including Quill) must share the app's+ // React instance or hooks are dispatched through a second runtime.+ dedupe: ['react', 'react-dom', '@base-ui/react'],alias: {'@base-ui/react': resolve(__dirname, 'node_modules/@base-ui/react'),'~': fileURLToPath(new URL('./src', import.meta.url)),@@ -73,7 +75,10 @@ export default defineConfig(({ mode }) => {// it by default when imported from products/*/frontend, like the @posthog/icons case above.// Alias each export explicitly, subpath first: a lone package-root alias would rewrite the// '@posthog/llm-normalizer/types' import to a nonexistent path instead of src/types.ts.- '@posthog/llm-normalizer/types': resolve(__dirname, 'node_modules/@posthog/llm-normalizer/src/types.ts'),+ '@posthog/llm-normalizer/types': resolve(+ __dirname,+ 'node_modules/@posthog/llm-normalizer/src/types.ts'+ ),'@posthog/llm-normalizer': resolve(__dirname, 'node_modules/@posthog/llm-normalizer/src/index.ts'),// These @tiptap packages live only in frontend/node_modules, which products/*/frontend// files can't reach by walking up from their own directory. Alias each packagediff --git a/packages/quill/packages/components/AGENTS.md b/packages/quill/packages/components/AGENTS.mdindex ecc80aa3a476..e1c17f94e24c 100644--- a/packages/quill/packages/components/AGENTS.md+++ b/packages/quill/packages/components/AGENTS.md@@ -30,6 +30,7 @@ const columns: ColumnDef<Person>[] = [stickyHeader // or "page" to stick to document scrollfullWidthsize="sm" // tighten cell padding; pair with Card size="sm"+ onRowClick={(row) => open(row)} // ignores links, buttons, and form controls inside the row/>```@@ -40,6 +41,7 @@ Rules:- Sorting is client-side and on by default — click header toggles asc → desc → off. Opt out per column with `enableSorting: false`.- Pagination is opt-in via `pageSize`; the component owns page state and resets to page 0 when `pageSize` changes. The pager is suppressed when the table has no rows — an empty table shows only its empty state, never a "0–0 of 0" pager.- Custom empty state via the `empty` prop (ReactNode); default is a minimal "No results".+- `onRowClick` makes non-interactive parts of each row clickable and keyboard accessible. Links, buttons, form controls, editable content, and custom controls keep their own behavior. Add `data-row-click-ignore` to a custom descendant that must not activate the row.- Don't rebuild tables from `Table` primitives when the data is row/column shaped and needs sorting or pagination — that's what DataTable is for. Drop to the `Table` primitive only for fully custom layouts.## DateTimePickerdiff --git a/packages/quill/packages/components/src/data-table.stories.tsx b/packages/quill/packages/components/src/data-table.stories.tsxindex a4168e0aeb96..cf836e507f04 100644--- a/packages/quill/packages/components/src/data-table.stories.tsx+++ b/packages/quill/packages/components/src/data-table.stories.tsx@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react'import { type ColumnDef } from '@tanstack/react-table'import * as React from 'react'-import { Badge } from '@posthog/quill-primitives'+import { Badge, Checkbox, Field, Label } from '@posthog/quill-primitives'import { DataTable } from './data-table'@@ -134,6 +134,25 @@ const fullWidthColumns: ColumnDef<Person>[] = [},]+const clickableColumns: ColumnDef<Person>[] = [+ ...fullWidthColumns,+ {+ id: 'selection',+ header: 'Select',+ enableSorting: false,+ cell: ({ row }) => {+ const id = `select-${row.original.id}`++ return (+ <Field orientation="horizontal">+ <Checkbox id={id} />+ <Label htmlFor={id}>Select</Label>+ </Field>+ )+ },+ },+]+export const FullWidth: Story = {render: () => (<DataTable@@ -145,6 +164,18 @@ export const FullWidth: Story = {),}+export const ClickableRows: Story = {+ render: () => (+ <DataTable+ columns={clickableColumns}+ data={people}+ fullWidth+ onRowClick={() => undefined}+ className="rounded-md border border-[var(--border)]"+ />+ ),+}+// Client-side pagination — pass `pageSize` to page the data and render a pager// below the table. `pageSizeOptions` adds a rows-per-page selector.export const Paginated: Story = {@@ -174,4 +205,3 @@ export const FullWidthPaginated: Story = {/>),}-diff --git a/packages/quill/packages/components/src/data-table.test.tsx b/packages/quill/packages/components/src/data-table.test.tsxnew file mode 100644index 000000000000..2f02adc8773e--- /dev/null+++ b/packages/quill/packages/components/src/data-table.test.tsx@@ -0,0 +1,43 @@+import { type ColumnDef } from '@tanstack/react-table'+import { fireEvent, render, screen } from '@testing-library/react'++import { DataTable } from './data-table'++interface TestRow {+ name: string+}++const data: TestRow[] = [{ name: 'Ada' }]++describe('DataTable', () => {+ it.each([+ ['label', <label key="label">Toggle</label>],+ ['contenteditable element', <span key="editable" contentEditable />],+ ['custom control', <span key="control" role="button" />],+ ['consumer opt-out', <span key="opt-out" data-row-click-ignore />],+ ])('does not activate a row from a %s', (_name, control) => {+ const onRowClick = jest.fn()+ const columns: ColumnDef<TestRow>[] = [+ {+ accessorKey: 'name',+ header: 'Name',+ cell: () => control,+ },+ ]+ const { container } = render(<DataTable columns={columns} data={data} onRowClick={onRowClick} />)++ fireEvent.click(container.querySelector('tbody td > *')!)++ expect(onRowClick).not.toHaveBeenCalled()+ })++ it('activates a row from non-interactive content', () => {+ const onRowClick = jest.fn()+ const columns: ColumnDef<TestRow>[] = [{ accessorKey: 'name', header: 'Name' }]+ render(<DataTable columns={columns} data={data} onRowClick={onRowClick} />)++ fireEvent.click(screen.getByText('Ada'))++ expect(onRowClick).toHaveBeenCalledWith(data[0])+ })+})diff --git a/packages/quill/packages/components/src/data-table.tsx b/packages/quill/packages/components/src/data-table.tsxindex 8d0b22f8a8ca..860181f3b400 100644--- a/packages/quill/packages/components/src/data-table.tsx+++ b/packages/quill/packages/components/src/data-table.tsx@@ -53,9 +53,53 @@ declare module '@tanstack/react-table' {}}+const ROW_CLICK_IGNORE_SELECTOR = [+ 'a',+ 'button',+ 'input',+ 'select',+ 'textarea',+ 'label',+ 'summary',+ 'audio[controls]',+ 'video[controls]',+ '[contenteditable]:not([contenteditable="false"])',+ '[tabindex]:not([tabindex="-1"])',+ '[role="button"]',+ '[role="checkbox"]',+ '[role="combobox"]',+ '[role="link"]',+ '[role="listbox"]',+ '[role="menuitem"]',+ '[role="menuitemcheckbox"]',+ '[role="menuitemradio"]',+ '[role="option"]',+ '[role="radio"]',+ '[role="searchbox"]',+ '[role="slider"]',+ '[role="spinbutton"]',+ '[role="switch"]',+ '[role="tab"]',+ '[role="textbox"]',+ '[role="treeitem"]',+ '[data-row-click-ignore]',+].join(', ')++function shouldIgnoreRowClick(target: EventTarget | null, row: HTMLTableRowElement): boolean {+ if (!(target instanceof Element)) {+ return false+ }++ const interactiveElement = target.closest(ROW_CLICK_IGNORE_SELECTOR)++ return interactiveElement !== null && interactiveElement !== row+}+export interface DataTableProps<TData, TValue> {columns: ColumnDef<TData, TValue>[]data: TData[]+ /** Opens or selects a record when the user clicks a non-interactive part of its row. */+ onRowClick?: (row: TData) => void/** Sizing/scroll classes for the table container (forwarded to the Table primitive). */className?: string/** Sticky header mode, forwarded to the Table primitive. `'page'` sticks to document scroll. */@@ -122,10 +166,10 @@ function DataTablePagination<TData>({const end = Math.min((pageIndex + 1) * pageSize, total)const range = getPaginationRange(pageCount, pageIndex)- // px-3 matches the cells' 0.75rem inline padding so the pager lines up under- // the column content.+ // px-3 matches the cells' 0.75rem inline padding. Bottom padding keeps the+ // controls clear of a flush card's edge.return (- <div className="flex flex-wrap items-center justify-between gap-2 px-3">+ <div className="flex flex-wrap items-center justify-between gap-2 px-3 pb-2"><div className="flex items-center gap-2 text-xs text-muted-foreground"><span className="tabular-nums">{start}–{end} of {total}@@ -193,6 +237,7 @@ function DataTablePagination<TData>({function DataTable<TData, TValue>({columns,data,+ onRowClick,className,stickyHeader,fullWidth,@@ -277,7 +322,38 @@ function DataTable<TData, TValue>({<TableBody>{rows.length ? (rows.map((row) => (- <TableRow key={row.id} data-state={row.getIsSelected() ? 'selected' : undefined}>+ <TableRow+ key={row.id}+ data-state={row.getIsSelected() ? 'selected' : undefined}+ className={+ onRowClick+ ? 'cursor-pointer focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring'+ : undefined+ }+ tabIndex={onRowClick ? 0 : undefined}+ onClick={+ onRowClick+ ? (event) => {+ if (!shouldIgnoreRowClick(event.target, event.currentTarget)) {+ onRowClick(row.original)+ }+ }+ : undefined+ }+ onKeyDown={+ onRowClick+ ? (event) => {+ if (+ event.target === event.currentTarget &&+ (event.key === 'Enter' || event.key === ' ')+ ) {+ event.preventDefault()+ onRowClick(row.original)+ }+ }+ : undefined+ }+ >{row.getVisibleCells().map((cell) => (<TableCellkey={cell.id}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex a458a44c2812..fcf3c34864a9 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -4956,6 +4956,12 @@ importers:'@posthog/lemon-ui':specifier: '*'version: 0.0.0([email protected]([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected])))([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected]))([email protected]([email protected]))([email protected])+ '@posthog/quill-components':+ specifier: workspace:*+ version: link:../../packages/quill/packages/components+ '@posthog/quill-primitives':+ specifier: workspace:*+ version: link:../../packages/quill/packages/primitives'@storybook/react':specifier: 'catalog:'version: 10.4.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])([email protected](@testing-library/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected])diff --git a/products/wizard/backend/facade/contracts.py b/products/wizard/backend/facade/contracts.pyindex 8da93e5ac6ef..d55512f39196 100644--- a/products/wizard/backend/facade/contracts.py+++ b/products/wizard/backend/facade/contracts.py@@ -144,6 +144,14 @@ class WizardRunCreationResult:created: bool+@frozen+class WizardRunCreatorDTO:+ id: int+ first_name: str+ last_name: str+ email: str++@frozenclass WizardRunDTO:id: UUID@@ -161,6 +169,7 @@ class WizardRunDTO:started_at: datetime | Nonefinished_at: datetime | Nonedeadline_at: datetime | None+ created_by: WizardRunCreatorDTO | None = None@frozendiff --git a/products/wizard/backend/logic/runs/mappers.py b/products/wizard/backend/logic/runs/mappers.pyindex debcc73e15cd..88ded36b1eba 100644--- a/products/wizard/backend/logic/runs/mappers.py+++ b/products/wizard/backend/logic/runs/mappers.py@@ -1,6 +1,7 @@from products.wizard.backend.facade.contracts import (GitRepositoryWorkspace,LocalFolderWorkspace,+ WizardRunCreatorDTO,WizardRunDTO,WizardWorkspace,)@@ -32,6 +33,8 @@ def record_to_workspace(workspace_type: str, metadata: object) -> WizardWorkspacdef record_to_run(run: WizardRun) -> WizardRunDTO:+ creator = run.created_by+return WizardRunDTO(id=run.id,team_id=run.team_id,@@ -48,4 +51,14 @@ def record_to_run(run: WizardRun) -> WizardRunDTO:started_at=run.started_at,finished_at=run.finished_at,deadline_at=run.deadline_at,+ created_by=(+ WizardRunCreatorDTO(+ id=creator.id,+ first_name=creator.first_name,+ last_name=creator.last_name,+ email=creator.email,+ )+ if creator is not None+ else None+ ),)diff --git a/products/wizard/backend/logic/runs/store.py b/products/wizard/backend/logic/runs/store.pyindex eeb9086ef1aa..ac8c2edb1d0f 100644--- a/products/wizard/backend/logic/runs/store.py+++ b/products/wizard/backend/logic/runs/store.py@@ -37,7 +37,7 @@ logger = logging.getLogger(__name__)def _get_run_record(team_id: int, run_id: UUID) -> WizardRun:- run = WizardRun.objects.for_team(team_id).filter(id=run_id).first()+ run = WizardRun.objects.for_team(team_id).select_related("created_by").filter(id=run_id).first()if run is None:raise WizardRunNotFoundError@@ -175,7 +175,7 @@ def get_run_for_update(team_id: int, run_id: UUID) -> WizardRunDTO:def list_runs(params: ListWizardRunsInput) -> WizardRunPage:- runs = WizardRun.objects.for_team(params.team_id).order_by("-created_at")+ runs = WizardRun.objects.for_team(params.team_id).select_related("created_by").order_by("-created_at")page = runs[params.offset : params.offset + params.limit]results: list[WizardRunDTO] = []for run in page:diff --git a/products/wizard/backend/presentation/runs/serializers.py b/products/wizard/backend/presentation/runs/serializers.pyindex 6ac306c590f0..6a75315dd756 100644--- a/products/wizard/backend/presentation/runs/serializers.py+++ b/products/wizard/backend/presentation/runs/serializers.py@@ -195,6 +195,13 @@ class WizardRunStatusUpdateRequestSerializer(serializers.Serializer):return cast(str | None, self.validated_data.get("error_code"))+class WizardRunCreatorSerializer(serializers.Serializer):+ id = serializers.IntegerField(read_only=True, help_text="Unique ID of the user who created the Wizard run.")+ first_name = serializers.CharField(read_only=True, help_text="First name of the user who created the Wizard run.")+ last_name = serializers.CharField(read_only=True, help_text="Last name of the user who created the Wizard run.")+ email = serializers.EmailField(read_only=True, help_text="Email address of the user who created the Wizard run.")++class WizardRunSerializer(serializers.Serializer):id = serializers.UUIDField(read_only=True, help_text="Unique ID of the Wizard run.")team_id = serializers.IntegerField(read_only=True, help_text="Project that owns the Wizard run.")@@ -203,6 +210,11 @@ class WizardRunSerializer(serializers.Serializer):allow_null=True,help_text="User who created the Wizard run, or null if that user no longer exists.",)+ created_by = WizardRunCreatorSerializer(+ read_only=True,+ allow_null=True,+ help_text="User who created the Wizard run, or null if that user no longer exists.",+ )environment = serializers.ChoiceField(read_only=True,choices=[environment.value for environment in WizardRunEnvironment],diff --git a/products/wizard/backend/tests/runs/test_presentation.py b/products/wizard/backend/tests/runs/test_presentation.pyindex 4be0046e889d..74beaf2fdffc 100644--- a/products/wizard/backend/tests/runs/test_presentation.py+++ b/products/wizard/backend/tests/runs/test_presentation.py@@ -69,6 +69,12 @@ class TestWizardRunViewSet(APIBaseTest):"id": response.json()["id"],"team_id": self.team.id,"created_by_id": self.user.id,+ "created_by": {+ "id": self.user.id,+ "first_name": self.user.first_name,+ "last_name": self.user.last_name,+ "email": self.user.email,+ },"environment": "local","workspace": {"type": "local_folder", "project_name": "example-project"},"program": {diff --git a/products/wizard/frontend/WizardRunsScene.tsx b/products/wizard/frontend/WizardRunsScene.tsxindex 7d9700a9d224..53a644d976db 100644--- a/products/wizard/frontend/WizardRunsScene.tsx+++ b/products/wizard/frontend/WizardRunsScene.tsx@@ -1,7 +1,20 @@import { useActions, useValues } from 'kea'import { IconBook, IconRefresh, IconSearch, IconSparkles } from '@posthog/icons'-import { LemonButton, LemonInput, LemonSelect } from '@posthog/lemon-ui'+import {+ Button,+ Dot,+ InputGroup,+ InputGroupAddon,+ InputGroupInput,+ Select,+ SelectContent,+ SelectGroup,+ SelectItem,+ SelectTrigger,+ SelectValue,+ Text,+} from '@posthog/quill-primitives'import { NotFound } from 'lib/components/NotFound'import { dayjs } from 'lib/dayjs'@@ -10,7 +23,6 @@ import { SceneExport } from 'scenes/sceneTypes'import { userLogic } from 'scenes/userLogic'import { SceneContent } from '~/layout/scenes/components/SceneContent'-import { SceneTitleSection } from '~/layout/scenes/components/SceneTitleSection'import { WizardLibraryModal } from './library/WizardLibraryModal'import { WizardRunDetailsDrawer } from './runs/WizardRunDetailsDrawer'@@ -56,7 +68,6 @@ export function WizardRunsScene(): JSX.Element {registryFailed,registryInitialLoading,repository,- requiredPrograms,selectedProgram,selectedProgramCommand,wizardCloudRunAvailable,@@ -64,7 +75,6 @@ export function WizardRunsScene(): JSX.Element {const {closeLibrary,copyCommand,- markCommandCopied,createRun,openLibrary,runAgain,@@ -86,7 +96,6 @@ export function WizardRunsScene(): JSX.Element {selectedRunArtifactsInitialLoading,selectedRunDiffArtifactId,selectedRunDiffContent,- selectedRunId,} = useValues(wizardRunDetailsLogic)const { cancelRun, closeRunDiff, copyRunId, openRunDiff, refreshSelectedRun, selectRun } =useActions(wizardRunDetailsLogic)@@ -97,76 +106,99 @@ export function WizardRunsScene(): JSX.Element {return (<SceneContent>- <SceneTitleSection- name="Wizard"- description="Run the setup agent in the cloud, then review the changes it produces."- descriptionAlwaysVisible- hideProductSetupButton- resourceType={{ type: 'default_icon_type', forceIcon: <IconSparkles className="text-ai" /> }}- actions={- <LemonButton- type="primary"- icon={<IconBook />}+ <div className="flex flex-col gap-2">+ <div className="flex flex-wrap items-center justify-between gap-3">+ <div className="flex h-8 items-center gap-2">+ <span className="flex h-8 items-center" aria-hidden>+ <IconSparkles className="-translate-y-1 text-ai" />+ </span>+ <Text render={<h1 />} size="lg" weight="semibold" className="flex h-8 items-center">+ Wizard+ </Text>+ </div>+ <Button+ variant="primary"+ size="lg"onClick={() => openLibrary()}- disabledReason={- wizardCloudRunAvailable ? undefined : 'Cloud runs are not available on this instance.'- }+ disabled={!wizardCloudRunAvailable}>+ <IconBook />Open Wizard Library- </LemonButton>- }- />+ </Button>+ </div>+ <Text size="sm">Run the setup agent in the cloud, then review the changes it produces.</Text>+ </div><div className="mb-4 flex flex-wrap items-center gap-2">- <LemonInput- value={search}- onChange={setSearch}- prefix={<IconSearch />}- placeholder="Search Wizard runs"- className="w-[280px]"- />+ <InputGroup className="w-[280px]">+ <InputGroupInput+ value={search}+ onChange={(event) => setSearch(event.target.value)}+ placeholder="Search Wizard runs"+ />+ <InputGroupAddon align="inline-start">+ <IconSearch />+ </InputGroupAddon>+ </InputGroup><div className="flex-1" />{!runsInitialLoading && !runsFailed && filteredRuns.length > 0 && runsLastLoadedAt && (- <span className="flex items-center gap-1 whitespace-nowrap text-xs text-success">- <span className="size-2 rounded-full bg-success" />+ <Text+ size="xs"+ className="flex h-8 translate-y-1 items-center gap-1 whitespace-nowrap text-success-foreground leading-[1.625]"+ >+ <Dot />Updated {dayjs(runsLastLoadedAt).fromNow()}- </span>+ </Text>)}- <LemonSelect- className="min-w-40"- value={environment}- onChange={setEnvironment}- options={[- { value: 'all', label: 'All environments' },- { value: 'cloud', label: 'Cloud' },- { value: 'local', label: 'Local' },- ]}- />- <LemonSelect- className="min-w-36"- value={status}- onChange={setStatus}- options={[- { value: 'all', label: 'All statuses' },- { value: 'created', label: 'Starting' },- { value: 'running', label: 'Running' },- { value: 'completed', label: 'Completed' },- { value: 'failed', label: 'Failed' },- { value: 'cancelled', label: 'Canceled' },- ]}- />- <LemonButton icon={<IconRefresh />} onClick={refreshRuns} loading={refreshingRuns}>+ <Select value={environment} onValueChange={(value) => value && setEnvironment(value)}>+ <SelectTrigger className="!h-8 min-w-40" aria-label="Environment">+ <SelectValue>+ {environment === 'all' ? 'All environments' : environment === 'cloud' ? 'Cloud' : 'Local'}+ </SelectValue>+ </SelectTrigger>+ <SelectContent>+ <SelectGroup>+ <SelectItem value="all">All environments</SelectItem>+ <SelectItem value="cloud">Cloud</SelectItem>+ <SelectItem value="local">Local</SelectItem>+ </SelectGroup>+ </SelectContent>+ </Select>+ <Select value={status} onValueChange={(value) => value && setStatus(value)}>+ <SelectTrigger className="!h-8 min-w-36" aria-label="Status">+ <SelectValue>+ {status === 'all'+ ? 'All statuses'+ : status === 'created'+ ? 'Starting'+ : status === 'cancelled'+ ? 'Canceled'+ : status[0].toUpperCase() + status.slice(1)}+ </SelectValue>+ </SelectTrigger>+ <SelectContent>+ <SelectGroup>+ <SelectItem value="all">All statuses</SelectItem>+ <SelectItem value="created">Starting</SelectItem>+ <SelectItem value="running">Running</SelectItem>+ <SelectItem value="completed">Completed</SelectItem>+ <SelectItem value="failed">Failed</SelectItem>+ <SelectItem value="cancelled">Canceled</SelectItem>+ </SelectGroup>+ </SelectContent>+ </Select>+ <Button variant="outline" size="lg" onClick={refreshRuns} loading={refreshingRuns}>+ <IconRefresh />Refresh- </LemonButton>+ </Button></div><WizardRunTableruns={filteredRuns}totalRuns={runs.length}- selectedRunId={selectedRunId}currentUserId={user?.id ?? null}loading={runsInitialLoading}failed={runsFailed}@@ -188,7 +220,6 @@ export function WizardRunsScene(): JSX.Element {loading={registryInitialLoading}failed={registryFailed}selectedProgram={selectedProgram}- requiredPrograms={requiredPrograms}search={librarySearch}command={selectedProgramCommand}environment={libraryEnvironment}@@ -208,7 +239,6 @@ export function WizardRunsScene(): JSX.Element {onRepositoryChange={setRepository}onCreate={createRun}onCopyCommand={copyCommand}- onCommandCopied={markCommandCopied}/><WizardRunDetailsDrawerdiff --git a/products/wizard/frontend/generated/api.schemas.ts b/products/wizard/frontend/generated/api.schemas.tsindex 2374b8301903..64be35f6b4b4 100644--- a/products/wizard/frontend/generated/api.schemas.ts+++ b/products/wizard/frontend/generated/api.schemas.ts@@ -46,6 +46,17 @@ export interface PaginatedWizardProgramListApi {results: WizardProgramApi[]}+export interface WizardRunCreatorApi {+ /** Unique ID of the user who created the Wizard run. */+ readonly id: number+ /** First name of the user who created the Wizard run. */+ readonly first_name: string+ /** Last name of the user who created the Wizard run. */+ readonly last_name: string+ /** Email address of the user who created the Wizard run. */+ readonly email: string+}+/*** Selects a folder on the user's machine as the workspace.*/@@ -131,6 +142,8 @@ export interface WizardRunApi {* @nullable*/readonly created_by_id: number | null+ /** User who created the Wizard run, or null if that user no longer exists. */+ readonly created_by: WizardRunCreatorApi | null/** Where the setup agent runs.** * `local` - localdiff --git a/products/wizard/frontend/library/WizardCommand.tsx b/products/wizard/frontend/library/WizardCommand.tsxindex 4d079f951a10..7e1327500e9c 100644--- a/products/wizard/frontend/library/WizardCommand.tsx+++ b/products/wizard/frontend/library/WizardCommand.tsx@@ -1,40 +1,42 @@import { IconCheck } from '@posthog/icons'-import { LemonButton } from '@posthog/lemon-ui'--import { CodeSnippet, Language } from 'lib/components/CodeSnippet/CodeSnippet'+import { Button, Card, CardContent, CardHeader, Text } from '@posthog/quill-primitives'export function WizardCommand({command,showCopyButton,copied,onCopy,- onCopied,}: {command: stringshowCopyButton: booleancopied: booleanonCopy: () => void- onCopied: () => void}): JSX.Element {return (- <div className="space-y-2">- <CodeSnippet- language={Language.Text}- thing="Wizard command"- onCopy={onCopied}- className="[&_.CodeSnippet__actions]:!bg-gray-900 [&_.CodeSnippet__actions_.LemonButton]:!border-0 [&_.CodeSnippet__actions_.LemonButton]:!bg-transparent [&_.CodeSnippet__actions_.LemonButton]:!shadow-none [&_.LemonButton]:![--lemon-button-color:#fff] [&_code]:!font-normal [&_code]:!text-gray-100 [&_pre]:!border-gray-900 [&_pre]:!bg-gray-900 [&_pre]:!px-4 [&_pre]:!py-4"- >- {command}- </CodeSnippet>+ <div className="flex flex-col gap-2">+ <Card className="bg-muted">+ {!showCopyButton && (+ <CardHeader className="justify-end">+ <Button size="sm" variant="outline" onClick={onCopy}>+ Copy command+ </Button>+ </CardHeader>+ )}+ <CardContent>+ <code className="block overflow-x-auto whitespace-pre-wrap break-words font-mono text-xs">+ {command}+ </code>+ </CardContent>+ </Card>{showCopyButton && (- <LemonButton type="secondary" onClick={onCopy}>+ <Button variant="outline" onClick={onCopy}>Copy command- </LemonButton>+ </Button>)}{copied && (- <div className="flex items-center gap-1 text-sm font-medium text-success">+ <Text size="sm" className="flex items-center gap-1 text-success-foreground"><IconCheck /> Command copied.- </div>+ </Text>)}</div>)diff --git a/products/wizard/frontend/library/WizardLibraryModal.tsx b/products/wizard/frontend/library/WizardLibraryModal.tsxindex 6b22021291c7..7b627c850de0 100644--- a/products/wizard/frontend/library/WizardLibraryModal.tsx+++ b/products/wizard/frontend/library/WizardLibraryModal.tsx@@ -1,4 +1,11 @@-import { LemonModal } from '@posthog/lemon-ui'+import {+ Dialog,+ DialogBody,+ DialogContent,+ DialogDescription,+ DialogHeader,+ DialogTitle,+} from '@posthog/quill-primitives'import type { RunEnvironmentEnumApi, WizardProgramApi } from '../generated/api.schemas'import { WizardProgramDetails } from './WizardProgramDetails'@@ -10,7 +17,6 @@ export function WizardLibraryModal({loading,failed,selectedProgram,- requiredPrograms,search,command,environment,@@ -30,14 +36,12 @@ export function WizardLibraryModal({onRepositoryChange,onCreate,onCopyCommand,- onCommandCopied,}: {isOpen: booleanfilteredPrograms: WizardProgramApi[]loading: booleanfailed: booleanselectedProgram: WizardProgramApi | null- requiredPrograms: WizardProgramApi[]search: stringcommand: stringenvironment: RunEnvironmentEnumApi@@ -57,50 +61,49 @@ export function WizardLibraryModal({onRepositoryChange: (repository: string) => voidonCreate: () => voidonCopyCommand: () => void- onCommandCopied: () => void}): JSX.Element {return (- <LemonModal- isOpen={isOpen}- onClose={onClose}- title="Wizard Library"- description="Choose what you want the setup agent to do."- width={1000}- maxWidth="95vw"- >- <div className="@container">- <div className="flex h-[min(680px,75vh)] min-h-0 flex-col gap-5 @3xl:flex-row">- <WizardProgramList- programs={filteredPrograms}- selectedProgram={selectedProgram}- search={search}- loading={loading}- failed={failed}- onSearch={onSearch}- onSelect={onSelect}- />- <WizardProgramDetails- program={selectedProgram}- requiredPrograms={requiredPrograms}- command={command}- environment={environment}- repository={repository}- githubIntegrationId={githubIntegrationId}- githubConnected={githubConnected}- githubIntegrationLoading={githubIntegrationLoading}- connectGitHubUrl={connectGitHubUrl}- creating={creating}- createError={createError}- commandCopied={commandCopied}- selectionInvalidated={selectionInvalidated}- onEnvironmentChange={onEnvironmentChange}- onRepositoryChange={onRepositoryChange}- onCreate={onCreate}- onCopyCommand={onCopyCommand}- onCommandCopied={onCommandCopied}- />- </div>- </div>- </LemonModal>+ <Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>+ <DialogContent size="wide" className="max-w-[1000px]">+ <DialogHeader>+ <DialogTitle>Wizard Library</DialogTitle>+ <DialogDescription>Choose what you want the setup agent to do.</DialogDescription>+ </DialogHeader>+ <DialogBody viewportClassName="p-0">+ <div className="@container">+ <div className="flex h-[min(680px,78vh)] min-h-0 flex-col @3xl:flex-row">+ <WizardProgramList+ programs={filteredPrograms}+ selectedProgram={selectedProgram}+ search={search}+ loading={loading}+ failed={failed}+ onSearch={onSearch}+ onSelect={onSelect}+ />+ <WizardProgramDetails+ loading={loading}+ program={selectedProgram}+ command={command}+ environment={environment}+ repository={repository}+ githubIntegrationId={githubIntegrationId}+ githubConnected={githubConnected}+ githubIntegrationLoading={githubIntegrationLoading}+ connectGitHubUrl={connectGitHubUrl}+ creating={creating}+ createError={createError}+ commandCopied={commandCopied}+ selectionInvalidated={selectionInvalidated}+ onEnvironmentChange={onEnvironmentChange}+ onRepositoryChange={onRepositoryChange}+ onCreate={onCreate}+ onCopyCommand={onCopyCommand}+ />+ </div>+ </div>+ </DialogBody>+ </DialogContent>+ </Dialog>)}diff --git a/products/wizard/frontend/library/WizardProgramDetails.tsx b/products/wizard/frontend/library/WizardProgramDetails.tsxindex 410b93b9c101..8f2bd6004920 100644--- a/products/wizard/frontend/library/WizardProgramDetails.tsx+++ b/products/wizard/frontend/library/WizardProgramDetails.tsx@@ -1,5 +1,23 @@import { IconCloud, IconGithub, IconLaptop } from '@posthog/icons'-import { LemonBanner, LemonButton, LemonDivider, LemonTabs, LemonTag } from '@posthog/lemon-ui'+import {+ Badge,+ Button,+ Field,+ FieldDescription,+ FieldLabel,+ Item,+ ItemContent,+ ItemDescription,+ ItemTitle,+ Separator,+ Skeleton,+ Tabs,+ TabsList,+ TabsTrigger,+ Text,+} from '@posthog/quill-primitives'++import { LinkPrimitive } from 'lib/lemon-ui/Link'import type { RunEnvironmentEnumApi, WizardProgramApi } from '../generated/api.schemas'import { WIZARD_LOCAL_RUNS_VISIBLE } from '../wizardRunDisplay'@@ -7,8 +25,8 @@ import { WizardCommand } from './WizardCommand'import { WizardRepositoryPicker } from './WizardRepositoryPicker'export function WizardProgramDetails({+ loading,program,- requiredPrograms,command,environment,repository,@@ -24,10 +42,9 @@ export function WizardProgramDetails({onRepositoryChange,onCreate,onCopyCommand,- onCommandCopied,}: {+ loading: booleanprogram: WizardProgramApi | null- requiredPrograms: WizardProgramApi[]command: stringenvironment: RunEnvironmentEnumApirepository: string@@ -43,100 +60,123 @@ export function WizardProgramDetails({onRepositoryChange: (repository: string) => voidonCreate: () => voidonCopyCommand: () => void- onCommandCopied: () => void}): JSX.Element {+ if (loading) {+ return (+ <div+ className="flex min-h-0 flex-1 flex-col gap-5 overflow-hidden p-5 @3xl:p-6"+ aria-label="Loading program details"+ >+ <div className="flex flex-col gap-2">+ <Skeleton className="h-5 w-48" />+ <Skeleton className="h-4 w-72 max-w-full" />+ </div>+ <div className="flex flex-col gap-2">+ <Skeleton className="h-4 w-36" />+ <Skeleton className="h-4 w-44" />+ </div>+ <Separator />+ <Skeleton className="h-8 w-44" />+ <div className="flex flex-col gap-2">+ <Skeleton className="h-4 w-28" />+ <Skeleton className="h-8 w-full" />+ <Skeleton className="h-4 w-80 max-w-full" />+ </div>+ <Skeleton className="h-8 w-32" />+ </div>+ )+ }+if (selectionInvalidated) {return (- <LemonBanner type="warning">- <div className="font-semibold">This program is no longer available.</div>- <div className="text-sm">Refresh the Library and choose another program.</div>- </LemonBanner>+ <Item tone="warning" variant="outline">+ <ItemContent>+ <ItemTitle>This program is no longer available</ItemTitle>+ <ItemDescription>Refresh the Library and choose another program.</ItemDescription>+ </ItemContent>+ </Item>)}if (!program) {- return <div className="flex h-full items-center justify-center text-sm text-muted">Select a program.</div>+ return (+ <Text className="flex h-full items-center justify-center" size="sm" variant="muted">+ Select a program.+ </Text>+ )}const supportsCloud = program.supported_environments.includes('cloud')const supportsLocal = program.supported_environments.includes('local')return (- <div className="flex min-h-0 flex-1 flex-col overflow-y-auto px-1 @3xl:pl-3">- <div>- <h3 className="mb-1 text-xl">{program.name}</h3>- <p className="m-0 text-sm text-muted">{program.description}</p>+ <div className="flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto p-5 @3xl:p-6">+ <div className="flex flex-col gap-1">+ <Text render={<h3 />} size="lg" weight="semibold">+ {program.name}+ </Text>+ <Text size="sm" variant="muted">+ {program.description}+ </Text></div>- <div className="mt-3">+ <div className="flex flex-col gap-2"><div className="flex flex-wrap items-center gap-2">- <span className="text-xs font-semibold uppercase text-muted">Supported</span>+ <Text size="xs" weight="semibold" variant="muted">+ Supported+ </Text>{supportsCloud && (- <LemonTag type="info" size="small" icon={<IconCloud />}>+ <Badge variant="info">+ <IconCloud />Cloud- </LemonTag>+ </Badge>)}{WIZARD_LOCAL_RUNS_VISIBLE && supportsLocal && (- <LemonTag size="small" icon={<IconLaptop />}>+ <Badge>+ <IconLaptop />Local- </LemonTag>+ </Badge>)}</div>- <div className="mt-3 text-sm text-muted">Runs with Wizard {program.wizard_version}</div>+ <Text size="sm" variant="muted">+ Runs with Wizard {program.wizard_version}+ </Text></div>- {requiredPrograms.length > 0 && (- <div className="mt-5 rounded border border-info bg-info-highlight p-3">- <div className="text-xs font-semibold uppercase text-muted">Run first</div>- {requiredPrograms.map((requiredProgram) => (- <div key={requiredProgram.id} className="mt-1 font-semibold underline">- {requiredProgram.name}- </div>- ))}- </div>- )}-{WIZARD_LOCAL_RUNS_VISIBLE && supportsLocal && environment === 'cloud' && githubConnected && (- <div className="mt-3">- <WizardCommand- command={command}- showCopyButton={false}- copied={commandCopied}- onCopy={onCopyCommand}- onCopied={onCommandCopied}- />- </div>+ <WizardCommand command={command} showCopyButton={false} copied={commandCopied} onCopy={onCopyCommand} />)}- <LemonDivider className="my-5" />+ <Separator />- <LemonTabs- activeKey={environment}- onChange={onEnvironmentChange}- tabs={[- supportsCloud && {- key: 'cloud',- label: (- <span className="flex items-center gap-1.5">- <span>Cloud</span>- <span className="text-xs font-normal text-muted">Recommended</span>- </span>- ),- },- WIZARD_LOCAL_RUNS_VISIBLE && supportsLocal && { key: 'local', label: 'Local' },- ]}- />+ <Tabs value={environment} onValueChange={(value) => onEnvironmentChange(value as RunEnvironmentEnumApi)}>+ <TabsList variant="line">+ {supportsCloud && (+ <TabsTrigger value="cloud">+ Cloud{' '}+ <Text size="xs" variant="muted">+ Recommended+ </Text>+ </TabsTrigger>+ )}+ {WIZARD_LOCAL_RUNS_VISIBLE && supportsLocal && <TabsTrigger value="local">Local</TabsTrigger>}+ </TabsList>+ </Tabs>- <div className="mt-5">+ <div>{environment === 'cloud' ? (githubIntegrationLoading ? (- <div className="text-sm text-muted">Checking the GitHub integration…</div>+ <Text size="sm" variant="muted">+ Checking the GitHub integration…+ </Text>) : githubConnected ? (- <div className="space-y-3">- <div>- <label className="mb-1 block text-sm font-semibold">GitHub repository</label>+ <div className="flex flex-col gap-4">+ <Field>+ <FieldLabel>GitHub repository</FieldLabel>{githubIntegrationId === null ? (- <div className="text-sm text-muted">Checking the GitHub integration…</div>+ <Text size="sm" variant="muted">+ Checking the GitHub integration…+ </Text>) : (<WizardRepositoryPickerintegrationId={githubIntegrationId}@@ -145,65 +185,68 @@ export function WizardProgramDetails({disabledReason={creating ? 'A cloud run is starting.' : undefined}/>)}- <div className="mt-1 text-xs text-muted">- <IconGithub className="mr-1 inline" />+ <FieldDescription className="flex items-center gap-1">+ <IconGithub />Choose a repository available to the connected GitHub integration.- </div>- </div>+ </FieldDescription>+ </Field>- {createError && <LemonBanner type="error">{createError}</LemonBanner>}+ {createError && (+ <Item tone="destructive" variant="outline">+ {createError}+ </Item>+ )}- <LemonButton- type="primary"+ <Button+ variant="primary"+ size="lg"+ className="self-start"onClick={() => onCreate()}loading={creating}- disabledReason={repository ? undefined : 'Select a GitHub repository.'}+ disabled={!repository}>Start cloud run- </LemonButton>+ </Button></div>) : (- <div className="space-y-3">- <LemonBanner type="warning">- <div className="space-y-3">- <div className="font-semibold">- Connect GitHub to run this program in the cloud.- </div>- <div className="flex">- <LemonButton type="secondary" to={connectGitHubUrl} disableClientSideRouting>- Connect GitHub- </LemonButton>- </div>- </div>- </LemonBanner>+ <div className="flex flex-col gap-4">+ <Item tone="warning" variant="outline">+ <ItemContent>+ <ItemTitle>Connect GitHub to run this program in the cloud.</ItemTitle>+ <Button variant="outline" render={<LinkPrimitive to={connectGitHubUrl} />}>+ Connect GitHub+ </Button>+ </ItemContent>+ </Item>{WIZARD_LOCAL_RUNS_VISIBLE && (- <div>- <div className="mb-2 text-xs font-semibold uppercase text-muted">Local command</div>- <p className="text-sm">You can still run this program from your project folder.</p>+ <div className="flex flex-col gap-2">+ <Text size="xs" weight="semibold" variant="muted">+ Local command+ </Text>+ <Text size="sm">You can still run this program from your project folder.</Text><WizardCommandcommand={command}showCopyButton={false}copied={commandCopied}onCopy={onCopyCommand}- onCopied={onCommandCopied}/></div>)}</div>)) : (- <div>- <h4 className="mb-1">Run from your project folder</h4>- <p className="text-sm text-muted">Open a terminal in the project root, then run:</p>- <WizardCommand- command={command}- showCopyButton- copied={commandCopied}- onCopy={onCopyCommand}- onCopied={onCommandCopied}- />- <div className="mt-3 text-xs text-muted">Requires Node.js 22.22 or later.</div>+ <div className="flex flex-col gap-2">+ <Text render={<h4 />} size="lg" weight="semibold">+ Run from your project folder+ </Text>+ <Text size="sm" variant="muted">+ Open a terminal in the project root, then run:+ </Text>+ <WizardCommand command={command} showCopyButton copied={commandCopied} onCopy={onCopyCommand} />+ <Text size="xs" variant="muted">+ Requires Node.js 22.22 or later.+ </Text></div>)}</div>diff --git a/products/wizard/frontend/library/WizardProgramList.tsx b/products/wizard/frontend/library/WizardProgramList.tsxindex 5a186ca23b9d..74e2662ce092 100644--- a/products/wizard/frontend/library/WizardProgramList.tsx+++ b/products/wizard/frontend/library/WizardProgramList.tsx@@ -1,5 +1,20 @@import { IconSearch } from '@posthog/icons'-import { LemonButton, LemonInput, LemonSkeleton } from '@posthog/lemon-ui'+import {+ Button,+ Empty,+ EmptyDescription,+ EmptyHeader,+ EmptyTitle,+ InputGroup,+ InputGroupAddon,+ InputGroupInput,+ Item,+ ItemContent,+ ItemDescription,+ ItemGroup,+ ItemTitle,+ Skeleton,+} from '@posthog/quill-primitives'import type { WizardProgramApi } from '../generated/api.schemas'import { WIZARD_LOCAL_RUNS_VISIBLE } from '../wizardRunDisplay'@@ -22,80 +37,82 @@ export function WizardProgramList({onSelect: (program: WizardProgramApi) => void}): JSX.Element {return (- <div className="flex h-1/2 min-h-0 w-full flex-col gap-3 border-b pb-4 @3xl:h-full @3xl:w-90 @3xl:border-b-0 @3xl:border-r @3xl:pb-0 @3xl:pr-4">- <LemonInput- value={search}- onChange={onSearch}- prefix={<IconSearch />}- placeholder="Search programs"- fullWidth- disabled={loading}- />+ <div className="flex h-1/2 min-h-0 w-full flex-col gap-3 border-b p-4 @3xl:h-full @3xl:w-[340px] @3xl:shrink-0 @3xl:border-b-0 @3xl:border-r">+ <InputGroup>+ <InputGroupInput+ value={search}+ onChange={(event) => onSearch(event.target.value)}+ placeholder="Search programs"+ disabled={loading}+ />+ <InputGroupAddon align="inline-start">+ <IconSearch />+ </InputGroupAddon>+ </InputGroup><div className="min-h-0 flex-1 overflow-y-auto">{loading ? (- <div className="space-y-3 p-2">- <LemonSkeleton repeat={7} className="h-14 w-full" />+ <div className="flex flex-col gap-2">+ {Array.from({ length: 7 }).map((_, index) => (+ <Skeleton key={index} className="h-14 w-full" />+ ))}</div>) : failed ? (- <div className="p-4 text-center text-sm text-muted">- Couldn’t load the Wizard Library. Close and reopen it to try again.- </div>+ <Empty className="py-8">+ <EmptyHeader>+ <EmptyTitle>Couldn’t load the Wizard Library</EmptyTitle>+ <EmptyDescription>Close and reopen it to try again.</EmptyDescription>+ </EmptyHeader>+ </Empty>) : programs.length === 0 ? (search.trim() ? (- <div className="p-6 text-center">- <div className="font-semibold">No matching programs</div>- <p className="mt-1 text-sm text-muted">- Try a different search, or clear it to see all programs.- </p>- <div className="mt-3 flex justify-center">- <LemonButton type="secondary" size="small" onClick={() => onSearch('')}>- Clear search- </LemonButton>- </div>- </div>+ <Empty className="py-8">+ <EmptyHeader>+ <EmptyTitle>No matching programs</EmptyTitle>+ <EmptyDescription>+ Try a different search, or clear it to see all programs.+ </EmptyDescription>+ </EmptyHeader>+ <Button variant="outline" size="sm" onClick={() => onSearch('')}>+ Clear search+ </Button>+ </Empty>) : (- <div className="p-6 text-center">- <div className="font-semibold">No programs are available</div>- <p className="mt-1 text-sm text-muted">- Refresh the page, or contact support if you expected to see a program.- </p>- </div>+ <Empty className="py-8">+ <EmptyHeader>+ <EmptyTitle>No programs are available</EmptyTitle>+ <EmptyDescription>+ Refresh the page, or contact support if you expected to see a program.+ </EmptyDescription>+ </EmptyHeader>+ </Empty>)) : (- <div className="flex flex-col">+ <ItemGroup combined>{programs.map((program) => (- <LemonButton+ <Itemkey={program.id}- type="tertiary"- fullWidth- className={`h-auto justify-start !rounded-none border-l-2 px-3 py-2 text-left ${+ variant="pressable"+ className={selectedProgram?.id === program.id- ? 'border-l-accent bg-fill-highlight-100'- : 'border-l-transparent'- }`}- onClick={() => onSelect(program)}+ ? 'z-[1] border-ring bg-fill-selected shadow-none'+ : 'shadow-none'+ }+ render={<button type="button" onClick={() => onSelect(program)} />}>- <div className="w-full min-w-0">- <div className="flex items-start justify-between gap-3">- <div className="min-w-0 font-semibold">{program.name}</div>- <span className="shrink-0 whitespace-nowrap text-xs font-normal text-muted">- {program.supported_environments- .filter(- (environment) =>- WIZARD_LOCAL_RUNS_VISIBLE || environment === 'cloud'- )- .map((environment) => (environment === 'cloud' ? 'Cloud' : 'Local'))- .join(' · ')}- </span>- </div>- <div className="line-clamp-2 text-xs font-normal text-muted">- {program.description}- </div>- </div>- </LemonButton>+ <ItemContent>+ <ItemTitle>{program.name}</ItemTitle>+ <ItemDescription>{program.description}</ItemDescription>+ </ItemContent>+ <span className="shrink-0 whitespace-nowrap text-xs text-muted-foreground">+ {program.supported_environments+ .filter((environment) => WIZARD_LOCAL_RUNS_VISIBLE || environment === 'cloud')+ .map((environment) => (environment === 'cloud' ? 'Cloud' : 'Local'))+ .join(' · ')}+ </span>+ </Item>))}- </div>+ </ItemGroup>)}</div></div>diff --git a/products/wizard/frontend/runs/WizardRunActionsMenu.tsx b/products/wizard/frontend/runs/WizardRunActionsMenu.tsxindex af6aa4b16ea7..57f0f3bd74cc 100644--- a/products/wizard/frontend/runs/WizardRunActionsMenu.tsx+++ b/products/wizard/frontend/runs/WizardRunActionsMenu.tsx@@ -1,7 +1,12 @@import { IconCopy, IconEllipsis, IconListCheck, IconRefresh, IconStopFilled } from '@posthog/icons'-import { LemonButton, LemonMenu } from '@posthog/lemon-ui'--import type { LemonMenuItems } from 'lib/lemon-ui/LemonMenu'+import {+ Button,+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuSeparator,+ DropdownMenuTrigger,+} from '@posthog/quill-primitives'import type { WizardRunApi } from '../generated/api.schemas'import { wizardRunCanCancel } from '../wizardRunDisplay'@@ -25,49 +30,43 @@ export function WizardRunActionsMenu({onCopyRunId: (runId: string) => voidonCancel: (run: WizardRunApi) => void}): JSX.Element {- const items: LemonMenuItems = [- {- items: [- {- label: 'View run details',- icon: <IconListCheck />,- onClick: () => onView(run),- },- {- label: 'Refresh status',- icon: <IconRefresh />,- disabledReason: refreshing ? 'Refreshing…' : null,- onClick: () => onRefresh(run),- },- {- label: 'Copy run ID',- icon: <IconCopy />,- onClick: () => onCopyRunId(run.id),- },- ],- },- wizardRunCanCancel(run, currentUserId) && {- items: [- {- label: 'Cancel run',- icon: <IconStopFilled />,- status: 'danger',- disabledReason: cancelling ? 'Canceling…' : null,- onClick: () => onCancel(run),- },- ],- },- ]-return (- <LemonMenu items={items} placement="bottom-end" className="min-w-56">- <LemonButton- type="tertiary"- size="small"- icon={<IconEllipsis />}- aria-label={`More options for ${run.program.name}`}- onClick={(event) => event.stopPropagation()}+ <DropdownMenu>+ <DropdownMenuTrigger+ render={+ <Button+ variant="outline"+ size="icon-sm"+ aria-label={`More options for ${run.program.name}`}+ onClick={(event) => event.stopPropagation()}+ >+ <IconEllipsis />+ </Button>+ }/>- </LemonMenu>+ <DropdownMenuContent align="end" className="min-w-56">+ <DropdownMenuItem onClick={() => onView(run)}>+ <IconListCheck />+ View run details+ </DropdownMenuItem>+ <DropdownMenuItem disabled={refreshing} onClick={() => onRefresh(run)}>+ <IconRefresh />+ {refreshing ? 'Refreshing…' : 'Refresh status'}+ </DropdownMenuItem>+ <DropdownMenuItem onClick={() => onCopyRunId(run.id)}>+ <IconCopy />+ Copy run ID+ </DropdownMenuItem>+ {wizardRunCanCancel(run, currentUserId) && (+ <>+ <DropdownMenuSeparator />+ <DropdownMenuItem variant="destructive" disabled={cancelling} onClick={() => onCancel(run)}>+ <IconStopFilled />+ {cancelling ? 'Canceling…' : 'Cancel run'}+ </DropdownMenuItem>+ </>+ )}+ </DropdownMenuContent>+ </DropdownMenu>)}diff --git a/products/wizard/frontend/runs/WizardRunDetailsArtifacts.tsx b/products/wizard/frontend/runs/WizardRunDetailsArtifacts.tsxindex b3ab696680f3..74480585a0a7 100644--- a/products/wizard/frontend/runs/WizardRunDetailsArtifacts.tsx+++ b/products/wizard/frontend/runs/WizardRunDetailsArtifacts.tsx@@ -1,5 +1,17 @@import { IconArrowRight, IconExternal, IconGitBranch, IconGithub } from '@posthog/icons'-import { LemonBanner, LemonButton, LemonSkeleton } from '@posthog/lemon-ui'+import {+ Button,+ Item,+ ItemActions,+ ItemContent,+ ItemDescription,+ ItemGroup,+ ItemMedia,+ ItemTitle,+ Skeleton,+} from '@posthog/quill-primitives'++import { LinkPrimitive } from 'lib/lemon-ui/Link'import type { WizardRunApi, WizardRunArtifactApi, WizardRunGitDiffArtifactApi } from '../generated/api.schemas'import { formatArtifactSize } from '../wizardRunDisplay'@@ -21,14 +33,24 @@ export function WizardRunDetailsArtifacts({onRetry: () => void}): JSX.Element {if (loading) {- return <LemonSkeleton repeat={2} className="h-12 w-full" />+ return (+ <div className="flex flex-col gap-2">+ <Skeleton className="h-12 w-full" />+ <Skeleton className="h-12 w-full" />+ </div>+ )}if (error && artifacts.length === 0) {return (- <LemonBanner type="error" action={{ children: 'Try again', onClick: onRetry }}>- {error}- </LemonBanner>+ <Item tone="destructive" variant="outline">+ <ItemContent>+ <ItemDescription>{error}</ItemDescription>+ <Button variant="outline" size="sm" onClick={onRetry}>+ Try again+ </Button>+ </ItemContent>+ </Item>)}@@ -46,54 +68,57 @@ export function WizardRunDetailsArtifacts({const gitDiff = artifacts.find((artifact) => artifact.artifact_type === 'git_diff')return (- <div className="divide-y divide-primary overflow-hidden rounded border border-primary">+ <ItemGroup className="gap-2">{pullRequest && (- <LemonButton- type="tertiary"- fullWidth- to={pullRequest.url}- targetBlank- hideExternalLinkIcon- icon={<IconGithub />}- className="h-auto rounded-none px-3 py-3"+ <Item+ size="sm"+ variant="outline"+ className="hover:bg-fill-hover"+ render={<LinkPrimitive to={pullRequest.url} target="_blank" />}>- <span className="flex w-full min-w-0 items-center justify-between gap-3">- <span className="flex min-w-0 flex-col items-start gap-1">- <span className="font-semibold">Pull request #{pullRequest.number}</span>- <span className="flex min-w-0 items-center gap-1 text-xs text-muted">- <IconGitBranch className="shrink-0" />- <span className="truncate">{pullRequest.base_branch}</span>- <IconArrowRight className="shrink-0" />- <span className="truncate">{pullRequest.head_branch}</span>- </span>- </span>- <span className="flex shrink-0 items-center gap-2">- {gitDiff && (- <WizardRunDiffStats additions={gitDiff.additions} removals={gitDiff.removals} />- )}- <IconExternal className="size-4 text-muted" />- </span>- </span>- </LemonButton>+ <ItemMedia>+ <IconGithub />+ </ItemMedia>+ <ItemContent>+ <ItemTitle className="text-foreground">Pull request #{pullRequest.number}</ItemTitle>+ <ItemDescription className="flex min-w-0 items-center gap-1">+ <IconGitBranch className="shrink-0" />+ <span className="truncate">{pullRequest.base_branch}</span>+ <IconArrowRight className="shrink-0" />+ <span className="truncate">{pullRequest.head_branch}</span>+ </ItemDescription>+ </ItemContent>+ <ItemActions>+ <IconExternal className="size-4 shrink-0 text-muted" />+ </ItemActions>+ </Item>)}{gitDiff && (- <LemonButton- type="tertiary"- fullWidth- icon={<IconGitBranch />}- onClick={() => onOpenDiff(gitDiff)}- data-attr="wizard-run-open-git-diff"- className="h-auto rounded-none px-3 py-3"+ <Item+ size="sm"+ variant="outline"+ className="hover:bg-fill-hover"+ render={+ <button+ type="button"+ onClick={() => onOpenDiff(gitDiff)}+ data-attr="wizard-run-open-git-diff"+ />+ }>- <span className="flex w-full min-w-0 items-center justify-between gap-3">- <span className="flex min-w-0 flex-col items-start gap-1">- <span className="font-semibold">Git diff</span>- <span className="text-xs text-muted">{formatArtifactSize(gitDiff.size_bytes)}</span>- </span>+ <ItemMedia>+ <IconGitBranch />+ </ItemMedia>+ <ItemContent>+ <ItemTitle className="text-foreground">Git diff</ItemTitle>+ <ItemDescription>{formatArtifactSize(gitDiff.size_bytes)}</ItemDescription>+ </ItemContent>+ <ItemActions><WizardRunDiffStats additions={gitDiff.additions} removals={gitDiff.removals} />- </span>- </LemonButton>+ <IconArrowRight className="size-4 shrink-0 text-muted" />+ </ItemActions>+ </Item>)}- </div>+ </ItemGroup>)}diff --git a/products/wizard/frontend/runs/WizardRunDetailsDrawer.tsx b/products/wizard/frontend/runs/WizardRunDetailsDrawer.tsxindex db78ae3e0d4e..9fce94dd5d65 100644--- a/products/wizard/frontend/runs/WizardRunDetailsDrawer.tsx+++ b/products/wizard/frontend/runs/WizardRunDetailsDrawer.tsx@@ -1,10 +1,23 @@import { Suspense } from 'react'import { IconArrowLeft, IconCopy, IconFolder, IconGithub, IconRefresh, IconStopFilled } from '@posthog/icons'-import { LemonBanner, LemonButton, LemonDrawer, LemonSkeleton } from '@posthog/lemon-ui'+import {+ Button,+ Dialog,+ DialogBody,+ DialogContent,+ DialogFooter,+ DialogHeader,+ DialogTitle,+ Item,+ ItemContent,+ ItemDescription,+ Skeleton,+} from '@posthog/quill-primitives'import { CopyToClipboardInline } from 'lib/components/CopyToClipboard'import { TZLabel } from 'lib/components/TZLabel'+import { LinkPrimitive } from 'lib/lemon-ui/Link'import { lazyWithRetry } from 'lib/utils/retryImport'import type { WizardRunApi, WizardRunArtifactApi, WizardRunGitDiffArtifactApi } from '../generated/api.schemas'@@ -23,12 +36,41 @@ import { WizardRunEnvironmentTag } from './WizardRunEnvironmentTag'import { WizardRunProgress } from './WizardRunProgress'import { WizardRunStatusTag } from './WizardRunStatusTag'-// The diff renderer pulls in @pierre/diffs and Shiki, so load it only when a user opens a diff-// instead of shipping it in the runs scene chunk.const WizardRunDiffViewer = lazyWithRetry(() =>import('./WizardRunDiffViewer').then((module) => ({ default: module.WizardRunDiffViewer })))+function LoadingRows(): JSX.Element {+ return (+ <div className="flex flex-col gap-2">+ {Array.from({ length: 8 }, (_, index) => (+ <Skeleton key={index} className="h-6 w-full" />+ ))}+ </div>+ )+}++function RetryItem({+ children,+ onRetry,+ tone = 'destructive',+}: {+ children: string+ onRetry: () => void+ tone?: 'warning' | 'destructive'+}): JSX.Element {+ return (+ <Item tone={tone} variant="outline">+ <ItemContent>+ <ItemDescription>{children}</ItemDescription>+ <Button variant="outline" size="sm" onClick={onRetry}>+ Try again+ </Button>+ </ItemContent>+ </Item>+ )+}+export function WizardRunDetailsDrawer({run,artifacts,@@ -75,204 +117,195 @@ export function WizardRunDetailsDrawer({const selectedDiff = gitDiff?.id === diffArtifactId ? gitDiff : nullreturn (- <LemonDrawer- isOpen={!!run}- onClose={onClose}- width={selectedDiff ? 960 : 460}- overlayTransparent- title={- run ? (- <div className="flex w-full items-center justify-between gap-2 pr-8">- <span>{run.program.name}</span>- <WizardRunStatusTag status={run.status} />- </div>- ) : (- 'Wizard run'- )- }- footer={- run ? (- <div className="flex w-full items-center justify-between gap-2">- <LemonButton icon={<IconCopy />} onClick={() => onCopyRunId(run.id)}>- Copy run ID- </LemonButton>+ <Dialog open={!!run} onOpenChange={(open) => !open && onClose()}>+ <DialogContent size={selectedDiff ? 'wide' : undefined} className={selectedDiff ? 'max-w-6xl' : 'max-w-xl'}>+ <DialogHeader className="pr-8">+ <DialogTitle className="flex items-center justify-between gap-2">+ <span>{run?.program.name ?? 'Wizard run'}</span>+ {run && <WizardRunStatusTag status={run.status} />}+ </DialogTitle>+ </DialogHeader>- {pullRequest ? (- <LemonButton type="primary" to={pullRequest.url} targetBlank>- Open pull request- </LemonButton>- ) : wizardRunCanCancel(run, currentUserId) ? (- <LemonButton- status="danger"- icon={<IconStopFilled />}- onClick={() => onCancel(run)}- loading={cancelling}- >- Cancel run- </LemonButton>- ) : run.status === 'failed' && (WIZARD_LOCAL_RUNS_VISIBLE || run.environment === 'cloud') ? (- <LemonButton type="primary" onClick={() => onRunAgain(run)}>- Run again- </LemonButton>- ) : null}- </div>- ) : null- }- >- {run && selectedDiff ? (- <div className="flex min-w-0 flex-col gap-4">- <div className="flex flex-wrap items-center justify-between gap-3">- <LemonButton- icon={<IconArrowLeft />}- onClick={onCloseDiff}- data-attr="wizard-run-close-git-diff"- >- Run details- </LemonButton>- <WizardRunDiffStats additions={selectedDiff.additions} removals={selectedDiff.removals} />- </div>- <Suspense fallback={<LemonSkeleton repeat={8} className="h-6 w-full" />}>- {!wizardRunDiffCanRender(selectedDiff.size_bytes) ? (- <WizardRunDiffViewer- diff=""- contentHash={selectedDiff.content_hash}- sizeBytes={selectedDiff.size_bytes}- pullRequestUrl={pullRequest?.url ?? null}- />- ) : diffLoading ? (- <LemonSkeleton repeat={8} className="h-6 w-full" />- ) : diffError ? (- <LemonBanner- type="error"- action={{ children: 'Try again', onClick: () => onOpenDiff(selectedDiff) }}- >- {diffError}- </LemonBanner>- ) : diffContent !== null ? (- <WizardRunDiffViewer- diff={diffContent}- contentHash={selectedDiff.content_hash}- sizeBytes={selectedDiff.size_bytes}- pullRequestUrl={pullRequest?.url ?? null}- />- ) : (- <LemonBanner- type="error"- action={{ children: 'Try again', onClick: () => onOpenDiff(selectedDiff) }}- >- Couldn't load this diff. Try again.- </LemonBanner>- )}- </Suspense>- </div>- ) : run ? (- <div className="space-y-5">- <dl className="space-y-3 text-sm">- <div className="grid grid-cols-[120px_1fr] items-center gap-3">- <dt className="text-xs font-semibold uppercase text-muted">Workspace</dt>- <dd className="m-0 min-w-0">- {run.workspace.type === 'git_repository' ? (- <LemonButton- size="small"- type="tertiary"- icon={<IconGithub />}- to={wizardGithubRepositoryUrl(run.workspace.repository)}- targetBlank- className="w-fit max-w-full"- >- {run.workspace.repository}- </LemonButton>- ) : (- <span className="inline-flex items-center gap-1 px-2 py-1 text-sm font-medium">- <IconFolder />- {wizardWorkspaceLabel(run)}- </span>- )}- </dd>- </div>- <div className="grid grid-cols-[120px_1fr] items-center gap-3">- <dt className="text-xs font-semibold uppercase text-muted">Environment</dt>- <dd className="m-0">- <WizardRunEnvironmentTag environment={run.environment} />- </dd>- </div>- <div className="grid grid-cols-[120px_1fr] items-center gap-3">- <dt className="text-xs font-semibold uppercase text-muted">Started</dt>- <dd className="m-0">- {run.started_at ? (- <TZLabel time={run.started_at} />- ) : (- <span className="text-muted">Not started</span>- )}- </dd>- </div>- <div className="grid grid-cols-[120px_1fr] items-center gap-3">- <dt className="text-xs font-semibold uppercase text-muted">Run ID</dt>- <dd className="m-0 font-mono text-xs">- <CopyToClipboardInline- explicitValue={run.id}- >{`${run.id.slice(0, 8)}…`}</CopyToClipboardInline>- </dd>- </div>- </dl>+ {run && (+ <>+ <DialogBody>+ {selectedDiff ? (+ <div className="flex min-w-0 flex-col gap-4">+ <div className="flex flex-wrap items-center justify-between gap-3">+ <Button+ variant="outline"+ onClick={onCloseDiff}+ data-attr="wizard-run-close-git-diff"+ >+ <IconArrowLeft />+ Run details+ </Button>+ <WizardRunDiffStats+ additions={selectedDiff.additions}+ removals={selectedDiff.removals}+ />+ </div>+ <Suspense fallback={<LoadingRows />}>+ {!wizardRunDiffCanRender(selectedDiff.size_bytes) ? (+ <WizardRunDiffViewer+ diff=""+ contentHash={selectedDiff.content_hash}+ sizeBytes={selectedDiff.size_bytes}+ pullRequestUrl={pullRequest?.url ?? null}+ />+ ) : diffLoading ? (+ <LoadingRows />+ ) : diffError ? (+ <RetryItem onRetry={() => onOpenDiff(selectedDiff)}>{diffError}</RetryItem>+ ) : diffContent !== null ? (+ <WizardRunDiffViewer+ diff={diffContent}+ contentHash={selectedDiff.content_hash}+ sizeBytes={selectedDiff.size_bytes}+ pullRequestUrl={pullRequest?.url ?? null}+ />+ ) : (+ <RetryItem onRetry={() => onOpenDiff(selectedDiff)}>+ Couldn't load this diff. Try again.+ </RetryItem>+ )}+ </Suspense>+ </div>+ ) : (+ <div className="space-y-5">+ <dl className="space-y-3 text-sm">+ <div className="grid grid-cols-[120px_1fr] items-center gap-3">+ <dt className="text-xs font-semibold uppercase text-muted">Workspace</dt>+ <dd className="m-0 min-w-0">+ {run.workspace.type === 'git_repository' ? (+ <Button+ size="sm"+ variant="link"+ render={+ <LinkPrimitive+ to={wizardGithubRepositoryUrl(run.workspace.repository)}+ target="_blank"+ />+ }+ className="w-fit max-w-full"+ >+ <IconGithub />+ {run.workspace.repository}+ </Button>+ ) : (+ <span className="inline-flex items-center gap-1 px-2 py-1 text-sm font-medium">+ <IconFolder />+ {wizardWorkspaceLabel(run)}+ </span>+ )}+ </dd>+ </div>+ <div className="grid grid-cols-[120px_1fr] items-center gap-3">+ <dt className="text-xs font-semibold uppercase text-muted">Environment</dt>+ <dd className="m-0">+ <WizardRunEnvironmentTag environment={run.environment} />+ </dd>+ </div>+ <div className="grid grid-cols-[120px_1fr] items-center gap-3">+ <dt className="text-xs font-semibold uppercase text-muted">Started</dt>+ <dd className="m-0">+ {run.started_at ? (+ <TZLabel time={run.started_at} />+ ) : (+ <span className="text-muted">Not started</span>+ )}+ </dd>+ </div>+ <div className="grid grid-cols-[120px_1fr] items-center gap-3">+ <dt className="text-xs font-semibold uppercase text-muted">Run ID</dt>+ <dd className="m-0 font-mono text-xs">+ <CopyToClipboardInline+ explicitValue={run.id}+ >{`${run.id.slice(0, 8)}…`}</CopyToClipboardInline>+ </dd>+ </div>+ </dl>- <section>- <div className="mb-3 flex items-center justify-between">- <h4 className="m-0">Artifacts</h4>- {wizardRunIsActive(run) && <span className="text-xs text-muted">Pending</span>}- </div>- {detailsError && (- <LemonBanner- type="warning"- className="mb-3"- action={{ children: 'Try again', onClick: onRefresh }}- >- {detailsError}- </LemonBanner>- )}- <WizardRunDetailsArtifacts- run={run}- artifacts={artifacts}- error={artifactsError}- loading={artifactsLoading}- onOpenDiff={onOpenDiff}- onRetry={onRefresh}- />- </section>+ <section>+ <div className="mb-3 flex items-center justify-between">+ <h4 className="m-0">Artifacts</h4>+ {wizardRunIsActive(run) && (+ <span className="text-xs text-muted">Pending</span>+ )}+ </div>+ {detailsError && (+ <div className="mb-3">+ <RetryItem tone="warning" onRetry={onRefresh}>+ {detailsError}+ </RetryItem>+ </div>+ )}+ <WizardRunDetailsArtifacts+ run={run}+ artifacts={artifacts}+ error={artifactsError}+ loading={artifactsLoading}+ onOpenDiff={onOpenDiff}+ onRetry={onRefresh}+ />+ </section>- <section>- <h4 className="mb-4">Run progress</h4>- <WizardRunProgress run={run} />- <div className="mt-4 flex items-center justify-between text-xs text-muted">- <span>- {wizardRunIsActive(run) ? (- 'Updates automatically.'- ) : run.finished_at ? (- <>- {wizardRunTerminalLabel(run.status)} <TZLabel time={run.finished_at} />.- </>- ) : (- `${wizardRunTerminalLabel(run.status)}.`- )}- </span>- {run.status === 'failed' && (WIZARD_LOCAL_RUNS_VISIBLE || run.environment === 'cloud') ? (- <LemonButton size="small" onClick={() => onRunAgain(run)}>- Run again- </LemonButton>- ) : wizardRunIsActive(run) ? (- <LemonButton- size="small"- icon={<IconRefresh />}- onClick={onRefresh}- loading={refreshing}+ <section>+ <h4 className="mb-4">Run progress</h4>+ <WizardRunProgress run={run} />+ <div className="mt-4 flex items-center justify-between text-xs text-muted">+ <span>+ {wizardRunIsActive(run) ? (+ 'Updates automatically.'+ ) : run.finished_at ? (+ <>+ {wizardRunTerminalLabel(run.status)}{' '}+ <TZLabel time={run.finished_at} />.+ </>+ ) : (+ `${wizardRunTerminalLabel(run.status)}.`+ )}+ </span>+ {run.status === 'failed' &&+ (WIZARD_LOCAL_RUNS_VISIBLE || run.environment === 'cloud') ? (+ <Button size="sm" onClick={() => onRunAgain(run)}>+ Run again+ </Button>+ ) : wizardRunIsActive(run) ? (+ <Button size="sm" onClick={onRefresh} loading={refreshing}>+ <IconRefresh /> Refresh+ </Button>+ ) : null}+ </div>+ </section>+ </div>+ )}+ </DialogBody>+ <DialogFooter className="flex-row justify-between">+ <Button variant="outline" onClick={() => onCopyRunId(run.id)}>+ <IconCopy /> Copy run ID+ </Button>+ {pullRequest ? (+ <Button+ variant="primary"+ render={<LinkPrimitive to={pullRequest.url} target="_blank" />}>- Refresh- </LemonButton>+ Open pull request+ </Button>+ ) : wizardRunCanCancel(run, currentUserId) ? (+ <Button variant="destructive" onClick={() => onCancel(run)} loading={cancelling}>+ <IconStopFilled /> Cancel run+ </Button>+ ) : run.status === 'failed' &&+ (WIZARD_LOCAL_RUNS_VISIBLE || run.environment === 'cloud') ? (+ <Button variant="primary" onClick={() => onRunAgain(run)}>+ Run again+ </Button>) : null}- </div>- </section>- </div>- ) : null}- </LemonDrawer>+ </DialogFooter>+ </>+ )}+ </DialogContent>+ </Dialog>)}diff --git a/products/wizard/frontend/runs/WizardRunDiffViewer.tsx b/products/wizard/frontend/runs/WizardRunDiffViewer.tsxindex 37859d84459f..2f78e58577ea 100644--- a/products/wizard/frontend/runs/WizardRunDiffViewer.tsx+++ b/products/wizard/frontend/runs/WizardRunDiffViewer.tsx@@ -4,13 +4,38 @@ import { FileDiff } from '@pierre/diffs/react'import { useValues } from 'kea'import { useMemo } from 'react'-import { LemonBanner, LemonCard } from '@posthog/lemon-ui'+import { Button, Card, Item, ItemContent, ItemDescription } from '@posthog/quill-primitives'++import { LinkPrimitive } from 'lib/lemon-ui/Link'import { themeLogic } from '~/layout/navigation-3000/themeLogic'import { MAX_RENDERED_WIZARD_DIFF_LINES, wizardRunDiffCanRender } from '../wizardRunDisplay'const DIFF_THEME = { light: 'github-light', dark: 'github-dark' } as const+function DiffNotice({+ children,+ pullRequestUrl,+ tone,+}: {+ children: string+ pullRequestUrl: string | null+ tone: 'warning' | 'destructive'+}): JSX.Element {+ return (+ <Item tone={tone} variant="outline">+ <ItemContent>+ <ItemDescription>{children}</ItemDescription>+ {pullRequestUrl && (+ <Button variant="outline" size="sm" render={<LinkPrimitive to={pullRequestUrl} target="_blank" />}>+ Open pull request+ </Button>+ )}+ </ItemContent>+ </Item>+ )+}+function lineCounts(file: FileDiffMetadata): { additions: number; removals: number } {return file.hunks.reduce((counts, hunk) => ({@@ -48,9 +73,6 @@ export function WizardRunDiffViewer({}): JSX.Element {const { isDarkModeOn } = useValues(themeLogic)const hasPullRequest = !!pullRequestUrl- const pullRequestAction = pullRequestUrl- ? { children: 'Open pull request', to: pullRequestUrl, targetBlank: true }- : undefined// Poll updates re-render the drawer with unchanged props, so parse only on real content changes.const parsed = useMemo<[boolean, FileDiffMetadata[]]>(() => {@@ -66,11 +88,11 @@ export function WizardRunDiffViewer({if (!wizardRunDiffCanRender(sizeBytes)) {return (- <LemonBanner type="warning" action={pullRequestAction}>+ <DiffNotice tone="warning" pullRequestUrl={pullRequestUrl}>{hasPullRequest? 'This diff is too large to display here. Open the pull request to review the full change.': 'This diff is too large to display here.'}- </LemonBanner>+ </DiffNotice>)}@@ -78,11 +100,11 @@ export function WizardRunDiffViewer({if (parseFailed) {return (- <LemonBanner type="error" action={pullRequestAction}>+ <DiffNotice tone="destructive" pullRequestUrl={pullRequestUrl}>{hasPullRequest? "Couldn't display this diff. Open the pull request to review the changes.": "Couldn't display this diff."}- </LemonBanner>+ </DiffNotice>)}@@ -92,11 +114,11 @@ export function WizardRunDiffViewer({if (renderedLines > MAX_RENDERED_WIZARD_DIFF_LINES) {return (- <LemonBanner type="warning" action={pullRequestAction}>+ <DiffNotice tone="warning" pullRequestUrl={pullRequestUrl}>{hasPullRequest? 'This diff has too many changes to display here. Open the pull request to review the full change.': 'This diff has too many changes to display here.'}- </LemonBanner>+ </DiffNotice>)}@@ -127,11 +149,7 @@ export function WizardRunDiffViewer({)return (- <LemonCard- key={`${file.name}-${file.cacheKey ?? ''}`}- hoverEffect={false}- className="p-0 overflow-clip"- >+ <Card key={`${file.name}-${file.cacheKey ?? ''}`} flush className="overflow-clip">{nonTextChange ? (<>{header}@@ -145,7 +163,7 @@ export function WizardRunDiffViewer({disableWorkerPool/>)}- </LemonCard>+ </Card>)})}</div>diff --git a/products/wizard/frontend/runs/WizardRunEnvironmentTag.tsx b/products/wizard/frontend/runs/WizardRunEnvironmentTag.tsxindex 78ed376a23e5..cafb6fdc6d2c 100644--- a/products/wizard/frontend/runs/WizardRunEnvironmentTag.tsx+++ b/products/wizard/frontend/runs/WizardRunEnvironmentTag.tsx@@ -1,16 +1,13 @@import { IconCloud, IconLaptop } from '@posthog/icons'-import { LemonTag } from '@posthog/lemon-ui'+import { Badge } from '@posthog/quill-primitives'import type { RunEnvironmentEnumApi } from '../generated/api.schemas'export function WizardRunEnvironmentTag({ environment }: { environment: RunEnvironmentEnumApi }): JSX.Element {return (- <LemonTag- type={environment === 'cloud' ? 'info' : 'default'}- size="medium"- icon={environment === 'cloud' ? <IconCloud /> : <IconLaptop />}- >+ <Badge variant={environment === 'cloud' ? 'info' : 'default'}>+ {environment === 'cloud' ? <IconCloud /> : <IconLaptop />}{environment === 'cloud' ? 'Cloud' : 'Local'}- </LemonTag>+ </Badge>)}diff --git a/products/wizard/frontend/runs/WizardRunProgress.tsx b/products/wizard/frontend/runs/WizardRunProgress.tsxindex a173ce04886c..55380d9d697a 100644--- a/products/wizard/frontend/runs/WizardRunProgress.tsx+++ b/products/wizard/frontend/runs/WizardRunProgress.tsx@@ -1,5 +1,5 @@import { IconCheckCircle, IconClock, IconWarning, IconXCircle } from '@posthog/icons'-import { Spinner } from '@posthog/lemon-ui'+import { Spinner } from '@posthog/quill-primitives'import { TZLabel } from 'lib/components/TZLabel'@@ -64,7 +64,7 @@ function ProgressIcon({ state }: { state: ProgressState }): JSX.Element {return <IconCheckCircle className="text-success" />}if (state === 'active') {- return <Spinner textColored />+ return <Spinner />}if (state === 'failed') {return <IconXCircle className="text-danger" />diff --git a/products/wizard/frontend/runs/WizardRunStatusTag.tsx b/products/wizard/frontend/runs/WizardRunStatusTag.tsxindex 4f9ca6be903a..bdc2cff9cb52 100644--- a/products/wizard/frontend/runs/WizardRunStatusTag.tsx+++ b/products/wizard/frontend/runs/WizardRunStatusTag.tsx@@ -1,44 +1,49 @@import { IconCheckCircle, IconClock, IconX, IconXCircle } from '@posthog/icons'-import { LemonTag, Spinner } from '@posthog/lemon-ui'+import { Badge, Spinner } from '@posthog/quill-primitives'import type { WizardRunApi } from '../generated/api.schemas'export function WizardRunStatusTag({ status }: { status: WizardRunApi['status'] }): JSX.Element {if (status === 'completed') {return (- <LemonTag type="success" size="medium" icon={<IconCheckCircle />}>+ <Badge variant="success">+ <IconCheckCircle />Completed- </LemonTag>+ </Badge>)}if (status === 'failed') {return (- <LemonTag type="danger" size="medium" icon={<IconXCircle />}>+ <Badge variant="destructive">+ <IconXCircle />Failed- </LemonTag>+ </Badge>)}if (status === 'running') {return (- <LemonTag type="warning" size="medium" icon={<Spinner textColored />}>+ <Badge variant="warning">+ <Spinner />Running- </LemonTag>+ </Badge>)}if (status === 'cancelled') {return (- <LemonTag type="muted" size="medium" icon={<IconX />}>+ <Badge variant="default">+ <IconX />Canceled- </LemonTag>+ </Badge>)}return (- <LemonTag type="warning" size="medium" icon={<IconClock />}>+ <Badge variant="warning">+ <IconClock />Starting- </LemonTag>+ </Badge>)}diff --git a/products/wizard/frontend/runs/WizardRunTable.tsx b/products/wizard/frontend/runs/WizardRunTable.tsxindex 925807d22453..d2f7a994e6d7 100644--- a/products/wizard/frontend/runs/WizardRunTable.tsx+++ b/products/wizard/frontend/runs/WizardRunTable.tsx@@ -1,8 +1,26 @@import { IconFolder, IconGithub } from '@posthog/icons'-import { LemonBanner, LemonButton, LemonTable, LemonTableColumns } from '@posthog/lemon-ui'+import type { DataTableProps } from '@posthog/quill-components'+import { DataTable } from '@posthog/quill-components'+import {+ Avatar,+ AvatarFallback,+ Button,+ Card,+ Empty,+ EmptyContent,+ EmptyDescription,+ EmptyHeader,+ EmptyTitle,+ Item,+ ItemContent,+ ItemDescription,+ ItemTitle,+ Skeleton,+ Text,+} from '@posthog/quill-primitives'-import { EmptyMessage } from 'lib/components/EmptyMessage/EmptyMessage'import { TZLabel } from 'lib/components/TZLabel'+import { LinkPrimitive } from 'lib/lemon-ui/Link'import type { WizardRunApi } from '../generated/api.schemas'import { wizardGithubRepositoryUrl, wizardWorkspaceLabel } from '../wizardRunDisplay'@@ -14,7 +32,6 @@ import { WizardRunStatusTag } from './WizardRunStatusTag'export function WizardRunTable({runs,totalRuns,- selectedRunId,currentUserId,loading,failed,@@ -31,7 +48,6 @@ export function WizardRunTable({}: {runs: WizardRunApi[]totalRuns: number- selectedRunId: string | nullcurrentUserId: number | nullloading: booleanfailed: boolean@@ -46,130 +62,191 @@ export function WizardRunTable({onCopyRunId: (runId: string) => voidonCancel: (run: WizardRunApi) => void}): JSX.Element {- const columns: LemonTableColumns<WizardRunApi> = [+ const columns: DataTableProps<WizardRunApi, unknown>['columns'] = [{- title: 'Program',- key: 'program',- render: (_, run) => (- <div className="min-w-44">- <div className="font-semibold">{run.program.name}</div>- <div className="text-xs text-muted">Wizard {run.program.wizard_version}</div>- </div>- ),+ accessorKey: 'program.name',+ header: 'Program',+ cell: ({ row }) => {+ const run = row.original+ return (+ <Button variant="link-muted" size="sm" onClick={() => onSelect(run)}>+ <span className="flex min-w-44 flex-col items-start text-left">+ <span className="font-semibold">{run.program.name}</span>+ <Text size="xs" variant="muted">+ Wizard {run.program.wizard_version}+ </Text>+ </span>+ </Button>+ )+ },},{- title: 'Workspace',- key: 'workspace',- render: (_, run) => {+ id: 'workspace',+ header: 'Workspace',+ enableSorting: false,+ meta: { expand: true },+ cell: ({ row }) => {+ const run = row.originalif (run.workspace.type === 'git_repository') {return (- <LemonButton- size="small"- type="tertiary"- icon={<IconGithub />}- to={wizardGithubRepositoryUrl(run.workspace.repository)}- targetBlank- className="w-fit"- onClick={(e) => e.stopPropagation()}+ <Button+ variant="link-muted"+ size="sm"+ render={+ <LinkPrimitive+ to={wizardGithubRepositoryUrl(run.workspace.repository)}+ target="_blank"+ onClick={(event) => event.stopPropagation()}+ />+ }>+ <IconGithub />{run.workspace.repository}- </LemonButton>+ </Button>)}return (- <span className="inline-flex items-center gap-1 px-2 py-1 text-sm font-medium">+ <Text size="sm" className="flex items-center gap-1"><IconFolder />{wizardWorkspaceLabel(run)}+ </Text>+ )+ },+ },+ {+ id: 'created_by',+ accessorFn: (run) => run.created_by?.first_name || run.created_by?.email || '',+ header: 'Created by',+ cell: ({ row }) => {+ const creator = row.original.created_by+ if (!creator) {+ return (+ <Text size="sm" variant="muted">+ Unknown+ </Text>+ )+ }++ const name = [creator.first_name, creator.last_name].filter(Boolean).join(' ') || creator.email+ const initials = creator.first_name+ ? `${creator.first_name[0]}${creator.last_name[0] ?? ''}`+ : creator.email[0]++ return (+ <span className="flex min-w-0 items-center gap-2">+ <Avatar size="sm">+ <AvatarFallback>{initials}</AvatarFallback>+ </Avatar>+ <Text size="sm" className="max-w-40 truncate">+ {name}+ </Text></span>)},},{- title: 'Environment',- key: 'environment',- render: (_, run) => <WizardRunEnvironmentTag environment={run.environment} />,+ accessorKey: 'environment',+ header: 'Environment',+ cell: ({ row }) => <WizardRunEnvironmentTag environment={row.original.environment} />,},{- title: 'Status',- key: 'status',- render: (_, run) => (- <div className="flex min-w-36 flex-col items-start gap-1">- <WizardRunStatusTag status={run.status} />- {run.status === 'failed' && run.error_message && (- <span className="max-w-52 text-xs text-muted" title={run.error_message}>- {run.error_message}- </span>- )}- </div>- ),+ accessorKey: 'status',+ header: 'Status',+ cell: ({ row }) => {+ const run = row.original+ return <WizardRunStatusTag status={run.status} />+ },},{- title: 'Started',- key: 'started_at',- render: (_, run) =>- run.started_at ? (- <TZLabel time={run.started_at} className="whitespace-nowrap text-xs" />+ accessorKey: 'started_at',+ header: 'Started',+ cell: ({ row }) =>+ row.original.started_at ? (+ <TZLabel time={row.original.started_at} className="whitespace-nowrap text-xs" />) : (- <span className="whitespace-nowrap text-xs text-muted">Not started</span>+ <Text size="xs" variant="muted">+ Not started+ </Text>),},+ {+ id: 'actions',+ header: () => <span className="sr-only">Actions</span>,+ enableSorting: false,+ meta: { align: 'right' },+ cell: ({ row }) => (+ <WizardRunActionsMenu+ run={row.original}+ currentUserId={currentUserId}+ refreshing={refreshing}+ cancelling={cancelling}+ onView={onSelect}+ onRefresh={onRefreshRun}+ onCopyRunId={onCopyRunId}+ onCancel={onCancel}+ />+ ),+ },]- // Judge failure against the unfiltered list: a background poll can fail while a filter- // legitimately matches nothing.if (failed && totalRuns === 0) {return (- <LemonBanner type="error" action={{ children: 'Refresh', onClick: onRefreshRuns }}>- <div className="font-semibold">Couldn’t load Wizard runs.</div>- <div className="text-sm">Refresh the page and try again.</div>- </LemonBanner>+ <Item tone="destructive" variant="outline">+ <ItemContent>+ <ItemTitle>Couldn’t load Wizard runs</ItemTitle>+ <ItemDescription>Refresh the page and try again.</ItemDescription>+ </ItemContent>+ <Button variant="outline" size="sm" onClick={onRefreshRuns}>+ Refresh+ </Button>+ </Item>)}+ const empty = hasActiveFilters ? (+ <Empty className="min-h-64 py-12">+ <EmptyHeader>+ <EmptyTitle>No matching Wizard runs</EmptyTitle>+ <EmptyDescription>Try another search or clear the current filters.</EmptyDescription>+ </EmptyHeader>+ <EmptyContent>+ <Button variant="outline" onClick={onClearFilters}>+ Clear filters+ </Button>+ </EmptyContent>+ </Empty>+ ) : (+ <WizardRunsEmptyState onOpenLibrary={onOpenLibrary} />+ )+return (<div className="flex flex-col gap-2">{failed && totalRuns > 0 && (- <LemonBanner type="warning" action={{ children: 'Refresh', onClick: onRefreshRuns }}>- Live updates stopped. The list may be out of date.- </LemonBanner>+ <Item tone="warning" variant="outline">+ <ItemContent>Live updates stopped. The list may be out of date.</ItemContent>+ <Button variant="outline" size="sm" onClick={onRefreshRuns}>+ Refresh+ </Button>+ </Item>)}- <LemonTable- id="wizard-runs"- dataSource={runs}- columns={columns}- rowKey="id"- loading={loading}- loadingSkeletonRows={7}- nouns={['Wizard run', 'Wizard runs']}- pagination={{ pageSize: 25, hideOnSinglePage: false, useUrl: false }}- rowClassName="h-[68px]"- rowStatus={(run) => (run.id === selectedRunId ? 'highlighted' : null)}- onRow={(run) => ({ onClick: () => onSelect(run), className: 'cursor-pointer' })}- emptyState={- hasActiveFilters ? (- <EmptyMessage- title="No matching Wizard runs"- description="Try another search or clear the current filters."- buttonText="Clear filters"- buttonOnClick={onClearFilters}- />- ) : (- <WizardRunsEmptyState onOpenLibrary={onOpenLibrary} />- )- }- rowActions={(run) => (- <WizardRunActionsMenu- run={run}- currentUserId={currentUserId}- refreshing={refreshing}- cancelling={cancelling}- onView={onSelect}- onRefresh={onRefreshRun}- onCopyRunId={onCopyRunId}- onCancel={onCancel}+ {loading ? (+ <div className="flex flex-col gap-2">+ {Array.from({ length: 7 }).map((_, index) => (+ <Skeleton key={index} className="h-[68px] w-full" />+ ))}+ </div>+ ) : (+ <Card size="sm" flush className="overflow-hidden">+ <DataTable+ columns={columns}+ data={runs}+ empty={empty}+ pageSize={25}+ fullWidth+ onRowClick={onSelect}/>- )}- />+ </Card>+ )}</div>)}diff --git a/products/wizard/frontend/runs/WizardRunsEmptyState.tsx b/products/wizard/frontend/runs/WizardRunsEmptyState.tsxindex 4d71399231c5..a86f632ec8bc 100644--- a/products/wizard/frontend/runs/WizardRunsEmptyState.tsx+++ b/products/wizard/frontend/runs/WizardRunsEmptyState.tsx@@ -1,17 +1,29 @@import { IconDocument } from '@posthog/icons'-import { LemonButton } from '@posthog/lemon-ui'+import {+ Button,+ Empty,+ EmptyContent,+ EmptyDescription,+ EmptyHeader,+ EmptyMedia,+ EmptyTitle,+} from '@posthog/quill-primitives'export function WizardRunsEmptyState({ onOpenLibrary }: { onOpenLibrary: () => void }): JSX.Element {return (- <div className="flex min-h-[440px] flex-col items-center justify-center gap-3 py-16 text-center">- <IconDocument className="text-4xl text-muted" />- <div className="font-semibold">No Wizard runs yet</div>- <p className="m-0 max-w-md text-sm text-muted">- Choose a program from the Wizard Library to start a cloud run.- </p>- <LemonButton type="primary" onClick={onOpenLibrary}>- Open Wizard Library- </LemonButton>- </div>+ <Empty className="min-h-[440px] justify-center py-16">+ <EmptyHeader>+ <EmptyMedia variant="icon">+ <IconDocument />+ </EmptyMedia>+ <EmptyTitle>No Wizard runs yet</EmptyTitle>+ <EmptyDescription>Choose a program from the Wizard Library to start a cloud run.</EmptyDescription>+ </EmptyHeader>+ <EmptyContent>+ <Button variant="primary" onClick={onOpenLibrary}>+ Open Wizard Library+ </Button>+ </EmptyContent>+ </Empty>)}diff --git a/products/wizard/frontend/wizardLibraryLogic.test.tsx b/products/wizard/frontend/wizardLibraryLogic.test.tsxindex b8e3bc396762..a80e9ab7231f 100644--- a/products/wizard/frontend/wizardLibraryLogic.test.tsx+++ b/products/wizard/frontend/wizardLibraryLogic.test.tsx@@ -52,6 +52,7 @@ function makeRun(overrides: Partial<WizardRunApi> = {}): WizardRunApi {id: 'run-new',team_id: 1,created_by_id: 1,+ created_by: { id: 1, first_name: 'Ada', last_name: 'Lovelace', email: '[email protected]' },environment: 'cloud',workspace: { type: 'git_repository', repository: 'example/private-project' },program,diff --git a/products/wizard/frontend/wizardRunDetailsLogic.test.ts b/products/wizard/frontend/wizardRunDetailsLogic.test.tsindex de71ee5f6d74..a663e59b460d 100644--- a/products/wizard/frontend/wizardRunDetailsLogic.test.ts+++ b/products/wizard/frontend/wizardRunDetailsLogic.test.ts@@ -45,6 +45,7 @@ function makeRun(): WizardRunApi {id: 'run-1',team_id: 1,created_by_id: 1,+ created_by: { id: 1, first_name: 'Ada', last_name: 'Lovelace', email: '[email protected]' },environment: 'cloud',workspace: { type: 'git_repository', repository: 'posthog/posthog' },program: {diff --git a/products/wizard/frontend/wizardRunsLogic.test.ts b/products/wizard/frontend/wizardRunsLogic.test.tsindex 06a3311d4e1f..226bc4d2edf9 100644--- a/products/wizard/frontend/wizardRunsLogic.test.ts+++ b/products/wizard/frontend/wizardRunsLogic.test.ts@@ -19,6 +19,7 @@ function makeRun(id = 'run-1'): WizardRunApi {id,team_id: 1,created_by_id: 1,+ created_by: { id: 1, first_name: 'Ada', last_name: 'Lovelace', email: '[email protected]' },environment: 'cloud',workspace: { type: 'git_repository', repository: 'posthog/posthog' },program: {diff --git a/products/wizard/package.json b/products/wizard/package.jsonindex e399b99d31fb..8063a683990f 100644--- a/products/wizard/package.json+++ b/products/wizard/package.json@@ -6,6 +6,8 @@},"dependencies": {"@pierre/diffs": "1.2.11",+ "@posthog/quill-components": "workspace:*",+ "@posthog/quill-primitives": "workspace:*","kea": "catalog:","kea-loaders": "catalog:","posthog-js": "catalog:"diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex e93d3d6262b2..286b360ecfd7 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -62075,6 +62075,17 @@ export namespace Schemas {results: WizardRunArtifact[];}+ export interface WizardRunCreator {+ /** Unique ID of the user who created the Wizard run. */+ readonly id: number;+ /** First name of the user who created the Wizard run. */+ readonly first_name: string;+ /** Last name of the user who created the Wizard run. */+ readonly last_name: string;+ /** Email address of the user who created the Wizard run. */+ readonly email: string;+ }+export type WizardWorkspace = LocalFolderWorkspace | GitRepositoryWorkspace;/**@@ -62123,6 +62134,8 @@ export namespace Schemas {* @nullable*/readonly created_by_id: number | null;+ /** User who created the Wizard run, or null if that user no longer exists. */+ readonly created_by: WizardRunCreator | null;/** Where the setup agent runs.** * `local` - local