Skip to content

The open alternative to Salesforce, designed for AI.

Show built-in account apps in the Installed tab (#28388)

nitin5d11de08f55d
diff --git a/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/cover-placeholder.webp b/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/cover-placeholder.webp
new file mode 100644
index 00000000000..0394b4f69e3
Binary files /dev/null and b/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/cover-placeholder.webp differ
diff --git a/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/google.svg b/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/google.svg
new file mode 100644
index 00000000000..71ddd12192e
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/google.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden" viewBox="-2.8655 0 273.883 273.883"><defs><linearGradient id="google-2025-a"><stop offset="0" stop-color="#0fbc5c"/><stop offset="1" stop-color="#0cba65"/></linearGradient><linearGradient id="google-2025-g"><stop offset=".231" stop-color="#0fbc5f"/><stop offset=".312" stop-color="#0fbc5f"/><stop offset=".366" stop-color="#0fbc5e"/><stop offset=".458" stop-color="#0fbc5d"/><stop offset=".54" stop-color="#12bc58"/><stop offset=".699" stop-color="#28bf3c"/><stop offset=".771" stop-color="#38c02b"/><stop offset=".861" stop-color="#52c218"/><stop offset=".915" stop-color="#67c30f"/><stop offset="1" stop-color="#86c504"/></linearGradient><linearGradient id="google-2025-h"><stop offset=".142" stop-color="#1abd4d"/><stop offset=".248" stop-color="#6ec30d"/><stop offset=".312" stop-color="#8ac502"/><stop offset=".366" stop-color="#a2c600"/><stop offset=".446" stop-color="#c8c903"/><stop offset=".54" stop-color="#ebcb03"/><stop offset=".616" stop-color="#f7cd07"/><stop offset=".699" stop-color="#fdcd04"/><stop offset=".771" stop-color="#fdce05"/><stop offset=".861" stop-color="#ffce0a"/></linearGradient><linearGradient id="google-2025-f"><stop offset=".316" stop-color="#ff4c3c"/><stop offset=".604" stop-color="#ff692c"/><stop offset=".727" stop-color="#ff7825"/><stop offset=".885" stop-color="#ff8d1b"/><stop offset="1" stop-color="#ff9f13"/></linearGradient><linearGradient id="google-2025-b"><stop offset=".231" stop-color="#ff4541"/><stop offset=".312" stop-color="#ff4540"/><stop offset=".458" stop-color="#ff4640"/><stop offset=".54" stop-color="#ff473f"/><stop offset=".699" stop-color="#ff5138"/><stop offset=".771" stop-color="#ff5b33"/><stop offset=".861" stop-color="#ff6c29"/><stop offset="1" stop-color="#ff8c18"/></linearGradient><linearGradient id="google-2025-d"><stop offset=".408" stop-color="#fb4e5a"/><stop offset="1" stop-color="#ff4540"/></linearGradient><linearGradient id="google-2025-c"><stop offset=".132" stop-color="#0cba65"/><stop offset=".21" stop-color="#0bb86d"/><stop offset=".297" stop-color="#09b479"/><stop offset=".396" stop-color="#08ad93"/><stop offset=".477" stop-color="#0aa6a9"/><stop offset=".568" stop-color="#0d9cc6"/><stop offset=".667" stop-color="#1893dd"/><stop offset=".769" stop-color="#258bf1"/><stop offset=".859" stop-color="#3086ff"/></linearGradient><linearGradient id="google-2025-e"><stop offset=".366" stop-color="#ff4e3a"/><stop offset=".458" stop-color="#ff8a1b"/><stop offset=".54" stop-color="#ffa312"/><stop offset=".616" stop-color="#ffb60c"/><stop offset=".771" stop-color="#ffcd0a"/><stop offset=".861" stop-color="#fecf0a"/><stop offset=".915" stop-color="#fecf08"/><stop offset="1" stop-color="#fdcd01"/></linearGradient><linearGradient xlink:href="#google-2025-a" id="google-2025-s" x1="219.7" x2="254.467" y1="329.535" y2="329.535" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#google-2025-b" id="google-2025-m" cx="109.627" cy="135.862" r="71.46" fx="109.627" fy="135.862" gradientTransform="matrix(-1.93688 1.043 1.45573 2.55542 290.525 -400.634)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#google-2025-c" id="google-2025-n" cx="45.259" cy="279.274" r="71.46" fx="45.259" fy="279.274" gradientTransform="matrix(-3.5126 -4.45809 -1.69255 1.26062 870.8 191.554)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#google-2025-d" id="google-2025-l" cx="304.017" cy="118.009" r="47.854" fx="304.017" fy="118.009" gradientTransform="matrix(2.06435 0 0 2.59204 -297.679 -151.747)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#google-2025-e" id="google-2025-o" cx="181.001" cy="177.201" r="71.46" fx="181.001" fy="177.201" gradientTransform="matrix(-.24858 2.08314 2.96249 .33417 -255.146 -331.164)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#google-2025-f" id="google-2025-p" cx="207.673" cy="108.097" r="41.102" fx="207.673" fy="108.097" gradientTransform="matrix(-1.2492 1.34326 -3.89684 -3.4257 880.501 194.905)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#google-2025-g" id="google-2025-r" cx="109.627" cy="135.862" r="71.46" fx="109.627" fy="135.862" gradientTransform="matrix(-1.93688 -1.043 1.45573 -2.55542 290.525 838.683)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#google-2025-h" id="google-2025-j" cx="154.87" cy="145.969" r="71.46" fx="154.87" fy="145.969" gradientTransform="matrix(-.0814 -1.93722 2.92674 -.11625 -215.135 632.86)" gradientUnits="userSpaceOnUse"/><filter id="google-2025-q" width="1.097" height="1.116" x="-.048" y="-.058" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="1.701"/></filter><filter id="google-2025-k" width="1.033" height="1.02" x="-.017" y="-.01" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation=".242"/></filter><clipPath id="google-2025-i" clipPathUnits="userSpaceOnUse"><path d="M371.378 193.24H237.083v53.438h77.167c-1.241 7.563-4.026 15.003-8.105 21.786-4.674 7.773-10.451 13.69-16.373 18.196-17.74 13.498-38.42 16.258-52.783 16.258-36.283 0-67.283-23.286-79.285-54.928-.484-1.149-.805-2.335-1.197-3.507a81.1 81.1 0 0 1-4.101-25.448c0-9.226 1.569-18.057 4.43-26.398 11.285-32.897 42.985-57.467 80.179-57.467 7.481 0 14.685.884 21.517 2.648a77.7 77.7 0 0 1 33.425 18.25l40.834-39.712c-24.839-22.616-57.219-36.32-95.844-36.32-30.878 0-59.386 9.553-82.748 25.7-18.945 13.093-34.483 30.625-44.97 50.985-9.753 18.879-15.094 39.8-15.094 62.294 0 22.495 5.35 43.633 15.103 62.337v.126c10.302 19.857 25.368 36.954 43.678 49.988 15.997 11.386 44.68 26.551 84.031 26.551 22.63 0 42.687-4.051 60.375-11.644 12.76-5.478 24.065-12.622 34.301-21.804 13.525-12.132 24.117-27.139 31.347-44.404s11.097-36.79 11.097-57.957c0-9.858-.998-19.87-2.689-28.968"/></clipPath></defs><g clip-path="url(#google-2025-i)" transform="matrix(.95792 0 0 .98525 -90.174 -78.856)"><path fill="url(#google-2025-j)" d="M92.076 219.959c.148 22.14 6.501 44.982 16.117 63.423v.127c6.949 13.392 16.445 23.97 27.26 34.452l65.327-23.67c-12.36-6.235-14.246-10.055-23.105-17.026-9.054-9.066-15.802-19.473-20.004-31.677h-.17l.17-.127c-2.765-8.058-3.037-16.613-3.14-25.503Z" filter="url(#google-2025-k)"/><path fill="url(#google-2025-l)" d="M237.084 79.025c-6.457 22.526-3.989 44.421 0 57.161 7.456.006 14.638.888 21.449 2.647a77.66 77.66 0 0 1 33.424 18.25l41.88-40.726c-24.81-22.59-54.667-37.296-96.754-37.332" filter="url(#google-2025-k)"/><path fill="url(#google-2025-m)" d="M236.943 78.847c-31.67 0-60.91 9.798-84.871 26.359a145.5 145.5 0 0 0-24.332 21.15c-1.904 17.744 14.257 39.551 46.262 39.37 15.528-17.936 38.495-29.542 64.056-29.542l.07.002-1.044-57.335z" filter="url(#google-2025-k)"/><path fill="url(#google-2025-n)" d="m341.475 226.379-28.268 19.285c-1.24 7.562-4.028 15.002-8.107 21.786-4.674 7.772-10.45 13.69-16.373 18.196-17.702 13.47-38.328 16.244-52.687 16.255-14.842 25.102-17.444 37.675 1.043 57.934 22.877-.016 43.157-4.117 61.046-11.796 12.931-5.551 24.388-12.792 34.761-22.097 13.706-12.295 24.442-27.503 31.769-45s11.245-37.282 11.245-58.734Z" filter="url(#google-2025-k)"/><path fill="#3086ff" d="M234.996 191.21v57.498h136.006c1.196-7.874 5.152-18.064 5.152-26.5 0-9.858-.996-21.899-2.687-30.998Z" filter="url(#google-2025-k)"/><path fill="url(#google-2025-o)" d="M128.39 124.327c-8.394 9.119-15.564 19.326-21.249 30.364-9.753 18.879-15.094 41.83-15.094 64.324 0 .317.026.627.029.944 4.32 8.224 59.666 6.649 62.456 0-.004-.31-.039-.613-.039-.924 0-9.226 1.57-16.026 4.43-24.367 3.53-10.289 9.056-19.763 16.123-27.926 1.602-2.031 5.875-6.397 7.121-9.016.475-.997-.862-1.557-.937-1.908-.083-.393-1.876-.077-2.277-.37-1.275-.929-3.8-1.414-5.334-1.845-3.277-.921-8.708-2.953-11.725-5.06-9.536-6.658-24.417-14.612-33.505-24.216" filter="url(#google-2025-k)"/><path fill="url(#google-2025-p)" d="M162.099 155.857c22.112 13.301 28.471-6.714 43.173-12.977l-25.574-52.664a144.7 144.7 0 0 0-26.543 14.504c-12.316 8.512-23.192 18.9-32.176 30.72Z" filter="url(#google-2025-q)"/><path fill="url(#google-2025-r)" d="M171.099 290.222c-29.683 10.641-34.33 11.023-37.062 29.29a145 145 0 0 0 16.792 13.984c15.996 11.386 46.766 26.551 86.118 26.551l.137-.004v-59.157l-.094.002c-14.736 0-26.512-3.843-38.585-10.527-2.977-1.648-8.378 2.777-11.123.799-3.786-2.729-12.9 2.35-16.183-.938" filter="url(#google-2025-k)"/><path fill="url(#google-2025-s)" d="M219.7 299.023v59.996c5.506.64 11.236 1.028 17.247 1.028 6.026 0 11.855-.307 17.52-.872v-59.748a105 105 0 0 1-17.477 1.461c-5.932 0-11.7-.686-17.29-1.865" filter="url(#google-2025-k)" opacity=".5"/></g></svg>
diff --git a/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/imap.svg b/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/imap.svg
new file mode 100644
index 00000000000..50d69f9c958
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/imap.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 272 272"><defs><linearGradient id="imap-logo-background" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#8b9099"/><stop offset="1" stop-color="#6b7079"/></linearGradient></defs><rect width="272" height="272" fill="url(#imap-logo-background)"/><svg x="28" y="28" width="216" height="216" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0"/><path d="M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28"/></svg></svg>
diff --git a/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/outlook.svg b/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/outlook.svg
new file mode 100644
index 00000000000..780e7ea10a3
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/app-preferences/assets/built-in-account-apps/outlook.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="60 75.225 570.02 570.02"><defs><linearGradient id="microsoft-outlook-2025-linear0" x1="9.989" x2="30.932" y1="22.365" y2="9.375" gradientTransform="scale(15)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#20a7fa;stop-opacity:1"/><stop offset=".4" style="stop-color:#3bd5ff;stop-opacity:1"/><stop offset="1" style="stop-color:#c4b0ff;stop-opacity:1"/></linearGradient><linearGradient id="microsoft-outlook-2025-linear1" x1="17.197" x2="28.856" y1="26.794" y2="8.126" gradientTransform="scale(15)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#165ad9;stop-opacity:1"/><stop offset=".501" style="stop-color:#1880e5;stop-opacity:1"/><stop offset="1" style="stop-color:#8587ff;stop-opacity:1"/></linearGradient><linearGradient id="microsoft-outlook-2025-linear2" x1="25.701" x2="12.756" y1="27.048" y2="16.501" gradientTransform="scale(15)" gradientUnits="userSpaceOnUse"><stop offset=".237" style="stop-color:#448aff;stop-opacity:0"/><stop offset=".792" style="stop-color:#0032b1;stop-opacity:.2"/></linearGradient><linearGradient id="microsoft-outlook-2025-linear3" x1="24.053" x2="44.51" y1="31.11" y2="18.018" gradientTransform="scale(15)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#1a43a6;stop-opacity:1"/><stop offset=".492" style="stop-color:#2052cb;stop-opacity:1"/><stop offset="1" style="stop-color:#5f20cb;stop-opacity:1"/></linearGradient><linearGradient id="microsoft-outlook-2025-linear4" x1="29.828" x2="17.397" y1="30.327" y2="19.571" gradientTransform="scale(15)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#0045b9;stop-opacity:0"/><stop offset=".67" style="stop-color:#0d1f69;stop-opacity:.2"/></linearGradient><linearGradient id="microsoft-outlook-2025-linear5" x1="41.998" x2="23.852" y1="29.943" y2="29.943" gradientTransform="scale(15)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#4dc4ff;stop-opacity:1"/><stop offset=".196" style="stop-color:#0fafff;stop-opacity:1"/></linearGradient><linearGradient id="microsoft-outlook-2025-linear6" x1="3.458" x2="20.929" y1="37.872" y2="37.86" gradientTransform="scale(15)" gradientUnits="userSpaceOnUse"><stop offset=".206" style="stop-color:#6ce0ff;stop-opacity:1"/><stop offset=".535" style="stop-color:#50d5ff;stop-opacity:0"/></linearGradient><radialGradient id="microsoft-outlook-2025-radial0" cx="0" cy="0" r="1" fx="0" fy="0" gradientTransform="matrix(0 -405.04051 438.393 0 359.92 102.475)" gradientUnits="userSpaceOnUse"><stop offset=".568" style="stop-color:#275ff0;stop-opacity:0"/><stop offset=".992" style="stop-color:#002177;stop-opacity:1"/></radialGradient><radialGradient id="microsoft-outlook-2025-radial1" cx="0" cy="0" r="1" fx="0" fy="0" gradientTransform="rotate(-45 897.061 -224.265)scale(173.58)" gradientUnits="userSpaceOnUse"><stop offset=".259" style="stop-color:#0060d1;stop-opacity:.4"/><stop offset=".908" style="stop-color:#0383f1;stop-opacity:0"/></radialGradient><radialGradient id="microsoft-outlook-2025-radial2" cx="0" cy="0" r="1" fx="0" fy="0" gradientTransform="matrix(357.40702 -468.44593 423.59457 323.18709 159.471 697.08)" gradientUnits="userSpaceOnUse"><stop offset=".732" style="stop-color:#f4a7f7;stop-opacity:0"/><stop offset="1" style="stop-color:#f4a7f7;stop-opacity:.501961"/></radialGradient><radialGradient id="microsoft-outlook-2025-radial3" cx="0" cy="0" r="1" fx="0" fy="0" gradientTransform="matrix(-170.86087 259.7254 -674.01813 -443.40415 278.562 412.979)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#49deff;stop-opacity:1"/><stop offset=".724" style="stop-color:#29c3ff;stop-opacity:1"/></radialGradient><radialGradient id="microsoft-outlook-2025-radial4" cx="0" cy="0" r="1" fx="0" fy="0" gradientTransform="rotate(46.924 -378.504 245.25)scale(315.927)" gradientUnits="userSpaceOnUse"><stop offset=".039" style="stop-color:#0091ff;stop-opacity:1"/><stop offset=".919" style="stop-color:#183dad;stop-opacity:1"/></radialGradient><radialGradient id="microsoft-outlook-2025-radial5" cx="0" cy="0" r="1" fx="0" fy="0" gradientTransform="matrix(0 168 -193.782 0 180 491.159)" gradientUnits="userSpaceOnUse"><stop offset=".558" style="stop-color:#0fa5f7;stop-opacity:0"/><stop offset="1" style="stop-color:#74c6ff;stop-opacity:.501961"/></radialGradient></defs><g id="microsoft-outlook-2025-surface1"><path d="m463.984 140.145-344.347 218.27-29.614-46.72v-40.257a43.26 43.26 0 0 1 19.72-36.293L309.91 105.258c30.496-19.79 69.777-19.793 100.277-.008Zm0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-linear0)"/><path d="M407.102 103.34a91 91 0 0 1 3.082 1.914l156.214 101.332-387.335 245.52-59.438-93.77L403.895 177.8c26.925-17.102 28.105-55.57 3.207-74.461m0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-linear1)"/><path d="M407.102 103.34a91 91 0 0 1 3.082 1.914l156.214 101.332-387.335 245.52-59.438-93.77L403.895 177.8c26.925-17.102 28.105-55.57 3.207-74.461m0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-linear2)"/><path d="M333.602 498.988 179.066 452.11 507.63 243.836c27.672-17.54 27.601-57.938-.133-75.379l-1.48-.93 4.261 2.649 99.996 64.867a43.26 43.26 0 0 1 19.723 36.3v38.962Zm0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-linear3)"/><path d="M333.602 498.988 179.066 452.11 507.63 243.836c27.672-17.54 27.601-57.938-.133-75.379l-1.48-.93 4.261 2.649 99.996 64.867a43.26 43.26 0 0 1 19.723 36.3v38.962Zm0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-linear4)"/><path d="M410.188 105.25c-30.5-19.785-69.782-19.781-100.282.008L109.742 235.145a43.26 43.26 0 0 0-19.719 36.292v1.97a44.48 44.48 0 0 0 20.735 36.16l248.887 156.91L609.16 309.805a44.47 44.47 0 0 0 20.824-37.664v38.168l.008-38.965a43.28 43.28 0 0 0-19.722-36.301Zm0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-radial0)"/><path d="M315.77 630.05h220.449c51.777 0 93.75-41.972 93.75-93.75V272.14a44.48 44.48 0 0 1-20.82 37.665l-327.907 205.89a60.71 60.71 0 0 0-28.422 51.414c.004 34.762 28.184 62.942 62.95 62.942m0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-linear5)"/><path d="M315.77 630.05h220.449c51.777 0 93.75-41.972 93.75-93.75V272.14a44.48 44.48 0 0 1-20.82 37.665l-327.907 205.89a60.71 60.71 0 0 0-28.422 51.414c.004 34.762 28.184 62.942 62.95 62.942m0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-radial1)"/><path d="M315.77 630.05h220.449c51.777 0 93.75-41.972 93.75-93.75V272.14a44.48 44.48 0 0 1-20.82 37.665l-327.907 205.89a60.71 60.71 0 0 0-28.422 51.414c.004 34.762 28.184 62.942 62.95 62.942m0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-radial2)"/><path d="M405.402 630.035H183.738c-51.777 0-93.75-41.972-93.75-93.75v-264.34a44.47 44.47 0 0 0 20.754 37.621l327.582 206.52a61.74 61.74 0 0 1 28.809 52.226c-.004 34.09-27.64 61.723-61.73 61.723m0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-radial3)"/><path d="M405.402 630.035H183.738c-51.777 0-93.75-41.972-93.75-93.75v-264.34a44.47 44.47 0 0 0 20.754 37.621l327.582 206.52a61.74 61.74 0 0 1 28.809 52.226c-.004 34.09-27.64 61.723-61.73 61.723m0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-linear6)"/><path d="M108.75 345h142.5c26.926 0 48.75 21.824 48.75 48.75v142.5c0 26.926-21.824 48.75-48.75 48.75h-142.5C81.824 585 60 563.176 60 536.25v-142.5C60 366.824 81.824 345 108.75 345m0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-radial4)"/><path d="M108.75 345h142.5c26.926 0 48.75 21.824 48.75 48.75v142.5c0 26.926-21.824 48.75-48.75 48.75h-142.5C81.824 585 60 563.176 60 536.25v-142.5C60 366.824 81.824 345 108.75 345m0 0" style="stroke:none;fill-rule:nonzero;fill:url(#microsoft-outlook-2025-radial5)"/><path d="M179.387 534q-29.77-.001-48.875-18.625-19.11-18.622-19.11-48.605c0-21.11 6.465-38.18 19.395-51.22Q150.195 396 181.594 396q29.67 0 48.297 18.715c12.484 12.476 18.726 28.93 18.726 49.351 0 20.985-6.469 37.899-19.398 50.75Q209.919 534 179.387 534m.574-26.352q16.225 0 26.117-11.082c6.594-7.386 9.89-17.664 9.89-30.824q-.001-20.577-9.6-32.031-9.605-11.454-25.638-11.453-16.518 0-26.597 11.824-10.083 11.736-10.082 31.102 0 19.652 10.082 31.101 10.078 11.362 25.828 11.363m0 0" style="stroke:none;fill-rule:nonzero;fill:#fff;fill-opacity:1"/><path d="M179.332 535.848q-29.655.001-48.691-19.13-19.034-19.131-19.036-49.929 0-32.525 19.325-52.61 19.324-20.09 50.601-20.09 29.555.001 48.114 19.227 18.654 19.23 18.652 50.7c0 21.55-6.442 38.93-19.32 52.129q-19.23 19.704-49.645 19.703m.57-27.067c10.778 0 19.453-3.797 26.02-11.383q9.853-11.384 9.851-31.664 0-21.138-9.562-32.902-9.567-11.766-25.54-11.766-16.457-.002-26.5 12.149c-6.694 8.031-10.042 18.683-10.042 31.945q0 20.185 10.043 31.95 10.043 11.67 25.73 11.671m0 0" style="stroke:none;fill-rule:nonzero;fill:#fff;fill-opacity:1"/></g></svg>
diff --git a/packages/twenty-front/src/modules/settings/app-preferences/constants/BuiltInAccountApps.ts b/packages/twenty-front/src/modules/settings/app-preferences/constants/BuiltInAccountApps.ts
index 0fa4767605f..134264a4c1a 100644
--- a/packages/twenty-front/src/modules/settings/app-preferences/constants/BuiltInAccountApps.ts
+++ b/packages/twenty-front/src/modules/settings/app-preferences/constants/BuiltInAccountApps.ts
@@ -1,3 +1,7 @@
+import GoogleLogo from '@/settings/app-preferences/assets/built-in-account-apps/google.svg';
+import ImapLogo from '@/settings/app-preferences/assets/built-in-account-apps/imap.svg';
+import OutlookLogo from '@/settings/app-preferences/assets/built-in-account-apps/outlook.svg';
+import CoverPlaceholder from '@/settings/app-preferences/assets/built-in-account-apps/cover-placeholder.webp';
import { type BuiltInAccountApp } from '@/settings/app-preferences/types/BuiltInAccountApp';
import { msg } from '@lingui/core/macro';
import { ConnectedAccountProvider } from 'twenty-shared/types';
@@ -7,6 +11,9 @@ export const BUILT_IN_ACCOUNT_APPS: BuiltInAccountApp[] = [
{
id: 'google',
name: msg`Gmail and Calendar`,
+ description: msg`Sync emails and calendar events from your Google accounts.`,
+ logo: GoogleLogo,
+ coverImage: CoverPlaceholder,
Icon: IconGoogle,
provider: ConnectedAccountProvider.GOOGLE,
hasEmails: true,
@@ -32,6 +39,9 @@ export const BUILT_IN_ACCOUNT_APPS: BuiltInAccountApp[] = [
{
id: 'outlook',
name: msg`Outlook`,
+ description: msg`Sync emails and calendar events from your Microsoft accounts.`,
+ logo: OutlookLogo,
+ coverImage: CoverPlaceholder,
Icon: IconMicrosoftOutlook,
provider: ConnectedAccountProvider.MICROSOFT,
hasEmails: true,
@@ -45,6 +55,9 @@ export const BUILT_IN_ACCOUNT_APPS: BuiltInAccountApp[] = [
{
id: 'imap',
name: msg`IMAP`,
+ description: msg`Sync emails and calendar events from any IMAP, SMTP and CalDAV server.`,
+ logo: ImapLogo,
+ coverImage: CoverPlaceholder,
Icon: IconAt,
provider: ConnectedAccountProvider.IMAP_SMTP_CALDAV,
hasEmails: true,
diff --git a/packages/twenty-front/src/modules/settings/app-preferences/types/BuiltInAccountApp.ts b/packages/twenty-front/src/modules/settings/app-preferences/types/BuiltInAccountApp.ts
index a5be7643a46..6c3e034acfe 100644
--- a/packages/twenty-front/src/modules/settings/app-preferences/types/BuiltInAccountApp.ts
+++ b/packages/twenty-front/src/modules/settings/app-preferences/types/BuiltInAccountApp.ts
@@ -6,6 +6,9 @@ import { type IconComponent } from 'twenty-ui/icon';
export type BuiltInAccountApp = {
id: 'google' | 'outlook' | 'imap';
name: MessageDescriptor;
+ description: MessageDescriptor;
+ logo: string;
+ coverImage: string;
Icon: IconComponent;
provider: ConnectedAccountProvider;
hasEmails: boolean;
diff --git a/packages/twenty-front/src/modules/settings/app-preferences/utils/getBuiltInAccountAppLogoUrl.ts b/packages/twenty-front/src/modules/settings/app-preferences/utils/getBuiltInAccountAppLogoUrl.ts
new file mode 100644
index 00000000000..b3d94b4ec63
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/app-preferences/utils/getBuiltInAccountAppLogoUrl.ts
@@ -0,0 +1,5 @@
+import { type BuiltInAccountApp } from '@/settings/app-preferences/types/BuiltInAccountApp';
+
+export const getBuiltInAccountAppLogoUrl = (
+ builtInAccountApp: Pick<BuiltInAccountApp, 'logo'>,
+) => new URL(builtInAccountApp.logo, window.location.href).toString();
diff --git a/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useInstalledBuiltInAccountApp.test.tsx b/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useInstalledBuiltInAccountApp.test.tsx
new file mode 100644
index 00000000000..9f6816e76cd
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useInstalledBuiltInAccountApp.test.tsx
@@ -0,0 +1,50 @@
+import { renderHook } from '@testing-library/react';
+import { Provider as JotaiProvider } from 'jotai';
+import { type ReactNode } from 'react';
+
+import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
+import { isGoogleMessagingEnabledState } from '@/client-config/states/isGoogleMessagingEnabledState';
+import { useInstalledBuiltInAccountApp } from '@/settings/applications/hooks/useInstalledBuiltInAccountApp';
+import {
+ jotaiStore,
+ resetJotaiStore,
+} from '@/ui/utilities/state/jotai/jotaiStore';
+import { FeatureFlagKey } from '~/generated-metadata/graphql';
+import { mockCurrentWorkspace } from '~/testing/mock-data/users';
+
+const wrapper = ({ children }: { children: ReactNode }) => (
+ <JotaiProvider store={jotaiStore}>{children}</JotaiProvider>
+);
+
+const renderInstalledBuiltInAccountAppId = (
+ builtInAccountAppId: string | undefined,
+) =>
+ renderHook(() => useInstalledBuiltInAccountApp(builtInAccountAppId), {
+ wrapper,
+ }).result.current?.id;
+
+describe('useInstalledBuiltInAccountApp', () => {
+ beforeEach(() => {
+ resetJotaiStore();
+ jotaiStore.set(isGoogleMessagingEnabledState.atom, true);
+ jotaiStore.set(currentWorkspaceState.atom, {
+ ...mockCurrentWorkspace,
+ featureFlags: [
+ { key: FeatureFlagKey.IS_APP_PREFERENCES_ENABLED, value: true },
+ ],
+ });
+ });
+
+ it('returns the installed built-in account app with that id', () => {
+ expect(renderInstalledBuiltInAccountAppId('google')).toBe('google');
+ });
+
+ it('returns nothing for an id that is not an installed built-in account app', () => {
+ expect(renderInstalledBuiltInAccountAppId('outlook')).toBeUndefined();
+ expect(
+ renderInstalledBuiltInAccountAppId(
+ '20202020-6a7b-4c3d-8e4f-000000000001',
+ ),
+ ).toBeUndefined();
+ });
+});
diff --git a/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useInstalledBuiltInAccountApps.test.tsx b/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useInstalledBuiltInAccountApps.test.tsx
new file mode 100644
index 00000000000..0dae19fadd9
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useInstalledBuiltInAccountApps.test.tsx
@@ -0,0 +1,54 @@
+import { renderHook } from '@testing-library/react';
+import { Provider as JotaiProvider } from 'jotai';
+import { type ReactNode } from 'react';
+
+import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
+import { isGoogleMessagingEnabledState } from '@/client-config/states/isGoogleMessagingEnabledState';
+import { isImapSmtpCaldavEnabledState } from '@/client-config/states/isImapSmtpCaldavEnabledState';
+import { isMicrosoftMessagingEnabledState } from '@/client-config/states/isMicrosoftMessagingEnabledState';
+import { useInstalledBuiltInAccountApps } from '@/settings/applications/hooks/useInstalledBuiltInAccountApps';
+import {
+ jotaiStore,
+ resetJotaiStore,
+} from '@/ui/utilities/state/jotai/jotaiStore';
+import { FeatureFlagKey } from '~/generated-metadata/graphql';
+import { mockCurrentWorkspace } from '~/testing/mock-data/users';
+
+const wrapper = ({ children }: { children: ReactNode }) => (
+ <JotaiProvider store={jotaiStore}>{children}</JotaiProvider>
+);
+
+const setAppPreferencesFlag = (value: boolean) =>
+ jotaiStore.set(currentWorkspaceState.atom, {
+ ...mockCurrentWorkspace,
+ featureFlags: [{ key: FeatureFlagKey.IS_APP_PREFERENCES_ENABLED, value }],
+ });
+
+const renderInstalledBuiltInAccountAppIds = () =>
+ renderHook(() => useInstalledBuiltInAccountApps(), {
+ wrapper,
+ }).result.current.map((builtInAccountApp) => builtInAccountApp.id);
+
+describe('useInstalledBuiltInAccountApps', () => {
+ beforeEach(() => {
+ resetJotaiStore();
+ jotaiStore.set(isGoogleMessagingEnabledState.atom, true);
+ jotaiStore.set(isMicrosoftMessagingEnabledState.atom, true);
+ jotaiStore.set(isImapSmtpCaldavEnabledState.atom, false);
+ });
+
+ it('returns the built-in account apps enabled on the server when the flag is on', () => {
+ setAppPreferencesFlag(true);
+
+ expect(renderInstalledBuiltInAccountAppIds()).toEqual([
+ 'google',
+ 'outlook',
+ ]);
+ });
+
+ it('returns no built-in account app when the flag is off', () => {
+ setAppPreferencesFlag(false);
+
+ expect(renderInstalledBuiltInAccountAppIds()).toEqual([]);
+ });
+});
diff --git a/packages/twenty-front/src/modules/settings/applications/hooks/useInstalledBuiltInAccountApp.ts b/packages/twenty-front/src/modules/settings/applications/hooks/useInstalledBuiltInAccountApp.ts
new file mode 100644
index 00000000000..9f68297113a
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/applications/hooks/useInstalledBuiltInAccountApp.ts
@@ -0,0 +1,9 @@
+import { useInstalledBuiltInAccountApps } from '@/settings/applications/hooks/useInstalledBuiltInAccountApps';
+
+export const useInstalledBuiltInAccountApp = (
+ builtInAccountAppId: string | undefined,
+) =>
+ useInstalledBuiltInAccountApps().find(
+ (installedBuiltInAccountApp) =>
+ installedBuiltInAccountApp.id === builtInAccountAppId,
+ );
diff --git a/packages/twenty-front/src/modules/settings/applications/hooks/useInstalledBuiltInAccountApps.ts b/packages/twenty-front/src/modules/settings/applications/hooks/useInstalledBuiltInAccountApps.ts
new file mode 100644
index 00000000000..1623c427a6f
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/applications/hooks/useInstalledBuiltInAccountApps.ts
@@ -0,0 +1,12 @@
+import { useEnabledBuiltInAccountApps } from '@/settings/app-preferences/hooks/useEnabledBuiltInAccountApps';
+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
+import { FeatureFlagKey } from '~/generated-metadata/graphql';
+
+export const useInstalledBuiltInAccountApps = () => {
+ const isAppPreferencesEnabled = useIsFeatureEnabled(
+ FeatureFlagKey.IS_APP_PREFERENCES_ENABLED,
+ );
+ const { enabledBuiltInAccountApps } = useEnabledBuiltInAccountApps();
+
+ return isAppPreferencesEnabled ? enabledBuiltInAccountApps : [];
+};
diff --git a/packages/twenty-front/src/modules/settings/applications/utils/__tests__/splitApplicationsAroundBuiltInAccountApps.test.ts b/packages/twenty-front/src/modules/settings/applications/utils/__tests__/splitApplicationsAroundBuiltInAccountApps.test.ts
new file mode 100644
index 00000000000..b338377e4f0
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/applications/utils/__tests__/splitApplicationsAroundBuiltInAccountApps.test.ts
@@ -0,0 +1,51 @@
+import { TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER } from 'twenty-shared/application';
+
+import { splitApplicationsAroundBuiltInAccountApps } from '@/settings/applications/utils/splitApplicationsAroundBuiltInAccountApps';
+
+const STANDARD_APPLICATION = {
+ id: 'standard',
+ universalIdentifier: TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER,
+};
+const CUSTOM_APPLICATION = { id: 'custom', universalIdentifier: 'custom' };
+const NPM_APPLICATION = { id: 'npm', universalIdentifier: 'npm' };
+
+describe('splitApplicationsAroundBuiltInAccountApps', () => {
+ it('puts the standard application before built-in account apps and keeps the others after in order', () => {
+ expect(
+ splitApplicationsAroundBuiltInAccountApps({
+ applications: [
+ CUSTOM_APPLICATION,
+ STANDARD_APPLICATION,
+ NPM_APPLICATION,
+ ],
+ hasBuiltInAccountApps: true,
+ }),
+ ).toEqual({
+ applicationsBeforeBuiltInAccountApps: [STANDARD_APPLICATION],
+ applicationsAfterBuiltInAccountApps: [
+ CUSTOM_APPLICATION,
+ NPM_APPLICATION,
+ ],
+ });
+ });
+
+ it('keeps every application in its order when there is no built-in account app', () => {
+ expect(
+ splitApplicationsAroundBuiltInAccountApps({
+ applications: [
+ CUSTOM_APPLICATION,
+ STANDARD_APPLICATION,
+ NPM_APPLICATION,
+ ],
+ hasBuiltInAccountApps: false,
+ }),
+ ).toEqual({
+ applicationsBeforeBuiltInAccountApps: [],
+ applicationsAfterBuiltInAccountApps: [
+ CUSTOM_APPLICATION,
+ STANDARD_APPLICATION,
+ NPM_APPLICATION,
+ ],
+ });
+ });
+});
diff --git a/packages/twenty-front/src/modules/settings/applications/utils/splitApplicationsAroundBuiltInAccountApps.ts b/packages/twenty-front/src/modules/settings/applications/utils/splitApplicationsAroundBuiltInAccountApps.ts
new file mode 100644
index 00000000000..f4c9533622a
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/applications/utils/splitApplicationsAroundBuiltInAccountApps.ts
@@ -0,0 +1,30 @@
+import { isTwentyStandardApplication } from '@/applications/utils/isTwentyStandardApplication';
+
+export const splitApplicationsAroundBuiltInAccountApps = <
+ TApplication extends { universalIdentifier?: string | null },
+>({
+ applications,
+ hasBuiltInAccountApps,
+}: {
+ applications: TApplication[];
+ hasBuiltInAccountApps: boolean;
+}): {
+ applicationsBeforeBuiltInAccountApps: TApplication[];
+ applicationsAfterBuiltInAccountApps: TApplication[];
+} => {
+ if (!hasBuiltInAccountApps) {
+ return {
+ applicationsBeforeBuiltInAccountApps: [],
+ applicationsAfterBuiltInAccountApps: applications,
+ };
+ }
+
+ return {
+ applicationsBeforeBuiltInAccountApps: applications.filter(
+ isTwentyStandardApplication,
+ ),
+ applicationsAfterBuiltInAccountApps: applications.filter(
+ (application) => !isTwentyStandardApplication(application),
+ ),
+ };
+};
diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
index e47785533fb..2afc5b1e489 100644
--- a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
@@ -6,6 +6,7 @@ import { isTwentyStandardApplication } from '@/applications/utils/isTwentyStanda
import { isWorkspaceCustomApplication } from '@/applications/utils/isWorkspaceCustomApplication';
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
import { useUpgradeApplication } from '@/marketplace/hooks/useUpgradeApplication';
+import { useInstalledBuiltInAccountApp } from '@/settings/applications/hooks/useInstalledBuiltInAccountApp';
import { useUninstallApplication } from '@/settings/applications/hooks/useUninstallApplication';
import { getDisplayedApplicationVariables } from '@/settings/applications/utils/getDisplayedApplicationVariables';
import { getSettingsMenuItemsForScope } from '@/settings/applications/utils/getSettingsMenuItemsForScope';
@@ -53,6 +54,7 @@ import { SettingsApplicationHealthBanner } from '~/pages/settings/applications/c
import { SettingsApplicationMissingConfigurationBanner } from '@/settings/applications/components/SettingsApplicationMissingConfigurationBanner';
import { SettingsApplicationLoadErrorBanner } from '@/settings/applications/components/SettingsApplicationLoadErrorBanner';
import { SettingsApplicationNotFound } from '~/pages/settings/applications/components/SettingsApplicationNotFound';
+import { SettingsBuiltInAccountAppDetails } from '~/pages/settings/applications/SettingsBuiltInAccountAppDetails';
import { CUSTOM_APPLICATION_ILLUSTRATIONS } from '~/pages/settings/applications/constants/CustomApplicationIllustrations';
import { STANDARD_APPLICATION_ILLUSTRATIONS } from '~/pages/settings/applications/constants/StandardApplicationIllustrations';
import { useApplicationHealthCheck } from '~/pages/settings/applications/hooks/useApplicationHealthCheck';
@@ -75,6 +77,7 @@ const GENERAL_TAB_ID = 'general';
export const SettingsApplicationDetails = () => {
const { applicationId = '' } = useParams<{ applicationId: string }>();
const { getIcon } = useIcons();
+ const builtInAccountApp = useInstalledBuiltInAccountApp(applicationId);
const {
data,
@@ -371,6 +374,12 @@ export const SettingsApplicationDetails = () => {
}
};
+ if (isDefined(builtInAccountApp)) {
+ return (
+ <SettingsBuiltInAccountAppDetails builtInAccountApp={builtInAccountApp} />
+ );
+ }
+
return (
<CurrentApplicationContext.Provider value={application?.id ?? null}>
<SettingsPageLayout
diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsBuiltInAccountAppDetails.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsBuiltInAccountAppDetails.tsx
new file mode 100644
index 00000000000..0130e992e54
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/applications/SettingsBuiltInAccountAppDetails.tsx
@@ -0,0 +1,70 @@
+import { AppChip } from '@/applications/components/AppChip';
+import { type BuiltInAccountApp } from '@/settings/app-preferences/types/BuiltInAccountApp';
+import { getBuiltInAccountAppLogoUrl } from '@/settings/app-preferences/utils/getBuiltInAccountAppLogoUrl';
+import { SettingsApplicationOverviewCard } from '@/settings/applications/components/SettingsApplicationOverviewCard';
+import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
+import { SettingsPageLayout } from '@/settings/components/layout/SettingsPageLayout';
+import { SettingsTabBar } from '@/settings/components/layout/SettingsTabBar';
+import { useLingui } from '@lingui/react/macro';
+import { SettingsPath } from 'twenty-shared/types';
+import { getSettingsPath } from 'twenty-shared/utils';
+import { Section } from 'twenty-ui/components/layout';
+import { IconSettings } from 'twenty-ui/icon';
+
+const BUILT_IN_ACCOUNT_APP_DETAILS_TAB_LIST_ID = 'built-in-account-app-details';
+
+type SettingsBuiltInAccountAppDetailsProps = {
+ builtInAccountApp: BuiltInAccountApp;
+};
+
+export const SettingsBuiltInAccountAppDetails = ({
+ builtInAccountApp,
+}: SettingsBuiltInAccountAppDetailsProps) => {
+ const { t } = useLingui();
+
+ const appName = t(builtInAccountApp.name);
+ const logoUrl = getBuiltInAccountAppLogoUrl(builtInAccountApp);
+
+ return (
+ <SettingsPageLayout
+ title={appName}
+ icon={
+ <AppChip
+ logoUrl={logoUrl}
+ fallbackApplicationData={{ name: appName }}
+ size="md"
+ chipOnly
+ />
+ }
+ links={[
+ {
+ children: t`Workspace`,
+ href: getSettingsPath(SettingsPath.General),
+ },
+ {
+ children: t`Apps`,
+ href: getSettingsPath(SettingsPath.Applications),
+ },
+ { children: appName },
+ ]}
+ secondaryBar={
+ <SettingsTabBar
+ aria-label={t`Application details`}
+ tabs={[{ id: 'general', title: t`General`, Icon: IconSettings }]}
+ componentInstanceId={BUILT_IN_ACCOUNT_APP_DETAILS_TAB_LIST_ID}
+ />
+ }
+ >
+ <SettingsPageContainer overflow="visible">
+ <Section.Root>
+ <SettingsApplicationOverviewCard
+ logoUrl={logoUrl}
+ displayName={appName}
+ description={t(builtInAccountApp.description)}
+ coverImageUrl={builtInAccountApp.coverImage}
+ />
+ </Section.Root>
+ </SettingsPageContainer>
+ </SettingsPageLayout>
+ );
+};
diff --git a/packages/twenty-front/src/pages/settings/applications/__stories__/SettingsApplicationDetails.stories.tsx b/packages/twenty-front/src/pages/settings/applications/__stories__/SettingsApplicationDetails.stories.tsx
index 97fe4bef31c..6ab4f809b18 100644
--- a/packages/twenty-front/src/pages/settings/applications/__stories__/SettingsApplicationDetails.stories.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/__stories__/SettingsApplicationDetails.stories.tsx
@@ -8,6 +8,15 @@ import {
} from '~/testing/decorators/PageDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { mockedApolloClient } from '~/testing/mockedApolloClient';
+import { mockCurrentWorkspace } from '~/testing/mock-data/users';
+
+import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
+import { isGoogleCalendarEnabledState } from '@/client-config/states/isGoogleCalendarEnabledState';
+import { isGoogleMessagingEnabledState } from '@/client-config/states/isGoogleMessagingEnabledState';
+import { isMicrosoftCalendarEnabledState } from '@/client-config/states/isMicrosoftCalendarEnabledState';
+import { isMicrosoftMessagingEnabledState } from '@/client-config/states/isMicrosoftMessagingEnabledState';
+import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
+import { FeatureFlagKey } from '~/generated-metadata/graphql';
import { SettingsApplicationDetails } from '~/pages/settings/applications/SettingsApplicationDetails';
@@ -257,3 +266,81 @@ export const VariablesTabSavesWorkspaceVariable: Story = {
expect(canvas.getByDisplayValue('https://new.example.com')).toBeVisible();
},
};
+
+const seedBuiltInAccountAppStory = ({
+ isAppPreferencesEnabled,
+}: {
+ isAppPreferencesEnabled: boolean;
+}) => {
+ jotaiStore.set(isGoogleMessagingEnabledState.atom, true);
+ jotaiStore.set(isGoogleCalendarEnabledState.atom, true);
+ jotaiStore.set(isMicrosoftMessagingEnabledState.atom, false);
+ jotaiStore.set(isMicrosoftCalendarEnabledState.atom, false);
+ jotaiStore.set(currentWorkspaceState.atom, {
+ ...mockCurrentWorkspace,
+ featureFlags: [
+ {
+ key: FeatureFlagKey.IS_APP_PREFERENCES_ENABLED,
+ value: isAppPreferencesEnabled,
+ },
+ ],
+ });
+};
+
+export const BuiltInAccountAppShowsGeneralTab: Story = {
+ args: {
+ routeParams: { ':applicationId': 'google' },
+ },
+ beforeEach: () =>
+ seedBuiltInAccountAppStory({ isAppPreferencesEnabled: true }),
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement);
+
+ expect(
+ await canvas.findByText(
+ 'Sync emails and calendar events from your Google accounts.',
+ undefined,
+ { timeout: 3000 },
+ ),
+ ).toBeVisible();
+ expect(canvas.getByTestId('tab-general')).toBeVisible();
+ },
+};
+
+export const BuiltInAccountAppIsNotInstalledWhenFeatureFlagIsOff: Story = {
+ args: {
+ routeParams: { ':applicationId': 'google' },
+ },
+ beforeEach: () =>
+ seedBuiltInAccountAppStory({ isAppPreferencesEnabled: false }),
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement);
+
+ expect(
+ await canvas.findByText(
+ /This application is not installed on this workspace/,
+ undefined,
+ { timeout: 3000 },
+ ),
+ ).toBeVisible();
+ },
+};
+
+export const BuiltInAccountAppIsNotInstalledWhenDisabledOnServer: Story = {
+ args: {
+ routeParams: { ':applicationId': 'outlook' },
+ },
+ beforeEach: () =>
+ seedBuiltInAccountAppStory({ isAppPreferencesEnabled: true }),
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement);
+
+ expect(
+ await canvas.findByText(
+ /This application is not installed on this workspace/,
+ undefined,
+ { timeout: 3000 },
+ ),
+ ).toBeVisible();
+ },
+};
diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationsTable.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationsTable.tsx
index 00f436d121f..5e779eb75e3 100644
--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationsTable.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationsTable.tsx
@@ -1,3 +1,6 @@
+import { type BuiltInAccountApp } from '@/settings/app-preferences/types/BuiltInAccountApp';
+import { getBuiltInAccountAppLogoUrl } from '@/settings/app-preferences/utils/getBuiltInAccountAppLogoUrl';
+import { splitApplicationsAroundBuiltInAccountApps } from '@/settings/applications/utils/splitApplicationsAroundBuiltInAccountApps';
import { SettingsEmptyPlaceholder } from '@/settings/components/SettingsEmptyPlaceholder';
import { Table } from '@/ui/layout/table/components/Table';
import { TableHeader } from '@/ui/layout/table/components/TableHeader';
@@ -6,7 +9,7 @@ import { styled } from '@linaria/react';
import { useLingui } from '@lingui/react/macro';
import { useState } from 'react';
import { SettingsPath } from 'twenty-shared/types';
-import { getSettingsPath } from 'twenty-shared/utils';
+import { getSettingsPath, isNonEmptyArray } from 'twenty-shared/utils';
import { SearchInput } from 'twenty-ui/components/input';
import { Section } from 'twenty-ui/components/layout';
import { IconChevronRight } from 'twenty-ui/icon';
@@ -18,6 +21,7 @@ import {
} from '~/pages/settings/applications/components/SettingsApplicationTableRow';
import { type ApplicationWithoutRelation } from '@/applications/types/ApplicationWithoutRelation';
import { hasApplicationUpdate } from '~/pages/settings/applications/utils/hasApplicationUpdate';
+import { filterBySearchQuery } from '~/utils/filterBySearchQuery';
const StyledTableRowsContainer = styled.div`
border-bottom: 1px solid ${themeCssVariables.border.color.light};
@@ -29,11 +33,15 @@ const StyledSearchInputContainer = styled.div`
width: 100%;
`;
+type SettingsApplicationsTableProps = {
+ applications: ApplicationWithoutRelation[];
+ builtInAccountApps: BuiltInAccountApp[];
+};
+
export const SettingsApplicationsTable = ({
applications,
-}: {
- applications: ApplicationWithoutRelation[];
-}) => {
+ builtInAccountApps,
+}: SettingsApplicationsTableProps) => {
const theme = useTheme();
const { t } = useLingui();
@@ -62,6 +70,53 @@ export const SettingsApplicationsTable = ({
return aIsOAuth ? 1 : -1;
});
+ const filteredBuiltInAccountApps = filterBySearchQuery({
+ items: builtInAccountApps,
+ searchQuery: searchTerm.trim(),
+ getSearchableValues: (builtInAccountApp) => [
+ t(builtInAccountApp.name),
+ t(builtInAccountApp.description),
+ ],
+ });
+
+ const {
+ applicationsBeforeBuiltInAccountApps,
+ applicationsAfterBuiltInAccountApps,
+ } = splitApplicationsAroundBuiltInAccountApps({
+ applications: filteredApplications,
+ hasBuiltInAccountApps: isNonEmptyArray(builtInAccountApps),
+ });
+
+ const chevronIcon = (
+ <IconChevronRight
+ size={theme.icon.size.md}
+ stroke={theme.icon.stroke.sm}
+ color={theme.font.color.light}
+ />
+ );
+
+ const renderApplicationRow = (application: ApplicationWithoutRelation) => {
+ const hasUpdate = hasApplicationUpdate({
+ sourceType: application.applicationRegistration?.sourceType,
+ currentVersion: application.version,
+ latestAvailableVersion:
+ application.applicationRegistration?.latestAvailableVersion,
+ });
+
+ return (
+ <SettingsApplicationTableRow
+ key={application.id}
+ application={application}
+ hasUpdate={hasUpdate}
+ sourceType={application.applicationRegistration?.sourceType}
+ action={chevronIcon}
+ link={getSettingsPath(SettingsPath.ApplicationDetail, {
+ applicationId: application.id,
+ })}
+ />
+ );
+ };
+
return (
<Section.Root>
<Section.Header
@@ -85,38 +140,28 @@ export const SettingsApplicationsTable = ({
<TableHeader />
</TableRow>
<StyledTableRowsContainer>
- {filteredApplications.length === 0 && (
- <SettingsEmptyPlaceholder padding="4">
- <span role="status">{t`No application matches your search`}</span>
- </SettingsEmptyPlaceholder>
- )}
- {filteredApplications.map((application) => {
- const hasUpdate = hasApplicationUpdate({
- sourceType: application.applicationRegistration?.sourceType,
- currentVersion: application.version,
- latestAvailableVersion:
- application.applicationRegistration?.latestAvailableVersion,
- });
-
- return (
- <SettingsApplicationTableRow
- key={application.id}
- application={application}
- hasUpdate={hasUpdate}
- sourceType={application.applicationRegistration?.sourceType}
- action={
- <IconChevronRight
- size={theme.icon.size.md}
- stroke={theme.icon.stroke.sm}
- color={theme.font.color.light}
- />
- }
- link={getSettingsPath(SettingsPath.ApplicationDetail, {
- applicationId: application.id,
- })}
- />
- );
- })}
+ {filteredApplications.length === 0 &&
+ filteredBuiltInAccountApps.length === 0 && (
+ <SettingsEmptyPlaceholder padding="4">
+ <span role="status">{t`No application matches your search`}</span>
+ </SettingsEmptyPlaceholder>
+ )}
+ {applicationsBeforeBuiltInAccountApps.map(renderApplicationRow)}
+ {filteredBuiltInAccountApps.map((builtInAccountApp) => (
+ <SettingsApplicationTableRow
+ key={builtInAccountApp.id}
+ application={{
+ name: t(builtInAccountApp.name),
+ description: t(builtInAccountApp.description),
+ logoUrl: getBuiltInAccountAppLogoUrl(builtInAccountApp),
+ }}
+ action={chevronIcon}
+ link={getSettingsPath(SettingsPath.ApplicationDetail, {
+ applicationId: builtInAccountApp.id,
+ })}
+ />
+ ))}
+ {applicationsAfterBuiltInAccountApps.map(renderApplicationRow)}
</StyledTableRowsContainer>
</Table>
</Section.Root>
diff --git a/packages/twenty-front/src/pages/settings/applications/components/__stories__/SettingsApplicationsTable.stories.tsx b/packages/twenty-front/src/pages/settings/applications/components/__stories__/SettingsApplicationsTable.stories.tsx
new file mode 100644
index 00000000000..354f57b746b
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/applications/components/__stories__/SettingsApplicationsTable.stories.tsx
@@ -0,0 +1,116 @@
+import { type Meta, type StoryObj } from '@storybook/react-vite';
+import { expect, userEvent, waitFor, within } from 'storybook/test';
+import { TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER } from 'twenty-shared/application';
+
+import { type ApplicationWithoutRelation } from '@/applications/types/ApplicationWithoutRelation';
+import { BUILT_IN_ACCOUNT_APPS } from '@/settings/app-preferences/constants/BuiltInAccountApps';
+import { ApplicationRegistrationSourceType } from '~/generated-metadata/graphql';
+import { SettingsApplicationsTable } from '~/pages/settings/applications/components/SettingsApplicationsTable';
+import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';
+
+const STANDARD_APPLICATION: ApplicationWithoutRelation = {
+ id: 'standard-application-id',
+ name: 'Standard',
+ universalIdentifier: TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER,
+};
+
+const NPM_APPLICATION: ApplicationWithoutRelation = {
+ id: 'npm-application-id',
+ name: 'Acme Sync',
+ description: 'Keeps Acme in sync',
+ universalIdentifier: 'npm-application-universal-identifier',
+ applicationRegistration: {
+ id: 'npm-registration-id',
+ sourceType: ApplicationRegistrationSourceType.NPM,
+ },
+};
+
+const OAUTH_APPLICATION: ApplicationWithoutRelation = {
+ id: 'oauth-application-id',
+ name: 'Zapier',
+ universalIdentifier: 'oauth-application-universal-identifier',
+ applicationRegistration: {
+ id: 'oauth-registration-id',
+ sourceType: ApplicationRegistrationSourceType.OAUTH_ONLY,
+ },
+};
+
+const getRowLinks = (canvasElement: HTMLElement) =>
+ within(canvasElement)
+ .getAllByRole('link')
+ .map((link) => link.getAttribute('href'));
+
+const meta: Meta<typeof SettingsApplicationsTable> = {
+ title: 'Pages/Settings/Applications/SettingsApplicationsTable',
+ component: SettingsApplicationsTable,
+ decorators: [ComponentWithRouterDecorator],
+ args: {
+ applications: [OAUTH_APPLICATION, NPM_APPLICATION, STANDARD_APPLICATION],
+ builtInAccountApps: BUILT_IN_ACCOUNT_APPS,
+ },
+};
+
+export default meta;
+
+type Story = StoryObj<typeof SettingsApplicationsTable>;
+
+export const BuiltInAccountAppsListedAfterStandardApp: Story = {
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement);
+
+ expect(await canvas.findByText('Gmail and Calendar')).toBeVisible();
+ expect(getRowLinks(canvasElement)).toEqual([
+ '/settings/applications/standard-application-id',
+ '/settings/applications/google',
+ '/settings/applications/outlook',
+ '/settings/applications/imap',
+ '/settings/applications/npm-application-id',
+ '/settings/applications/oauth-application-id',
+ ]);
+ expect(
+ canvas.getByRole('link', { name: /Gmail and Calendar/ }),
+ ).toHaveTextContent('Built-in');
+ },
+};
+
+export const SearchMatchesBuiltInAccountApps: Story = {
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement);
+ const searchInput = await canvas.findByPlaceholderText(
+ 'Search an application',
+ );
+
+ await userEvent.type(searchInput, 'microsoft');
+
+ await waitFor(() =>
+ expect(getRowLinks(canvasElement)).toEqual([
+ '/settings/applications/outlook',
+ ]),
+ );
+
+ await userEvent.clear(searchInput);
+ await userEvent.type(searchInput, 'outlook ');
+
+ await waitFor(() =>
+ expect(getRowLinks(canvasElement)).toEqual([
+ '/settings/applications/outlook',
+ ]),
+ );
+ },
+};
+
+export const KeepsExistingOrderWithoutBuiltInAccountApps: Story = {
+ args: {
+ builtInAccountApps: [],
+ },
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement);
+
+ expect(await canvas.findByText('Acme Sync')).toBeVisible();
+ expect(getRowLinks(canvasElement)).toEqual([
+ '/settings/applications/npm-application-id',
+ '/settings/applications/standard-application-id',
+ '/settings/applications/oauth-application-id',
+ ]);
+ },
+};
diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsInstalledTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsInstalledTab.tsx
index a63db91a3b4..4823656866a 100644
--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsInstalledTab.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsInstalledTab.tsx
@@ -1,12 +1,19 @@
import { useInstalledApplications } from '@/applications/hooks/useInstalledApplications';
+import { useInstalledBuiltInAccountApps } from '@/settings/applications/hooks/useInstalledBuiltInAccountApps';
import { SettingsApplicationsTable } from '~/pages/settings/applications/components/SettingsApplicationsTable';
export const SettingsApplicationsInstalledTab = () => {
const installedApplications = useInstalledApplications();
+ const installedBuiltInAccountApps = useInstalledBuiltInAccountApps();
if (installedApplications.length === 0) {
return null;
}
- return <SettingsApplicationsTable applications={installedApplications} />;
+ return (
+ <SettingsApplicationsTable
+ applications={installedApplications}
+ builtInAccountApps={installedBuiltInAccountApps}
+ />
+ );
};