Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

feat(ui): add themed empty states and refine chat composers (#2337)

void4ba526c9f018
diff --git a/src/assets/empty-states/chat-empty-dark.svg b/src/assets/empty-states/chat-empty-dark.svg
new file mode 100644
index 000000000..bc2083c1a
--- /dev/null
+++ b/src/assets/empty-states/chat-empty-dark.svg
@@ -0,0 +1,68 @@
+<svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
+<mask id="mask0_4059_3374" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="11" y="0" width="128" height="150">
+<rect x="11" width="128" height="150" fill="url(#paint0_linear_4059_3374)"/>
+</mask>
+<g mask="url(#mask0_4059_3374)">
+<rect x="21.25" y="11.25" width="106.5" height="38.5" rx="9.75" fill="#0F0F0F"/>
+<rect x="21.25" y="11.25" width="106.5" height="38.5" rx="9.75" stroke="#233968" stroke-width="0.5"/>
+<path d="M47.9933 25.8208C47.8983 24.2658 46.7575 22.9233 45.1558 22.715C43.4267 22.4908 41.6642 22.375 39.875 22.375C38.0858 22.375 36.3233 22.49 34.5942 22.715C32.9208 22.9325 31.75 24.39 31.75 26.0317V31.2183C31.75 32.8608 32.9208 34.3167 34.5942 34.535C34.8957 34.574 35.1977 34.6095 35.5 34.6417V38C35.5001 38.1235 35.5368 38.2443 35.6055 38.3469C35.6742 38.4496 35.7718 38.5296 35.8859 38.5769C36 38.6242 36.1256 38.6365 36.2468 38.6125C36.3679 38.5884 36.4793 38.529 36.5667 38.4417L38.7775 36.2317" stroke="#233968" stroke-width="0.5"/>
+<path d="M43.625 27C44.7543 26.9996 45.8833 27.0456 47.0088 27.1387C48.155 27.2347 48.9999 28.2089 49 29.3398V32.9121C48.9998 33.9737 48.2557 34.8969 47.2168 35.085L47.0049 35.1123L46.7305 35.1338L46.5 35.1523V37.375L46.4961 37.4297C46.488 37.4843 46.4675 37.5367 46.4365 37.583C46.3953 37.6445 46.3369 37.6924 46.2686 37.7207C46.2001 37.7491 46.1245 37.7566 46.0518 37.7422C45.9792 37.7277 45.9127 37.6919 45.8604 37.6396L43.542 35.3223L43.4688 35.25L43.3662 35.249C42.3159 35.2424 41.2744 35.1968 40.2451 35.1123C39.0969 35.0183 38.2502 34.0443 38.25 32.9121V29.3408C38.25 28.2089 39.0937 27.2352 40.2402 27.1396C41.3558 27.0469 42.4852 27 43.625 27Z" stroke="#233968" stroke-width="0.5"/>
+<rect x="54.75" y="21.75" width="63.5" height="6.5" rx="3.25" stroke="#233968" stroke-width="0.5"/>
+<rect x="54.75" y="32.75" width="38.5" height="6.5" rx="3.25" stroke="#233968" stroke-width="0.5"/>
+<g filter="url(#filter0_d_4059_3374)">
+<g clip-path="url(#clip0_4059_3374)">
+<rect x="21" y="56" width="107" height="38" rx="10" fill="#0F0F0F"/>
+<path d="M34.0942 67.215C35.8233 66.99 37.5858 66.875 39.375 66.875C41.1642 66.875 42.9267 66.9908 44.6558 67.215C46.2575 67.4233 47.3983 68.7658 47.4933 70.3208C47.2147 70.228 46.926 70.169 46.6333 70.145C44.2985 69.9512 41.9515 69.9512 39.6167 70.145C37.6517 70.3083 36.25 71.97 36.25 73.84V77.4117C36.2492 78.0981 36.4381 78.7715 36.7959 79.3574C37.1537 79.9432 37.6664 80.4188 38.2775 80.7317L36.0667 82.9417C35.9793 83.029 35.8679 83.0884 35.7468 83.1125C35.6256 83.1365 35.5 83.1242 35.3859 83.0769C35.2718 83.0296 35.1742 82.9496 35.1055 82.8469C35.0368 82.7443 35.0001 82.6235 35 82.5V79.1417C34.6977 79.1095 34.3957 79.074 34.0942 79.035C32.4208 78.8167 31.25 77.3608 31.25 75.7183V70.5317C31.25 68.89 32.4208 67.4325 34.0942 67.215Z" fill="#1A1A1A"/>
+<path d="M43.125 71.25C41.9783 71.25 40.8425 71.2975 39.72 71.3908C38.4367 71.4975 37.5 72.5858 37.5 73.8408V77.4117C37.5 78.6675 38.44 79.7567 39.725 79.8617C40.7608 79.9467 41.8083 79.9925 42.865 79.9992L45.1833 82.3167C45.2707 82.404 45.3821 82.4634 45.5032 82.4875C45.6244 82.5115 45.75 82.4992 45.8641 82.4519C45.9782 82.4046 46.0758 82.3246 46.1445 82.2219C46.2132 82.1193 46.2499 81.9985 46.25 81.875V79.8833L46.525 79.8617C47.81 79.7575 48.75 78.6675 48.75 77.4117V73.84C48.75 72.5858 47.8125 71.4975 46.53 71.39C45.3974 71.2963 44.2614 71.2496 43.125 71.25Z" fill="#1A1A1A"/>
+<rect x="54" y="66" width="64" height="7" rx="3.5" fill="#1A1A1A"/>
+<rect x="54" y="77" width="39" height="7" rx="3.5" fill="#1A1A1A"/>
+<path d="M31.8611 94.5L21.0019 83.6389C20.9698 86.7234 21.3219 88.75 23.8754 91.625C27.0693 94.5 28.574 94.4773 31.8611 94.5Z" fill="#262626"/>
+<path d="M31.8611 94.5L21.0019 83.6389C20.9698 86.7234 21.3219 88.75 23.8754 91.625C27.0693 94.5 28.574 94.4773 31.8611 94.5Z" fill="black" fill-opacity="0.24"/>
+<g filter="url(#filter1_d_4059_3374)">
+<path d="M31.8611 93.8611C31.9727 94.1975 32.1017 94.3514 32.5 94.5H31.8611L21 83.6389V83C21.0645 83.3995 21.0323 83.5221 21.6389 83.6389L28.4674 83.2121C30.3064 83.0972 31.8611 84.5577 31.8611 86.4003V93.8611Z" fill="url(#paint1_linear_4059_3374)"/>
+</g>
+</g>
+<rect x="20.2308" y="55.2308" width="108.538" height="39.5385" rx="10.7692" stroke="#262626" stroke-width="1.53846"/>
+</g>
+<rect x="21.25" y="100.25" width="106.5" height="38.5" rx="9.75" fill="#0F0F0F"/>
+<rect x="21.25" y="100.25" width="106.5" height="38.5" rx="9.75" stroke="#233968" stroke-width="0.5"/>
+<path d="M47.9933 114.821C47.8983 113.266 46.7575 111.923 45.1558 111.715C43.4267 111.491 41.6642 111.375 39.875 111.375C38.0858 111.375 36.3233 111.49 34.5942 111.715C32.9208 111.933 31.75 113.39 31.75 115.032V120.218C31.75 121.861 32.9208 123.317 34.5942 123.535C34.8957 123.574 35.1977 123.61 35.5 123.642V127C35.5001 127.124 35.5368 127.244 35.6055 127.347C35.6742 127.45 35.7718 127.53 35.8859 127.577C36 127.624 36.1256 127.637 36.2468 127.612C36.3679 127.588 36.4793 127.529 36.5667 127.442L38.7775 125.232" stroke="#233968" stroke-width="0.5"/>
+<path d="M43.625 116C44.7543 116 45.8833 116.046 47.0088 116.139C48.155 116.235 48.9999 117.209 49 118.34V121.912C48.9998 122.974 48.2557 123.897 47.2168 124.085L47.0049 124.112L46.7305 124.134L46.5 124.152V126.375L46.4961 126.43C46.488 126.484 46.4675 126.537 46.4365 126.583C46.3953 126.645 46.3369 126.692 46.2686 126.721C46.2001 126.749 46.1245 126.757 46.0518 126.742C45.9792 126.728 45.9127 126.692 45.8604 126.64L43.542 124.322L43.4688 124.25L43.3662 124.249C42.3159 124.242 41.2744 124.197 40.2451 124.112C39.0969 124.018 38.2502 123.044 38.25 121.912V118.341C38.25 117.209 39.0937 116.235 40.2402 116.14C41.3558 116.047 42.4852 116 43.625 116Z" stroke="#233968" stroke-width="0.5"/>
+<rect x="54.75" y="110.75" width="63.5" height="6.5" rx="3.25" stroke="#233968" stroke-width="0.5"/>
+<rect x="54.75" y="121.75" width="38.5" height="6.5" rx="3.25" stroke="#233968" stroke-width="0.5"/>
+</g>
+<defs>
+<filter id="filter0_d_4059_3374" x="16.3846" y="52.1537" width="116.231" height="47.231" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="0.769231"/>
+<feGaussianBlur stdDeviation="1.53846"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_3374"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_3374" result="shape"/>
+</filter>
+<filter id="filter1_d_4059_3374" x="17.1667" y="77.25" width="21.7222" height="21.7222" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="1.27778" dy="-0.638889"/>
+<feGaussianBlur stdDeviation="2.55556"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_3374"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_3374" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_4059_3374" x1="75" y1="0" x2="75" y2="150" gradientUnits="userSpaceOnUse">
+<stop offset="0.0480598" stop-color="white" stop-opacity="0"/>
+<stop offset="0.348055" stop-color="white"/>
+<stop offset="0.649208" stop-color="white"/>
+<stop offset="0.931962" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint1_linear_4059_3374" x1="30.9028" y1="84.2778" x2="26.4306" y2="89.0694" gradientUnits="userSpaceOnUse">
+<stop stop-color="#404040"/>
+<stop offset="1" stop-color="#2B2B2B"/>
+</linearGradient>
+<clipPath id="clip0_4059_3374">
+<rect x="21" y="56" width="107" height="38" rx="10" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/assets/empty-states/chat-empty-light.svg b/src/assets/empty-states/chat-empty-light.svg
new file mode 100644
index 000000000..6c4f363c7
--- /dev/null
+++ b/src/assets/empty-states/chat-empty-light.svg
@@ -0,0 +1,72 @@
+<svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
+<mask id="mask0_4059_3204" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="11" y="0" width="128" height="150">
+<rect x="11" width="128" height="150" fill="url(#paint0_linear_4059_3204)"/>
+</mask>
+<g mask="url(#mask0_4059_3204)">
+<rect x="21.25" y="11.25" width="106.5" height="38.5" rx="9.75" fill="white"/>
+<rect x="21.25" y="11.25" width="106.5" height="38.5" rx="9.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<path d="M47.9933 25.8208C47.8983 24.2658 46.7575 22.9233 45.1558 22.715C43.4267 22.4908 41.6642 22.375 39.875 22.375C38.0858 22.375 36.3233 22.49 34.5942 22.715C32.9208 22.9325 31.75 24.39 31.75 26.0317V31.2183C31.75 32.8608 32.9208 34.3167 34.5942 34.535C34.8957 34.574 35.1977 34.6095 35.5 34.6417V38C35.5001 38.1235 35.5368 38.2443 35.6055 38.3469C35.6742 38.4496 35.7718 38.5296 35.8859 38.5769C36 38.6242 36.1256 38.6365 36.2468 38.6125C36.3679 38.5884 36.4793 38.529 36.5667 38.4417L38.7775 36.2317" stroke="#DAE5FD" stroke-width="0.5"/>
+<path d="M43.625 27C44.7543 26.9996 45.8833 27.0456 47.0088 27.1387C48.155 27.2347 48.9999 28.2089 49 29.3398V32.9121C48.9998 33.9737 48.2557 34.8969 47.2168 35.085L47.0049 35.1123L46.7305 35.1338L46.5 35.1523V37.375L46.4961 37.4297C46.488 37.4843 46.4675 37.5367 46.4365 37.583C46.3953 37.6445 46.3369 37.6924 46.2686 37.7207C46.2001 37.7491 46.1245 37.7566 46.0518 37.7422C45.9792 37.7277 45.9127 37.6919 45.8604 37.6396L43.542 35.3223L43.4688 35.25L43.3662 35.249C42.3159 35.2424 41.2744 35.1968 40.2451 35.1123C39.0969 35.0183 38.2502 34.0443 38.25 32.9121V29.3408C38.25 28.2089 39.0937 27.2352 40.2402 27.1396C41.3558 27.0469 42.4852 27 43.625 27Z" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="54.75" y="21.75" width="63.5" height="6.5" rx="3.25" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="54.75" y="32.75" width="38.5" height="6.5" rx="3.25" stroke="#DAE5FD" stroke-width="0.5"/>
+<g filter="url(#filter0_d_4059_3204)">
+<g clip-path="url(#clip0_4059_3204)">
+<rect x="21" y="56" width="107" height="38" rx="10" fill="white"/>
+<path d="M34.0942 67.215C35.8233 66.99 37.5858 66.875 39.375 66.875C41.1642 66.875 42.9267 66.9908 44.6558 67.215C46.2575 67.4233 47.3983 68.7658 47.4933 70.3208C47.2147 70.228 46.926 70.169 46.6333 70.145C44.2985 69.9512 41.9515 69.9512 39.6167 70.145C37.6517 70.3083 36.25 71.97 36.25 73.84V77.4117C36.2492 78.0981 36.4381 78.7715 36.7959 79.3574C37.1537 79.9432 37.6664 80.4188 38.2775 80.7317L36.0667 82.9417C35.9793 83.029 35.8679 83.0884 35.7468 83.1125C35.6256 83.1365 35.5 83.1242 35.3859 83.0769C35.2718 83.0296 35.1742 82.9496 35.1055 82.8469C35.0368 82.7443 35.0001 82.6235 35 82.5V79.1417C34.6977 79.1095 34.3957 79.074 34.0942 79.035C32.4208 78.8167 31.25 77.3608 31.25 75.7183V70.5317C31.25 68.89 32.4208 67.4325 34.0942 67.215Z" fill="#F7F7F7"/>
+<path d="M43.125 71.25C41.9783 71.25 40.8425 71.2975 39.72 71.3908C38.4367 71.4975 37.5 72.5858 37.5 73.8408V77.4117C37.5 78.6675 38.44 79.7567 39.725 79.8617C40.7608 79.9467 41.8083 79.9925 42.865 79.9992L45.1833 82.3167C45.2707 82.404 45.3821 82.4634 45.5032 82.4875C45.6244 82.5115 45.75 82.4992 45.8641 82.4519C45.9782 82.4046 46.0758 82.3246 46.1445 82.2219C46.2132 82.1193 46.2499 81.9985 46.25 81.875V79.8833L46.525 79.8617C47.81 79.7575 48.75 78.6675 48.75 77.4117V73.84C48.75 72.5858 47.8125 71.4975 46.53 71.39C45.3974 71.2963 44.2614 71.2496 43.125 71.25Z" fill="#F7F7F7"/>
+<rect x="54" y="66" width="64" height="7" rx="3.5" fill="#F7F7F7"/>
+<rect x="54" y="77" width="39" height="7" rx="3.5" fill="#F7F7F7"/>
+<path d="M31.3974 94.5388L20.5019 83.6414C20.4697 86.7362 20.823 88.7696 23.3851 91.6542C26.5896 94.5388 28.0993 94.516 31.3974 94.5388Z" fill="url(#paint1_linear_4059_3204)"/>
+<path d="M31.3974 94.5388L20.5019 83.6414C20.4697 86.7362 20.823 88.7696 23.3851 91.6542C26.5896 94.5388 28.0993 94.516 31.3974 94.5388Z" fill="black" fill-opacity="0.08"/>
+<g filter="url(#filter1_d_4059_3204)">
+<path d="M31.3974 93.8974C31.5094 94.2349 31.6388 94.3894 32.0385 94.5385H31.3974L20.5 83.641V83C20.5647 83.4009 20.5324 83.5238 21.141 83.641L27.9924 83.2128C29.8376 83.0975 31.3974 84.5629 31.3974 86.4117V93.8974Z" fill="url(#paint2_linear_4059_3204)"/>
+</g>
+</g>
+<rect x="20.2308" y="55.2308" width="108.538" height="39.5385" rx="10.7692" stroke="#E6E6E6" stroke-width="1.53846"/>
+</g>
+<rect x="21.25" y="100.25" width="106.5" height="38.5" rx="9.75" fill="white"/>
+<rect x="21.25" y="100.25" width="106.5" height="38.5" rx="9.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<path d="M47.9933 114.821C47.8983 113.266 46.7575 111.923 45.1558 111.715C43.4267 111.491 41.6642 111.375 39.875 111.375C38.0858 111.375 36.3233 111.49 34.5942 111.715C32.9208 111.933 31.75 113.39 31.75 115.032V120.218C31.75 121.861 32.9208 123.317 34.5942 123.535C34.8957 123.574 35.1977 123.61 35.5 123.642V127C35.5001 127.124 35.5368 127.244 35.6055 127.347C35.6742 127.45 35.7718 127.53 35.8859 127.577C36 127.624 36.1256 127.637 36.2468 127.612C36.3679 127.588 36.4793 127.529 36.5667 127.442L38.7775 125.232" stroke="#DAE5FD" stroke-width="0.5"/>
+<path d="M43.625 116C44.7543 116 45.8833 116.046 47.0088 116.139C48.155 116.235 48.9999 117.209 49 118.34V121.912C48.9998 122.974 48.2557 123.897 47.2168 124.085L47.0049 124.112L46.7305 124.134L46.5 124.152V126.375L46.4961 126.43C46.488 126.484 46.4675 126.537 46.4365 126.583C46.3953 126.645 46.3369 126.692 46.2686 126.721C46.2001 126.749 46.1245 126.757 46.0518 126.742C45.9792 126.728 45.9127 126.692 45.8604 126.64L43.542 124.322L43.4688 124.25L43.3662 124.249C42.3159 124.242 41.2744 124.197 40.2451 124.112C39.0969 124.018 38.2502 123.044 38.25 121.912V118.341C38.25 117.209 39.0937 116.235 40.2402 116.14C41.3558 116.047 42.4852 116 43.625 116Z" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="54.75" y="110.75" width="63.5" height="6.5" rx="3.25" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="54.75" y="121.75" width="38.5" height="6.5" rx="3.25" stroke="#DAE5FD" stroke-width="0.5"/>
+</g>
+<defs>
+<filter id="filter0_d_4059_3204" x="16.3846" y="52.1537" width="116.231" height="47.231" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="0.769231"/>
+<feGaussianBlur stdDeviation="1.53846"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_3204"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_3204" result="shape"/>
+</filter>
+<filter id="filter1_d_4059_3204" x="16.6538" y="77.2308" width="21.7949" height="21.795" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="1.28205" dy="-0.641026"/>
+<feGaussianBlur stdDeviation="2.5641"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_3204"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_3204" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_4059_3204" x1="75" y1="0" x2="75" y2="150" gradientUnits="userSpaceOnUse">
+<stop offset="0.0480598" stop-color="white" stop-opacity="0"/>
+<stop offset="0.348055" stop-color="white"/>
+<stop offset="0.649208" stop-color="white"/>
+<stop offset="0.931962" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint1_linear_4059_3204" x1="23.0641" y1="91.0132" x2="25.6282" y2="88.7696" gradientUnits="userSpaceOnUse">
+<stop offset="0.221633" stop-color="#DBDBDB"/>
+<stop offset="1" stop-color="#C9C9C9"/>
+</linearGradient>
+<linearGradient id="paint2_linear_4059_3204" x1="30.4359" y1="84.2821" x2="25.9487" y2="89.0897" gradientUnits="userSpaceOnUse">
+<stop stop-color="#DEDEDE"/>
+<stop offset="1" stop-color="#D3D0D0"/>
+</linearGradient>
+<clipPath id="clip0_4059_3204">
+<rect x="21" y="56" width="107" height="38" rx="10" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/assets/empty-states/home-calendar-dark.svg b/src/assets/empty-states/home-calendar-dark.svg
new file mode 100644
index 000000000..ef7cc9243
--- /dev/null
+++ b/src/assets/empty-states/home-calendar-dark.svg
@@ -0,0 +1,11 @@
+<svg width="316" height="120" viewBox="0 0 316 120" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="67.75" y="39.75" width="180.5" height="40.5" rx="10.25" fill="#202225"/>
+<rect x="67.75" y="39.75" width="180.5" height="40.5" rx="10.25" stroke="#2B3A63"/>
+<rect x="75.25" y="52.25" width="15.5" height="15.5" rx="7.75" fill="#202225"/>
+<rect x="75.25" y="52.25" width="15.5" height="15.5" rx="7.75" stroke="#2B3A63"/>
+<rect x="86.45" y="52.25" width="15.5" height="15.5" rx="7.75" fill="#202225"/>
+<rect x="86.45" y="52.25" width="15.5" height="15.5" rx="7.75" stroke="#2B3A63"/>
+<rect x="108.45" y="52.25" width="80.5" height="6.5" rx="3.25" stroke="#2B3A63"/>
+<rect x="108.45" y="64.25" width="80.5" height="3.5" rx="1.75" stroke="#2B3A63"/>
+<rect x="195.25" y="52.25" width="45.5" height="15.5" rx="7.75" stroke="#2B3A63"/>
+</svg>
diff --git a/src/assets/empty-states/home-calendar-light.svg b/src/assets/empty-states/home-calendar-light.svg
new file mode 100644
index 000000000..90251021a
--- /dev/null
+++ b/src/assets/empty-states/home-calendar-light.svg
@@ -0,0 +1,11 @@
+<svg width="316" height="120" viewBox="0 0 316 120" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="67.75" y="39.75" width="180.5" height="40.5" rx="10.25" fill="white"/>
+<rect x="67.75" y="39.75" width="180.5" height="40.5" rx="10.25" stroke="#DAE5FD"/>
+<rect x="75.25" y="52.25" width="15.5" height="15.5" rx="7.75" fill="white"/>
+<rect x="75.25" y="52.25" width="15.5" height="15.5" rx="7.75" stroke="#DAE5FD"/>
+<rect x="86.45" y="52.25" width="15.5" height="15.5" rx="7.75" fill="white"/>
+<rect x="86.45" y="52.25" width="15.5" height="15.5" rx="7.75" stroke="#DAE5FD"/>
+<rect x="108.45" y="52.25" width="80.5" height="6.5" rx="3.25" stroke="#DAE5FD"/>
+<rect x="108.45" y="64.25" width="80.5" height="3.5" rx="1.75" stroke="#DAE5FD"/>
+<rect x="195.25" y="52.25" width="45.5" height="15.5" rx="7.75" stroke="#DAE5FD"/>
+</svg>
diff --git a/src/assets/empty-states/home-history-dark.svg b/src/assets/empty-states/home-history-dark.svg
new file mode 100644
index 000000000..1f2bbcd3c
--- /dev/null
+++ b/src/assets/empty-states/home-history-dark.svg
@@ -0,0 +1,57 @@
+<svg width="560" height="102" viewBox="0 0 560 102" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="-35.75" y="4.75" width="200.5" height="90.5" rx="16.25" stroke="#233968" stroke-width="0.5"/>
+<rect x="-23.25" y="17.25" width="175.5" height="5.5" rx="2.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="-23.25" y="27.25" width="175.5" height="5.5" rx="2.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="-23.25" y="37.25" width="123.5" height="5.5" rx="2.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="116.75" y="67.25" width="15.5" height="15.5" rx="7.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="136.75" y="67.25" width="15.5" height="15.5" rx="7.75" stroke="#233968" stroke-width="0.5"/>
+<g filter="url(#filter0_d_4059_2430)">
+<g clip-path="url(#clip0_4059_2430)">
+<rect x="180.5" y="5" width="200" height="90" rx="16" fill="#0F0F0F"/>
+<rect x="192.5" y="17" width="176" height="6" rx="3" fill="#1B2844"/>
+<rect x="192.5" y="27" width="176" height="6" rx="3" fill="#1B2844"/>
+<rect x="192.5" y="37" width="124" height="6" rx="3" fill="#1B2844"/>
+<rect x="332.5" y="67" width="16" height="16" rx="8" fill="#1A1A1A"/>
+<rect x="352.5" y="67" width="16" height="16" rx="8" fill="#233968"/>
+<path d="M197.5 95L180.503 78C180.453 82.8279 181.004 86 185.001 90.5C190 95 192.355 94.9645 197.5 95Z" fill="#262626"/>
+<path d="M197.5 95L180.503 78C180.453 82.8279 181.004 86 185.001 90.5C190 95 192.355 94.9645 197.5 95Z" fill="black" fill-opacity="0.24"/>
+<g filter="url(#filter1_d_4059_2430)">
+<path d="M197.5 94C197.675 94.5265 197.877 94.7674 198.5 95H197.5L180.5 78V77C180.601 77.6254 180.551 77.8172 181.5 78L192.188 77.332C195.067 77.1521 197.5 79.4381 197.5 82.3223V94Z" fill="url(#paint0_linear_4059_2430)"/>
+</g>
+</g>
+<rect x="179.5" y="4" width="202" height="92" rx="17" stroke="#262626" stroke-width="2"/>
+</g>
+<rect x="396.25" y="4.75" width="200.5" height="90.5" rx="16.25" stroke="#233968" stroke-width="0.5"/>
+<rect x="408.75" y="17.25" width="175.5" height="5.5" rx="2.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="408.75" y="27.25" width="175.5" height="5.5" rx="2.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="408.75" y="37.25" width="123.5" height="5.5" rx="2.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="548.75" y="67.25" width="15.5" height="15.5" rx="7.75" stroke="#233968" stroke-width="0.5"/>
+<defs>
+<filter id="filter0_d_4059_2430" x="174.5" y="0" width="212" height="102" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="1"/>
+<feGaussianBlur stdDeviation="2"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_2430"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_2430" result="shape"/>
+</filter>
+<filter id="filter1_d_4059_2430" x="174.5" y="68" width="34" height="34" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="2" dy="-1"/>
+<feGaussianBlur stdDeviation="4"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_2430"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_2430" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_4059_2430" x1="196" y1="79" x2="189" y2="86.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="#404040"/>
+<stop offset="1" stop-color="#2B2B2B"/>
+</linearGradient>
+<clipPath id="clip0_4059_2430">
+<rect x="180.5" y="5" width="200" height="90" rx="16" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/assets/empty-states/home-history-light.svg b/src/assets/empty-states/home-history-light.svg
new file mode 100644
index 000000000..d9c2f931e
--- /dev/null
+++ b/src/assets/empty-states/home-history-light.svg
@@ -0,0 +1,61 @@
+<svg width="560" height="102" viewBox="0 0 560 102" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="-35.75" y="4.75" width="200.5" height="90.5" rx="16.25" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="-23.25" y="17.25" width="175.5" height="5.5" rx="2.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="-23.25" y="27.25" width="175.5" height="5.5" rx="2.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="-23.25" y="37.25" width="123.5" height="5.5" rx="2.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="116.75" y="67.25" width="15.5" height="15.5" rx="7.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="136.75" y="67.25" width="15.5" height="15.5" rx="7.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<g filter="url(#filter0_d_4059_2383)">
+<g clip-path="url(#clip0_4059_2383)">
+<rect x="180.5" y="5" width="200" height="90" rx="16" fill="white"/>
+<rect x="192.5" y="17" width="176" height="6" rx="3" fill="#E8EFFD"/>
+<rect x="192.5" y="27" width="176" height="6" rx="3" fill="#E8EFFD"/>
+<rect x="192.5" y="37" width="124" height="6" rx="3" fill="#E8EFFD"/>
+<rect x="332.5" y="67" width="16" height="16" rx="8" fill="#F7F7F7"/>
+<rect x="352.5" y="67" width="16" height="16" rx="8" fill="#DAE5FD"/>
+<path d="M197.5 95L180.503 78C180.453 82.8279 181.004 86 185.001 90.5C190 95 192.355 94.9645 197.5 95Z" fill="url(#paint0_linear_4059_2383)"/>
+<path d="M197.5 95L180.503 78C180.453 82.8279 181.004 86 185.001 90.5C190 95 192.355 94.9645 197.5 95Z" fill="black" fill-opacity="0.08"/>
+<g filter="url(#filter1_d_4059_2383)">
+<path d="M197.5 94C197.675 94.5265 197.877 94.7674 198.5 95H197.5L180.5 78V77C180.601 77.6254 180.551 77.8172 181.5 78L192.188 77.332C195.067 77.1521 197.5 79.4381 197.5 82.3223V94Z" fill="url(#paint1_linear_4059_2383)"/>
+</g>
+</g>
+<rect x="179.5" y="4" width="202" height="92" rx="17" stroke="#E6E6E6" stroke-width="2"/>
+</g>
+<rect x="396.25" y="4.75" width="200.5" height="90.5" rx="16.25" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="408.75" y="17.25" width="175.5" height="5.5" rx="2.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="408.75" y="27.25" width="175.5" height="5.5" rx="2.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="408.75" y="37.25" width="123.5" height="5.5" rx="2.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="548.75" y="67.25" width="15.5" height="15.5" rx="7.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<defs>
+<filter id="filter0_d_4059_2383" x="174.5" y="0" width="212" height="102" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="1"/>
+<feGaussianBlur stdDeviation="2"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_2383"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_2383" result="shape"/>
+</filter>
+<filter id="filter1_d_4059_2383" x="174.5" y="68" width="34" height="34" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="2" dy="-1"/>
+<feGaussianBlur stdDeviation="4"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_2383"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_2383" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_4059_2383" x1="184.5" y1="89.5" x2="188.5" y2="86" gradientUnits="userSpaceOnUse">
+<stop offset="0.221633" stop-color="#DBDBDB"/>
+<stop offset="1" stop-color="#C9C9C9"/>
+</linearGradient>
+<linearGradient id="paint1_linear_4059_2383" x1="196" y1="79" x2="189" y2="86.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="#DEDEDE"/>
+<stop offset="1" stop-color="#D3D0D0"/>
+</linearGradient>
+<clipPath id="clip0_4059_2383">
+<rect x="180.5" y="5" width="200" height="90" rx="16" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/assets/empty-states/notes-empty-dark.svg b/src/assets/empty-states/notes-empty-dark.svg
new file mode 100644
index 000000000..83abacc77
--- /dev/null
+++ b/src/assets/empty-states/notes-empty-dark.svg
@@ -0,0 +1,67 @@
+<svg width="327" height="117" viewBox="0 0 327 117" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.25" y="4.75" width="98.5" height="105.5" rx="16.25" stroke="#233968" stroke-width="0.5"/>
+<rect x="75.75" y="87.25" width="15.5" height="15.5" rx="7.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="8.75" y="17.25" width="80.5" height="9.5" rx="4.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="8.75" y="31.25" width="52.5" height="9.5" rx="4.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="8.75" y="51.25" width="80.5" height="3.5" rx="1.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="8.75" y="59.25" width="80.5" height="3.5" rx="1.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="8.75" y="67.25" width="70.5" height="3.5" rx="1.75" stroke="#233968" stroke-width="0.5"/>
+<g filter="url(#filter0_d_4059_2085)">
+<g clip-path="url(#clip0_4059_2085)">
+<rect x="114.5" y="5" width="98" height="105" rx="16" fill="#0F0F0F"/>
+<rect x="189.5" y="87" width="16" height="16" rx="8" fill="#233968"/>
+<g clip-path="url(#clip1_4059_2085)">
+<path d="M198.5 92.6666L199.833 94M200.558 93.2706C200.734 93.0944 200.833 92.8555 200.833 92.6062C200.833 92.357 200.734 92.118 200.558 91.9418C200.382 91.7656 200.143 91.6665 199.894 91.6665C199.645 91.6665 199.406 91.7654 199.229 91.9416L194.781 96.3913C194.703 96.4685 194.646 96.5635 194.614 96.668L194.174 98.1186C194.165 98.1475 194.164 98.1781 194.172 98.2072C194.179 98.2364 194.194 98.263 194.216 98.2843C194.237 98.3056 194.264 98.3207 194.293 98.328C194.322 98.3353 194.353 98.3346 194.381 98.326L195.832 97.886C195.937 97.8542 196.032 97.7973 196.109 97.7203L200.558 93.2706Z" stroke="#4079ED" stroke-width="0.666667" stroke-linecap="round" stroke-linejoin="round"/>
+</g>
+<rect x="122.5" y="17" width="81" height="10" rx="5" fill="#1B2844"/>
+<rect x="122.5" y="31" width="53" height="10" rx="5" fill="#1B2844"/>
+<rect x="122.5" y="51" width="81" height="4" rx="2" fill="#1A1A1A"/>
+<rect x="122.5" y="59" width="81" height="4" rx="2" fill="#1A1A1A"/>
+<rect x="122.5" y="67" width="71" height="4" rx="2" fill="#1A1A1A"/>
+<path d="M131.5 110L114.503 93C114.453 97.8279 115.004 101 119.001 105.5C124 110 126.355 109.964 131.5 110Z" fill="#262626"/>
+<path d="M131.5 110L114.503 93C114.453 97.8279 115.004 101 119.001 105.5C124 110 126.355 109.964 131.5 110Z" fill="black" fill-opacity="0.24"/>
+<g filter="url(#filter1_d_4059_2085)">
+<path d="M131.5 109C131.675 109.526 131.877 109.767 132.5 110H131.5L114.5 93V92C114.601 92.6254 114.551 92.8172 115.5 93L126.188 92.332C129.067 92.1521 131.5 94.4381 131.5 97.3223V109Z" fill="url(#paint0_linear_4059_2085)"/>
+</g>
+</g>
+<rect x="113.5" y="4" width="100" height="107" rx="17" stroke="#262626" stroke-width="2"/>
+</g>
+<rect x="228.25" y="4.75" width="98.5" height="105.5" rx="16.25" stroke="#233968" stroke-width="0.5"/>
+<rect x="303.75" y="87.25" width="15.5" height="15.5" rx="7.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="236.75" y="17.25" width="80.5" height="9.5" rx="4.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="236.75" y="31.25" width="52.5" height="9.5" rx="4.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="236.75" y="51.25" width="80.5" height="3.5" rx="1.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="236.75" y="59.25" width="80.5" height="3.5" rx="1.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="236.75" y="67.25" width="70.5" height="3.5" rx="1.75" stroke="#233968" stroke-width="0.5"/>
+<defs>
+<filter id="filter0_d_4059_2085" x="108.5" y="0" width="110" height="117" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="1"/>
+<feGaussianBlur stdDeviation="2"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_2085"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_2085" result="shape"/>
+</filter>
+<filter id="filter1_d_4059_2085" x="108.5" y="83" width="34" height="34" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="2" dy="-1"/>
+<feGaussianBlur stdDeviation="4"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_2085"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_2085" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_4059_2085" x1="130" y1="94" x2="123" y2="101.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="#404040"/>
+<stop offset="1" stop-color="#2B2B2B"/>
+</linearGradient>
+<clipPath id="clip0_4059_2085">
+<rect x="114.5" y="5" width="98" height="105" rx="16" fill="white"/>
+</clipPath>
+<clipPath id="clip1_4059_2085">
+<rect width="8" height="8" fill="white" transform="translate(193.5 91)"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/assets/empty-states/notes-empty-light.svg b/src/assets/empty-states/notes-empty-light.svg
new file mode 100644
index 000000000..e06fb4391
--- /dev/null
+++ b/src/assets/empty-states/notes-empty-light.svg
@@ -0,0 +1,71 @@
+<svg width="327" height="117" viewBox="0 0 327 117" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.25" y="4.75" width="98.5" height="105.5" rx="16.25" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="75.75" y="87.25" width="15.5" height="15.5" rx="7.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="8.75" y="17.25" width="80.5" height="9.5" rx="4.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="8.75" y="31.25" width="52.5" height="9.5" rx="4.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="8.75" y="51.25" width="80.5" height="3.5" rx="1.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="8.75" y="59.25" width="80.5" height="3.5" rx="1.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="8.75" y="67.25" width="70.5" height="3.5" rx="1.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<g filter="url(#filter0_d_4059_1482)">
+<g clip-path="url(#clip0_4059_1482)">
+<rect x="114.5" y="5" width="98" height="105" rx="16" fill="white"/>
+<rect x="189.5" y="87" width="16" height="16" rx="8" fill="#DAE5FD"/>
+<g clip-path="url(#clip1_4059_1482)">
+<path d="M198.5 92.6666L199.833 94M200.558 93.2706C200.734 93.0944 200.833 92.8555 200.833 92.6062C200.833 92.357 200.734 92.118 200.558 91.9418C200.382 91.7656 200.143 91.6665 199.894 91.6665C199.645 91.6665 199.406 91.7654 199.229 91.9416L194.781 96.3913C194.703 96.4685 194.646 96.5635 194.614 96.668L194.174 98.1186C194.165 98.1475 194.164 98.1781 194.172 98.2072C194.179 98.2364 194.194 98.263 194.216 98.2843C194.237 98.3056 194.264 98.3207 194.293 98.328C194.322 98.3353 194.353 98.3346 194.381 98.326L195.832 97.886C195.937 97.8542 196.032 97.7973 196.109 97.7203L200.558 93.2706Z" stroke="#4079ED" stroke-width="0.666667" stroke-linecap="round" stroke-linejoin="round"/>
+</g>
+<rect x="122.5" y="17" width="81" height="10" rx="5" fill="#E8EFFD"/>
+<rect x="122.5" y="31" width="53" height="10" rx="5" fill="#E8EFFD"/>
+<rect x="122.5" y="51" width="81" height="4" rx="2" fill="#F7F7F7"/>
+<rect x="122.5" y="59" width="81" height="4" rx="2" fill="#F7F7F7"/>
+<rect x="122.5" y="67" width="71" height="4" rx="2" fill="#F7F7F7"/>
+<path d="M131.5 110L114.503 93C114.453 97.8279 115.004 101 119.001 105.5C124 110 126.355 109.964 131.5 110Z" fill="url(#paint0_linear_4059_1482)"/>
+<path d="M131.5 110L114.503 93C114.453 97.8279 115.004 101 119.001 105.5C124 110 126.355 109.964 131.5 110Z" fill="black" fill-opacity="0.08"/>
+<g filter="url(#filter1_d_4059_1482)">
+<path d="M131.5 109C131.675 109.526 131.877 109.767 132.5 110H131.5L114.5 93V92C114.601 92.6254 114.551 92.8172 115.5 93L126.188 92.332C129.067 92.1521 131.5 94.4381 131.5 97.3223V109Z" fill="url(#paint1_linear_4059_1482)"/>
+</g>
+</g>
+<rect x="113.5" y="4" width="100" height="107" rx="17" stroke="#E6E6E6" stroke-width="2"/>
+</g>
+<rect x="228.25" y="4.75" width="98.5" height="105.5" rx="16.25" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="303.75" y="87.25" width="15.5" height="15.5" rx="7.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="236.75" y="17.25" width="80.5" height="9.5" rx="4.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="236.75" y="31.25" width="52.5" height="9.5" rx="4.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="236.75" y="51.25" width="80.5" height="3.5" rx="1.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="236.75" y="59.25" width="80.5" height="3.5" rx="1.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="236.75" y="67.25" width="70.5" height="3.5" rx="1.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<defs>
+<filter id="filter0_d_4059_1482" x="108.5" y="0" width="110" height="117" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="1"/>
+<feGaussianBlur stdDeviation="2"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_1482"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_1482" result="shape"/>
+</filter>
+<filter id="filter1_d_4059_1482" x="108.5" y="83" width="34" height="34" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="2" dy="-1"/>
+<feGaussianBlur stdDeviation="4"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_1482"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_1482" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_4059_1482" x1="118.5" y1="104.5" x2="122.5" y2="101" gradientUnits="userSpaceOnUse">
+<stop offset="0.221633" stop-color="#DBDBDB"/>
+<stop offset="1" stop-color="#C9C9C9"/>
+</linearGradient>
+<linearGradient id="paint1_linear_4059_1482" x1="130" y1="94" x2="123" y2="101.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="#DEDEDE"/>
+<stop offset="1" stop-color="#D3D0D0"/>
+</linearGradient>
+<clipPath id="clip0_4059_1482">
+<rect x="114.5" y="5" width="98" height="105" rx="16" fill="white"/>
+</clipPath>
+<clipPath id="clip1_4059_1482">
+<rect width="8" height="8" fill="white" transform="translate(193.5 91)"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/assets/empty-states/notes-shared-space-dark.svg b/src/assets/empty-states/notes-shared-space-dark.svg
new file mode 100644
index 000000000..bafbf896e
--- /dev/null
+++ b/src/assets/empty-states/notes-shared-space-dark.svg
@@ -0,0 +1,49 @@
+<svg width="134" height="139" viewBox="0 0 134 139" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g filter="url(#filter0_d_4059_4242)">
+<g clip-path="url(#clip0_4059_4242)">
+<rect x="46.5" y="49.5" width="40" height="40" rx="12.3077" fill="#0F0F0F"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M63.375 65.125C63.375 64.2962 63.7042 63.5013 64.2903 62.9153C64.8763 62.3292 65.6712 62 66.5 62C67.3288 62 68.1237 62.3292 68.7097 62.9153C69.2958 63.5013 69.625 64.2962 69.625 65.125C69.625 65.9538 69.2958 66.7487 68.7097 67.3347C68.1237 67.9208 67.3288 68.25 66.5 68.25C65.6712 68.25 64.8763 67.9208 64.2903 67.3347C63.7042 66.7487 63.375 65.9538 63.375 65.125ZM69.625 67.625C69.625 66.962 69.8884 66.3261 70.3572 65.8572C70.8261 65.3884 71.462 65.125 72.125 65.125C72.788 65.125 73.4239 65.3884 73.8928 65.8572C74.3616 66.3261 74.625 66.962 74.625 67.625C74.625 68.288 74.3616 68.9239 73.8928 69.3928C73.4239 69.8616 72.788 70.125 72.125 70.125C71.462 70.125 70.8261 69.8616 70.3572 69.3928C69.8884 68.9239 69.625 68.288 69.625 67.625ZM58.375 67.625C58.375 66.962 58.6384 66.3261 59.1072 65.8572C59.5761 65.3884 60.212 65.125 60.875 65.125C61.538 65.125 62.1739 65.3884 62.6428 65.8572C63.1116 66.3261 63.375 66.962 63.375 67.625C63.375 68.288 63.1116 68.9239 62.6428 69.3928C62.1739 69.8616 61.538 70.125 60.875 70.125C60.212 70.125 59.5761 69.8616 59.1072 69.3928C58.6384 68.9239 58.375 68.288 58.375 67.625ZM61.7583 72.0975C62.2666 71.3009 62.9676 70.6452 63.7964 70.1912C64.6251 69.7372 65.555 69.4995 66.5 69.5C67.2915 69.4993 68.0743 69.6657 68.797 69.9885C69.5197 70.3112 70.1661 70.7829 70.6939 71.3728C71.2217 71.9627 71.619 72.6574 71.8597 73.4114C72.1004 74.1654 72.1792 74.9618 72.0908 75.7483C72.08 75.8461 72.0463 75.9398 71.9925 76.0221C71.9386 76.1043 71.8661 76.1727 71.7808 76.2217C70.1738 77.1438 68.3528 77.6277 66.5 77.625C64.5792 77.625 62.775 77.115 61.2192 76.2217C61.1339 76.1727 61.0614 76.1043 61.0075 76.0221C60.9537 75.9398 60.92 75.8461 60.9092 75.7483C60.7692 74.4705 61.0687 73.1831 61.7583 72.0983V72.0975Z" fill="#303030"/>
+<path d="M60.7351 71.3782C59.9132 72.6469 59.5303 74.1502 59.6451 75.6574C59.1447 75.5815 58.6525 75.4588 58.1751 75.2907L58.0792 75.2574C57.9937 75.2271 57.9189 75.1726 57.8637 75.1005C57.8085 75.0285 57.7754 74.942 57.7684 74.8516L57.7601 74.7507C57.7264 74.3324 57.7774 73.9115 57.9099 73.5133C58.0424 73.115 58.2538 72.7476 58.5315 72.4328C58.8092 72.1181 59.1474 71.8625 59.526 71.6813C59.9046 71.5001 60.3158 71.397 60.7351 71.3782ZM73.3551 75.6574C73.4699 74.1502 73.0869 72.6469 72.2651 71.3782C72.6844 71.397 73.0956 71.5001 73.4742 71.6813C73.8528 71.8625 74.191 72.1181 74.4686 72.4328C74.7463 72.7476 74.9577 73.115 75.0902 73.5133C75.2228 73.9115 75.2737 74.3324 75.2401 74.7507L75.2317 74.8516C75.2246 74.9419 75.1914 75.0282 75.1362 75.1C75.0811 75.1719 75.0063 75.2263 74.9209 75.2566L74.8251 75.2899C74.3526 75.4566 73.8617 75.5807 73.3551 75.6574Z" fill="#303030"/>
+<path d="M57.3611 90L46.5019 79.1389C46.4698 82.2234 46.8219 84.25 49.3754 87.125C52.5693 90 54.074 89.9773 57.3611 90Z" fill="#262626"/>
+<path d="M57.3611 90L46.5019 79.1389C46.4698 82.2234 46.8219 84.25 49.3754 87.125C52.5693 90 54.074 89.9773 57.3611 90Z" fill="black" fill-opacity="0.24"/>
+<g filter="url(#filter1_d_4059_4242)">
+<path d="M57.3611 89.3611C57.4727 89.6975 57.6017 89.8514 58 90H57.3611L46.5 79.1389V78.5C46.5645 78.8995 46.5323 79.0221 47.1389 79.1389L53.9674 78.7121C55.8064 78.5972 57.3611 80.0577 57.3611 81.9003V89.3611Z" fill="url(#paint0_linear_4059_4242)"/>
+</g>
+</g>
+<rect x="45.7308" y="48.7308" width="41.5385" height="41.5385" rx="13.0769" stroke="#262626" stroke-width="1.53846"/>
+</g>
+<rect x="93.25" y="23.25" width="40.5" height="40.5" rx="12.5577" stroke="#233968" stroke-width="0.5"/>
+<rect x="46.25" y="0.25" width="40.5" height="40.5" rx="12.5577" stroke="#233968" stroke-width="0.5"/>
+<rect x="0.25" y="23.25" width="40.5" height="40.5" rx="12.5577" stroke="#233968" stroke-width="0.5"/>
+<rect x="0.25" y="74.25" width="40.5" height="40.5" rx="12.5577" stroke="#233968" stroke-width="0.5"/>
+<rect x="46.25" y="98.25" width="40.5" height="40.5" rx="12.5577" stroke="#233968" stroke-width="0.5"/>
+<rect x="93.25" y="74.25" width="40.5" height="40.5" rx="12.5577" stroke="#233968" stroke-width="0.5"/>
+<defs>
+<filter id="filter0_d_4059_4242" x="41.8846" y="45.6539" width="49.2308" height="49.2308" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="0.769231"/>
+<feGaussianBlur stdDeviation="1.53846"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_4242"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_4242" result="shape"/>
+</filter>
+<filter id="filter1_d_4059_4242" x="42.6667" y="72.75" width="21.7222" height="21.7222" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="1.27778" dy="-0.638889"/>
+<feGaussianBlur stdDeviation="2.55556"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_4242"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_4242" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_4059_4242" x1="56.4028" y1="79.7778" x2="51.9306" y2="84.5694" gradientUnits="userSpaceOnUse">
+<stop stop-color="#404040"/>
+<stop offset="1" stop-color="#2B2B2B"/>
+</linearGradient>
+<clipPath id="clip0_4059_4242">
+<rect x="46.5" y="49.5" width="40" height="40" rx="12.3077" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/assets/empty-states/notes-shared-space-light.svg b/src/assets/empty-states/notes-shared-space-light.svg
new file mode 100644
index 000000000..df0bced64
--- /dev/null
+++ b/src/assets/empty-states/notes-shared-space-light.svg
@@ -0,0 +1,53 @@
+<svg width="134" height="139" viewBox="0 0 134 139" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g filter="url(#filter0_d_4059_3702)">
+<g clip-path="url(#clip0_4059_3702)">
+<rect x="46.5" y="49.5" width="40" height="40" rx="12.3077" fill="white"/>
+<path d="M57.3974 89.5002L46.5019 78.6028C46.4697 81.6976 46.823 83.731 49.3851 86.6156C52.5896 89.5002 54.0993 89.4775 57.3974 89.5002Z" fill="url(#paint0_linear_4059_3702)"/>
+<path d="M57.3974 89.5002L46.5019 78.6028C46.4697 81.6976 46.823 83.731 49.3851 86.6156C52.5896 89.5002 54.0993 89.4775 57.3974 89.5002Z" fill="black" fill-opacity="0.08"/>
+<g filter="url(#filter1_d_4059_3702)">
+<path d="M57.3974 88.859C57.5094 89.1965 57.6388 89.3509 58.0385 89.5H57.3974L46.5 78.6026V77.9615C46.5647 78.3624 46.5324 78.4854 47.141 78.6026L53.9924 78.1744C55.8376 78.059 57.3974 79.5245 57.3974 81.3733V88.859Z" fill="url(#paint1_linear_4059_3702)"/>
+</g>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M63.375 65.125C63.375 64.2962 63.7042 63.5013 64.2903 62.9153C64.8763 62.3292 65.6712 62 66.5 62C67.3288 62 68.1237 62.3292 68.7097 62.9153C69.2958 63.5013 69.625 64.2962 69.625 65.125C69.625 65.9538 69.2958 66.7487 68.7097 67.3347C68.1237 67.9208 67.3288 68.25 66.5 68.25C65.6712 68.25 64.8763 67.9208 64.2903 67.3347C63.7042 66.7487 63.375 65.9538 63.375 65.125ZM69.625 67.625C69.625 66.962 69.8884 66.3261 70.3572 65.8572C70.8261 65.3884 71.462 65.125 72.125 65.125C72.788 65.125 73.4239 65.3884 73.8928 65.8572C74.3616 66.3261 74.625 66.962 74.625 67.625C74.625 68.288 74.3616 68.9239 73.8928 69.3928C73.4239 69.8616 72.788 70.125 72.125 70.125C71.462 70.125 70.8261 69.8616 70.3572 69.3928C69.8884 68.9239 69.625 68.288 69.625 67.625ZM58.375 67.625C58.375 66.962 58.6384 66.3261 59.1072 65.8572C59.5761 65.3884 60.212 65.125 60.875 65.125C61.538 65.125 62.1739 65.3884 62.6428 65.8572C63.1116 66.3261 63.375 66.962 63.375 67.625C63.375 68.288 63.1116 68.9239 62.6428 69.3928C62.1739 69.8616 61.538 70.125 60.875 70.125C60.212 70.125 59.5761 69.8616 59.1072 69.3928C58.6384 68.9239 58.375 68.288 58.375 67.625ZM61.7583 72.0975C62.2666 71.3009 62.9676 70.6452 63.7964 70.1912C64.6251 69.7372 65.555 69.4995 66.5 69.5C67.2915 69.4993 68.0743 69.6657 68.797 69.9885C69.5197 70.3112 70.1661 70.7829 70.6939 71.3728C71.2217 71.9627 71.619 72.6574 71.8597 73.4114C72.1004 74.1654 72.1792 74.9618 72.0908 75.7483C72.08 75.8461 72.0463 75.9398 71.9925 76.0221C71.9386 76.1043 71.8661 76.1727 71.7808 76.2217C70.1738 77.1438 68.3528 77.6277 66.5 77.625C64.5792 77.625 62.775 77.115 61.2192 76.2217C61.1339 76.1727 61.0614 76.1043 61.0075 76.0221C60.9537 75.9398 60.92 75.8461 60.9092 75.7483C60.7692 74.4705 61.0687 73.1831 61.7583 72.0983V72.0975Z" fill="#E6E6E6"/>
+<path d="M60.7351 71.3782C59.9132 72.6469 59.5303 74.1502 59.6451 75.6574C59.1447 75.5815 58.6525 75.4588 58.1751 75.2907L58.0792 75.2574C57.9937 75.2271 57.9189 75.1726 57.8637 75.1005C57.8085 75.0285 57.7754 74.942 57.7684 74.8516L57.7601 74.7507C57.7264 74.3324 57.7774 73.9115 57.9099 73.5133C58.0424 73.115 58.2538 72.7476 58.5315 72.4328C58.8092 72.1181 59.1474 71.8625 59.526 71.6813C59.9046 71.5001 60.3158 71.397 60.7351 71.3782ZM73.3551 75.6574C73.4699 74.1502 73.0869 72.6469 72.2651 71.3782C72.6844 71.397 73.0956 71.5001 73.4742 71.6813C73.8528 71.8625 74.191 72.1181 74.4686 72.4328C74.7463 72.7476 74.9577 73.115 75.0902 73.5133C75.2228 73.9115 75.2737 74.3324 75.2401 74.7507L75.2317 74.8516C75.2246 74.9419 75.1914 75.0282 75.1362 75.1C75.0811 75.1719 75.0063 75.2263 74.9209 75.2566L74.8251 75.2899C74.3526 75.4566 73.8617 75.5807 73.3551 75.6574Z" fill="#E6E6E6"/>
+</g>
+<rect x="45.7308" y="48.7308" width="41.5385" height="41.5385" rx="13.0769" stroke="#E6E6E6" stroke-width="1.53846"/>
+</g>
+<rect x="93.25" y="23.25" width="40.5" height="40.5" rx="12.5577" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="46.25" y="0.25" width="40.5" height="40.5" rx="12.5577" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="0.25" y="23.25" width="40.5" height="40.5" rx="12.5577" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="0.25" y="74.25" width="40.5" height="40.5" rx="12.5577" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="46.25" y="98.25" width="40.5" height="40.5" rx="12.5577" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="93.25" y="74.25" width="40.5" height="40.5" rx="12.5577" stroke="#DAE5FD" stroke-width="0.5"/>
+<defs>
+<filter id="filter0_d_4059_3702" x="41.8846" y="45.6539" width="49.2308" height="49.2308" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="0.769231"/>
+<feGaussianBlur stdDeviation="1.53846"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_3702"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_3702" result="shape"/>
+</filter>
+<filter id="filter1_d_4059_3702" x="42.6538" y="72.1923" width="21.7949" height="21.7949" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="1.28205" dy="-0.641026"/>
+<feGaussianBlur stdDeviation="2.5641"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_3702"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_3702" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_4059_3702" x1="49.0641" y1="85.9746" x2="51.6282" y2="83.731" gradientUnits="userSpaceOnUse">
+<stop offset="0.221633" stop-color="#DBDBDB"/>
+<stop offset="1" stop-color="#C9C9C9"/>
+</linearGradient>
+<linearGradient id="paint1_linear_4059_3702" x1="56.4359" y1="79.2436" x2="51.9487" y2="84.0513" gradientUnits="userSpaceOnUse">
+<stop stop-color="#DEDEDE"/>
+<stop offset="1" stop-color="#D3D0D0"/>
+</linearGradient>
+<clipPath id="clip0_4059_3702">
+<rect x="46.5" y="49.5" width="40" height="40" rx="12.3077" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/assets/empty-states/notes-transcripts-dark.svg b/src/assets/empty-states/notes-transcripts-dark.svg
new file mode 100644
index 000000000..31ca5dc8e
--- /dev/null
+++ b/src/assets/empty-states/notes-transcripts-dark.svg
@@ -0,0 +1,140 @@
+<svg width="590" height="77" viewBox="0 0 590 77" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_4059_4708)">
+<mask id="mask0_4059_4708" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="-26" y="0" width="641" height="77">
+<rect x="-26" width="641" height="77" fill="url(#paint0_linear_4059_4708)"/>
+</mask>
+<g mask="url(#mask0_4059_4708)">
+<rect x="-21.25" y="17.75" width="200.5" height="42.5" rx="12.25" fill="#0F0F0F"/>
+<rect x="-21.25" y="17.75" width="200.5" height="42.5" rx="12.25" stroke="#233968" stroke-width="0.5"/>
+<rect x="1.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="6.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="11.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="16.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="21.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="26.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="31.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="36.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="41.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="46.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="51.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="56.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="61.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="66.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="71.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="76.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="81.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="86.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="91.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="96.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="101.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="106.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="111.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="116.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="135.25" y="31.25" width="31.5" height="15.5" rx="7.75" stroke="#233968" stroke-width="0.5"/>
+<g filter="url(#filter0_d_4059_4708)">
+<g clip-path="url(#clip1_4059_4708)">
+<rect x="195" y="18" width="200" height="42" rx="12" fill="#0F0F0F"/>
+<rect x="207" y="33" width="2" height="12" rx="1" fill="#151C2A"/>
+<rect x="212" y="30" width="2" height="18" rx="1" fill="#151C2A"/>
+<rect x="217" y="33" width="2" height="12" rx="1" fill="#151C2A"/>
+<rect x="222" y="33" width="2" height="12" rx="1" fill="#151C2A"/>
+<rect x="227" y="34.5" width="2" height="9" rx="1" fill="#1B2844"/>
+<rect x="232" y="34.5" width="2" height="9" rx="1" fill="#1B2844"/>
+<rect x="237" y="34.5" width="2" height="9" rx="1" fill="#1B2844"/>
+<rect x="242" y="30" width="2" height="18" rx="1" fill="#1B2844"/>
+<rect x="247" y="33" width="2" height="12" rx="1" fill="#233968"/>
+<rect x="252" y="33" width="2" height="12" rx="1" fill="#233968"/>
+<rect x="257" y="33" width="2" height="12" rx="1" fill="#233968"/>
+<rect x="262" y="33" width="2" height="12" rx="1" fill="#233968"/>
+<rect x="267" y="33" width="2" height="12" rx="1" fill="#233968"/>
+<rect x="272" y="33" width="2" height="12" rx="1" fill="#233968"/>
+<rect x="277" y="33" width="2" height="12" rx="1" fill="#233968"/>
+<rect x="282" y="30" width="2" height="18" rx="1" fill="#1B2844"/>
+<rect x="287" y="33" width="2" height="12" rx="1" fill="#1B2844"/>
+<rect x="292" y="34.5" width="2" height="9" rx="1" fill="#1B2844"/>
+<rect x="297" y="34.5" width="2" height="9" rx="1" fill="#1B2844"/>
+<rect x="302" y="30" width="2" height="18" rx="1" fill="#151C2A"/>
+<rect x="307" y="34.5" width="2" height="9" rx="1" fill="#151C2A"/>
+<rect x="312" y="33" width="2" height="12" rx="1" fill="#151C2A"/>
+<rect x="317" y="30" width="2" height="18" rx="1" fill="#151C2A"/>
+<rect x="322" y="30" width="2" height="18" rx="1" fill="#151C2A"/>
+<rect x="327" y="33" width="2" height="12" rx="1" fill="#151C2A"/>
+<rect x="332" y="34.5" width="2" height="9" rx="1" fill="#151C2A"/>
+<rect x="351" y="31" width="32" height="16" rx="8" fill="#1A1A1A"/>
+<path d="M379 62L395.997 45C396.047 49.8279 395.496 53 391.499 57.5C386.5 62 384.145 61.9645 379 62Z" fill="#262626"/>
+<path d="M379 62L395.997 45C396.047 49.8279 395.496 53 391.499 57.5C386.5 62 384.145 61.9645 379 62Z" fill="black" fill-opacity="0.24"/>
+<g filter="url(#filter1_d_4059_4708)">
+<path d="M379 61C378.825 61.5265 378.623 61.7674 378 62H379L396 45V44C395.899 44.6254 395.949 44.8172 395 45L384.312 44.332C381.433 44.1521 379 46.4381 379 49.3223V61Z" fill="url(#paint1_linear_4059_4708)"/>
+</g>
+</g>
+<rect x="194" y="17" width="202" height="44" rx="13" stroke="#262626" stroke-width="2"/>
+</g>
+<rect x="410.75" y="17.75" width="200.5" height="42.5" rx="12.25" fill="#0F0F0F"/>
+<rect x="410.75" y="17.75" width="200.5" height="42.5" rx="12.25" stroke="#233968" stroke-width="0.5"/>
+<rect x="423.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="428.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="433.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="438.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="443.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="448.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="453.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="458.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="463.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="468.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="473.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="478.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="483.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="488.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="493.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="498.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="503.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="508.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="513.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="518.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="523.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="528.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="533.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="538.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="543.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="548.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#233968" stroke-width="0.5"/>
+<rect x="567.25" y="31.25" width="31.5" height="15.5" rx="7.75" stroke="#233968" stroke-width="0.5"/>
+</g>
+</g>
+<defs>
+<filter id="filter0_d_4059_4708" x="189" y="13" width="212" height="54" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="1"/>
+<feGaussianBlur stdDeviation="2"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_4708"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_4708" result="shape"/>
+</filter>
+<filter id="filter1_d_4059_4708" x="372" y="35" width="34" height="34" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="2" dy="-1"/>
+<feGaussianBlur stdDeviation="4"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_4708"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_4708" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_4059_4708" x1="-26" y1="38.5" x2="615" y2="38.5" gradientUnits="userSpaceOnUse">
+<stop offset="0.0680385" stop-color="white" stop-opacity="0"/>
+<stop offset="0.350792" stop-color="white"/>
+<stop offset="0.651945" stop-color="white"/>
+<stop offset="0.95194" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint1_linear_4059_4708" x1="380.5" y1="46" x2="387.5" y2="53.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="#404040"/>
+<stop offset="1" stop-color="#2B2B2B"/>
+</linearGradient>
+<clipPath id="clip0_4059_4708">
+<rect width="590" height="77" fill="white"/>
+</clipPath>
+<clipPath id="clip1_4059_4708">
+<rect x="195" y="18" width="200" height="42" rx="12" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/assets/empty-states/notes-transcripts-light.svg b/src/assets/empty-states/notes-transcripts-light.svg
new file mode 100644
index 000000000..a5ac33287
--- /dev/null
+++ b/src/assets/empty-states/notes-transcripts-light.svg
@@ -0,0 +1,144 @@
+<svg width="590" height="77" viewBox="0 0 590 77" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_4059_4256)">
+<mask id="mask0_4059_4256" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="-26" y="0" width="641" height="77">
+<rect x="-26" width="641" height="77" fill="url(#paint0_linear_4059_4256)"/>
+</mask>
+<g mask="url(#mask0_4059_4256)">
+<rect x="-21.25" y="17.75" width="200.5" height="42.5" rx="12.25" fill="white"/>
+<rect x="-21.25" y="17.75" width="200.5" height="42.5" rx="12.25" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="1.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="6.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="11.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="16.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="21.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="26.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="31.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="36.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="41.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="46.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="51.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="56.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="61.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="66.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="71.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="76.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="81.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="86.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="91.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="96.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="101.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="106.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="111.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="116.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="135.25" y="31.25" width="31.5" height="15.5" rx="7.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<g filter="url(#filter0_d_4059_4256)">
+<g clip-path="url(#clip1_4059_4256)">
+<rect x="195" y="18" width="200" height="42" rx="12" fill="white"/>
+<rect x="207" y="33" width="2" height="12" rx="1" fill="#F2F6FF"/>
+<rect x="212" y="30" width="2" height="18" rx="1" fill="#F2F6FF"/>
+<rect x="217" y="33" width="2" height="12" rx="1" fill="#F2F6FF"/>
+<rect x="222" y="33" width="2" height="12" rx="1" fill="#F2F6FF"/>
+<rect x="227" y="34.5" width="2" height="9" rx="1" fill="#E8EFFD"/>
+<rect x="232" y="34.5" width="2" height="9" rx="1" fill="#E8EFFD"/>
+<rect x="237" y="34.5" width="2" height="9" rx="1" fill="#E8EFFD"/>
+<rect x="242" y="30" width="2" height="18" rx="1" fill="#E8EFFD"/>
+<rect x="247" y="33" width="2" height="12" rx="1" fill="#DAE5FD"/>
+<rect x="252" y="33" width="2" height="12" rx="1" fill="#DAE5FD"/>
+<rect x="257" y="33" width="2" height="12" rx="1" fill="#DAE5FD"/>
+<rect x="262" y="33" width="2" height="12" rx="1" fill="#DAE5FD"/>
+<rect x="267" y="33" width="2" height="12" rx="1" fill="#DAE5FD"/>
+<rect x="272" y="33" width="2" height="12" rx="1" fill="#DAE5FD"/>
+<rect x="277" y="33" width="2" height="12" rx="1" fill="#DAE5FD"/>
+<rect x="282" y="30" width="2" height="18" rx="1" fill="#E8EFFD"/>
+<rect x="287" y="33" width="2" height="12" rx="1" fill="#E8EFFD"/>
+<rect x="292" y="34.5" width="2" height="9" rx="1" fill="#E8EFFD"/>
+<rect x="297" y="34.5" width="2" height="9" rx="1" fill="#E8EFFD"/>
+<rect x="302" y="30" width="2" height="18" rx="1" fill="#F2F6FF"/>
+<rect x="307" y="34.5" width="2" height="9" rx="1" fill="#F2F6FF"/>
+<rect x="312" y="33" width="2" height="12" rx="1" fill="#F2F6FF"/>
+<rect x="317" y="30" width="2" height="18" rx="1" fill="#F2F6FF"/>
+<rect x="322" y="30" width="2" height="18" rx="1" fill="#F2F6FF"/>
+<rect x="327" y="33" width="2" height="12" rx="1" fill="#F2F6FF"/>
+<rect x="332" y="34.5" width="2" height="9" rx="1" fill="#F2F6FF"/>
+<rect x="351" y="31" width="32" height="16" rx="8" fill="#F7F7F7"/>
+<path d="M379 61L395.997 44C396.047 48.8279 395.496 52 391.499 56.5C386.5 61 384.145 60.9645 379 61Z" fill="url(#paint1_linear_4059_4256)"/>
+<path d="M379 61L395.997 44C396.047 48.8279 395.496 52 391.499 56.5C386.5 61 384.145 60.9645 379 61Z" fill="black" fill-opacity="0.08"/>
+<g filter="url(#filter1_d_4059_4256)">
+<path d="M379 60C378.825 60.5265 378.623 60.7674 378 61H379L396 44V43C395.899 43.6254 395.949 43.8172 395 44L384.312 43.332C381.433 43.1521 379 45.4381 379 48.3223V60Z" fill="url(#paint2_linear_4059_4256)"/>
+</g>
+</g>
+<rect x="194" y="17" width="202" height="44" rx="13" stroke="#E6E6E6" stroke-width="2"/>
+</g>
+<rect x="410.75" y="17.75" width="200.5" height="42.5" rx="12.25" fill="white"/>
+<rect x="410.75" y="17.75" width="200.5" height="42.5" rx="12.25" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="423.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="428.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="433.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="438.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="443.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="448.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="453.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="458.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="463.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="468.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="473.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="478.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="483.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="488.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="493.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="498.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="503.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="508.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="513.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="518.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="523.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="528.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="533.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="538.25" y="30.25" width="1.5" height="17.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="543.25" y="33.25" width="1.5" height="11.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="548.25" y="34.75" width="1.5" height="8.5" rx="0.75" stroke="#DAE5FD" stroke-width="0.5"/>
+<rect x="567.25" y="31.25" width="31.5" height="15.5" rx="7.75" stroke="#DAE5FD" stroke-width="0.5"/>
+</g>
+</g>
+<defs>
+<filter id="filter0_d_4059_4256" x="189" y="13" width="212" height="54" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="1"/>
+<feGaussianBlur stdDeviation="2"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_4256"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_4256" result="shape"/>
+</filter>
+<filter id="filter1_d_4059_4256" x="372" y="34" width="34" height="34" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="2" dy="-1"/>
+<feGaussianBlur stdDeviation="4"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4059_4256"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4059_4256" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_4059_4256" x1="-26" y1="38.5" x2="615" y2="38.5" gradientUnits="userSpaceOnUse">
+<stop offset="0.0680385" stop-color="white" stop-opacity="0"/>
+<stop offset="0.350792" stop-color="white"/>
+<stop offset="0.651945" stop-color="white"/>
+<stop offset="0.95194" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint1_linear_4059_4256" x1="392" y1="55.5" x2="388" y2="52" gradientUnits="userSpaceOnUse">
+<stop offset="0.221633" stop-color="#DBDBDB"/>
+<stop offset="1" stop-color="#C9C9C9"/>
+</linearGradient>
+<linearGradient id="paint2_linear_4059_4256" x1="380.5" y1="45" x2="387.5" y2="52.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="#DEDEDE"/>
+<stop offset="1" stop-color="#D3D0D0"/>
+</linearGradient>
+<clipPath id="clip0_4059_4256">
+<rect width="590" height="77" fill="white"/>
+</clipPath>
+<clipPath id="clip1_4059_4256">
+<rect x="195" y="18" width="200" height="42" rx="12" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsx
index 106c8f4ed..332368815 100644
--- a/src/components/ControlPanel.tsx
+++ b/src/components/ControlPanel.tsx
@@ -1168,6 +1168,7 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
onRetryTranscription={retryTranscription}
showDiscarded={showDiscarded}
onToggleDiscarded={toggleShowDiscarded}
+ userName={user?.name}
onOpenSettings={(section) => {
setSettingsSection(section);
setShowSettings(true);
diff --git a/src/components/DictionaryEmptyIllustration.tsx b/src/components/DictionaryEmptyIllustration.tsx
new file mode 100644
index 000000000..893c05556
--- /dev/null
+++ b/src/components/DictionaryEmptyIllustration.tsx
@@ -0,0 +1,93 @@
+import { useTranslation } from "react-i18next";
+import { NotebookPen, PanelRight } from "./icons";
+
+interface DictionaryEmptyIllustrationProps {
+ variant: "dictionary" | "snippets";
+}
+
+export default function DictionaryEmptyIllustration({ variant }: DictionaryEmptyIllustrationProps) {
+ const { t } = useTranslation();
+ const isSnippet = variant === "snippets";
+
+ return (
+ <div aria-hidden="true" className="absolute inset-y-0 end-0 hidden w-2/5 md:block">
+ <span className="absolute -end-10 top-1/2 flex size-80 -translate-y-1/2 items-center justify-center">
+ <svg
+ viewBox="0 0 320 320"
+ fill="none"
+ className="absolute inset-0 size-full text-primary/15 dark:text-primary/30"
+ >
+ <circle
+ cx="160"
+ cy="160"
+ r="152"
+ stroke="currentColor"
+ strokeWidth="2"
+ strokeDasharray="14 16"
+ />
+ <circle
+ cx="160"
+ cy="160"
+ r="92"
+ stroke="currentColor"
+ strokeWidth="2"
+ strokeDasharray="14 16"
+ />
+ </svg>
+ <span className="flex size-18 items-center justify-center rounded-full bg-primary/10 text-primary dark:bg-primary/20">
+ {isSnippet ? <PanelRight size={28} /> : <NotebookPen size={28} />}
+ </span>
+ </span>
+
+ {isSnippet ? (
+ <>
+ <span
+ dir="auto"
+ className="absolute start-16 top-7 flex flex-col gap-1 rounded-2xl border border-border/70 bg-card px-4 py-2.5 text-sm shadow-sm dark:bg-surface-window"
+ >
+ <span className="italic text-foreground/50 dark:text-foreground/65">
+ “{t("dictionary.snippets.examples.signoffTrigger")}”
+ </span>
+ <span className="italic text-primary">
+ <span className="me-2 text-foreground/50 dark:text-foreground/65">↳</span>
+ {t("dictionary.snippets.examples.signoffText")}
+ </span>
+ </span>
+ <span
+ dir="auto"
+ className="absolute bottom-7 end-2 flex flex-col gap-1 rounded-2xl border border-border/70 bg-card px-4 py-2.5 text-sm shadow-sm dark:bg-surface-window"
+ >
+ <span className="italic text-foreground/50 dark:text-foreground/65">
+ “{t("dictionary.snippets.examples.linkedinTrigger")}”
+ </span>
+ <span className="italic text-primary">
+ <span className="me-2 text-foreground/50 dark:text-foreground/65">↳</span>
+ {t("dictionary.snippets.examples.linkedinText")}
+ </span>
+ </span>
+ </>
+ ) : (
+ <>
+ <span
+ dir="ltr"
+ className="absolute start-16 top-7 flex items-center gap-2 rounded-full border border-border/70 bg-card px-4 py-2.5 text-sm shadow-sm dark:bg-surface-window"
+ >
+ <span className="italic text-foreground/50 line-through dark:text-foreground/65">
+ open whisper
+ </span>
+ <span className="font-medium text-primary">OpenWhispr</span>
+ </span>
+ <span
+ dir="ltr"
+ className="absolute bottom-7 end-2 flex items-center gap-2 rounded-full border border-border/70 bg-card px-4 py-2.5 text-sm shadow-sm dark:bg-surface-window"
+ >
+ <span className="italic text-foreground/50 line-through dark:text-foreground/65">
+ Cameren
+ </span>
+ <span className="font-medium text-primary">Cameron</span>
+ </span>
+ </>
+ )}
+ </div>
+ );
+}
diff --git a/src/components/DictionaryView.tsx b/src/components/DictionaryView.tsx
index 8a3f6945b..7744df7e8 100644
--- a/src/components/DictionaryView.tsx
+++ b/src/components/DictionaryView.tsx
@@ -1,15 +1,27 @@
import { useCallback, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
-import { BookOpen, CornerDownLeft, Download, Pencil, Plus, Sparkles, Upload, X } from "./icons";
+import {
+ CornerDownLeft,
+ Download,
+ NotebookPen,
+ PanelRight,
+ Pencil,
+ Plus,
+ Sparkles,
+ Upload,
+ X,
+} from "./icons";
import { Input } from "./ui/input";
import { Textarea } from "./ui/textarea";
import { Button } from "./ui/button";
import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";
import { cn } from "./lib/utils";
+import { CARD_SURFACE_CLASS } from "./ui/surfaces";
import { ConfirmDialog } from "./ui/dialog";
import { Tabs, TabsList, TabsTrigger, TabsContent } from "./ui/tabs";
import { useToast } from "./ui/useToast";
import SnippetsView from "./SnippetsView";
+import DictionaryEmptyIllustration from "./DictionaryEmptyIllustration";
import { useSettings } from "../hooks/useSettings";
import { getAgentName } from "../utils/agentName";
import { parseDictionaryImportText } from "../helpers/dictionaryImport";
@@ -23,6 +35,7 @@ export default function DictionaryView() {
const { toast } = useToast();
const [newWord, setNewWord] = useState("");
+ const [showEmptyInput, setShowEmptyInput] = useState(false);
const [bulkText, setBulkText] = useState("");
const [showBulkImport, setShowBulkImport] = useState(false);
const [editingWord, setEditingWord] = useState<string | null>(null);
@@ -71,7 +84,12 @@ export default function DictionaryView() {
);
const handleAdd = useCallback(() => {
- if (addWords(newWord) > 0) setNewWord("");
+ if (addWords(newWord) > 0) {
+ setNewWord("");
+ setShowEmptyInput(false);
+ // The first word moves the input from the empty card to the top of the list.
+ requestAnimationFrame(() => addInputRef.current?.focus());
+ }
}, [addWords, newWord]);
const handleImport = useCallback(() => {
@@ -115,26 +133,60 @@ export default function DictionaryView() {
}
}, [customDictionary, toast, t]);
+ const addWordInput = (
+ <div className="relative">
+ <Input
+ dir="auto"
+ ref={addInputRef}
+ autoFocus={userWords.length === 0}
+ placeholder={t("dictionary.addPlaceholder")}
+ value={newWord}
+ onChange={(e) => setNewWord(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") handleAdd();
+ if (e.key === "Escape" && userWords.length === 0) setShowEmptyInput(false);
+ }}
+ className="h-10 w-full rounded-full! pe-24 text-sm placeholder:text-foreground/45"
+ />
+ <div className="absolute end-3 top-1/2 flex -translate-y-1/2 items-center gap-2">
+ <button
+ onClick={handleAdd}
+ disabled={!newWord.trim()}
+ aria-label={t("dictionary.addWord")}
+ className="flex items-center gap-1 text-xs text-foreground/45 transition-colors enabled:hover:text-primary disabled:text-foreground/45"
+ >
+ {t("dictionary.add")}
+ <CornerDownLeft size={12} />
+ </button>
+ <div className="h-4 w-px bg-foreground/10 dark:bg-white/8" />
+ <button
+ onClick={() => setShowBulkImport(true)}
+ aria-label={t("dictionary.importWords")}
+ className="text-foreground/45 transition-colors hover:text-foreground/60"
+ >
+ <Upload size={14} />
+ </button>
+ </div>
+ </div>
+ );
+
const emptyState = (
- <div className="flex flex-col items-center text-center py-8">
- <div className="w-10 h-10 rounded-[10px] bg-gradient-to-b from-primary/8 to-primary/4 dark:from-primary/12 dark:to-primary/6 border border-primary/10 dark:border-primary/15 flex items-center justify-center mb-3.5">
- <BookOpen size={17} strokeWidth={1.5} className="text-primary/50 dark:text-primary/60" />
+ <div className="flex min-h-64 items-start px-6 py-6">
+ <div className="relative z-10 w-full min-w-0 md:w-3/5">
+ <h2 className="text-xl font-normal text-foreground">{t("dictionary.emptyTitle")}</h2>
+ <p className="mt-3 max-w-xl text-base leading-relaxed text-foreground/50 dark:text-foreground/65">
+ {t("dictionary.emptyDescription", { agentName })}
+ </p>
+ {showEmptyInput ? (
+ <div className="mt-6 max-w-md">{addWordInput}</div>
+ ) : (
+ <Button className="mt-6 px-5 font-normal" onClick={() => setShowEmptyInput(true)}>
+ <Plus size={16} />
+ {t("dictionary.addFirstWord")}
+ </Button>
+ )}
</div>
- <h4 className="text-xs font-semibold text-foreground mb-1">{t("dictionary.emptyTitle")}</h4>
- <p className="text-xs text-foreground/45 leading-relaxed max-w-[240px] mb-4">
- {t("dictionary.emptyDescription", { agentName })}
- </p>
- <Button size="sm" onClick={() => addInputRef.current?.focus()}>
- <Plus size={12} />
- {t("dictionary.addFirstWord")}
- </Button>
- <button
- onClick={() => setShowBulkImport(true)}
- className="mt-3 flex items-center gap-1.5 text-xs text-foreground/45 hover:text-foreground/60 transition-colors"
- >
- <Upload size={11} />
- {t("dictionary.importList")}
- </button>
+ <DictionaryEmptyIllustration variant="dictionary" />
</div>
);
@@ -149,54 +201,23 @@ export default function DictionaryView() {
variant="destructive"
/>
- <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 pt-4")}>
- <TabsList className="h-7 p-0.5 rounded-[7px]">
- <TabsTrigger value="dictionary" className="h-6 px-2.5 text-xs rounded-[5px]">
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 pt-6")}>
+ <TabsList className="h-10 rounded-full p-1">
+ <TabsTrigger value="dictionary" className="h-8 gap-2 rounded-full px-4 text-sm">
+ <NotebookPen size={17} />
{t("dictionary.tabDictionary")}
</TabsTrigger>
- <TabsTrigger value="snippets" className="h-6 px-2.5 text-xs rounded-[5px]">
+ <TabsTrigger value="snippets" className="h-8 gap-2 rounded-full px-4 text-sm">
+ <PanelRight size={17} />
{t("dictionary.tabSnippets")}
</TabsTrigger>
</TabsList>
</div>
<TabsContent value="dictionary" className="flex-1 min-h-0 mt-0 overflow-y-auto">
- <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 py-4 flex flex-col gap-3")}>
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "flex flex-col gap-3 px-6 py-5")}>
{/* ─── Add word ─── */}
- <div>
- <div className="relative">
- <Input
- dir="auto"
- ref={addInputRef}
- placeholder={t("dictionary.addPlaceholder")}
- value={newWord}
- onChange={(e) => setNewWord(e.target.value)}
- onKeyDown={(e) => {
- if (e.key === "Enter") handleAdd();
- }}
- className="w-full h-8 text-xs pe-24 placeholder:text-foreground/45"
- />
- <div className="absolute end-2.5 top-1/2 -translate-y-1/2 flex items-center gap-2">
- <button
- onClick={handleAdd}
- disabled={!newWord.trim()}
- aria-label={t("dictionary.addWord")}
- className="flex items-center gap-1 text-xs text-foreground/45 enabled:hover:text-primary disabled:text-foreground/45 transition-colors"
- >
- {t("dictionary.add")}
- <CornerDownLeft size={10} />
- </button>
- <div className="w-px h-3.5 bg-foreground/10 dark:bg-white/8" />
- <button
- onClick={() => setShowBulkImport(true)}
- aria-label={t("dictionary.importWords")}
- className="text-foreground/45 hover:text-foreground/60 transition-colors"
- >
- <Upload size={11} />
- </button>
- </div>
- </div>
- </div>
+ {userWords.length > 0 && addWordInput}
{/* ─── Bulk import ─── */}
{showBulkImport && (
@@ -240,20 +261,30 @@ export default function DictionaryView() {
)}
{/* ─── Agent name (always recognized) ─── */}
- <div className="rounded-md border border-primary/15 dark:border-primary/20 bg-primary/3 dark:bg-primary/6 px-4 py-2.5 flex items-center justify-between gap-3">
- <div className="flex items-center gap-2 min-w-0">
- <Sparkles size={11} className="text-primary/70 shrink-0" />
- <span dir="auto" className="text-xs font-medium text-primary truncate">
- {agentName}
+ {userWords.length > 0 && (
+ <div className="flex items-center justify-between gap-3 rounded-xl border border-primary/15 bg-primary/3 px-4 py-3 dark:border-primary/20 dark:bg-primary/6">
+ <div className="flex items-center gap-2 min-w-0">
+ <Sparkles size={11} className="text-primary/70 shrink-0" />
+ <span dir="auto" className="text-xs font-medium text-primary truncate">
+ {agentName}
+ </span>
+ </div>
+ <span className="text-xs text-foreground/45 shrink-0">
+ {t("dictionary.agentDefault")}
</span>
</div>
- <span className="text-xs text-foreground/45 shrink-0">
- {t("dictionary.agentDefault")}
- </span>
- </div>
+ )}
{/* ─── Dictionary list ─── */}
- <div className="rounded-md border border-foreground/8 dark:border-white/10 bg-foreground/[0.02] dark:bg-white/[0.03] px-4 py-3">
+ <div
+ className={cn(
+ CARD_SURFACE_CLASS,
+ "shadow-sm",
+ userWords.length > 0
+ ? "px-4 py-3"
+ : "relative overflow-hidden rounded-3xl dark:bg-surface-window"
+ )}
+ >
{userWords.length > 0 && (
<>
<div className="flex items-center justify-between">
diff --git a/src/components/HistoryView.tsx b/src/components/HistoryView.tsx
index dff047e01..4a3294f3a 100644
--- a/src/components/HistoryView.tsx
+++ b/src/components/HistoryView.tsx
@@ -1,14 +1,17 @@
-import { Fragment, useMemo } from "react";
+import { useMemo } from "react";
import { useTranslation } from "react-i18next";
import { cn } from "./lib/utils";
import { useUiLocale } from "../hooks/useUiLocale";
import { Button } from "./ui/button";
import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";
-import { Loader2, Sparkles, X, Mic, Trash2, Archive } from "./icons";
+import { Loader2, Sparkles, X, Trash2, Archive } from "./icons";
import TranscriptionItem from "./ui/TranscriptionItem";
-import EmptyStateCard from "./ui/EmptyStateCard";
+import ThemedEmptyIllustration from "./ui/ThemedEmptyIllustration";
+import DictationHotkeyHint from "./ui/DictationHotkeyHint";
+import { BIDI_VALUE_TOKEN, BidiInterpolatedText } from "./ui/BidiInterpolatedText";
+import historyEmptyLight from "../assets/empty-states/home-history-light.svg";
+import historyEmptyDark from "../assets/empty-states/home-history-dark.svg";
import type { TranscriptionItem as TranscriptionItemType } from "../types/electron";
-import { formatHotkeyLabel, parseHotkeyList } from "../utils/hotkeys";
import { formatDateGroup } from "../utils/dateFormatting";
import { useUpcomingEvents } from "../hooks/useUpcomingEvents";
import UpcomingMeetings from "./UpcomingMeetings";
@@ -16,8 +19,6 @@ import { useSettingsStore } from "../stores/settingsStore";
import { effectiveLocalHistoryEnabled } from "../stores/policyRules";
import { usePolicyStore } from "../stores/policyStore";
-const EMPTY_PREVIEW_WIDTHS = ["w-full", "w-4/5", "w-3/5"];
-
interface HistoryViewProps {
history: TranscriptionItemType[];
isLoading: boolean;
@@ -34,6 +35,7 @@ interface HistoryViewProps {
onRetryTranscription: (id: number, options?: { isRecover?: boolean }) => Promise<void>;
showDiscarded: boolean;
onToggleDiscarded: () => void;
+ userName?: string | null;
}
export default function HistoryView({
@@ -52,6 +54,7 @@ export default function HistoryView({
onRetryTranscription,
showDiscarded,
onToggleDiscarded,
+ userName,
}: HistoryViewProps) {
const { t } = useTranslation();
const locale = useUiLocale();
@@ -60,6 +63,8 @@ export default function HistoryView({
effectiveLocalHistoryEnabled(policyState, personalDataRetentionEnabled)
);
const { events, isLoading: eventsLoading, isConnected } = useUpcomingEvents();
+ const firstName = userName?.trim().split(/\s+/)[0];
+ const hasHistory = history.length > 0;
const groupedHistory = useMemo(() => {
if (history.length === 0) return [];
@@ -97,6 +102,23 @@ export default function HistoryView({
return (
<div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 pt-4 pb-6")}>
+ {/* Hidden until the first load settles, so a returning user isn't greeted as new. */}
+ <h2 className={cn("mb-4 text-xl text-foreground", isLoading && !hasHistory && "invisible")}>
+ {firstName ? (
+ <BidiInterpolatedText
+ text={t(
+ hasHistory
+ ? "controlPanel.history.welcomeBackNamed"
+ : "controlPanel.history.welcomeNamed",
+ { name: BIDI_VALUE_TOKEN }
+ )}
+ value={firstName}
+ dir="auto"
+ />
+ ) : (
+ t(hasHistory ? "controlPanel.history.welcomeBack" : "controlPanel.history.welcome")
+ )}
+ </h2>
{!useCleanupModel && !aiCTADismissed && (
<div className="mb-3 relative rounded-lg border border-primary/20 bg-primary/5 dark:bg-primary/10 p-3">
<button
@@ -151,43 +173,22 @@ export default function HistoryView({
</div>
</div>
) : history.length === 0 ? (
- <>
- <p className="pt-2 pb-2.5 text-sm text-muted-foreground">
- {t("controlPanel.history.sectionTitle")}
+ <div className="flex min-h-72 flex-col items-center px-4 pt-6 text-center">
+ <ThemedEmptyIllustration
+ light={historyEmptyLight}
+ dark={historyEmptyDark}
+ width={560}
+ height={102}
+ className="[mask-image:linear-gradient(to_right,transparent,black_20%,black_80%,transparent)]"
+ />
+ <h2 className="mt-6 text-lg font-semibold text-foreground">
+ {t("controlPanel.history.empty")}
+ </h2>
+ <p className="mt-2 max-w-md text-sm text-muted-foreground">
+ {t("controlPanel.history.emptyDescription")}
</p>
- <EmptyStateCard
- icon={Mic}
- title={t("controlPanel.history.empty")}
- description={t("controlPanel.history.emptyDescription")}
- >
- {/* Ghost rows preview the list this card becomes. */}
- <div aria-hidden="true" className="mb-1 w-56 space-y-2">
- {EMPTY_PREVIEW_WIDTHS.map((width) => (
- <span
- key={width}
- className={cn(
- "block h-2 rounded-full bg-foreground/6 dark:bg-white/8",
- width
- )}
- />
- ))}
- </div>
- <span className="inline-flex h-[30px] items-center gap-1.5 rounded-full bg-surface-3 px-3 text-xs font-medium text-foreground/70 dark:bg-surface-3">
- {t("controlPanel.history.press")}
- <span dir="ltr" className="inline-flex items-center gap-1">
- {parseHotkeyList(hotkey).map((hk, index) => (
- <Fragment key={hk}>
- {index > 0 && <span className="text-foreground/45">/</span>}
- <kbd className="rounded-md bg-background px-1.5 py-px font-sans text-[11px] font-medium text-foreground/80 shadow-sm dark:bg-surface-2">
- {formatHotkeyLabel(hk)}
- </kbd>
- </Fragment>
- ))}
- </span>
- {t("controlPanel.history.toStart")}
- </span>
- </EmptyStateCard>
- </>
+ <DictationHotkeyHint hotkey={hotkey} className="mt-2" />
+ </div>
) : (
<div className="group">
{groupedHistory.map((group, index) => (
@@ -226,7 +227,9 @@ export default function HistoryView({
)}
</div>
- <div className="hidden w-80 shrink-0 md:block">
+ {/* With history, drop the day cards by one date row (pt-2 + text-sm line + pb-2.5) so
+ the first one lines up with the first transcription. */}
+ <div className={cn("hidden w-80 shrink-0 md:block", history.length > 0 && "pt-[2.375rem]")}>
<UpcomingMeetings
events={events}
isLoading={eventsLoading}
diff --git a/src/components/InsightsView.tsx b/src/components/InsightsView.tsx
index 94af965f1..bd20fb977 100644
--- a/src/components/InsightsView.tsx
+++ b/src/components/InsightsView.tsx
@@ -2,6 +2,7 @@ import { lazy, Suspense, useCallback, useEffect, useMemo, useRef, useState } fro
import { BarChart3, Cloud, CloudUpload, Flame, Gauge, Mic2, Trophy } from "./icons";
import { useTranslation } from "react-i18next";
import { useAuth } from "../hooks/useAuth";
+import { useHotkey } from "../hooks/useHotkey";
import { useInsightsSyncOptIn } from "../hooks/useInsightsSyncOptIn";
import { useSettings } from "../hooks/useSettings";
import { hasValidatedAuthContext } from "../lib/authRequestContext";
@@ -19,6 +20,8 @@ import type { AnalyticsDailyBucket, AnalyticsSummary } from "../types/electron";
import { cn } from "./lib/utils";
import LeaderboardSkeleton from "./LeaderboardSkeleton";
import { Button } from "./ui/button";
+import DictationHotkeyHint from "./ui/DictationHotkeyHint";
+import EmptyStateCard from "./ui/EmptyStateCard";
import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";
import { Skeleton } from "./ui/skeleton";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs";
@@ -231,6 +234,129 @@ function MetricCard({
);
}
+// The dashboard a user gets once they've dictated: the metric cards over the activity
+// heatmap. Null while the summary loads; every value holds a skeleton meanwhile.
+function UsageDashboard({ summary }: { summary: AnalyticsSummary | null }) {
+ const { t, i18n } = useTranslation();
+ // i18n.language, not the runtime default: the OS locale is not the language
+ // the app is being read in, so a Japanese UI rendered 12.3K where 1.2万
+ // belongs, next to correctly localized month labels in the same card.
+ const number = useMemo(
+ () => new Intl.NumberFormat(i18n.language, { notation: "compact", maximumFractionDigits: 1 }),
+ [i18n.language]
+ );
+
+ return (
+ <>
+ {!summary && (
+ <p role="status" className="sr-only">
+ {t("controlPanel.loading")}
+ </p>
+ )}
+ <div className="grid grid-cols-2 gap-3 lg:grid-cols-4">
+ <MetricCard
+ icon={Mic2}
+ label={t("insights.wordsSpoken")}
+ value={summary && number.format(summary.totalWords)}
+ detail={t("insights.allTime")}
+ largeValue
+ />
+ <MetricCard
+ icon={Gauge}
+ label={t("insights.wordsPerMinute")}
+ value={summary && (summary.averageWpm == null ? "—" : number.format(summary.averageWpm))}
+ detail={summary && t("insights.wpmCoverage", { count: summary.wpmCoveragePercent })}
+ largeValue
+ />
+ <MetricCard
+ icon={BarChart3}
+ label={t("insights.dictations")}
+ value={summary && number.format(summary.totalDictations)}
+ detail={t("insights.allTime")}
+ largeValue
+ />
+ <MetricCard
+ icon={Flame}
+ label={t("insights.currentStreak")}
+ value={summary && t("insights.days", { count: summary.currentStreakDays })}
+ detail={summary && t("insights.longestStreak", { count: summary.longestStreakDays })}
+ />
+ </div>
+
+ <div className="mt-5 rounded-2xl border border-border/70 bg-card/70 px-5 py-2.5 dark:border-white/10">
+ <h2 className="text-base font-medium text-foreground">{t("insights.activity")}</h2>
+ <div className="mt-2">
+ <Heatmap daily={summary?.daily ?? null} />
+ </div>
+ </div>
+ </>
+ );
+}
+
+// 0 ≤ n < 1, stable per index, so the preview's heatmap is the same on every visit.
+function unitHash(index: number) {
+ let x = Math.imul(index ^ (index >>> 16), 0x45d9f3b);
+ x = Math.imul(x ^ (x >>> 16), 0x45d9f3b);
+ return ((x ^ (x >>> 16)) >>> 0) / 2 ** 32;
+}
+
+// Sample usage for the locked preview: a few months of dictation that is busier on
+// weekdays and picks up over time, so the heatmap reads like a real one.
+function buildPreviewSummary(): AnalyticsSummary {
+ const days = buildAnalyticsActivityDays([]);
+ const daily = days.map(({ date }, index) => {
+ const progress = index / (days.length - 1);
+ const weekday = dateFromLocalKey(date).getDay();
+ const chance = weekday === 0 || weekday === 6 ? 0.15 : 0.3 + progress * 0.55;
+ const words =
+ unitHash(index) < chance
+ ? Math.round((0.3 + unitHash(index + days.length) * 0.7) * (400 + progress * 1600))
+ : 0;
+ return { date, words, dictations: 0, spokenDurationMs: 0 };
+ });
+ return {
+ totalWords: daily.reduce((sum, day) => sum + day.words, 0),
+ totalDictations: 1260,
+ totalSpokenDurationMs: 0,
+ averageWpm: 142,
+ currentStreakDays: 12,
+ longestStreakDays: 21,
+ wpmCoveragePercent: 96,
+ daily,
+ };
+}
+
+// Before the first dictation: the dashboard as it will look, filled with sample
+// usage and locked behind a card that says how to start.
+function UsagePreview() {
+ const { t } = useTranslation();
+ const { hotkey } = useHotkey();
+ const summary = useMemo(buildPreviewSummary, []);
+
+ return (
+ <div className="relative">
+ <div
+ aria-hidden="true"
+ inert
+ className="pointer-events-none select-none opacity-50 blur-[1px] [mask-image:linear-gradient(to_bottom,#000_45%,transparent)]"
+ >
+ <UsageDashboard summary={summary} />
+ </div>
+ <div className="absolute inset-0 flex items-center justify-center p-6">
+ <EmptyStateCard
+ icon={BarChart3}
+ title={t("insights.emptyTitle")}
+ description={t("insights.emptyBody")}
+ headingLevel={2}
+ className="w-full max-w-sm bg-background/95 shadow-xl dark:bg-surface-1/95"
+ >
+ <DictationHotkeyHint hotkey={hotkey} className="text-[13px]" />
+ </EmptyStateCard>
+ </div>
+ </div>
+ );
+}
+
function YourUsage({
accountId,
dataRetentionEnabled,
@@ -244,7 +370,7 @@ function YourUsage({
onSyncErrorChange: (error: boolean) => void;
syncActive: boolean;
}) {
- const { t, i18n } = useTranslation();
+ const { t } = useTranslation();
const [summary, setSummary] = useState<AnalyticsSummary | null>(null);
const [loading, setLoading] = useState(true);
const [syncError, setSyncError] = useState(false);
@@ -304,14 +430,6 @@ function YourUsage({
onSyncErrorChange(syncError);
}, [onSyncErrorChange, syncError]);
- // i18n.language, not the runtime default: the OS locale is not the language
- // the app is being read in, so a Japanese UI rendered 12.3K where 1.2万
- // belongs, next to correctly localized month labels in the same card.
- const number = useMemo(
- () => new Intl.NumberFormat(i18n.language, { notation: "compact", maximumFractionDigits: 1 }),
- [i18n.language]
- );
-
if (loadFailed) {
return (
<div className="rounded-lg border border-border bg-card/50 backdrop-blur-sm dark:bg-card/60">
@@ -340,63 +458,7 @@ function YourUsage({
</div>
)}
- {summary?.totalDictations === 0 ? (
- <div className="rounded-lg border border-border bg-card/50 backdrop-blur-sm dark:bg-card/60">
- <div className="flex flex-col items-center justify-center px-4 py-16 text-center">
- <BarChart3 size={40} className="mb-4 text-foreground/45" aria-hidden="true" />
- <h2 className="text-sm font-medium text-foreground">{t("insights.emptyTitle")}</h2>
- <p className="mt-1.5 max-w-sm text-xs text-muted-foreground">
- {t("insights.emptyBody")}
- </p>
- </div>
- </div>
- ) : (
- <>
- {!summary && (
- <p role="status" className="sr-only">
- {t("controlPanel.loading")}
- </p>
- )}
- <div className="grid grid-cols-2 gap-3 lg:grid-cols-4">
- <MetricCard
- icon={Mic2}
- label={t("insights.wordsSpoken")}
- value={summary && number.format(summary.totalWords)}
- detail={t("insights.allTime")}
- largeValue
- />
- <MetricCard
- icon={Gauge}
- label={t("insights.wordsPerMinute")}
- value={
- summary && (summary.averageWpm == null ? "—" : number.format(summary.averageWpm))
- }
- detail={summary && t("insights.wpmCoverage", { count: summary.wpmCoveragePercent })}
- largeValue
- />
- <MetricCard
- icon={BarChart3}
- label={t("insights.dictations")}
- value={summary && number.format(summary.totalDictations)}
- detail={t("insights.allTime")}
- largeValue
- />
- <MetricCard
- icon={Flame}
- label={t("insights.currentStreak")}
- value={summary && t("insights.days", { count: summary.currentStreakDays })}
- detail={summary && t("insights.longestStreak", { count: summary.longestStreakDays })}
- />
- </div>
-
- <div className="mt-5 rounded-2xl border border-border/70 bg-card/70 px-5 py-2.5 dark:border-white/10">
- <h2 className="text-base font-medium text-foreground">{t("insights.activity")}</h2>
- <div className="mt-2">
- <Heatmap daily={summary?.daily ?? null} />
- </div>
- </div>
- </>
- )}
+ {summary?.totalDictations === 0 ? <UsagePreview /> : <UsageDashboard summary={summary} />}
</>
);
}
diff --git a/src/components/SnippetsView.tsx b/src/components/SnippetsView.tsx
index 8b641e46b..c45054785 100644
--- a/src/components/SnippetsView.tsx
+++ b/src/components/SnippetsView.tsx
@@ -1,6 +1,6 @@
import { useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
-import { CornerDownLeft, Mic, Pencil, Plus, X } from "./icons";
+import { CornerDownLeft, Pencil, Plus, X } from "./icons";
import {
Dialog,
DialogContent,
@@ -12,14 +12,14 @@ import {
import { Button } from "./ui/button";
import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";
import { cn } from "./lib/utils";
+import { CARD_SURFACE_CLASS } from "./ui/surfaces";
import { Input } from "./ui/input";
import { Label } from "./ui/label";
import { Textarea } from "./ui/textarea";
import { useSettings } from "../hooks/useSettings";
import { getCachedPlatform } from "../utils/platform";
import type { Snippet } from "../utils/snippets";
-
-const EXAMPLE_KEYS = ["linkedin", "rewrite", "intro", "signoff"] as const;
+import DictionaryEmptyIllustration from "./DictionaryEmptyIllustration";
interface EditSnippetDialogProps {
snippet: Snippet | null;
@@ -112,6 +112,7 @@ export default function SnippetsView() {
const { snippets, setSnippets } = useSettings();
const [trigger, setTrigger] = useState("");
const [expansion, setExpansion] = useState("");
+ const [showEmptyInput, setShowEmptyInput] = useState(false);
const [panelOpen, setPanelOpen] = useState(false);
const [editing, setEditing] = useState<Snippet | null>(null);
const triggerInputRef = useRef<HTMLInputElement>(null);
@@ -146,12 +147,14 @@ export default function SnippetsView() {
const closePanel = () => {
setPanelOpen(false);
setExpansion("");
- triggerInputRef.current?.focus();
+ // After the first snippet the trigger input remounts outside the empty card.
+ requestAnimationFrame(() => triggerInputRef.current?.focus());
};
const handleCreate = () => {
setSnippets([...snippets, { trigger: trimmedTrigger, replacement: expansion.trim() }]);
setTrigger("");
+ setShowEmptyInput(false);
closePanel();
};
@@ -166,8 +169,77 @@ export default function SnippetsView() {
const canCreate = !!trimmedTrigger && !!expansion.trim() && !duplicate;
+ const triggerInput = (
+ <div>
+ <div className="relative">
+ <Input
+ dir="auto"
+ ref={triggerInputRef}
+ autoFocus={snippets.length === 0}
+ placeholder={t("dictionary.snippets.addPlaceholder")}
+ value={trigger}
+ onChange={(e) => setTrigger(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") openPanel();
+ if (e.key === "Escape" && snippets.length === 0 && !panelOpen) setShowEmptyInput(false);
+ }}
+ maxLength={80}
+ className="h-10 w-full rounded-full! pe-16 text-sm placeholder:text-foreground/45"
+ />
+ <button
+ onClick={openPanel}
+ disabled={!trimmedTrigger || duplicate}
+ aria-label={t("dictionary.snippets.create")}
+ className="absolute end-3 top-1/2 flex -translate-y-1/2 items-center gap-1 text-xs text-foreground/45 transition-colors enabled:hover:text-primary disabled:text-foreground/45"
+ >
+ {t("dictionary.add")}
+ <CornerDownLeft size={12} />
+ </button>
+ </div>
+ {duplicate && (
+ <p className="mt-1.5 text-xs text-destructive">{t("dictionary.snippets.duplicate")}</p>
+ )}
+ </div>
+ );
+
+ const expansionPanel = (
+ <div className="rounded-xl border border-primary/30 px-3 pb-2 pt-2.5 dark:border-primary/40">
+ <Textarea
+ dir="auto"
+ autoFocus
+ value={expansion}
+ onChange={(e) => setExpansion(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Escape") closePanel();
+ if (e.key === "Enter" && (e.metaKey || e.ctrlKey) && canCreate) handleCreate();
+ }}
+ placeholder={t("dictionary.snippets.replacementPlaceholder")}
+ rows={4}
+ className="min-h-[72px] resize-none rounded-none border-0 bg-transparent text-xs text-foreground shadow-none placeholder:text-foreground/45 hover:border-0 focus:border-0 focus:ring-0"
+ />
+ <div className="flex items-center justify-between pt-1.5">
+ <div dir="ltr" className="flex items-center gap-0.5">
+ <kbd className="rounded border border-border/70 bg-muted/40 px-1 py-px font-mono text-[10px] leading-tight text-muted-foreground/70 dark:border-white/10">
+ {getCachedPlatform() === "darwin" ? "⌘" : "Ctrl"}
+ </kbd>
+ <kbd className="rounded border border-border/70 bg-muted/40 px-1 py-px font-mono text-[10px] leading-tight text-muted-foreground/70 dark:border-white/10">
+ ⏎
+ </kbd>
+ </div>
+ <div className="flex items-center gap-2">
+ <Button variant="ghost" size="sm" onClick={closePanel}>
+ {t("common.cancel")}
+ </Button>
+ <Button size="sm" onClick={handleCreate} disabled={!canCreate}>
+ {t("dictionary.snippets.create")}
+ </Button>
+ </div>
+ </div>
+ </div>
+ );
+
return (
- <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 py-4 flex flex-col gap-3")}>
+ <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "flex flex-col gap-3 px-6 py-5")}>
<EditSnippetDialog
snippet={editing}
onOpenChange={(open) => {
@@ -178,74 +250,21 @@ export default function SnippetsView() {
/>
{/* ─── Add snippet ─── */}
- <div>
- <div className="relative">
- <Input
- dir="auto"
- ref={triggerInputRef}
- placeholder={t("dictionary.snippets.addPlaceholder")}
- value={trigger}
- onChange={(e) => setTrigger(e.target.value)}
- onKeyDown={(e) => {
- if (e.key === "Enter") openPanel();
- }}
- maxLength={80}
- className="w-full h-8 text-xs pe-16 placeholder:text-foreground/45"
- />
- <button
- onClick={openPanel}
- disabled={!trimmedTrigger || duplicate}
- aria-label={t("dictionary.snippets.create")}
- className="absolute end-2.5 top-1/2 -translate-y-1/2 flex items-center gap-1 text-xs text-foreground/45 enabled:hover:text-primary disabled:text-foreground/45 transition-colors"
- >
- {t("dictionary.add")}
- <CornerDownLeft size={10} />
- </button>
- </div>
- {duplicate && (
- <p className="mt-1.5 text-xs text-destructive">{t("dictionary.snippets.duplicate")}</p>
- )}
- </div>
+ {snippets.length > 0 && triggerInput}
{/* ─── Expansion panel ─── */}
- {panelOpen && (
- <div className="rounded-md border border-primary/30 dark:border-primary/40 px-3 pt-2.5 pb-2">
- <Textarea
- dir="auto"
- autoFocus
- value={expansion}
- onChange={(e) => setExpansion(e.target.value)}
- onKeyDown={(e) => {
- if (e.key === "Escape") closePanel();
- if (e.key === "Enter" && (e.metaKey || e.ctrlKey) && canCreate) handleCreate();
- }}
- placeholder={t("dictionary.snippets.replacementPlaceholder")}
- rows={4}
- className="min-h-[72px] resize-none border-0 shadow-none rounded-none bg-transparent p-0 text-xs text-foreground placeholder:text-foreground/45 hover:border-0 focus:border-0 focus:ring-0"
- />
- <div className="flex items-center justify-between pt-1.5">
- <div dir="ltr" className="flex items-center gap-0.5">
- <kbd className="text-[10px] px-1 py-px rounded border border-border/70 dark:border-white/10 bg-muted/40 text-muted-foreground/70 font-mono leading-tight">
- {getCachedPlatform() === "darwin" ? "⌘" : "Ctrl"}
- </kbd>
- <kbd className="text-[10px] px-1 py-px rounded border border-border/70 dark:border-white/10 bg-muted/40 text-muted-foreground/70 font-mono leading-tight">
- ⏎
- </kbd>
- </div>
- <div className="flex items-center gap-2">
- <Button variant="ghost" size="sm" onClick={closePanel}>
- {t("common.cancel")}
- </Button>
- <Button size="sm" onClick={handleCreate} disabled={!canCreate}>
- {t("dictionary.snippets.create")}
- </Button>
- </div>
- </div>
- </div>
- )}
+ {panelOpen && snippets.length > 0 && expansionPanel}
{/* ─── Snippet list ─── */}
- <div className="rounded-md border border-foreground/8 dark:border-white/10 bg-foreground/[0.02] dark:bg-white/[0.03] px-4 py-3">
+ <div
+ className={cn(
+ CARD_SURFACE_CLASS,
+ "shadow-sm",
+ snippets.length > 0
+ ? "px-4 py-3"
+ : "relative overflow-hidden rounded-3xl dark:bg-surface-window"
+ )}
+ >
{snippets.length > 0 && (
<>
<h3 className="text-xs font-semibold text-foreground/45">
@@ -256,34 +275,27 @@ export default function SnippetsView() {
)}
{snippets.length === 0 ? (
- <div className="flex flex-wrap items-center gap-x-8 gap-y-5 px-2 py-6">
- <div className="flex-1 min-w-[220px]">
- <h4 className="text-sm font-semibold text-foreground leading-snug">
- {t("dictionary.snippets.emptyTitle")}{" "}
- <span className="text-primary">{t("dictionary.snippets.emptyTitleAccent")}</span>
- </h4>
- <p className="mt-1.5 text-xs text-foreground/45 leading-relaxed">
+ <div className="flex min-h-64 items-start px-6 py-6">
+ <div className="relative z-10 w-full min-w-0 md:w-3/5">
+ <h2 className="text-xl font-normal leading-snug text-foreground">
+ {t("dictionary.snippets.emptyTitle")} {t("dictionary.snippets.emptyTitleAccent")}
+ </h2>
+ <p className="mt-3 max-w-xl text-base leading-relaxed text-foreground/50 dark:text-foreground/65">
{t("dictionary.snippets.emptyDescription")}
</p>
- <Button size="sm" className="mt-4" onClick={() => triggerInputRef.current?.focus()}>
- <Plus size={12} />
- {t("dictionary.snippets.new")}
- </Button>
- </div>
- <div className="flex-1 min-w-[260px] rounded-md border border-foreground/8 dark:border-white/10 bg-foreground/[0.02] dark:bg-white/[0.03] px-3.5 py-3 flex flex-col gap-2.5">
- {EXAMPLE_KEYS.map((key) => (
- <div key={key} className="flex items-start gap-2">
- <span className="shrink-0 inline-flex items-center gap-1 rounded-[5px] bg-primary/10 dark:bg-primary/15 border border-primary/15 dark:border-primary/20 px-1.5 py-0.5 text-xs text-primary">
- <Mic size={9} />
- {t(`dictionary.snippets.examples.${key}Trigger`)}
- </span>
- <span className="shrink-0 text-xs text-foreground/45 mt-0.5">→</span>
- <span className="min-w-0 text-xs text-foreground/45 leading-relaxed">
- {t(`dictionary.snippets.examples.${key}Text`)}
- </span>
+ {showEmptyInput ? (
+ <div className="mt-6 max-w-md space-y-3">
+ {triggerInput}
+ {panelOpen && expansionPanel}
</div>
- ))}
+ ) : (
+ <Button className="mt-6 px-5 font-normal" onClick={() => setShowEmptyInput(true)}>
+ <Plus size={16} />
+ {t("dictionary.snippets.new")}
+ </Button>
+ )}
</div>
+ <DictionaryEmptyIllustration variant="snippets" />
</div>
) : visibleSnippets.length === 0 ? (
<p className="py-6 text-xs text-foreground/45 text-center">
diff --git a/src/components/TouchGrass.tsx b/src/components/TouchGrass.tsx
new file mode 100644
index 000000000..870fdf1eb
--- /dev/null
+++ b/src/components/TouchGrass.tsx
@@ -0,0 +1,383 @@
+import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
+import type { CSSProperties, KeyboardEvent, PointerEvent } from "react";
+import { cn } from "./lib/utils";
+import type { GrassRustle } from "../utils/grassRustle";
+import "../styles/touch-grass.css";
+
+// The lawn is one flat field from the bottom of the scene to the horizon, drawn as a
+// grid of patches: rows by depth, a few columns across. Only the patches animate
+// (growth, breeze), so the GPU moves about a hundred textures a frame; the tufts
+// inside them are painted once, and repainted only while the hand parts them.
+const HORIZON = 48; // % of the scene from the bottom
+const ROWS = 16;
+const SEGMENTS = 6;
+// When the breeze starts, just after the lawn has grown; each column then joins a
+// little after the one to its left, so gusts roll across the lawn.
+const WAVE_START_S = 3;
+const WAVE_CROSSING_S = 1.2;
+// Tufts part within this distance of the hand, fading to nothing at the edge.
+const PART_RADIUS_PX = 64;
+const MAX_PART_DEG = 40;
+// How quickly a parted tuft follows its target, and springs back once the hand leaves.
+const PART_EASE_MS = 90;
+const KEY_STEP_PX = 18;
+// The hand only rustles the grass below this fraction of the scene's height.
+const LAWN_TOP = 1 - HORIZON / 100;
+
+interface Tuft {
+ x: number; // % across its patch
+ lift: number; // px above the patch baseline, so rows don't read as stripes
+ h: number; // px
+ w: number; // px
+ blades: string; // clip-path cutting the tuft into blades
+ lean: number;
+ bend: number;
+ shade: number; // colour class, darker 0 to lighter 5
+}
+
+interface Patch {
+ row: number;
+ segment: number;
+ y: number; // % from the bottom of the scene
+ height: number; // px, the tallest tuft
+ amp: number;
+ growDelay: number;
+ growDur: number;
+ swayDur: number;
+ swayDelay: number;
+ tufts: Tuft[];
+}
+
+// Seeded so the patch is the same every visit; only the growth replays.
+function mulberry32(seed: number) {
+ let a = seed;
+ return () => {
+ a = (a + 0x6d2b79f5) | 0;
+ let t = Math.imul(a ^ (a >>> 15), 1 | a);
+ t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
+ };
+}
+
+// A tuft's blades as one polygon: each blade rises from the middle of the box along a
+// curved centreline and tapers to its tip, so blades bend and lean like real grass
+// instead of standing as straight spikes. Tips stay inside the box, where the
+// background paints.
+function bladesClipPath(rand: () => number): string {
+ const count = 4 + Math.floor(rand() * 3);
+ const cell = 60 / count;
+ const point = (x: number, y: number) => `${x.toFixed(1)}% ${y.toFixed(1)}%`;
+ const along = [0, 0.35, 0.65, 0.88];
+ const points: string[] = [];
+ for (let i = 0; i < count; i++) {
+ const base = 20 + cell * (i + 0.5) + (rand() - 0.5) * cell * 0.4;
+ const halfWidth = cell * (0.28 + rand() * 0.14);
+ const tipY = rand() * 35;
+ const drift = (rand() - 0.5) * 36;
+ const centre = (t: number) => base + drift * t * t;
+ const height = (t: number) => 100 - (100 - tipY) * t;
+ for (const t of along) points.push(point(centre(t) - halfWidth * (1 - t) ** 0.8, height(t)));
+ points.push(point(centre(1), tipY));
+ for (const t of [...along].reverse()) {
+ points.push(point(centre(t) + halfWidth * (1 - t) ** 0.8, height(t)));
+ }
+ }
+ return `polygon(${points.join(", ")})`;
+}
+
+// Rows crowd together toward the horizon, as they would in perspective.
+function rowY(depth: number): number {
+ return -4 + (HORIZON + 3) * (1 - (1 - depth) ** 1.8);
+}
+
+function makePatches(sceneHeight: number): Patch[] {
+ const rand = mulberry32(0x9e3779b9);
+ const patches: Patch[] = [];
+ // Far rows first, so nearer rows paint over them.
+ for (let row = ROWS - 1; row >= 0; row--) {
+ // 0 is the front edge, 1 the horizon.
+ const depth = row / (ROWS - 1);
+ const scale = 1 - depth * 0.82;
+ const y = rowY(depth);
+ const rowGapPx = ((rowY(Math.min(1, depth + 1 / (ROWS - 1))) - y) / 100) * sceneHeight;
+ // Smaller tufts need more of them to cover the ground.
+ const tuftCount = Math.round(5 + depth * 9);
+ for (let segment = 0; segment < SEGMENTS; segment++) {
+ const tufts: Tuft[] = [];
+ for (let i = 0; i < tuftCount; i++) {
+ tufts.push({
+ x: rand() * 100,
+ // About one row's spacing, so neighbouring rows interleave. The breeze skews
+ // from the patch baseline, which moves a lifted root by under a pixel.
+ lift: rand() * rowGapPx,
+ h: (40 + rand() * 20) * scale,
+ w: (16 + rand() * 8) * (0.35 + scale * 0.65),
+ blades: bladesClipPath(rand),
+ lean: (rand() - 0.5) * 8,
+ bend: (rand() - 0.5) * 14,
+ // Farther rows are lighter, as distance washes colour out.
+ shade: Math.min(5, Math.floor(depth * 2.2 + rand() * 3.8)),
+ });
+ }
+ // Lower tufts paint over higher ones.
+ tufts.sort((a, b) => b.lift - a.lift);
+ patches.push({
+ row,
+ segment,
+ y,
+ height: Math.max(...tufts.map((tuft) => tuft.h)),
+ // Negative skew pushes the tips right, with the gusts rolling left to right.
+ amp: -(5 + rand() * 4),
+ growDelay: depth * 0.5 + rand() * 0.8,
+ growDur: 1.5 + rand() * 0.5,
+ // Close periods keep the wave coherent; the small spread lets it drift so the
+ // patches never lock into step.
+ swayDur: 3.4 + rand() * 0.8,
+ swayDelay:
+ WAVE_START_S + (segment / SEGMENTS) * WAVE_CROSSING_S + depth * 0.3 + rand() * 0.25,
+ tufts,
+ });
+ }
+ }
+ return patches;
+}
+
+function patchStyle(patch: Patch): CSSProperties {
+ return {
+ left: `${(patch.segment * 100) / SEGMENTS}%`,
+ width: `${100 / SEGMENTS}%`,
+ bottom: `${patch.y}%`,
+ height: `${patch.height}px`,
+ "--amp": `${patch.amp}deg`,
+ "--grow-delay": `${patch.growDelay}s`,
+ "--grow-dur": `${patch.growDur}s`,
+ "--sway-dur": `${patch.swayDur}s`,
+ "--sway-delay": `${patch.swayDelay}s`,
+ } as CSSProperties;
+}
+
+// Plain values rather than custom properties: parting restyles tufts every frame, and
+// var() would make each restyle re-substitute and re-parse the clip path and colours.
+function tuftStyle(tuft: Tuft): CSSProperties {
+ return {
+ left: `${tuft.x}%`,
+ bottom: `${tuft.lift}px`,
+ width: `${tuft.w}px`,
+ height: `${tuft.h}px`,
+ marginLeft: `${-tuft.w / 2}px`,
+ clipPath: tuft.blades,
+ rotate: `${tuft.lean}deg`,
+ transform: `skewX(${tuft.bend}deg)`,
+ };
+}
+
+interface TouchGrassProps {
+ rustle: GrassRustle;
+ /** Height of the content this scene replaces, so the card keeps its size. */
+ height: number;
+ label: string;
+ onExit: () => void;
+}
+
+type Hand = { x: number; y: number } | null;
+
+export default function TouchGrass({ rustle, height, label, onExit }: TouchGrassProps) {
+ // The measured height sizes the gaps between rows; the card keeps it for the visit.
+ const patches = useMemo(() => makePatches(height || 240), [height]);
+ // Every tuft's root as fractions of the scene (lift aside), in the same order as the DOM.
+ const roots = useMemo(
+ () =>
+ patches.flatMap((patch) =>
+ patch.tufts.map((tuft) => ({
+ x: (patch.segment + tuft.x / 100) / SEGMENTS,
+ y: patch.y / 100,
+ h: tuft.h,
+ lean: tuft.lean,
+ }))
+ ),
+ [patches]
+ );
+
+ const sceneRef = useRef<HTMLDivElement>(null);
+ const sceneRectRef = useRef<DOMRect | null>(null);
+ const tuftNodesRef = useRef<HTMLElement[]>([]);
+ const partRef = useRef(new Float32Array(roots.length));
+ const partTargetRef = useRef(new Float32Array(roots.length));
+ const frameRef = useRef<number | null>(null);
+ const lastFrameRef = useRef(0);
+ const lastPointRef = useRef<{ x: number; y: number; t: number } | null>(null);
+ const keyHandRef = useRef<Hand>(null);
+
+ useLayoutEffect(() => {
+ const scene = sceneRef.current;
+ if (!scene) return;
+ tuftNodesRef.current = Array.from(scene.querySelectorAll<HTMLElement>("[data-tuft]"));
+ scene.focus({ preventScroll: true });
+ }, []);
+
+ // The lawn rests while the window is in the background. The control panel never reports
+ // itself hidden (backgroundThrottling is off, so visibilitychange doesn't fire and the
+ // animations keep running when it goes to the tray), but it does lose focus.
+ const [resting, setResting] = useState(false);
+
+ useEffect(() => {
+ const rest = () => {
+ rustle.hush();
+ setResting(true);
+ };
+ const wake = () => setResting(false);
+ // The page can scroll or resize under a resting hand; measure again on the next move.
+ const forgetRect = () => {
+ sceneRectRef.current = null;
+ };
+ window.addEventListener("blur", rest);
+ window.addEventListener("focus", wake);
+ window.addEventListener("scroll", forgetRect, true);
+ window.addEventListener("resize", forgetRect);
+ return () => {
+ window.removeEventListener("blur", rest);
+ window.removeEventListener("focus", wake);
+ window.removeEventListener("scroll", forgetRect, true);
+ window.removeEventListener("resize", forgetRect);
+ if (frameRef.current !== null) cancelAnimationFrame(frameRef.current);
+ };
+ }, [rustle]);
+
+ const sceneRect = () => {
+ sceneRectRef.current ??= sceneRef.current?.getBoundingClientRect() ?? null;
+ return sceneRectRef.current;
+ };
+
+ // Eases each tuft toward its target lean and stops once every tuft has settled.
+ const stepParting = (now: number) => {
+ const ease = 1 - Math.exp(-(now - lastFrameRef.current) / PART_EASE_MS);
+ lastFrameRef.current = now;
+ const parts = partRef.current;
+ const targets = partTargetRef.current;
+ const nodes = tuftNodesRef.current;
+ let settling = false;
+ for (let i = 0; i < parts.length; i++) {
+ if (parts[i] === targets[i]) continue;
+ let next = parts[i] + (targets[i] - parts[i]) * ease;
+ if (Math.abs(targets[i] - next) < 0.1) next = targets[i];
+ else settling = true;
+ parts[i] = next;
+ const node = nodes[i];
+ if (node) node.style.rotate = `${(roots[i].lean + next).toFixed(1)}deg`;
+ }
+ frameRef.current = settling ? requestAnimationFrame(stepParting) : null;
+ };
+
+ // Tufts near the hand lean away from it; the rest spring back upright.
+ const moveHand = (hand: Hand) => {
+ const rect = sceneRect();
+ const targets = partTargetRef.current;
+ roots.forEach((root, i) => {
+ let target = 0;
+ if (hand && rect) {
+ const rootX = root.x * rect.width;
+ const middleY = rect.height * (1 - root.y) - root.h * 0.6;
+ const distance = Math.hypot(rootX - hand.x, (middleY - hand.y) * 1.2);
+ if (distance < PART_RADIUS_PX) {
+ const strength = (1 - distance / PART_RADIUS_PX) ** 1.4;
+ target = Math.sign(rootX - hand.x || 1) * strength * MAX_PART_DEG;
+ }
+ }
+ targets[i] = target;
+ });
+ if (frameRef.current === null) {
+ lastFrameRef.current = performance.now();
+ frameRef.current = requestAnimationFrame(stepParting);
+ }
+ };
+
+ const handlePointerMove = (event: PointerEvent<HTMLDivElement>) => {
+ const rect = sceneRect();
+ if (!rect) return;
+ const x = event.clientX - rect.left;
+ const y = event.clientY - rect.top;
+ const last = lastPointRef.current;
+ if (last && y > rect.height * LAWN_TOP) {
+ const speed = Math.hypot(x - last.x, y - last.y) / Math.max(event.timeStamp - last.t, 1);
+ if (speed > 0.05) rustle.brush(speed);
+ }
+ lastPointRef.current = { x, y, t: event.timeStamp };
+ moveHand({ x, y });
+ };
+
+ const handlePointerLeave = () => {
+ lastPointRef.current = null;
+ moveHand(null);
+ };
+
+ const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {
+ if (event.key === "Escape") {
+ event.preventDefault();
+ onExit();
+ return;
+ }
+ const step = {
+ ArrowLeft: [-KEY_STEP_PX, 0],
+ ArrowRight: [KEY_STEP_PX, 0],
+ ArrowUp: [0, -KEY_STEP_PX],
+ ArrowDown: [0, KEY_STEP_PX],
+ }[event.key];
+ const rect = sceneRect();
+ if (!step || !rect) return;
+ event.preventDefault();
+ const current = keyHandRef.current ?? { x: rect.width / 2, y: rect.height * 0.8 };
+ const next = {
+ x: Math.min(rect.width, Math.max(0, current.x + step[0])),
+ y: Math.min(rect.height, Math.max(rect.height * LAWN_TOP, current.y + step[1])),
+ };
+ keyHandRef.current = next;
+ rustle.brush(0.8);
+ moveHand(next);
+ };
+
+ const handleBlur = () => {
+ keyHandRef.current = null;
+ moveHand(null);
+ };
+
+ return (
+ <div
+ ref={sceneRef}
+ role="application"
+ aria-label={label}
+ tabIndex={0}
+ className={cn(
+ "touch-grass -mx-2 rounded-t-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/40",
+ resting && "touch-grass--resting"
+ )}
+ style={{ height: height || undefined }}
+ onPointerEnter={() => {
+ sceneRectRef.current = null;
+ }}
+ onPointerMove={handlePointerMove}
+ onPointerLeave={handlePointerLeave}
+ onPointerCancel={handlePointerLeave}
+ onKeyDown={handleKeyDown}
+ onBlur={handleBlur}
+ >
+ <div className="touch-grass__ground" style={{ height: `${HORIZON}%` }} />
+ {patches.map((patch) => (
+ <div
+ key={`${patch.row}-${patch.segment}`}
+ className="touch-grass__patch"
+ style={patchStyle(patch)}
+ >
+ {patch.tufts.map((tuft, i) => (
+ <span
+ key={i}
+ data-tuft
+ className={`touch-grass__tuft touch-grass__tuft--${tuft.shade}`}
+ style={tuftStyle(tuft)}
+ />
+ ))}
+ </div>
+ ))}
+ <div className="touch-grass__gust" style={{ height: `${HORIZON}%` }} />
+ </div>
+ );
+}
diff --git a/src/components/UpcomingMeetings.tsx b/src/components/UpcomingMeetings.tsx
index 245c7d527..0b82d5b23 100644
--- a/src/components/UpcomingMeetings.tsx
+++ b/src/components/UpcomingMeetings.tsx
@@ -1,17 +1,22 @@
-import { useMemo } from "react";
+import { useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { Calendar, ExternalLink, Loader2, Mic, Monitor, Video } from "./icons";
import { Button } from "./ui/button";
import { Popover, PopoverContent, PopoverTrigger } from "./ui/popover";
import PersonAvatar from "./ui/PersonAvatar";
import EmptyStateCard from "./ui/EmptyStateCard";
-import { GRADIENT_CIRCLE } from "./ui/gradientCircle";
+import ThemedEmptyIllustration from "./ui/ThemedEmptyIllustration";
+import calendarEmptyLight from "../assets/empty-states/home-calendar-light.svg";
+import calendarEmptyDark from "../assets/empty-states/home-calendar-dark.svg";
import { cn } from "./lib/utils";
+import { CARD_SURFACE_CLASS } from "./ui/surfaces";
import type { CalendarAttendee, CalendarEvent } from "../types/calendar";
import { parseAttendees } from "../utils/calendarAttendees";
import { useSystemAudioPermission } from "../hooks/useSystemAudioPermission";
import { canManageSystemAudioInApp } from "../utils/systemAudioAccess";
import { getMeetingJoinUrl } from "../helpers/meetingJoinUrl";
+import TouchGrass from "./TouchGrass";
+import { createGrassRustle, type GrassRustle } from "../utils/grassRustle";
import { parseEventDate } from "../utils/dateFormatting";
interface UpcomingMeetingsProps {
@@ -70,6 +75,10 @@ function groupEventsByDay(events: CalendarEvent[], now: Date): DayGroup[] {
return groups.slice(0, MAX_DAY_CARDS);
}
+// The quiet grey buttons inside a day card: join a meeting, touch grass.
+const DAY_CARD_BUTTON_CLASS =
+ "h-7 bg-surface-3 hover:bg-surface-raised dark:bg-surface-2 dark:hover:bg-surface-3";
+
const ATTENDEE_COUNT_PILL_CLASS =
"flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-surface-3 px-0.5 text-[9px] font-medium tabular-nums text-muted-foreground ring-1 ring-background";
@@ -178,7 +187,7 @@ function EventRow({ event, isNow }: { event: CalendarEvent; isNow: boolean }) {
size="sm"
variant="ghost"
onClick={startNotes}
- className="pointer-events-auto h-7 bg-surface-3 hover:bg-surface-raised dark:bg-surface-2 dark:hover:bg-surface-3"
+ className={cn("pointer-events-auto", DAY_CARD_BUTTON_CLASS)}
>
{joinUrl ? <Video size={12} /> : <Mic size={12} />}
{joinUrl ? t("upcoming.joinAndTranscribe") : t("upcoming.takeNotes")}
@@ -233,22 +242,49 @@ function EventRow({ event, isNow }: { event: CalendarEvent; isNow: boolean }) {
function DayCard({ group, isNowFn }: { group: DayGroup; isNowFn: (e: CalendarEvent) => boolean }) {
const { t, i18n } = useTranslation();
+ // Non-null while the empty day shows the grass; it owns that visit's rustle audio.
+ const [rustle, setRustle] = useState<GrassRustle | null>(null);
+ const [sceneHeight, setSceneHeight] = useState(0);
+ const emptyStateRef = useRef<HTMLDivElement>(null);
+ const tryButtonRef = useRef<HTMLButtonElement>(null);
+ const returnFocusRef = useRef(false);
+
+ // A sync can add a meeting to today while the grass is out; the day is no longer empty.
+ if (rustle && group.items.length > 0) setRustle(null);
+
+ useEffect(() => () => rustle?.dispose(), [rustle]);
+
+ useEffect(() => {
+ if (rustle || !returnFocusRef.current) return;
+ returnFocusRef.current = false;
+ tryButtonRef.current?.focus();
+ }, [rustle]);
+
+ const touchGrass = () => {
+ setSceneHeight(emptyStateRef.current?.offsetHeight ?? 0);
+ // Created in the click so the browser lets the audio start.
+ setRustle(createGrassRustle());
+ };
+
+ const leaveGrass = () => {
+ returnFocusRef.current = true;
+ setRustle(null);
+ };
return (
<div
className={cn(
- "rounded-2xl border border-border/70 dark:border-white/10",
- !group.isToday && "overflow-clip"
+ "overflow-clip rounded-xl border border-border/70 bg-clip-padding dark:border-white/10",
+ // Out on the grass the header goes quiet grey, so the lawn carries the colour.
+ group.isToday && !rustle
+ ? "bg-[image:var(--gradient-calendar-today)]"
+ : "bg-surface-3 dark:bg-surface-2"
)}
>
<div
className={cn(
- "flex items-center gap-1.5 px-2.5 py-2 text-xs font-medium",
- // Today's glass strip sits over the card's hairline on three sides so the blue meets
- // the rounded edge directly instead of being outlined in grey.
- group.isToday
- ? cn(GRADIENT_CIRCLE, "-mx-px -mt-px rounded-t-2xl")
- : "bg-surface-3 text-foreground dark:bg-surface-2"
+ "flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium",
+ group.isToday && !rustle ? "calendar-today-header text-white" : "text-foreground"
)}
>
<Calendar size={12} className="shrink-0" />
@@ -259,20 +295,63 @@ function DayCard({ group, isNowFn }: { group: DayGroup; isNowFn: (e: CalendarEve
month: "short",
})}
</span>
- </div>
- <div className="rounded-b-[15px] bg-background px-2 dark:bg-surface-2/60">
- {group.items.length === 0 ? (
- <p className="px-1 py-3 text-xs text-muted-foreground/70">
- {t("upcoming.noEventsToday")}
- </p>
- ) : (
- <div className="divide-y divide-border/60">
- {group.items.map((event) => (
- <EventRow key={event.id} event={event} isNow={isNowFn(event)} />
- ))}
- </div>
+ {rustle && (
+ <button
+ type="button"
+ onClick={leaveGrass}
+ className="ms-auto rounded-sm px-1 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-current/40"
+ >
+ {t("common.back")}
+ </button>
)}
</div>
+ {/* The list sits on the header colour with its own rounded top, so that colour shows
+ around its corners. The opaque layer keeps the dark tint from mixing with it. */}
+ <div className="rounded-t-xl bg-background">
+ <div className="rounded-t-xl px-2 dark:bg-surface-2/60">
+ {group.items.length === 0 && rustle ? (
+ <TouchGrass
+ rustle={rustle}
+ height={sceneHeight}
+ label={t("upcoming.touchGrassLabel")}
+ onExit={leaveGrass}
+ />
+ ) : group.items.length === 0 ? (
+ <div ref={emptyStateRef} className="flex flex-col items-center px-1 py-5 text-center">
+ <ThemedEmptyIllustration
+ light={calendarEmptyLight}
+ dark={calendarEmptyDark}
+ width={316}
+ height={120}
+ />
+ <p className="mt-3 text-[15px] font-medium text-foreground">
+ {t("upcoming.noEventsToday")}
+ </p>
+ <p className="mt-1.5 text-[13px] text-muted-foreground">
+ {t("upcoming.emptyDayDescription")}
+ </p>
+ <Button
+ ref={tryButtonRef}
+ variant="ghost"
+ onClick={touchGrass}
+ className={cn(
+ "mt-5",
+ DAY_CARD_BUTTON_CLASS,
+ "h-9 rounded-full px-5 text-primary hover:text-primary dark:text-primary"
+ )}
+ >
+ {t("upcoming.touchGrass")}
+ </Button>
+ </div>
+ ) : (
+ <div className="divide-y divide-border/60">
+ {group.items.map((event) => (
+ <EventRow key={event.id} event={event} isNow={isNowFn(event)} />
+ ))}
+ </div>
+ )}
+ </div>
+ </div>
</div>
);
}
@@ -298,8 +377,6 @@ export default function UpcomingMeetings({
return (
<div>
- <p className="pt-2 pb-2.5 text-sm text-muted-foreground">{t("upcoming.title")}</p>
-
{/* Loading state */}
{isLoading && (
<div className="flex items-center justify-center gap-2 py-6">
@@ -343,19 +420,26 @@ export default function UpcomingMeetings({
</Button>
</EmptyStateCard>
) : (
- <EmptyStateCard
- className="px-4 py-8"
- icon={Calendar}
- title={t("upcoming.noUpcomingEvents")}
- description={t("upcoming.moreCalendarsHint")}
+ <div
+ className={cn(CARD_SURFACE_CLASS, "flex flex-col items-center px-4 py-6 text-center")}
>
+ <ThemedEmptyIllustration
+ light={calendarEmptyLight}
+ dark={calendarEmptyDark}
+ width={316}
+ height={120}
+ />
+ <p className="mt-3 text-sm font-semibold text-foreground">
+ {t("upcoming.noUpcomingEvents")}
+ </p>
+ <p className="mt-1 text-xs text-muted-foreground">{t("upcoming.moreCalendarsHint")}</p>
<button
onClick={onConnectCalendar}
- className="cursor-pointer text-xs text-primary underline-offset-2 outline-none hover:underline focus-visible:underline"
+ className="mt-3 cursor-pointer text-xs text-primary underline-offset-2 outline-none hover:underline focus-visible:underline"
>
{t("upcoming.connectHere")}
</button>
- </EmptyStateCard>
+ </div>
))}
{/* Day cards */}
diff --git a/src/components/chat/ChatEmptyIllustration.tsx b/src/components/chat/ChatEmptyIllustration.tsx
deleted file mode 100644
index dc685b36b..000000000
--- a/src/components/chat/ChatEmptyIllustration.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-interface ChatEmptyIllustrationProps {
- size?: number;
-}
-
-export function ChatEmptyIllustration({ size = 56 }: ChatEmptyIllustrationProps) {
- const h = Math.round(size * (48 / 56));
-
- return (
- <svg
- className="text-foreground dark:text-white"
- width={size}
- height={h}
- viewBox="0 0 56 48"
- fill="none"
- >
- {/* Back bubble */}
- <rect
- x="16"
- y="18"
- width="36"
- height="24"
- rx="4"
- fill="currentColor"
- fillOpacity={0.03}
- stroke="currentColor"
- strokeOpacity={0.06}
- />
- <rect x="22" y="25" width="18" height="2" rx="1" fill="currentColor" fillOpacity={0.05} />
- <rect x="22" y="30" width="24" height="2" rx="1" fill="currentColor" fillOpacity={0.03} />
-
- {/* Front bubble */}
- <rect
- x="4"
- y="6"
- width="36"
- height="24"
- rx="4"
- fill="currentColor"
- fillOpacity={0.04}
- stroke="currentColor"
- strokeOpacity={0.08}
- />
- <rect x="10" y="13" width="18" height="2" rx="1" fill="currentColor" fillOpacity={0.06} />
- <rect x="10" y="18" width="24" height="2" rx="1" fill="currentColor" fillOpacity={0.04} />
- <rect x="10" y="23" width="14" height="2" rx="1" fill="currentColor" fillOpacity={0.03} />
- </svg>
- );
-}
diff --git a/src/components/chat/ChatInput.tsx b/src/components/chat/ChatInput.tsx
index 88f72bfbd..bd34391bb 100644
--- a/src/components/chat/ChatInput.tsx
+++ b/src/components/chat/ChatInput.tsx
@@ -1,5 +1,5 @@
-import { useState, useRef, useCallback, useEffect } from "react";
-import { Mic, Square, X } from "../icons";
+import { useState, useRef, useCallback, useEffect, useLayoutEffect } from "react";
+import { ArrowRight, Mic, Square, X } from "../icons";
import { useTranslation } from "react-i18next";
import { cn } from "../lib/utils";
import { SendIcon } from "../ui/SendIcon";
@@ -11,6 +11,10 @@ import { formatMmSs } from "../../utils/formatDuration";
import { useVoiceDraft } from "./useVoiceDraft";
import type { AgentState } from "./types";
+// Controls stay bottom-anchored so they hold the corner while the composer expands;
+// this lifts a 28px control to the center of the collapsed composer's 34px row.
+const COLLAPSED_ROW_CENTER = "mb-[3px]";
+
interface ChatInputProps {
agentState: AgentState;
partialTranscript: string;
@@ -22,6 +26,16 @@ interface ChatInputProps {
className?: string;
/** Offer a mic when the input is empty; recordings transcribe into the input. */
voiceDraft?: boolean;
+ variant?: "default" | "assistant" | "note" | "sidebar";
+ outlined?: boolean;
+ draftText?: string;
+ onDraftChange?: (text: string) => void;
+ onFocus?: () => void;
+ onEscape?: () => void;
+ trailingContent?: React.ReactNode;
+ focusOnIdle?: boolean;
+ expandOnFocus?: boolean;
+ expandOnFocusSize?: "standard" | "compact";
}
function RecordingIndicator() {
@@ -61,16 +75,36 @@ export function ChatInput({
placeholder,
className,
voiceDraft = false,
+ variant = "default",
+ outlined = false,
+ draftText,
+ onDraftChange,
+ onFocus,
+ onEscape,
+ trailingContent,
+ focusOnIdle = true,
+ expandOnFocus = false,
+ expandOnFocusSize = "standard",
}: ChatInputProps) {
const { t } = useTranslation();
const { toast } = useToast();
- const [inputText, setInputText] = useState("");
- const inputRef = useRef<HTMLInputElement>(null);
+ const [localDraft, setLocalDraft] = useState("");
+ const inputText = draftText ?? localDraft;
+ const setInputText = onDraftChange ?? setLocalDraft;
+ const inputRef = useRef<HTMLTextAreaElement>(null);
+ const composerRef = useRef<HTMLDivElement>(null);
+ const allowDeferredFocusRef = useRef(variant !== "note" || focusOnIdle);
+ allowDeferredFocusRef.current = variant !== "note" || focusOnIdle;
+ const focusAfterFrame = useCallback(() => {
+ requestAnimationFrame(() => {
+ if (allowDeferredFocusRef.current) inputRef.current?.focus();
+ });
+ }, []);
const voice = useVoiceDraft({
onTranscript: (text) => {
- setInputText((prev) => (prev.trim() ? `${prev.trim()} ${text}` : text));
- requestAnimationFrame(() => inputRef.current?.focus());
+ setInputText(inputText.trim() ? `${inputText.trim()} ${text}` : text);
+ focusAfterFrame();
},
onError: (message) => {
toast({
@@ -82,47 +116,113 @@ export function ChatInput({
});
const isVoiceRecording = voice.status === "recording";
const isVoiceTranscribing = voice.status === "transcribing";
+ const isCompactNote = variant === "note" && !outlined;
+
+ const isIdle = agentState === "idle";
+ const isListening = agentState === "listening";
+ const isTranscribing = agentState === "transcribing";
+ const isBusy =
+ agentState === "thinking" || agentState === "streaming" || agentState === "tool-executing";
const handleSubmit = useCallback(() => {
const text = inputText.trim();
- if (!text || !onTextSubmit) return;
- onTextSubmit(text);
+ if (!text || !onTextSubmit || isBusy) return;
+ // Cleared first, so a host that can't send yet can write the draft back.
setInputText("");
- requestAnimationFrame(() => inputRef.current?.focus());
- }, [inputText, onTextSubmit]);
+ onTextSubmit(text);
+ focusAfterFrame();
+ }, [inputText, onTextSubmit, setInputText, isBusy, focusAfterFrame]);
+
+ // The Cancel button unmounts once the reply stops, which would drop its focus to the page.
+ const handleCancel = useCallback(() => {
+ onCancel?.();
+ focusAfterFrame();
+ }, [onCancel, focusAfterFrame]);
const handleKeyDown = useCallback(
- (e: React.KeyboardEvent<HTMLInputElement>) => {
- if (e.key === "Enter" && !e.shiftKey) {
+ (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
+ if (e.key === "Escape" && onEscape) {
+ e.preventDefault();
+ e.stopPropagation();
+ e.currentTarget.blur();
+ onEscape();
+ return;
+ }
+ if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing) {
e.preventDefault();
handleSubmit();
}
},
- [handleSubmit]
+ [handleSubmit, onEscape]
);
- const isIdle = agentState === "idle";
- const isListening = agentState === "listening";
- const isTranscribing = agentState === "transcribing";
- const isBusy =
- agentState === "thinking" || agentState === "streaming" || agentState === "tool-executing";
+ useLayoutEffect(() => {
+ const input = inputRef.current;
+ if (!input) return;
+ const composer = composerRef.current;
+ if (expandOnFocus && composer) {
+ // The focused composer opens at half its maximum height and grows with the
+ // draft up to that maximum (see --composer-fit-height below).
+ input.style.height = "100%";
+ const chromeHeight = composer.offsetHeight - input.offsetHeight;
+ input.style.height = "auto";
+ const draftHeight = input.scrollHeight;
+ input.style.height = "100%";
+ composer.style.setProperty("--composer-fit-height", `${draftHeight + chromeHeight}px`);
+ } else if (variant === "sidebar" || isCompactNote) {
+ input.style.height = "100%";
+ } else {
+ input.style.height = "auto";
+ input.style.height = `${input.scrollHeight}px`;
+ }
+ }, [inputText, isVoiceRecording, isVoiceTranscribing, expandOnFocus, variant, isCompactNote]);
useEffect(() => {
- if (isIdle) {
- requestAnimationFrame(() => inputRef.current?.focus());
- }
- }, [isIdle]);
+ if (!isIdle || !focusOnIdle) return;
+ const frameId = requestAnimationFrame(() => inputRef.current?.focus());
+ return () => cancelAnimationFrame(frameId);
+ }, [isIdle, focusOnIdle]);
return (
<div className={cn("shrink-0", className ?? "px-3 pb-3 pt-1")}>
<div
+ ref={composerRef}
className={cn(
- "flex items-center gap-2 min-h-11 ps-4 pe-1.5 rounded-full",
- GLASS_SURFACE,
- "border border-black/10 dark:border-white/14",
- "transition-all duration-200",
+ "flex items-center gap-2 min-h-11",
+ variant === "sidebar"
+ ? "h-14 items-end rounded-3xl bg-background ps-4 pe-2 py-1.5 focus-within:h-40 dark:bg-surface-2"
+ : "rounded-3xl ps-4 pe-1.5 py-1.5",
+ isCompactNote && "h-12 overflow-hidden",
+ variant === "assistant"
+ ? "min-h-12 bg-card shadow-sm dark:bg-surface-2"
+ : variant === "note"
+ ? outlined
+ ? "min-h-12 bg-background"
+ : "min-h-12 bg-transparent"
+ : variant === "default" && GLASS_SURFACE,
+ variant === "sidebar"
+ ? "border border-border/80 dark:border-white/14"
+ : variant === "note"
+ ? outlined
+ ? "border border-border/70 dark:border-white/14"
+ : "border-0"
+ : "border border-black/10 dark:border-white/14",
+ variant === "sidebar"
+ ? "transition-[height,border-color,box-shadow] duration-300 ease-out motion-reduce:transition-none"
+ : expandOnFocus
+ ? cn(
+ "h-12 items-end pe-2.25 transition-[height,border-color,box-shadow] duration-300 ease-out motion-reduce:transition-none",
+ expandOnFocusSize === "compact"
+ ? "focus-within:h-[clamp(min(18vh,7rem),var(--composer-fit-height,0px),min(36vh,14rem))]"
+ : "focus-within:h-[clamp(min(20vh,8rem),var(--composer-fit-height,0px),min(40vh,16rem))]"
+ )
+ : "transition-[border-color,box-shadow] duration-200",
isIdle &&
- "focus-within:border-black/15 dark:focus-within:border-white/22 focus-within:ring-[3px] focus-within:ring-primary/8"
+ (variant === "assistant"
+ ? "focus-within:border-foreground/15 focus-within:ring-2 focus-within:ring-foreground/5"
+ : variant === "note"
+ ? ""
+ : "focus-within:border-black/15 dark:focus-within:border-white/22 focus-within:ring-[3px] focus-within:ring-primary/8")
)}
>
{isListening && (
@@ -198,32 +298,44 @@ export function ChatInput({
)}
{(isIdle || isBusy) && !isVoiceRecording && !isVoiceTranscribing && (
- <div className="flex items-center gap-2 w-full">
- <input
+ <div
+ className={cn(
+ "flex gap-2 w-full",
+ isCompactNote ? "items-center" : "items-end",
+ (expandOnFocus || variant === "sidebar" || isCompactNote) && "h-full"
+ )}
+ >
+ <textarea
dir="auto"
ref={inputRef}
- type="text"
+ rows={1}
value={inputText}
onChange={(e) => setInputText(e.target.value)}
onKeyDown={handleKeyDown}
- disabled={isBusy}
+ onFocus={onFocus}
+ // Read-only, not disabled: disabling would drop focus for the length of every reply.
+ readOnly={isBusy}
autoFocus={autoFocus}
placeholder={placeholder ?? t("agentMode.input.typeMessage")}
className={cn(
"input-inline flex-1 outline-none bg-transparent caret-primary",
- "text-[13px] text-foreground placeholder:text-muted-foreground/70",
- "min-w-0 p-0",
+ variant === "default" ? "text-[13px]" : "text-sm",
+ "text-foreground placeholder:text-muted-foreground/70",
+ "min-w-0 min-h-8 max-h-32 resize-none overflow-y-auto border-0 px-0 py-1.5 leading-5",
+ (expandOnFocus || variant === "sidebar" || isCompactNote) && "min-h-0 max-h-none",
isBusy && "text-muted-foreground/70 cursor-not-allowed"
)}
/>
+ {isIdle && !inputText.trim() && trailingContent}
{isBusy && onCancel ? (
<button
type="button"
- onClick={onCancel}
+ onClick={handleCancel}
aria-label={t("common.cancel")}
title={t("common.cancel")}
className={cn(
"flex items-center justify-center w-7 h-7 rounded-full shrink-0",
+ expandOnFocus && COLLAPSED_ROW_CENTER,
"text-muted-foreground/70 hover:text-foreground hover:bg-foreground/8",
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/30",
"transition-colors duration-100"
@@ -243,10 +355,23 @@ export function ChatInput({
"transition-all duration-100",
inputText.trim()
? "hover:brightness-110 active:scale-95"
- : "opacity-30 saturate-0 cursor-default"
+ : variant === "assistant" || variant === "note" || variant === "sidebar"
+ ? "cursor-default"
+ : "opacity-30 saturate-0 cursor-default"
)}
>
- <SendIcon size={28} className="block rtl:scale-x-[-1]" />
+ {variant === "assistant" || variant === "note" || variant === "sidebar" ? (
+ <span
+ className={cn(
+ "flex size-8 items-center justify-center rounded-full",
+ inputText.trim() ? GRADIENT_CIRCLE : "bg-muted text-muted-foreground"
+ )}
+ >
+ <ArrowRight size={18} className="-rotate-90" />
+ </span>
+ ) : (
+ <SendIcon size={28} className="block rtl:scale-x-[-1]" />
+ )}
</button>
) : isIdle ? (
<button
@@ -260,6 +385,7 @@ export function ChatInput({
}
className={cn(
"flex items-center justify-center w-7 h-7 rounded-full shrink-0",
+ expandOnFocus && COLLAPSED_ROW_CENTER,
GRADIENT_CIRCLE,
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/30",
"transition-all duration-100",
diff --git a/src/components/chat/ChatMessage.tsx b/src/components/chat/ChatMessage.tsx
index c493d1c6a..e3771770c 100644
--- a/src/components/chat/ChatMessage.tsx
+++ b/src/components/chat/ChatMessage.tsx
@@ -1,4 +1,4 @@
-import { useState } from "react";
+import { memo, useState } from "react";
import { useTranslation } from "react-i18next";
import { Copy, Check, Search, FileText, ChevronDown, ChevronRight, CircleAlert } from "../icons";
import { cn } from "../lib/utils";
@@ -174,7 +174,9 @@ function NoteCard({
);
}
-export function ChatMessage({
+// Memoized: hosts re-render on every keystroke in their composer (or, for note chat, in
+// the note), and only the streaming reply's props change between those renders.
+export const ChatMessage = memo(function ChatMessage({
messageId,
role,
content,
@@ -209,7 +211,9 @@ export function ChatMessage({
"text-[13px] leading-relaxed"
)}
>
- <span dir="auto">{content}</span>
+ <span dir="auto" className="whitespace-pre-wrap">
+ {content}
+ </span>
</div>
</div>
);
@@ -295,4 +299,4 @@ export function ChatMessage({
</div>
</div>
);
-}
+});
diff --git a/src/components/chat/ChatMessages.tsx b/src/components/chat/ChatMessages.tsx
index d7e0a9235..c5ba74bc4 100644
--- a/src/components/chat/ChatMessages.tsx
+++ b/src/components/chat/ChatMessages.tsx
@@ -9,6 +9,7 @@ interface ChatMessagesProps {
onOpenNote?: (noteId: number) => void;
/** Extra classes for the message column (e.g. a page-width cap); the scroll container stays full width. */
contentClassName?: string;
+ scrollClassName?: string;
}
export function ChatMessages({
@@ -16,6 +17,7 @@ export function ChatMessages({
emptyState,
onOpenNote,
contentClassName,
+ scrollClassName,
}: ChatMessagesProps) {
// Follow the stream only while the user is at the bottom; scrolling up to
// re-read must not be yanked back down by the next token.
@@ -36,7 +38,18 @@ export function ChatMessages({
onTouchStart={handleTouchStart}
onTouchMove={handleTouchMove}
onTouchEnd={handleTouchEnd}
- className={cn("flex-1 overflow-y-auto agent-chat-scroll", "px-3 py-2")}
+ // Keep focus in a focused composer: blurring it collapses it and slides a bottom-pinned
+ // conversation out from under the pointer before the click completes. Otherwise links
+ // keep their default press, so their text can still be selected or dragged.
+ onMouseDown={(event) => {
+ if (
+ document.activeElement instanceof HTMLTextAreaElement &&
+ (event.target as Element).closest("button, a")
+ ) {
+ event.preventDefault();
+ }
+ }}
+ className={cn("min-h-0 flex-1 overflow-y-auto agent-chat-scroll px-3 py-2", scrollClassName)}
>
{messages.length === 0 ? (
(emptyState ?? null)
diff --git a/src/components/chat/ChatView.tsx b/src/components/chat/ChatView.tsx
index 95924b5ca..00a9b36b8 100644
--- a/src/components/chat/ChatView.tsx
+++ b/src/components/chat/ChatView.tsx
@@ -1,30 +1,62 @@
-import { useState, useCallback, useEffect, lazy, Suspense } from "react";
+import { useState, useCallback, useEffect, useRef, lazy, Suspense } from "react";
import { useTranslation } from "react-i18next";
import { useChatPersistence } from "./useChatPersistence";
import { useChatStreaming } from "./useChatStreaming";
import { useChatMessageSender } from "./useChatMessageSender";
import { ChatMessages } from "./ChatMessages";
import { ChatInput } from "./ChatInput";
-import { ChatEmptyIllustration } from "./ChatEmptyIllustration";
import ConversationList from "./ConversationList";
-import EmptyChatState from "./EmptyChatState";
import { ConfirmDialog } from "../ui/dialog";
import { PAGE_CONTENT_WIDTH_CLASS } from "../ui/pageWidth";
+import { BrandMarkIcon } from "../dictation/BrandMarkIcon";
import { useDialogs } from "../../hooks/useDialogs";
import { getCachedPlatform } from "../../utils/platform";
+import { Check, FileText, Video } from "../icons";
+import { observeChatComposerInset } from "./composerLayout";
const CommandSearch = lazy(() => import("../CommandSearch"));
const platform = getCachedPlatform();
-function NewChatEmptyState() {
+const STARTER_PROMPTS = [
+ { key: "chat.starters.todos", icon: Check },
+ { key: "chat.starters.meeting", icon: Video },
+ { key: "chat.starters.sharedNotes", icon: FileText },
+] as const;
+
+function NewChatEmptyState({
+ onPrompt,
+ showSuggestions,
+ disabled,
+}: {
+ onPrompt: (prompt: string) => void;
+ showSuggestions: boolean;
+ disabled: boolean;
+}) {
const { t } = useTranslation();
return (
- <div className="flex flex-col items-center justify-center h-full -mt-6 select-none">
- <ChatEmptyIllustration />
- <p className="text-xs text-foreground/50 dark:text-foreground/45 text-center max-w-48 mt-4">
- {t("chat.newChatEmpty")}
- </p>
+ <div className="flex h-full min-h-80 flex-col items-center justify-center px-4 pb-[var(--chat-composer-inset,5rem)] text-center">
+ <BrandMarkIcon size={64} className="text-foreground/15 dark:text-muted-foreground/35" />
+ {showSuggestions && (
+ <div className="mt-8 grid w-full max-w-2xl grid-cols-1 gap-3 sm:grid-cols-3">
+ {STARTER_PROMPTS.map(({ key, icon: Icon }) => (
+ <button
+ key={key}
+ type="button"
+ disabled={disabled}
+ onClick={() => onPrompt(t(key))}
+ className="flex min-h-24 flex-col items-start justify-between rounded-2xl border border-border bg-card p-4 text-start text-sm font-medium text-foreground transition-colors hover:border-primary/40 hover:bg-primary/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10"
+ >
+ <span className="flex h-8 w-8 items-center justify-center rounded-lg bg-muted text-muted-foreground">
+ <Icon size={16} />
+ </span>
+ <span className="max-w-full truncate" title={t(key)}>
+ {t(key)}
+ </span>
+ </button>
+ ))}
+ </div>
+ )}
</div>
);
}
@@ -76,6 +108,24 @@ export default function ChatView() {
persistence.handleNewChat();
}, [cancelStream, persistence]);
+ const composerElementRef = useRef<HTMLDivElement | null>(null);
+ const composerRef = useCallback((composer: HTMLDivElement | null) => {
+ composerElementRef.current = composer;
+ const container = composer?.parentElement;
+ if (!composer || !container) return;
+ return observeChatComposerInset(composer, container);
+ }, []);
+
+ const focusComposer = useCallback(() => {
+ composerElementRef.current?.querySelector("textarea")?.focus();
+ }, []);
+
+ // Starting a new chat from the list or the shortcut means the user is about to type.
+ const startNewChat = useCallback(() => {
+ handleNewChat();
+ focusComposer();
+ }, [handleNewChat, focusComposer]);
+
const createConversation = useCallback(
async (text: string) => {
const title = text.length > 50 ? `${text.slice(0, 50)}...` : text;
@@ -83,13 +133,11 @@ export default function ChatView() {
},
[persistence]
);
- const markChatStarted = useCallback(() => setIsNewChat(false), []);
const handleTextSubmit = useChatMessageSender({
conversationId: activeConversationId,
persistence,
streaming,
createConversation,
- onBeforeSend: markChatStarted,
onSendingChange: setSubmissionInFlight,
});
@@ -127,15 +175,12 @@ export default function ChatView() {
const mod = platform === "darwin" ? e.metaKey : e.ctrlKey;
if (mod && e.key === "n") {
e.preventDefault();
- handleNewChat();
+ startNewChat();
}
};
window.addEventListener("keydown", handleKeyDown);
return () => window.removeEventListener("keydown", handleKeyDown);
- }, [handleNewChat]);
-
- const hasActiveChat =
- activeConversationId !== null || persistence.messages.length > 0 || isNewChat;
+ }, [startNewChat]);
return (
<>
@@ -157,49 +202,60 @@ export default function ChatView() {
/>
</Suspense>
)}
- <div className="flex h-full">
+ <div className="flex h-full min-h-0">
<div className="w-56 min-w-50 shrink-0 border-e border-border dark:border-white/10">
<ConversationList
activeConversationId={activeConversationId}
onSelectConversation={handleSelectConversation}
- onNewChat={handleNewChat}
+ onNewChat={startNewChat}
onOpenSearch={() => setShowSearch(true)}
onArchive={handleArchive}
onDelete={handleDelete}
refreshKey={refreshKey}
/>
</div>
- <div className="flex-1 min-w-80 flex flex-col">
- {hasActiveChat ? (
- <>
- <ChatMessages
- messages={persistence.messages}
- emptyState={<NewChatEmptyState />}
- contentClassName={PAGE_CONTENT_WIDTH_CLASS}
+ <div className="relative flex-1 min-w-80 min-h-0 flex flex-col">
+ <ChatMessages
+ messages={persistence.messages}
+ emptyState={
+ <NewChatEmptyState
+ onPrompt={(prompt) => {
+ // The starter card unmounts once the message lands; move focus to the
+ // composer first so it isn't dropped.
+ focusComposer();
+ void handleTextSubmit(prompt);
+ }}
+ showSuggestions={isNewChat}
+ disabled={submissionInFlight || streaming.agentState !== "idle"}
/>
- <div className="px-3 pb-3 pt-1">
- <ChatInput
- className={PAGE_CONTENT_WIDTH_CLASS}
- // New chat and switching cancel the stream at once, but the
- // cancelled send can hold the submission lock until an
- // in-flight tool returns; a message sent before then would
- // be dropped, so the input stays busy until it lets go.
- agentState={
- submissionInFlight && streaming.agentState === "idle"
- ? "thinking"
- : streaming.agentState
- }
- partialTranscript=""
- onTextSubmit={handleTextSubmit}
- onCancel={streaming.cancelStream}
- autoFocus={isNewChat}
- voiceDraft
- />
- </div>
- </>
- ) : (
- <EmptyChatState />
- )}
+ }
+ contentClassName={`${PAGE_CONTENT_WIDTH_CLASS} pb-[var(--chat-composer-inset,5rem)]`}
+ />
+ <div
+ ref={composerRef}
+ className="pointer-events-none absolute inset-x-0 bottom-0 z-10 px-3 pb-5 pt-1"
+ >
+ <ChatInput
+ className="pointer-events-auto mx-auto w-full max-w-2xl"
+ // New chat and switching cancel the stream at once, but the
+ // cancelled send can hold the submission lock until an
+ // in-flight tool returns; a message sent before then would
+ // be dropped, so the input stays busy until it lets go.
+ agentState={
+ submissionInFlight && streaming.agentState === "idle"
+ ? "thinking"
+ : streaming.agentState
+ }
+ partialTranscript=""
+ onTextSubmit={handleTextSubmit}
+ onCancel={streaming.cancelStream}
+ voiceDraft
+ focusOnIdle={false}
+ placeholder={t("chat.inputPlaceholder")}
+ variant="assistant"
+ expandOnFocus
+ />
+ </div>
</div>
</div>
</>
diff --git a/src/components/chat/ConversationList.tsx b/src/components/chat/ConversationList.tsx
index b92688484..22dd07a99 100644
--- a/src/components/chat/ConversationList.tsx
+++ b/src/components/chat/ConversationList.tsx
@@ -1,5 +1,5 @@
import { useState, useEffect, useRef, useCallback, useMemo } from "react";
-import { SquarePen, Search, Archive as ArchiveIcon } from "../icons";
+import { Plus, Search, Archive as ArchiveIcon } from "../icons";
import { useTranslation } from "react-i18next";
import { useVirtualizer } from "@tanstack/react-virtual";
import { cn } from "../lib/utils";
@@ -69,12 +69,14 @@ export default function ConversationList({
const { t } = useTranslation();
const [conversations, setConversations] = useState<ConversationPreview[]>([]);
const [isLoading, setIsLoading] = useState(true);
+ const [loadError, setLoadError] = useState(false);
const [showArchived, setShowArchived] = useState(false);
const scrollRef = useRef<HTMLDivElement>(null);
const showSkeletonTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
const [showSkeleton, setShowSkeleton] = useState(false);
const loadConversations = useCallback(async () => {
+ setLoadError(false);
try {
const [active, archived] = await Promise.all([
window.electronAPI?.getAgentConversationsWithPreview?.(200, 0, false),
@@ -96,8 +98,10 @@ export default function ConversationList({
is_archived: !!c.archived_at,
});
setConversations([...(active ?? []).map(toPreview), ...(archived ?? []).map(toPreview)]);
+ // The Archived toggle hides once nothing is archived; leave that view with it.
+ if (!archived?.length) setShowArchived(false);
} catch {
- // silently fail
+ setLoadError(true);
} finally {
setIsLoading(false);
setShowSkeleton(false);
@@ -187,29 +191,29 @@ export default function ConversationList({
return (
<div className="flex flex-col h-full" onKeyDown={handleKeyDown} tabIndex={-1}>
- <div className="px-2 pt-2 pb-1 shrink-0 space-y-0.5">
+ <div className="shrink-0 space-y-1 px-4 pt-2 pb-1">
<button
onClick={onNewChat}
className={cn(
- "flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs",
- "text-muted-foreground/80 hover:text-foreground hover:bg-foreground/5",
+ "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm",
+ "text-foreground hover:bg-foreground/5",
"transition-colors duration-150",
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/30"
)}
>
- <SquarePen size={14} className="shrink-0" />
+ <Plus size={16} className="shrink-0" />
{t("chat.newChat")}
</button>
<button
onClick={onOpenSearch}
className={cn(
- "flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs",
- "text-muted-foreground/80 hover:text-foreground hover:bg-foreground/5",
+ "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm",
+ "text-foreground hover:bg-foreground/5",
"transition-colors duration-150",
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/30"
)}
>
- <Search size={14} className="shrink-0" />
+ <Search size={16} className="shrink-0" />
{t("chat.searchChats")}
</button>
{conversations.some((c) => c.is_archived) && (
@@ -230,7 +234,14 @@ export default function ConversationList({
</div>
{flatItems.length === 0 ? (
- <EmptyConversationList onNewChat={onNewChat} />
+ <EmptyConversationList
+ state={conversations.length > 0 ? "archived" : loadError ? "error" : "active"}
+ onRetry={() => {
+ setIsLoading(true);
+ setShowSkeleton(true);
+ void loadConversations();
+ }}
+ />
) : (
<div ref={scrollRef} className="flex-1 overflow-y-auto">
<div
diff --git a/src/components/chat/EmptyChatState.tsx b/src/components/chat/EmptyChatState.tsx
deleted file mode 100644
index 1df55726c..000000000
--- a/src/components/chat/EmptyChatState.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import { useTranslation } from "react-i18next";
-import { ChatEmptyIllustration } from "./ChatEmptyIllustration";
-
-export default function EmptyChatState() {
- const { t } = useTranslation();
-
- return (
- <div className="flex flex-col items-center justify-center h-full -mt-6 select-none">
- <ChatEmptyIllustration />
- <p className="text-xs text-muted-foreground/70 mt-4">{t("chat.selectChat")}</p>
- </div>
- );
-}
diff --git a/src/components/chat/EmptyConversationList.tsx b/src/components/chat/EmptyConversationList.tsx
index 715d0cb38..967cbbd04 100644
--- a/src/components/chat/EmptyConversationList.tsx
+++ b/src/components/chat/EmptyConversationList.tsx
@@ -1,29 +1,45 @@
-import { Plus } from "../icons";
import { useTranslation } from "react-i18next";
-import { cn } from "../lib/utils";
+import ThemedEmptyIllustration from "../ui/ThemedEmptyIllustration";
+import chatEmptyLight from "../../assets/empty-states/chat-empty-light.svg";
+import chatEmptyDark from "../../assets/empty-states/chat-empty-dark.svg";
+
+const TITLE_KEYS = {
+ active: "chat.noConversations",
+ // There are chats, but every one of them is archived.
+ archived: "chat.allArchived",
+ error: "chat.loadFailed",
+} as const;
interface EmptyConversationListProps {
- onNewChat: () => void;
+ state: keyof typeof TITLE_KEYS;
+ onRetry: () => void;
}
-export default function EmptyConversationList({ onNewChat }: EmptyConversationListProps) {
+export default function EmptyConversationList({ state, onRetry }: EmptyConversationListProps) {
const { t } = useTranslation();
return (
- <div className="flex flex-col items-center justify-center h-full gap-2 px-4 select-none">
- <p className="text-xs text-muted-foreground/70 text-center">{t("chat.noConversations")}</p>
- <button
- onClick={onNewChat}
- className={cn(
- "flex items-center gap-1.5 h-7 px-2.5 rounded-md",
- "text-xs text-primary hover:bg-primary/8",
- "transition-colors duration-150",
- "focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/30"
- )}
- >
- <Plus size={12} />
- {t("chat.newChat")}
- </button>
+ <div className="flex h-full flex-col items-center justify-center px-4 pb-10 text-center">
+ {state !== "error" && (
+ <ThemedEmptyIllustration
+ light={chatEmptyLight}
+ dark={chatEmptyDark}
+ width={150}
+ height={150}
+ />
+ )}
+ <p className="mt-3 text-sm font-semibold text-foreground">{t(TITLE_KEYS[state])}</p>
+ {state === "active" && (
+ <p className="mt-2 text-xs text-muted-foreground">{t("chat.noConversationsDescription")}</p>
+ )}
+ {state === "error" && (
+ <button
+ onClick={onRetry}
+ className="mt-3 text-xs text-primary hover:underline focus-visible:underline"
+ >
+ {t("common.retry")}
+ </button>
+ )}
</div>
);
}
diff --git a/src/components/chat/composerLayout.ts b/src/components/chat/composerLayout.ts
new file mode 100644
index 000000000..3cccd43ea
--- /dev/null
+++ b/src/components/chat/composerLayout.ts
@@ -0,0 +1,29 @@
+const COMPOSER_GAP_PX = 8;
+
+interface ResizeObserverHandle {
+ observe: (element: Element) => void;
+ disconnect: () => void;
+}
+
+export function observeChatComposerInset(
+ composer: HTMLElement,
+ container: HTMLElement,
+ createObserver: (callback: () => void) => ResizeObserverHandle = (callback) =>
+ new ResizeObserver(callback)
+): () => void {
+ const updateInset = () => {
+ container.style.setProperty(
+ "--chat-composer-inset",
+ `${composer.offsetHeight + COMPOSER_GAP_PX}px`
+ );
+ };
+
+ updateInset();
+ const observer = createObserver(updateInset);
+ observer.observe(composer);
+
+ return () => {
+ observer.disconnect();
+ container.style.removeProperty("--chat-composer-inset");
+ };
+}
diff --git a/src/components/chat/useChatMessageSender.ts b/src/components/chat/useChatMessageSender.ts
index c000b67dc..192d88fff 100644
--- a/src/components/chat/useChatMessageSender.ts
+++ b/src/components/chat/useChatMessageSender.ts
@@ -14,7 +14,6 @@ interface UseChatMessageSenderOptions {
persistence: ChatPersistence;
streaming: Pick<ChatStreaming, "sendToAI">;
createConversation: (text: string) => Promise<number>;
- onBeforeSend?: () => void;
onMessagePersisted?: (context: PersistedMessageContext) => void | Promise<void>;
onSendingChange?: (sending: boolean) => void;
}
@@ -45,7 +44,6 @@ export function useChatMessageSender({
persistence,
streaming,
createConversation,
- onBeforeSend,
onMessagePersisted,
onSendingChange,
}: UseChatMessageSenderOptions): (text: string, options?: SendToAIOptions) => Promise<boolean> {
@@ -59,7 +57,6 @@ export function useChatMessageSender({
return await submissionLockRef.current!.run(async () => {
onSendingChange?.(true);
try {
- onBeforeSend?.();
const convId = conversationId ?? (await createConversation(text));
const previousMessages = persistence.messages;
const userMessage: Message = {
@@ -85,7 +82,6 @@ export function useChatMessageSender({
[
conversationId,
createConversation,
- onBeforeSend,
onMessagePersisted,
onSendingChange,
persistence,
diff --git a/src/components/icons/index.ts b/src/components/icons/index.ts
index 8d3afec80..01d9cfc3d 100644
--- a/src/components/icons/index.ts
+++ b/src/components/icons/index.ts
@@ -134,7 +134,6 @@ export const ShieldCheck = createIcon("shield-check", Nucleo.ShieldCheckOutline2
export const Sliders = createIcon("sliders", Nucleo.Sliders2VerticalOutline24);
export const Smile = createIcon("smile", Nucleo.FaceSmileOutline24);
export const Sparkles = createIcon("sparkles", Nucleo.SparkleOutline24);
-export const SquarePen = createIcon("square-pen", Nucleo.ComposeOutline24);
export const Sun = createIcon("sun", Nucleo.SunOutline24);
export const Terminal = createIcon("terminal", Nucleo.ConsoleOutline24);
export const TestTube = createIcon("test-tube", Nucleo.TestTubeOutline24);
diff --git a/src/components/icons/nucleo-map.json b/src/components/icons/nucleo-map.json
index 237dec38f..4bbd912d1 100644
--- a/src/components/icons/nucleo-map.json
+++ b/src/components/icons/nucleo-map.json
@@ -120,7 +120,6 @@
"Sliders": "sliders-2-vertical",
"Smile": "face-smile",
"Sparkles": "sparkle",
- "SquarePen": "compose",
"Sun": "sun",
"Terminal": "console",
"TestTube": "test-tube",
diff --git a/src/components/icons/nucleo/ComposeOutline24.tsx b/src/components/icons/nucleo/ComposeOutline24.tsx
deleted file mode 100644
index a4933ed77..000000000
--- a/src/components/icons/nucleo/ComposeOutline24.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import type { SVGProps } from "react";
-
-export type ComposeOutline24Props = SVGProps<SVGSVGElement> & {
- strokeWidth?: number | string;
- corners?: "round" | "square";
-};
-
-export function ComposeOutline24({
- strokeWidth = 2,
- corners = "round",
- ...props
-}: ComposeOutline24Props) {
- return (
- <svg xmlns="http://www.w3.org/2000/svg" width={24} height={24} viewBox="0 0 24 24" {...props}>
- <path
- d="m21,11v8c0,1.105-.895,2-2,2H5c-1.105,0-2-.895-2-2V5c0-1.105.895-2,2-2h8"
- fill="none"
- stroke="currentColor"
- strokeMiterlimit="10"
- strokeWidth={strokeWidth}
- strokeLinejoin={corners === "round" ? "round" : "miter"}
- strokeLinecap={corners === "round" ? "round" : "square"}
- ></path>
- <line
- x1="22"
- y1="2"
- x2="11"
- y2="13"
- fill="none"
- stroke="currentColor"
- strokeMiterlimit="10"
- strokeWidth={strokeWidth}
- data-color="color-2"
- strokeLinejoin={corners === "round" ? "round" : "miter"}
- strokeLinecap={corners === "round" ? "round" : "square"}
- ></line>
- </svg>
- );
-}
diff --git a/src/components/icons/nucleo/index.ts b/src/components/icons/nucleo/index.ts
index 2cc70a77a..449ee45fa 100644
--- a/src/components/icons/nucleo/index.ts
+++ b/src/components/icons/nucleo/index.ts
@@ -31,7 +31,6 @@ export { ClockOutline24 } from "./ClockOutline24";
export { Cloud2Outline24 } from "./Cloud2Outline24";
export { CloudUpload2Outline24 } from "./CloudUpload2Outline24";
export { CodeOutline24 } from "./CodeOutline24";
-export { ComposeOutline24 } from "./ComposeOutline24";
export { ConsoleOutline24 } from "./ConsoleOutline24";
export { Copy2Outline24 } from "./Copy2Outline24";
export { CreditCardOutline24 } from "./CreditCardOutline24";
diff --git a/src/components/notes/BatchQueueView.tsx b/src/components/notes/BatchQueueView.tsx
index d04918d47..3f733c255 100644
--- a/src/components/notes/BatchQueueView.tsx
+++ b/src/components/notes/BatchQueueView.tsx
@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
import { AlertTriangle, Check, X, Loader2, Clock, Trash2 } from "../icons";
import { Button } from "../ui/button";
import { cn } from "../lib/utils";
+import { CARD_SURFACE_CLASS } from "../ui/surfaces";
import type { QueueItem } from "../../stores/batchQueueStore";
interface BatchQueueViewProps {
@@ -21,13 +22,13 @@ interface BatchQueueViewProps {
function StatusIcon({ status }: { status: QueueItem["status"] }) {
switch (status) {
case "done":
- return <Check size={12} className="text-success/70" />;
+ return <Check size={14} className="shrink-0 text-success" />;
case "error":
- return <X size={12} className="text-destructive/70" />;
+ return <X size={14} className="shrink-0 text-destructive" />;
case "queued":
- return <Clock size={12} className="text-foreground/45" />;
+ return <Clock size={14} className="shrink-0 text-muted-foreground" />;
default:
- return <Loader2 size={12} className="text-primary/60 animate-spin" />;
+ return <Loader2 size={14} className="shrink-0 animate-spin text-primary" />;
}
}
@@ -75,16 +76,19 @@ export default function BatchQueueView({
totalCount > 0 ? Math.round(((completedCount + failedCount) / totalCount) * 100) : 0;
return (
- <div style={{ animation: "float-up 0.3s ease-out" }}>
- <div className="mb-3">
- <div className="flex items-center justify-between mb-1.5">
- <p className="text-xs text-foreground/50 font-medium">
+ <div
+ className={cn(CARD_SURFACE_CLASS, "overflow-clip")}
+ style={{ animation: "float-up 0.3s ease-out" }}
+ >
+ <div className="px-4 pt-4 pb-3">
+ <div className="mb-2 flex items-center justify-between gap-3">
+ <p className="text-sm font-medium text-foreground">
{t("notes.upload.queueProgress", {
completed: completedCount,
total: totalCount,
})}
{failedCount > 0 && (
- <span className="text-destructive/50 font-normal">
+ <span className="font-normal text-destructive">
{" · "}
{t("notes.upload.queueFailed", { n: failedCount })}
</span>
@@ -95,38 +99,37 @@ export default function BatchQueueView({
variant="ghost"
size="sm"
onClick={onClearQueue}
- className="h-6 text-[10px] text-foreground/45"
+ className="h-7 rounded-full px-3 text-xs"
>
{t("notes.upload.clearQueue")}
</Button>
)}
</div>
- <div className="w-full h-[3px] rounded-full bg-foreground/5 dark:bg-white/5 overflow-hidden">
+ <div className="h-1 w-full overflow-hidden rounded-full bg-foreground/8 dark:bg-white/10">
<div
- className="h-full rounded-full bg-primary/50 transition-[width] duration-500 ease-out"
+ className="h-full rounded-full bg-primary transition-[width] duration-500 ease-out"
style={{ width: `${overallProgress}%` }}
/>
</div>
</div>
- <div className="space-y-1 max-h-[300px] overflow-y-auto">
+ <div className="max-h-[300px] divide-y divide-border/60 overflow-y-auto border-t border-border/60 dark:divide-white/10 dark:border-white/10">
{queue.map((item) => (
<div
key={item.id}
className={cn(
- "flex items-center gap-2 px-2.5 py-1.5 rounded-md text-xs",
- "bg-surface-1/30 dark:bg-white/[0.02] border border-foreground/4 dark:border-white/10",
- item.status === "error" && "border-destructive/15"
+ "flex min-h-12 items-center gap-3 px-4 py-2 text-sm",
+ item.status === "error" && "bg-destructive/5"
)}
>
<StatusIcon status={item.status} />
- <span className="flex-1 truncate text-foreground/60">{item.name}</span>
+ <span className="flex-1 truncate text-foreground/80">{item.name}</span>
{item.status === "downloading" && (
- <div className="w-16 h-[2px] rounded-full bg-foreground/5 overflow-hidden">
+ <div className="h-1 w-16 overflow-hidden rounded-full bg-foreground/8 dark:bg-white/10">
<div
className={cn(
- "h-full rounded-full bg-primary/50 transition-[width] duration-300",
+ "h-full rounded-full bg-primary transition-[width] duration-300",
// Percent 0 = size unknown: pulse instead of an empty bar.
!item.progress && "animate-pulse"
)}
@@ -146,7 +149,7 @@ export default function BatchQueueView({
{item.status === "done" && item.noteId && onOpenNote && (
<button
onClick={() => onOpenNote(item.noteId!)}
- className="text-[10px] text-primary/50 hover:text-primary/70"
+ className="text-xs font-medium text-primary hover:underline"
aria-label={t("notes.upload.openNote")}
>
{t("notes.upload.openNote")}
@@ -155,7 +158,7 @@ export default function BatchQueueView({
{item.status === "error" && item.error && (
<span
- className="text-[10px] text-destructive/50 truncate max-w-20"
+ className="max-w-40 truncate text-xs text-destructive"
title={t(`notes.upload.${item.error}`, {
defaultValue: item.error,
size: byokMaxFileSizeMb,
@@ -171,10 +174,10 @@ export default function BatchQueueView({
{item.status === "queued" && (
<button
onClick={() => onRemoveItem(item.id)}
- className="text-foreground/45 transition-colors"
+ className="flex size-7 shrink-0 items-center justify-center rounded-full text-foreground/45 transition-colors hover:bg-foreground/5 hover:text-foreground"
aria-label={t("notes.upload.removeFromQueue")}
>
- <Trash2 size={10} />
+ <Trash2 size={13} />
</button>
)}
</div>
@@ -182,13 +185,8 @@ export default function BatchQueueView({
</div>
{isProcessing && !allDone && (
- <div className="flex justify-center mt-3">
- <Button
- variant="ghost"
- size="sm"
- onClick={onCancelAll}
- className="h-7 text-xs text-foreground/45"
- >
+ <div className="flex justify-center border-t border-border/60 py-2 dark:border-white/10">
+ <Button variant="ghost" size="sm" onClick={onCancelAll} className="rounded-full px-4">
{t("notes.upload.cancelAll")}
</Button>
</div>
diff --git a/src/components/notes/ConversationPicker.tsx b/src/components/notes/ConversationPicker.tsx
index 68ecd89a0..a457336c3 100644
--- a/src/components/notes/ConversationPicker.tsx
+++ b/src/components/notes/ConversationPicker.tsx
@@ -1,4 +1,4 @@
-import { ChevronDown, Plus } from "../icons";
+import { ChevronDown, Clock, PanelRightClose, Plus } from "../icons";
import { useTranslation } from "react-i18next";
import { useUiLocale } from "../../hooks/useUiLocale";
import type { ContainerConversationItem } from "../../hooks/useContainerChat";
@@ -18,6 +18,8 @@ interface ConversationPickerProps {
onSwitchConversation: (id: number) => void;
onNewChat?: () => void;
titleClassName?: string;
+ variant?: "default" | "sidebar";
+ onUndock?: () => void;
}
export function ConversationPicker({
@@ -26,6 +28,8 @@ export function ConversationPicker({
onSwitchConversation,
onNewChat,
titleClassName,
+ variant = "default",
+ onUndock,
}: ConversationPickerProps) {
const { t } = useTranslation();
const locale = useUiLocale();
@@ -35,13 +39,23 @@ export function ConversationPicker({
<DropdownMenu>
<DropdownMenuTrigger asChild>
<button
- className="inline-flex items-center gap-1 text-xs font-medium text-foreground/50 hover:text-foreground/70 hover:bg-foreground/5 rounded-md px-1.5 py-0.5 -ms-1.5 transition-colors duration-150 outline-none"
+ className={cn(
+ "inline-flex items-center rounded-md transition-colors duration-150 outline-none hover:bg-foreground/5",
+ variant === "sidebar"
+ ? "gap-2 px-1 py-1 text-sm text-foreground/65 hover:text-foreground"
+ : "-ms-1.5 gap-1 px-1.5 py-0.5 text-xs font-medium text-foreground/50 hover:text-foreground/70"
+ )}
aria-label={t("embeddedChat.conversationSelector")}
>
+ {variant === "sidebar" && <Clock size={18} className="shrink-0" />}
<span className={cn("truncate max-w-40", titleClassName)}>
- {activeConversation?.title || t("embeddedChat.newChat")}
+ {variant === "sidebar"
+ ? t("embeddedChat.history")
+ : activeConversation?.title || t("embeddedChat.newChat")}
</span>
- <ChevronDown size={10} className="shrink-0 text-foreground/45" />
+ {variant !== "sidebar" && (
+ <ChevronDown size={10} className="shrink-0 text-foreground/45" />
+ )}
</button>
</DropdownMenuTrigger>
<DropdownMenuContent align="start" sideOffset={4} className="min-w-44 max-w-56 p-1">
@@ -69,6 +83,15 @@ export function ConversationPicker({
))}
</>
)}
+ {onUndock && (
+ <>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem onClick={onUndock} className="text-xs gap-2 rounded-md px-2 py-1.5">
+ <PanelRightClose size={12} className="text-foreground/45 shrink-0" />
+ {t("embeddedChat.undock")}
+ </DropdownMenuItem>
+ </>
+ )}
</DropdownMenuContent>
</DropdownMenu>
);
diff --git a/src/components/notes/EmbeddedChat.tsx b/src/components/notes/EmbeddedChat.tsx
index 0eb03c324..bf0b2c4bb 100644
--- a/src/components/notes/EmbeddedChat.tsx
+++ b/src/components/notes/EmbeddedChat.tsx
@@ -1,39 +1,65 @@
import { useEffect, useCallback } from "react";
import { useTranslation } from "react-i18next";
-import { X, PanelRight, PanelRightClose } from "../icons";
+import { X, PanelRight, Plus, AlignLeft, ClipboardCheck, FileText } from "../icons";
import { cn } from "../lib/utils";
import { ChatMessages } from "../chat/ChatMessages";
import { ChatInput } from "../chat/ChatInput";
+import { BrandMarkIcon } from "../dictation/BrandMarkIcon";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from "../ui/dropdown-menu";
import type { Message, AgentState } from "../chat/types";
import { setActiveNoteId, setActiveFolderId } from "../../stores/noteStore";
import type { ContainerConversationItem } from "../../hooks/useContainerChat";
import { ConversationPicker } from "./ConversationPicker";
-import { FLOATING_CHAT_MAX_HEIGHT_CSS } from "./floatingChatLayout";
export type EmbeddedChatMode = "hidden" | "floating" | "sidebar";
+const SIDEBAR_PROMPTS = [
+ { key: "embeddedChat.generateSummary", icon: AlignLeft },
+ { key: "embeddedChat.makeTodos", icon: ClipboardCheck },
+ { key: "embeddedChat.createOutline", icon: FileText },
+] as const;
+
interface EmbeddedChatProps {
mode: EmbeddedChatMode;
onModeChange: (mode: EmbeddedChatMode) => void;
messages: Message[];
agentState: AgentState;
+ draftText?: string;
+ onDraftChange?: (text: string) => void;
onTextSubmit: (text: string) => void;
onCancel: () => void;
noteConversations?: ContainerConversationItem[];
activeConversationId?: number | null;
onSwitchConversation?: (id: number) => void;
onNewChat?: () => void;
- /** Floating panel ref; NoteEditor reserves scroll space with it. */
- floatingPanelRef?: React.Ref<HTMLDivElement>;
+ active?: boolean;
}
-function EmptyState() {
+function EmptyState({ floating }: { floating: boolean }) {
const { t } = useTranslation();
return (
- <div className="flex items-center justify-center h-full select-none">
- <p className="text-xs text-foreground/45 dark:text-foreground/45 text-center max-w-44">
- {t("embeddedChat.emptyState")}
- </p>
+ <div
+ className={cn(
+ "flex h-full flex-col items-center justify-center gap-3 px-4 text-center select-none",
+ floating ? "min-h-48" : "min-h-40"
+ )}
+ >
+ {floating ? (
+ <>
+ <BrandMarkIcon size={36} className="text-foreground/20 dark:text-muted-foreground/35" />
+ <p className="max-w-64 text-sm text-muted-foreground">{t("embeddedChat.emptyState")}</p>
+ </>
+ ) : (
+ <BrandMarkIcon
+ size={72}
+ className="text-foreground/10 drop-shadow-sm dark:text-foreground/15"
+ />
+ )}
</div>
);
}
@@ -43,13 +69,15 @@ export default function EmbeddedChat({
onModeChange,
messages,
agentState,
+ draftText,
+ onDraftChange,
onTextSubmit,
onCancel,
noteConversations,
activeConversationId,
onSwitchConversation,
onNewChat,
- floatingPanelRef,
+ active = true,
}: EmbeddedChatProps) {
const { t } = useTranslation();
@@ -61,11 +89,11 @@ export default function EmbeddedChat({
const handleKeyDown = useCallback(
(e: KeyboardEvent) => {
- if (e.key === "Escape" && mode === "floating") {
+ if (e.key === "Escape" && mode === "floating" && active) {
onModeChange("hidden");
}
},
- [mode, onModeChange]
+ [mode, onModeChange, active]
);
useEffect(() => {
@@ -85,17 +113,18 @@ export default function EmbeddedChat({
onSwitchConversation={onSwitchConversation}
onNewChat={onNewChat}
titleClassName="max-w-32"
+ variant={mode === "sidebar" ? "sidebar" : "default"}
+ onUndock={mode === "sidebar" ? () => onModeChange("floating") : undefined}
/>
) : (
- <span className="text-xs font-medium text-foreground/50">{t("embeddedChat.title")}</span>
+ <span className="text-xs font-medium text-foreground/50">
+ {t(mode === "sidebar" ? "embeddedChat.history" : "embeddedChat.title")}
+ </span>
);
const header = (
<div
- className={cn(
- "h-9 flex items-center px-3 shrink-0",
- mode === "sidebar" && "border-b border-border/70 dark:border-white/10"
- )}
+ className={cn("flex items-center shrink-0", mode === "sidebar" ? "h-16 px-6" : "h-9 px-3")}
>
{headerTitle}
<div className="flex-1" />
@@ -108,76 +137,118 @@ export default function EmbeddedChat({
>
<PanelRight size={13} className="rtl:scale-x-[-1]" />
</button>
- ) : (
+ ) : null}
+ {mode === "sidebar" && onNewChat && (
<button
- onClick={() => onModeChange("floating")}
- className="h-6 w-6 flex items-center justify-center rounded-md text-foreground/45 hover:bg-foreground/6 transition-colors"
- aria-label={t("embeddedChat.undock")}
+ onClick={onNewChat}
+ className="flex size-8 items-center justify-center rounded-full text-foreground/65 transition-colors hover:bg-foreground/6 hover:text-foreground"
+ aria-label={t("embeddedChat.newChat")}
>
- <PanelRightClose size={13} className="rtl:scale-x-[-1]" />
+ <Plus size={18} />
</button>
)}
<button
onClick={() => onModeChange("hidden")}
- className="h-6 w-6 flex items-center justify-center rounded-md text-foreground/45 hover:bg-foreground/6 transition-colors"
+ className={cn(
+ "flex items-center justify-center text-foreground/45 transition-colors hover:bg-foreground/6 hover:text-foreground",
+ mode === "sidebar" ? "size-8 rounded-full" : "h-6 w-6 rounded-md"
+ )}
aria-label={t("embeddedChat.close")}
>
- <X size={13} />
+ <X size={mode === "sidebar" ? 18 : 13} />
</button>
</div>
</div>
);
- const chatContent = (
+ const chatBody = (
<>
{header}
- <div className="flex-1 min-h-0 flex flex-col **:data-chat-bubble:max-w-full">
- <ChatMessages messages={messages} emptyState={<EmptyState />} onOpenNote={handleOpenNote} />
- </div>
- <ChatInput
- agentState={agentState}
- partialTranscript=""
- onTextSubmit={onTextSubmit}
- onCancel={onCancel}
- voiceDraft
- />
- </>
- );
-
- if (mode === "floating") {
- return (
<div
- ref={floatingPanelRef}
- style={{ maxHeight: FLOATING_CHAT_MAX_HEIGHT_CSS }}
className={cn(
- "absolute bottom-4 left-5 right-5 z-20 mx-auto max-w-[600px]",
- "min-h-50",
- "flex flex-col",
- "bg-background/95 dark:bg-surface-2/95",
- "border border-black/15 dark:border-white/18",
- "ring-1 ring-inset ring-white/60 dark:ring-white/8",
- "rounded-xl",
- "shadow-elevated",
- "backdrop-blur-2xl",
- "animate-[scale-in_200ms_ease-out]"
+ "flex-1 min-h-0 flex flex-col **:data-chat-bubble:max-w-full",
+ mode === "floating" && "min-w-0 max-w-full **:data-chat-bubble:break-words"
)}
>
- {chatContent}
+ <ChatMessages
+ messages={messages}
+ emptyState={<EmptyState floating={mode === "floating"} />}
+ onOpenNote={handleOpenNote}
+ scrollClassName={
+ mode === "floating"
+ ? cn(
+ "min-w-0 max-w-full overflow-x-hidden",
+ messages.length === 0 && "scrollbar-hidden"
+ )
+ : messages.length === 0
+ ? "scrollbar-hidden"
+ : undefined
+ }
+ />
</div>
- );
+ </>
+ );
+
+ if (mode === "floating") {
+ return chatBody;
}
return (
- <div
- className={cn(
- "w-85 shrink-0",
- "border-s border-black/12 dark:border-white/14",
- "bg-surface-1 dark:bg-surface-2",
- "flex flex-col",
- "min-h-0"
- )}
- >
- {chatContent}
+ <div className="flex min-h-0 w-1/2 min-w-80 max-w-2xl shrink-0 p-4" data-note-chat-panel>
+ <div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-4xl border border-border/60 bg-surface-1 dark:border-white/10 dark:bg-surface-1">
+ {chatBody}
+ <div className="mx-3 mb-3 shrink-0">
+ <div className="scrollbar-hidden flex items-center gap-1.5 overflow-x-auto px-1 pb-2">
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <button
+ type="button"
+ disabled={agentState !== "idle"}
+ aria-label={t("embeddedChat.quickActions")}
+ className="flex size-8 shrink-0 items-center justify-center rounded-full border border-dashed border-foreground/35 bg-background text-foreground/55 transition-colors hover:text-foreground disabled:opacity-40 dark:bg-surface-2"
+ >
+ <Plus size={14} />
+ </button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="start" side="top" sideOffset={8}>
+ {SIDEBAR_PROMPTS.map(({ key, icon: Icon }) => (
+ <DropdownMenuItem key={key} onClick={() => onTextSubmit(t(key))}>
+ <Icon size={15} className="text-primary" />
+ {t(key)}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ {SIDEBAR_PROMPTS.map(({ key, icon: Icon }) => (
+ <button
+ key={key}
+ type="button"
+ // Keep focus in the composer so it doesn't collapse and slide the pills away.
+ onMouseDown={(event) => event.preventDefault()}
+ onClick={() => onTextSubmit(t(key))}
+ disabled={agentState !== "idle"}
+ className="inline-flex h-8 shrink-0 items-center gap-1.5 rounded-full border border-border/70 bg-background px-2.5 text-xs text-foreground/65 transition-colors hover:text-foreground disabled:opacity-40 dark:border-white/10 dark:bg-surface-2"
+ >
+ <Icon size={14} className="text-primary" />
+ {t(key)}
+ </button>
+ ))}
+ </div>
+ <ChatInput
+ className="w-full"
+ variant="sidebar"
+ agentState={agentState}
+ draftText={draftText}
+ onDraftChange={onDraftChange}
+ partialTranscript=""
+ onTextSubmit={onTextSubmit}
+ onCancel={onCancel}
+ voiceDraft
+ focusOnIdle={false}
+ placeholder={t("embeddedChat.askPlaceholder")}
+ />
+ </div>
+ </div>
</div>
);
}
diff --git a/src/components/notes/MeetingTranscriptChat.tsx b/src/components/notes/MeetingTranscriptChat.tsx
index 92e7b9a13..21ed45851 100644
--- a/src/components/notes/MeetingTranscriptChat.tsx
+++ b/src/components/notes/MeetingTranscriptChat.tsx
@@ -1,7 +1,7 @@
import { memo, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { useVirtualizer } from "@tanstack/react-virtual";
-import { Check, Loader2, ShieldCheck, Sparkles, Users, X } from "../icons";
+import { Check, Loader2, Sparkles, Users, X } from "../icons";
import { useStickToBottom } from "../../hooks/useStickToBottom";
import { Popover, PopoverTrigger, PopoverContent } from "../ui/popover";
import { Toggle } from "../ui/toggle";
@@ -847,17 +847,9 @@ export function MeetingTranscriptChat({
return map;
}, [speakerProfiles]);
- const consentNotice = (
- <div className="shrink-0 flex items-center justify-center gap-1 px-4 pt-2 pb-1 text-[10px] text-muted-foreground/70 select-none">
- <ShieldCheck size={10} className="shrink-0" />
- <span>{t("notes.speaker.consentNotice")}</span>
- </div>
- );
-
if (!hasContent) {
return (
<div className="h-full flex flex-col">
- {consentNotice}
<div className="flex-1 flex items-center justify-center px-5">
<p className="text-xs text-muted-foreground/70 select-none">
{t("notes.editor.conversationWillAppear")}
@@ -884,9 +876,8 @@ export function MeetingTranscriptChat({
return (
<div className="h-full flex flex-col">
- {consentNotice}
{(isRecording || isDiarizing) && (
- <div className={cn("shrink-0 px-4 mb-1.5", contentClassName)}>
+ <div className={cn("shrink-0 px-4 pt-2 mb-1.5", contentClassName)}>
<div className="flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-1.5 rounded-lg border border-border/70 bg-surface-2/40 text-xs text-foreground">
<div className="flex items-center gap-1.5 min-w-0">
{isDiarizing ? (
diff --git a/src/components/notes/NoteBottomBar.tsx b/src/components/notes/NoteBottomBar.tsx
index f3fbc0613..afdfc7fec 100644
--- a/src/components/notes/NoteBottomBar.tsx
+++ b/src/components/notes/NoteBottomBar.tsx
@@ -1,152 +1,145 @@
-import { useState, useRef, useCallback, useEffect } from "react";
+import { useCallback } from "react";
import { useTranslation } from "react-i18next";
+import { ChatInput } from "../chat/ChatInput";
+import type { AgentState } from "../chat/types";
import { cn } from "../lib/utils";
-import { SendIcon } from "../ui/SendIcon";
-import { GLASS_SURFACE } from "../ui/glass";
+import { observeFloatingChatSize } from "./floatingChatLayout";
-// While recording, the bar sits over the live streaming transcript, and every
-// partial would force backdrop-blur to re-blur the strip; the capsule trades
-// glass for a near-opaque surface until the recording ends.
const RECORDING_SURFACE = "bg-surface-2/95 shadow-(--shadow-glass)";
interface NoteBottomBarProps {
- /** Swaps the glass surface for an opaque one while the live transcript streams underneath. */
isRecording: boolean;
+ draftText: string;
+ onDraftChange: (text: string) => void;
onAskSubmit: (text: string) => void;
onInputFocus?: () => void;
- askDisabled?: boolean;
+ onInputEscape?: () => void;
actionPicker?: React.ReactNode;
- /** One centred call to action floated above the ask capsule. */
callout?: React.ReactNode;
+ footnote?: React.ReactNode;
hideInput?: boolean;
+ chatOpen?: boolean;
+ chatContent?: React.ReactNode;
+ agentState?: AgentState;
+ onCancel?: () => void;
+ floatingPanelRef?: (panel: HTMLDivElement, container: HTMLElement) => void | (() => void);
}
export default function NoteBottomBar({
isRecording,
+ draftText,
+ onDraftChange,
onAskSubmit,
onInputFocus,
- askDisabled,
+ onInputEscape,
actionPicker,
callout,
- hideInput,
+ footnote,
+ hideInput = false,
+ chatOpen = false,
+ chatContent,
+ agentState = "idle",
+ onCancel,
+ floatingPanelRef,
}: NoteBottomBarProps) {
const { t } = useTranslation();
- const [inputText, setInputText] = useState("");
- const [isExpanded, setIsExpanded] = useState(false);
- const inputRef = useRef<HTMLInputElement>(null);
- const containerRef = useRef<HTMLDivElement>(null);
- const hasText = inputText.trim().length > 0;
- const handleSubmit = useCallback(() => {
- const text = inputText.trim();
- if (!text || askDisabled) return;
- onAskSubmit(text);
- setInputText("");
- setIsExpanded(false);
- }, [inputText, askDisabled, onAskSubmit]);
-
- const handleKeyDown = useCallback(
- (e: React.KeyboardEvent<HTMLInputElement>) => {
- if (e.key === "Enter" && !e.shiftKey) {
- e.preventDefault();
- handleSubmit();
- }
- if (e.key === "Escape") {
- setIsExpanded(false);
- inputRef.current?.blur();
+ const attachPanel = useCallback(
+ (panel: HTMLDivElement | null) => {
+ if (!panel) return;
+ if (!chatOpen) {
+ panel.style.height = "48px";
+ return;
}
- },
- [handleSubmit]
- );
- const handleInputFocus = useCallback(() => {
- setIsExpanded(true);
- onInputFocus?.();
- }, [onInputFocus]);
+ const container = panel.parentElement?.parentElement;
+ if (!container) return;
- // Chat panel opening hides the input; drop the expanded state so the bar
- // comes back in its idle layout when the panel closes.
- useEffect(() => {
- if (hideInput) setIsExpanded(false);
- }, [hideInput]);
+ const stopSizing = observeFloatingChatSize({
+ panel,
+ container,
+ });
+ const stopLayout = floatingPanelRef?.(panel, container);
- useEffect(() => {
- if (!isExpanded) return;
- const handleClickOutside = (e: MouseEvent) => {
- if (!hasText && containerRef.current && !containerRef.current.contains(e.target as Node)) {
- setIsExpanded(false);
- }
- };
- document.addEventListener("mousedown", handleClickOutside);
- return () => document.removeEventListener("mousedown", handleClickOutside);
- }, [isExpanded, hasText]);
+ return () => {
+ stopSizing();
+ if (typeof stopLayout === "function") stopLayout();
+ };
+ },
+ [chatOpen, floatingPanelRef]
+ );
return (
<div
- ref={containerRef}
- className="absolute bottom-0 left-0 right-0 z-10 px-5 pb-4 pt-6 pointer-events-none bg-gradient-to-t from-background from-45% to-transparent"
+ className={cn(
+ "pointer-events-none absolute inset-x-0 bottom-0 z-20 px-5 pt-6",
+ footnote ? "pb-1.5" : "pb-7"
+ )}
>
- {callout && !hideInput && (
- <div className="pointer-events-auto mb-3 flex justify-center">{callout}</div>
+ <div
+ aria-hidden="true"
+ className={cn(
+ "pointer-events-none absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-background from-45% to-transparent transition-opacity duration-200",
+ chatOpen && "opacity-0"
+ )}
+ />
+ {callout && !chatOpen && !hideInput && (
+ <div className="pointer-events-auto relative mb-3 flex justify-center">{callout}</div>
)}
- <div className="flex items-end pointer-events-auto w-full max-w-[600px] mx-auto">
+ <div
+ ref={attachPanel}
+ data-note-chat-panel
+ aria-hidden={hideInput}
+ inert={hideInput}
+ className={cn(
+ "pointer-events-auto relative mx-auto flex w-full min-w-0 max-w-[600px] flex-col rounded-3xl border",
+ chatOpen || hideInput ? "overflow-hidden" : "overflow-visible",
+ "transition-[height,box-shadow,max-width,opacity] duration-300 [transition-timing-function:cubic-bezier(0.2,0.8,0.2,1)] motion-reduce:transition-none",
+ isRecording && !chatOpen ? RECORDING_SURFACE : "bg-background shadow-sm",
+ chatOpen
+ ? "border-black/10 shadow-elevated dark:border-white/14"
+ : "border-black/10 dark:border-white/14",
+ "focus-within:border-black/15 focus-within:ring-[3px] focus-within:ring-primary/8 dark:focus-within:border-white/22",
+ hideInput && "max-w-0 border-transparent opacity-0 pointer-events-none"
+ )}
+ >
<div
- aria-hidden={hideInput}
+ aria-hidden={!chatOpen}
+ inert={!chatOpen}
className={cn(
- "flex-1 min-w-0 flex items-center h-11 gap-2 rounded-full",
- isRecording ? RECORDING_SURFACE : GLASS_SURFACE,
- "border",
- // Named properties, not transition-all: the surface swap below must
- // land instantly, or every recording start/stop tweens
- // backdrop-filter for 500ms — the exact cost being removed.
- "transition-[max-width,opacity,padding,border-color,box-shadow] duration-500 [transition-timing-function:cubic-bezier(0.22,1,0.36,1)]",
- hideInput
- ? "max-w-0 opacity-0 ps-0 pe-0 border-transparent shadow-none pointer-events-none"
- : "max-w-[600px] opacity-100 ps-4 pe-1.5",
- isExpanded
- ? "border-black/15 dark:border-white/22 ring-[3px] ring-primary/8"
- : !hideInput && "border-black/10 dark:border-white/14"
+ "flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden transition-[opacity,transform] duration-300 motion-reduce:transition-none",
+ chatOpen ? "translate-y-0 opacity-100 delay-100" : "translate-y-2 opacity-0"
)}
>
- <input
- dir="auto"
- ref={inputRef}
- type="text"
- value={inputText}
- onChange={(e) => setInputText(e.target.value)}
- onKeyDown={handleKeyDown}
- onFocus={handleInputFocus}
- disabled={askDisabled}
- tabIndex={hideInput ? -1 : undefined}
+ {chatContent}
+ </div>
+ {!hideInput && (
+ <ChatInput
+ className={cn("w-full min-w-0", chatOpen && "px-2 py-1")}
+ variant="note"
+ outlined={chatOpen}
+ agentState={agentState}
+ partialTranscript=""
+ draftText={draftText}
+ onDraftChange={onDraftChange}
+ onTextSubmit={onAskSubmit}
+ onCancel={onCancel}
+ onFocus={onInputFocus}
+ onEscape={onInputEscape}
+ focusOnIdle={chatOpen}
+ voiceDraft={chatOpen}
placeholder={t("embeddedChat.askPlaceholder")}
- className={cn(
- "input-inline flex-1 bg-transparent outline-none min-w-0 p-0 caret-primary",
- "text-[13px] text-foreground",
- "placeholder:text-foreground/45 dark:placeholder:text-foreground/45"
- )}
+ trailingContent={
+ !chatOpen && actionPicker ? <div className="shrink-0">{actionPicker}</div> : null
+ }
/>
-
- {hasText ? (
- <button
- onClick={handleSubmit}
- disabled={askDisabled}
- className={cn(
- "flex items-center justify-center w-7 h-7 rounded-full shrink-0",
- "animate-[scale-in_0.15s_ease-out_backwards]",
- "transition-all duration-150",
- "hover:brightness-110",
- "active:scale-90",
- "disabled:opacity-30"
- )}
- aria-label={t("embeddedChat.send")}
- >
- <SendIcon size={28} className="block rtl:scale-x-[-1]" />
- </button>
- ) : !isExpanded ? (
- <div className="shrink-0">{actionPicker}</div>
- ) : null}
- </div>
+ )}
</div>
+ {footnote && (
+ <div className="relative mt-1.5 flex h-4 select-none items-center justify-center gap-1 text-[10px] text-muted-foreground/70">
+ {footnote}
+ </div>
+ )}
</div>
);
}
diff --git a/src/components/notes/NoteEditor.tsx b/src/components/notes/NoteEditor.tsx
index 28b3ca781..bee2b2bd3 100644
--- a/src/components/notes/NoteEditor.tsx
+++ b/src/components/notes/NoteEditor.tsx
@@ -7,7 +7,6 @@ import {
Sparkles,
AlignLeft,
MessageSquareText,
- Mic,
LinkIcon,
Link2,
Lock,
@@ -15,6 +14,7 @@ import {
Search,
Plus,
Check,
+ ShieldCheck,
Users,
} from "../icons";
import ShareNoteDialog, { type NoteExportOption } from "./ShareNoteDialog";
@@ -67,7 +67,9 @@ import type { NoteActionProgress } from "../../stores/actionProcessingStore";
import ActionProcessingOverlay from "./ActionProcessingOverlay";
import NoteBottomBar from "./NoteBottomBar";
import NoteRecordControl, { RecordingWave } from "./NoteRecordControl";
-import EmptyStateCard from "../ui/EmptyStateCard";
+import ThemedEmptyIllustration from "../ui/ThemedEmptyIllustration";
+import transcriptsEmptyLight from "../../assets/empty-states/notes-transcripts-light.svg";
+import transcriptsEmptyDark from "../../assets/empty-states/notes-transcripts-dark.svg";
import { Button } from "../ui/button";
import EmbeddedChat, { type EmbeddedChatMode } from "./EmbeddedChat";
import { useEmbeddedChat } from "../../hooks/useEmbeddedChat";
@@ -259,6 +261,21 @@ export default function NoteEditor({
const viewMode: MeetingViewMode =
selectedViewMode === "enhanced" && !enhancement ? "raw" : selectedViewMode;
const [chatMode, setChatMode] = useState<EmbeddedChatMode>("hidden");
+ // The in-view chat mounts on its first open and then stays, so it can fade out as it
+ // closes; a note whose chat is never opened doesn't render its conversation at all.
+ const [inViewChatMounted, setInViewChatMounted] = useState(false);
+ if (chatMode === "floating" && !inViewChatMounted) setInViewChatMounted(true);
+ const [chatDraft, setChatDraft] = useState("");
+ const handleChatModeChange = useCallback((mode: EmbeddedChatMode) => {
+ if (
+ mode === "hidden" &&
+ document.activeElement instanceof HTMLElement &&
+ document.activeElement.closest("[data-note-chat-panel]")
+ ) {
+ document.activeElement.blur();
+ }
+ setChatMode(mode);
+ }, []);
const [folderSearch, setFolderSearch] = useState("");
const [isCreatingFolder, setIsCreatingFolder] = useState(false);
const [newFolderName, setNewFolderName] = useState("");
@@ -524,6 +541,7 @@ export default function NoteEditor({
prevNoteIdRef.current = note.id;
return scheduleUiUpdate(() => {
setChatMode("hidden");
+ setChatDraft("");
setDiarizedSegments(null);
setIsDiarizing(false);
setSpeakerMappings({});
@@ -757,10 +775,9 @@ export default function NoteEditor({
}, []);
const floatingChatPanelRef = useCallback(
- (panel: HTMLDivElement | null): (() => void) | undefined => {
- const container = panel?.parentElement;
+ (panel: HTMLDivElement, container: HTMLElement): (() => void) | undefined => {
const contentRoot = contentScrollRef.current;
- if (!panel || !container || !contentRoot) return undefined;
+ if (!contentRoot) return undefined;
return observeFloatingChatLayout({
panel,
@@ -791,6 +808,11 @@ export default function NoteEditor({
if (chatMode === "hidden") {
setChatMode("floating");
}
+ // The chat is still replying: keep the question as the draft instead of dropping it.
+ if (embeddedChat.agentState !== "idle") {
+ setChatDraft(text);
+ return;
+ }
embeddedChat.sendMessage(text);
},
[chatMode, embeddedChat]
@@ -1214,19 +1236,34 @@ export default function NoteEditor({
) : viewMode === "transcript" && hasMeetingTranscript ? (
<RichTextEditor value={note.transcript || ""} disabled />
) : viewMode === "transcript" ? (
- <EmptyStateCard
- icon={Mic}
- title={t("notes.editor.transcriptEmptyTitle")}
- description={t("notes.editor.transcriptEmptyDescription")}
- className={cn(PAGE_CONTENT_WIDTH_CLASS, "mt-2")}
+ <div
+ className={cn(
+ PAGE_CONTENT_WIDTH_CLASS,
+ "flex min-h-80 flex-col items-center px-4 pt-16 text-center"
+ )}
>
+ <ThemedEmptyIllustration
+ light={transcriptsEmptyLight}
+ dark={transcriptsEmptyDark}
+ width={590}
+ height={77}
+ />
+ <h2 className="mt-12 text-xl font-semibold text-foreground">
+ {t("notes.editor.transcriptEmptyTitle")}
+ </h2>
+ <p className="mt-2 max-w-xs text-base leading-6 text-muted-foreground">
+ {t("notes.editor.transcriptEmptyDescription")}
+ </p>
{canEditNote && recordingAllowed && (
- <Button size="sm" onClick={onStartRecording} disabled={isProcessing}>
- <Mic size={13} />
+ <Button
+ className="mt-6 rounded-full px-5 font-medium"
+ onClick={onStartRecording}
+ disabled={isProcessing}
+ >
{t("notes.editor.startRecording")}
</Button>
)}
- </EmptyStateCard>
+ </div>
) : viewMode === "enhanced" && enhancement ? (
<RichTextEditor
value={enhancement.content}
@@ -1271,42 +1308,70 @@ export default function NoteEditor({
)}
<NoteBottomBar
isRecording={isRecording}
+ draftText={chatDraft}
+ onDraftChange={setChatDraft}
onAskSubmit={handleAskSubmit}
onInputFocus={handleChatInputFocus}
- actionPicker={isRecording || !canEditNote ? undefined : actionPicker}
+ onInputEscape={() => handleChatModeChange("hidden")}
+ chatOpen={chatMode === "floating"}
+ agentState={chatMode === "floating" ? embeddedChat.agentState : "idle"}
+ onCancel={embeddedChat.cancelStream}
+ floatingPanelRef={floatingChatPanelRef}
+ chatContent={
+ chatMode !== "sidebar" &&
+ inViewChatMounted && (
+ <EmbeddedChat
+ mode="floating"
+ active={chatMode === "floating"}
+ onModeChange={handleChatModeChange}
+ messages={embeddedChat.messages}
+ agentState={embeddedChat.agentState}
+ onTextSubmit={embeddedChat.sendMessage}
+ onCancel={embeddedChat.cancelStream}
+ noteConversations={embeddedChat.noteConversations}
+ activeConversationId={embeddedChat.activeConversationId}
+ onSwitchConversation={embeddedChat.switchConversation}
+ onNewChat={embeddedChat.startNewChat}
+ />
+ )
+ }
+ actionPicker={
+ isRecording ||
+ !canEditNote ||
+ (viewMode === "transcript" && !hasMeetingTranscript && !hasChatSegments)
+ ? undefined
+ : actionPicker
+ }
callout={
- showSummaryCallout && (
+ showSummaryCallout &&
+ selectedSegmentIds.size === 0 && (
<Button className="h-9 gap-2 px-4 text-sm" onClick={onGenerateSummary}>
<AlignLeft size={16} />
{t("notes.editor.generateSummary")}
</Button>
)
}
- hideInput={chatMode !== "hidden"}
+ footnote={
+ viewMode === "transcript" &&
+ (hasChatSegments || isRecording) && (
+ <>
+ <ShieldCheck size={10} className="shrink-0" />
+ <span>{t("notes.speaker.consentNotice")}</span>
+ </>
+ )
+ }
+ hideInput={chatMode === "sidebar"}
/>
- {chatMode === "floating" && (
- <EmbeddedChat
- mode="floating"
- floatingPanelRef={floatingChatPanelRef}
- onModeChange={setChatMode}
- messages={embeddedChat.messages}
- agentState={embeddedChat.agentState}
- onTextSubmit={embeddedChat.sendMessage}
- onCancel={embeddedChat.cancelStream}
- noteConversations={embeddedChat.noteConversations}
- activeConversationId={embeddedChat.activeConversationId}
- onSwitchConversation={embeddedChat.switchConversation}
- onNewChat={embeddedChat.startNewChat}
- />
- )}
</div>
</div>
{chatMode === "sidebar" && (
<EmbeddedChat
mode="sidebar"
- onModeChange={setChatMode}
+ onModeChange={handleChatModeChange}
messages={embeddedChat.messages}
agentState={embeddedChat.agentState}
+ draftText={chatDraft}
+ onDraftChange={setChatDraft}
onTextSubmit={embeddedChat.sendMessage}
onCancel={embeddedChat.cancelStream}
noteConversations={embeddedChat.noteConversations}
diff --git a/src/components/notes/NotesOnboarding.tsx b/src/components/notes/NotesOnboarding.tsx
index 2c770ffca..ce740b030 100644
--- a/src/components/notes/NotesOnboarding.tsx
+++ b/src/components/notes/NotesOnboarding.tsx
@@ -23,6 +23,12 @@ import ReasoningModelSelector from "../ReasoningModelSelector";
import { useSystemAudioPermission } from "../../hooks/useSystemAudioPermission";
import { canManageSystemAudioInApp } from "../../utils/systemAudioAccess";
import { usePolicySnapshot } from "../../hooks/usePolicy";
+import { PAGE_CONTENT_WIDTH_CLASS } from "../ui/pageWidth";
+import { PAGE_HERO_ICON_TILE_CLASS } from "../ui/surfaces";
+
+const CARD_CLASS = "rounded-2xl border transition-colors duration-200";
+const CARD_IDLE_CLASS = "border-border/70 bg-card/50 dark:border-white/10 dark:bg-surface-2/60";
+const CARD_DONE_CLASS = "border-success/20 bg-success/[0.03]";
interface NotesOnboardingProps {
onComplete: () => void;
@@ -107,55 +113,48 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
const customActions = actions.filter((a) => a.is_builtin !== 1);
return (
- <div className="flex flex-col items-center h-full overflow-y-auto px-6 py-6">
+ <div className="h-full overflow-y-auto">
<div
- className="w-full max-w-[420px] space-y-5 my-auto"
+ className={cn(PAGE_CONTENT_WIDTH_CLASS, "flex flex-col gap-5 px-6 py-8")}
style={{ animation: "float-up 0.4s ease-out" }}
>
- <div className="flex flex-col items-center text-center">
- <div className="w-10 h-10 rounded-[10px] bg-gradient-to-b from-accent/10 to-accent/[0.03] dark:from-accent/15 dark:to-accent/5 border border-accent/15 dark:border-accent/20 flex items-center justify-center mb-3">
- <Sparkles size={17} strokeWidth={1.5} className="text-accent/60" />
+ <div className="flex flex-col items-center gap-2 pt-4 text-center">
+ <div className={cn(PAGE_HERO_ICON_TILE_CLASS, "mb-1")}>
+ <Sparkles size={20} className="text-foreground/60" />
</div>
- <h2 className="text-sm font-semibold text-foreground mb-1">
+ <h2 className="text-xl font-semibold tracking-tight text-foreground">
{t("notes.onboarding.actions.title")}
</h2>
- <p className="text-xs text-foreground/45 leading-relaxed max-w-[320px]">
+ <p className="max-w-xl text-[13px] leading-relaxed text-foreground/50 dark:text-foreground/45">
{t("notes.onboarding.actions.description")}
</p>
</div>
{/* LLM Configuration — non-Pro only, deferred until pro status is known */}
{!isProLoading && !isProUser && (
- <div
- className={cn(
- "rounded-lg border transition-colors duration-200",
- isLLMConfigured
- ? "border-success/20 bg-success/[0.03]"
- : "border-foreground/8 dark:border-white/10 bg-surface-1/30 dark:bg-white/[0.02]"
- )}
- >
+ <div className={cn(CARD_CLASS, isLLMConfigured ? CARD_DONE_CLASS : CARD_IDLE_CLASS)}>
<button
type="button"
onClick={() => setLlmExpanded(!llmExpanded)}
aria-expanded={llmExpanded}
- className="flex items-center justify-between w-full px-4 py-3 text-start"
+ className="flex w-full items-center justify-between px-5 py-4 text-start"
>
- <div className="flex items-center gap-2.5">
+ <div className="flex items-center gap-3">
<Zap
- size={13}
- className={cn(isLLMConfigured ? "text-success/60" : "text-foreground/45")}
+ size={16}
+ className={cn(isLLMConfigured ? "text-success/70" : "text-foreground/45")}
/>
- <span className="text-xs font-medium text-foreground/70">
+ <span className="text-sm font-medium text-foreground">
{t("notes.onboarding.llm.title")}
</span>
{isLLMConfigured && (
- <span className="text-xs text-success/60 font-medium">
+ <span className="text-xs font-medium text-success/70">
{t("notes.onboarding.llm.configured")}
</span>
)}
</div>
<ChevronRight
- size={12}
+ size={14}
className={cn(
"text-foreground/45 transition-transform duration-200",
llmExpanded ? "rotate-90" : "rtl:rotate-180"
@@ -164,8 +163,8 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
</button>
{llmExpanded && (
- <div className="px-4 pb-4 space-y-3" style={{ animation: "float-up 0.2s ease-out" }}>
- <p className="text-xs text-foreground/45 leading-relaxed">
+ <div className="space-y-4 px-5 pb-5" style={{ animation: "float-up 0.2s ease-out" }}>
+ <p className="text-sm leading-relaxed text-muted-foreground">
{t("notes.onboarding.llm.description")}
</p>
@@ -187,31 +186,27 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
{/* System Audio Permission */}
{shouldShowSystemAudioPermission && (
- <div
- className={cn(
- "rounded-lg border transition-colors duration-200",
- systemAudioGranted
- ? "border-success/20 bg-success/[0.03]"
- : "border-foreground/8 dark:border-white/10 bg-surface-1/30 dark:bg-white/[0.02]"
- )}
- >
- <div className="flex items-center justify-between w-full px-4 py-3">
- <div className="flex items-center gap-2.5">
+ <div className={cn(CARD_CLASS, systemAudioGranted ? CARD_DONE_CLASS : CARD_IDLE_CLASS)}>
+ <div className="flex w-full items-center justify-between gap-4 px-5 py-4">
+ <div className="flex items-center gap-3">
<Monitor
- size={13}
- className={cn(systemAudioGranted ? "text-success/60" : "text-foreground/45")}
+ size={16}
+ className={cn(
+ "shrink-0",
+ systemAudioGranted ? "text-success/70" : "text-foreground/45"
+ )}
/>
<div>
- <span className="text-xs font-medium text-foreground/70">
+ <span className="text-sm font-medium text-foreground">
{t("notes.onboarding.systemAudio.title")}
</span>
- <p className="text-xs text-foreground/45 leading-relaxed mt-0.5">
+ <p className="mt-0.5 text-sm leading-relaxed text-muted-foreground">
{t("notes.onboarding.systemAudio.description")}
</p>
</div>
</div>
{systemAudioGranted ? (
- <span className="text-xs font-medium text-success/60 shrink-0">
+ <span className="shrink-0 text-xs font-medium text-success/70">
{t("notes.onboarding.systemAudio.enabled")}
</span>
) : (
@@ -220,10 +215,10 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
size="sm"
onClick={handleGrantSystemAudio}
disabled={isRequestingSystemAudio}
- className="h-7 text-xs shrink-0"
+ className="shrink-0"
>
{isRequestingSystemAudio ? (
- <Loader2 size={12} className="animate-spin" />
+ <Loader2 size={14} className="animate-spin" />
) : (
t("notes.onboarding.systemAudio.grant")
)}
@@ -233,47 +228,46 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
</div>
)}
- {/* Built-in action */}
+ {/* Built-in action, plus any custom actions the user just created */}
<div>
- <div className="flex items-center gap-2 mb-2">
- <span className="text-xs font-medium text-foreground/50">
- {t("notes.onboarding.actions.builtInLabel")}
- </span>
- </div>
- {builtInAction && (
- <div className="flex items-center gap-3 px-3 py-2.5 rounded-lg border border-foreground/6 dark:border-white/10 bg-surface-1/20 dark:bg-white/[0.02]">
- <div className="w-7 h-7 rounded-md bg-accent/8 dark:bg-accent/12 border border-accent/10 dark:border-accent/15 flex items-center justify-center shrink-0">
- <Sparkles size={12} className="text-accent/60" />
- </div>
- <div className="flex-1 min-w-0">
- <p className="text-xs font-medium text-foreground/70 truncate">
- {getActionName(builtInAction, t)}
- </p>
- <p className="text-xs text-foreground/45 truncate">
- {getActionDescription(builtInAction, t)}
- </p>
- </div>
- <span className="text-xs text-foreground/45 font-medium shrink-0">
- {t("notes.actions.builtIn")}
- </span>
- </div>
- )}
-
- {/* Show any custom actions the user just created */}
- {customActions.length > 0 && (
- <div className="mt-1.5 space-y-1.5">
+ <p className="pb-2.5 text-sm text-muted-foreground">
+ {t("notes.onboarding.actions.builtInLabel")}
+ </p>
+ {(builtInAction || customActions.length > 0) && (
+ <div
+ className={cn(
+ CARD_CLASS,
+ CARD_IDLE_CLASS,
+ "divide-y divide-border/60 overflow-clip dark:divide-white/10"
+ )}
+ >
+ {builtInAction && (
+ <div className="flex items-center gap-3 px-5 py-3.5">
+ <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-accent/10 bg-accent/8 dark:border-accent/15 dark:bg-accent/12">
+ <Sparkles size={14} className="text-accent/60" />
+ </div>
+ <div className="min-w-0 flex-1">
+ <p className="truncate text-sm font-medium text-foreground">
+ {getActionName(builtInAction, t)}
+ </p>
+ <p className="truncate text-sm text-muted-foreground">
+ {getActionDescription(builtInAction, t)}
+ </p>
+ </div>
+ <span className="shrink-0 text-xs font-medium text-muted-foreground">
+ {t("notes.actions.builtIn")}
+ </span>
+ </div>
+ )}
{customActions.map((action) => (
- <div
- key={action.id}
- className="flex items-center gap-3 px-3 py-2.5 rounded-lg border border-success/20 bg-success/[0.03]"
- >
- <div className="w-7 h-7 rounded-md bg-success/8 border border-success/15 dark:border-success/20 flex items-center justify-center shrink-0">
- <Check size={12} className="text-success/60" />
+ <div key={action.id} className="flex items-center gap-3 px-5 py-3.5">
+ <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-success/15 bg-success/8 dark:border-success/20">
+ <Check size={14} className="text-success/70" />
</div>
- <div className="flex-1 min-w-0">
- <p className="text-xs font-medium text-foreground/70 truncate">{action.name}</p>
+ <div className="min-w-0 flex-1">
+ <p className="truncate text-sm font-medium text-foreground">{action.name}</p>
{action.description && (
- <p className="text-xs text-foreground/45 truncate">{action.description}</p>
+ <p className="truncate text-sm text-muted-foreground">{action.description}</p>
)}
</div>
</div>
@@ -283,31 +277,26 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
</div>
{/* Create custom action */}
- <div
- className={cn(
- "rounded-lg border transition-colors duration-200",
- "border-foreground/8 dark:border-white/10 bg-surface-1/30 dark:bg-white/[0.02]"
- )}
- >
+ <div className={cn(CARD_CLASS, CARD_IDLE_CLASS)}>
<button
type="button"
onClick={() => setCreateExpanded(!createExpanded)}
aria-expanded={createExpanded}
- className="flex items-center justify-between w-full px-4 py-3 text-start"
+ className="flex w-full items-center justify-between px-5 py-4 text-start"
>
- <div className="flex items-center gap-2.5">
- <Plus size={13} className="text-foreground/45" />
- <span className="text-xs font-medium text-foreground/70">
+ <div className="flex items-center gap-3">
+ <Plus size={16} className="text-foreground/45" />
+ <span className="text-sm font-medium text-foreground">
{t("notes.onboarding.actions.createTitle")}
</span>
{justCreated && (
- <span className="text-xs text-success/60 font-medium">
+ <span className="text-xs font-medium text-success/70">
{t("notes.onboarding.actions.created")}
</span>
)}
</div>
<ChevronRight
- size={12}
+ size={14}
className={cn(
"text-foreground/45 transition-transform duration-200",
createExpanded ? "rotate-90" : "rtl:rotate-180"
@@ -316,8 +305,8 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
</button>
{createExpanded && (
- <div className="px-4 pb-4 space-y-2" style={{ animation: "float-up 0.2s ease-out" }}>
- <p className="text-xs text-foreground/45 leading-relaxed">
+ <div className="space-y-2.5 px-5 pb-5" style={{ animation: "float-up 0.2s ease-out" }}>
+ <p className="text-sm leading-relaxed text-muted-foreground">
{t("notes.onboarding.actions.createDescription")}
</p>
<input
@@ -328,7 +317,7 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
placeholder={t("notes.actions.namePlaceholder")}
aria-label={t("notes.actions.namePlaceholder")}
disabled={isSaving}
- className={cn(notesInputClass, "disabled:opacity-40")}
+ className={cn(notesInputClass, "h-9 text-sm disabled:opacity-40")}
/>
<input
dir="auto"
@@ -338,7 +327,7 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
placeholder={t("notes.actions.descriptionPlaceholder")}
aria-label={t("notes.actions.descriptionPlaceholder")}
disabled={isSaving}
- className={cn(notesInputClass, "disabled:opacity-40")}
+ className={cn(notesInputClass, "h-9 text-sm disabled:opacity-40")}
/>
<textarea
dir="auto"
@@ -348,7 +337,7 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
aria-label={t("notes.actions.promptPlaceholder")}
rows={3}
disabled={isSaving}
- className={cn(notesTextareaClass, "disabled:opacity-40")}
+ className={cn(notesTextareaClass, "text-sm disabled:opacity-40")}
/>
<div className="flex justify-end">
<Button
@@ -356,10 +345,9 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
size="sm"
onClick={handleCreateAction}
disabled={isSaving || !actionName.trim() || !actionPrompt.trim()}
- className="h-7 text-xs"
>
{isSaving ? (
- <Loader2 size={12} className="animate-spin" />
+ <Loader2 size={14} className="animate-spin" />
) : (
t("notes.actions.save")
)}
@@ -369,8 +357,8 @@ export default function NotesOnboarding({ onComplete }: NotesOnboardingProps) {
)}
</div>
- <div className="flex justify-center pt-1 pb-4">
- <Button variant="default" size="sm" onClick={handleComplete} className="h-8 text-xs px-8">
+ <div className="flex justify-center pt-2 pb-4">
+ <Button onClick={handleComplete} className="rounded-full px-6 font-medium">
{t("notes.onboarding.getStarted")}
</Button>
</div>
diff --git a/src/components/notes/SpacesTree.tsx b/src/components/notes/SpacesTree.tsx
index 88043d2d7..259478703 100644
--- a/src/components/notes/SpacesTree.tsx
+++ b/src/components/notes/SpacesTree.tsx
@@ -20,6 +20,9 @@ import {
Users,
} from "../icons";
import { Button } from "../ui/button";
+import ThemedEmptyIllustration from "../ui/ThemedEmptyIllustration";
+import sharedSpaceEmptyLight from "../../assets/empty-states/notes-shared-space-light.svg";
+import sharedSpaceEmptyDark from "../../assets/empty-states/notes-shared-space-dark.svg";
import {
DropdownMenu,
DropdownMenuTrigger,
@@ -2052,27 +2055,33 @@ export default function SpacesTree({
))
: teamSpaces.map(renderSpace)}
{showWorkspaceGroups && ungroupedTeamSpaces.map(renderSpace)}
- {teamSpaces.length === 0 &&
- (canCreateTeamSpace ? (
- // Grouped view already offers a + on each manageable workspace row.
- !showWorkspaceGroups && (
- <div className="ps-[18px] pe-2 py-1">
- <Button
- variant="ghost"
- size="sm"
- onClick={() => openCreateSpace()}
- className="h-6 px-2 text-xs gap-1 text-primary/70 hover:text-primary hover:bg-primary/8"
- >
- <Plus size={11} />
- {t("notes.spaces.newSpace")}
- </Button>
- </div>
- )
- ) : (
- <p className="ps-[18px] pe-2 py-1 text-xs text-foreground/60 leading-relaxed">
+ {teamSpaces.length === 0 && (
+ <div role="none" className="flex flex-col items-center px-3 py-6 text-center">
+ <ThemedEmptyIllustration
+ light={sharedSpaceEmptyLight}
+ dark={sharedSpaceEmptyDark}
+ width={134}
+ height={139}
+ />
+ <p className="mt-1 text-sm font-semibold text-foreground">
+ {t("notes.spaces.emptyTeamTitle")}
+ </p>
+ <p className="mt-2 text-xs text-muted-foreground">
{t("notes.spaces.emptyTeamHint")}
</p>
- ))}
+ {canCreateTeamSpace && !showWorkspaceGroups && (
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => openCreateSpace()}
+ className="mt-3 h-7 gap-1 text-xs text-primary"
+ >
+ <Plus size={11} />
+ {t("notes.spaces.newSpace")}
+ </Button>
+ )}
+ </div>
+ )}
</>
)}
</div>
diff --git a/src/components/notes/UploadAudioFeedback.tsx b/src/components/notes/UploadAudioFeedback.tsx
index e5086743c..38cf719a0 100644
--- a/src/components/notes/UploadAudioFeedback.tsx
+++ b/src/components/notes/UploadAudioFeedback.tsx
@@ -3,7 +3,7 @@ import { cn } from "../lib/utils";
// Both completion warnings sit under the transcript preview and share its
// column, so they share one recipe; only the tone differs.
-const COMPLETION_WARNING = "text-xs max-w-[240px] text-center mb-4 -mt-2";
+const COMPLETION_WARNING = "mt-3 max-w-md text-center text-[13px] leading-relaxed";
interface UploadModelSettingsButtonProps {
label: string;
@@ -56,7 +56,7 @@ export function UploadCompleteWarnings({
return (
<>
{partialWarning && (
- <p className={cn(COMPLETION_WARNING, "text-destructive/50")}>
+ <p className={cn(COMPLETION_WARNING, "text-destructive")}>
{t("notes.upload.partialWarningCount", {
failed: partialWarning.failed,
total: partialWarning.total,
diff --git a/src/components/notes/UploadAudioView.tsx b/src/components/notes/UploadAudioView.tsx
index 162255b3e..b2a8265fe 100644
--- a/src/components/notes/UploadAudioView.tsx
+++ b/src/components/notes/UploadAudioView.tsx
@@ -5,15 +5,20 @@ import {
FileAudio,
X,
AlertCircle,
- ChevronRight,
+ ArrowRight,
FolderOpen,
Plus,
Settings,
Link2,
+ Users,
} from "../icons";
import { useShallow } from "zustand/react/shallow";
import { Button } from "../ui/button";
import { PAGE_CONTENT_WIDTH_CLASS } from "../ui/pageWidth";
+import { CARD_SURFACE_CLASS } from "../ui/surfaces";
+import { GRADIENT_CIRCLE } from "../ui/gradientCircle";
+import { Toggle } from "../ui/toggle";
+import EmptyStateCard from "../ui/EmptyStateCard";
import { cn } from "../lib/utils";
import {
Select,
@@ -85,14 +90,9 @@ const CLOUD_PRO_MAX_FILE_SIZE = 500 * 1024 * 1024; // 500 MB — pro plan cloud
const MAX_BATCH_URLS = 50;
-const uploadFieldClass = cn(
- "rounded-lg text-xs",
- "bg-surface-1/40 dark:bg-white/[0.03] backdrop-blur-sm",
- "border border-foreground/6 dark:border-white/10",
- "text-foreground/70 placeholder:text-foreground/45",
- "focus:outline-none focus:border-foreground/12 dark:focus:border-white/10",
- "transition-colors"
-);
+// Every action on this page: the brand pill for the next step, a ghost pill beside it.
+const PRIMARY_ACTION_CLASS = "rounded-full px-5 font-medium";
+const SECONDARY_ACTION_CLASS = "rounded-full px-4";
function formatFileSize(bytes: number): string {
if (bytes < 1024) return `${bytes} B`;
@@ -960,7 +960,7 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
return (
<div className="flex flex-col items-center h-full overflow-y-auto">
<div
- className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 shrink-0 my-auto")}
+ className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 py-8 shrink-0 my-auto")}
style={{ animation: "float-up 0.4s ease-out" }}
>
{state === "idle" && providerReady === false && (
@@ -979,12 +979,12 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
onOpenSettings={onOpenSettings}
/>
- <div className="flex items-center gap-3 my-3">
- <div className="h-px flex-1 bg-foreground/5 dark:bg-white/5" />
- <span className="text-[10px] text-foreground/45 uppercase tracking-wider">
+ <div className="my-5 flex items-center gap-3">
+ <div className="h-px flex-1 bg-border/70 dark:bg-white/10" />
+ <span className="text-xs font-medium uppercase tracking-wider text-muted-foreground/70">
{t("notes.upload.orDivider")}
</span>
- <div className="h-px flex-1 bg-foreground/5 dark:bg-white/5" />
+ <div className="h-px flex-1 bg-border/70 dark:bg-white/10" />
</div>
{urlExpanded ? (
@@ -995,10 +995,10 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
onChange={(e) => setUrlInput(e.target.value)}
placeholder={t("notes.upload.pasteUrls")}
rows={4}
- className={cn(uploadFieldClass, "w-full px-3 py-2 resize-none")}
+ className="w-full resize-none rounded-2xl! px-4 py-3 text-sm placeholder:text-foreground/45"
autoFocus
/>
- <div className="flex items-center gap-2 mt-2 justify-end">
+ <div className="mt-3 flex items-center justify-end gap-2">
<Button
variant="ghost"
size="sm"
@@ -1006,16 +1006,15 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
setUrlExpanded(false);
setUrlInput("");
}}
- className="h-7 text-xs text-foreground/45"
+ className={SECONDARY_ACTION_CLASS}
>
{t("notes.upload.cancel")}
</Button>
<Button
- variant="default"
size="sm"
onClick={handleBatchUrlSubmit}
disabled={!urlInput.trim()}
- className="h-7 text-xs"
+ className={PRIMARY_ACTION_CLASS}
>
{t("notes.upload.addToQueue")}
</Button>
@@ -1026,20 +1025,20 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
{isYouTubeUrl(urlInput) ? (
<svg
viewBox="0 0 28 20"
- className="absolute left-2.5 top-1/2 -translate-y-1/2 w-[18px] h-[13px] z-10 pointer-events-none"
+ className="absolute left-4 top-1/2 -translate-y-1/2 w-5 h-[14px] z-10 pointer-events-none"
>
<rect width="28" height="20" rx="4" fill="#FF0000" />
<polygon points="11,4 11,16 21,10" fill="white" />
</svg>
) : uploadFileUrlPattern.test(urlInput) ? (
<FileAudio
- size={13}
- className="absolute left-2.5 top-1/2 -translate-y-1/2 text-foreground/45 z-10 pointer-events-none"
+ size={16}
+ className="absolute left-4 top-1/2 -translate-y-1/2 text-foreground/45 z-10 pointer-events-none"
/>
) : (
<Link2
- size={13}
- className="absolute left-2.5 top-1/2 -translate-y-1/2 text-foreground/45 z-10 pointer-events-none"
+ size={16}
+ className="absolute left-4 top-1/2 -translate-y-1/2 text-foreground/45 z-10 pointer-events-none"
/>
)}
<input
@@ -1065,33 +1064,31 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
}
}}
placeholder={t("notes.upload.urlPlaceholder")}
- className={cn(uploadFieldClass, "w-full h-8 pl-8 pr-9")}
+ className="h-11 w-full rounded-full! pl-11 pr-12 text-sm placeholder:text-foreground/45"
/>
<button
onClick={handleUrlSubmit}
disabled={!urlInput.trim()}
aria-label={t("notes.upload.urlSubmit")}
className={cn(
- "absolute right-px top-px bottom-px w-7 rounded-r-[7px] flex items-center justify-center transition-colors",
- "border-l border-foreground/6 dark:border-white/10",
+ "absolute right-1.5 top-1/2 flex size-8 -translate-y-1/2 items-center justify-center rounded-full transition-[filter,transform] duration-100",
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30",
urlInput.trim()
- ? "text-foreground/45 hover:text-foreground/60 hover:bg-foreground/[0.03] dark:hover:bg-white/[0.03]"
- : "text-foreground/45"
+ ? cn(GRADIENT_CIRCLE, "hover:brightness-110 active:scale-95")
+ : "bg-muted text-muted-foreground"
)}
>
- <ChevronRight size={14} />
+ <ArrowRight size={16} />
</button>
</div>
)}
</>
)}
- {skippedNotice && (
- <p className="text-[10px] text-amber-500/60 mt-2 text-center">{skippedNotice}</p>
- )}
+ {skippedNotice && <p className="mt-2 text-center text-xs text-warning">{skippedNotice}</p>}
{batch.hasQueue && (
- <div className="mt-3">
+ <div className="mt-5">
<BatchQueueView
queue={batch.queue}
byokMaxFileSizeMb={byokMaxFileSizeMb}
@@ -1111,7 +1108,7 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
/>
{!batch.isProcessing && batch.queue.some((i) => i.status === "queued") && (
- <div className="mt-3 space-y-2">
+ <div className="mt-4 flex flex-col items-center gap-3">
{folders.length > 0 && (
<FolderSelect
t={t}
@@ -1120,19 +1117,15 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
onChange={setBatchFolderId}
/>
)}
- <div className="flex justify-center">
- <Button
- variant="default"
- size="sm"
- onClick={startBatchProcessing}
- disabled={
- !uploadAllowedByPolicy || state === "downloading" || state === "transcribing"
- }
- className="h-8 text-xs px-5"
- >
- {t("notes.upload.transcribe")}
- </Button>
- </div>
+ <Button
+ onClick={startBatchProcessing}
+ disabled={
+ !uploadAllowedByPolicy || state === "downloading" || state === "transcribing"
+ }
+ className={PRIMARY_ACTION_CLASS}
+ >
+ {t("notes.upload.transcribe")}
+ </Button>
</div>
)}
</div>
@@ -1163,49 +1156,28 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
{state === "downloading" && downloadProgress && (
<div
- className="flex flex-col items-center"
+ className={cn(CARD_SURFACE_CLASS, "flex flex-col items-center px-6 py-10 text-center")}
style={{ animation: "float-up 0.3s ease-out" }}
>
- <div className="flex items-end justify-center gap-[3px] h-10 mb-5">
- {[0, 1, 2, 3, 4, 5, 6].map((i) => (
- <div
- key={i}
- className="w-[3px] rounded-full bg-primary/40 dark:bg-primary/50 origin-bottom"
- style={{
- height: "100%",
- animation: `waveform-bar ${0.8 + i * 0.12}s ease-in-out infinite`,
- animationDelay: `${i * 0.08}s`,
- }}
- />
- ))}
- </div>
-
- <div className="w-full max-w-[200px] h-[3px] rounded-full bg-foreground/5 dark:bg-white/5 overflow-hidden mb-3">
- <div
- className={cn(
- "h-full rounded-full bg-primary/50 transition-[width] duration-500 ease-out",
- // Percent 0 = size unknown (no content-length): pulse instead
- // of sitting on an empty bar.
- (downloadProgress.stage !== "downloading" || !downloadProgress.percent) &&
- "animate-pulse"
- )}
- style={{
- width:
- downloadProgress.stage === "downloading" && downloadProgress.percent
- ? `${Math.min(downloadProgress.percent, 100)}%`
- : "100%",
- }}
- />
- </div>
-
- <p className="text-xs text-foreground/50 font-medium">
+ <ProgressWaveform />
+ <ProgressBar
+ percent={
+ downloadProgress.stage === "downloading" && downloadProgress.percent
+ ? downloadProgress.percent
+ : null
+ }
+ />
+ <p className="text-[15px] font-medium text-foreground">
{downloadProgress.stage === "resolving"
? t("notes.upload.urlResolving")
: t("notes.upload.urlDownloading")}
</p>
{downloadProgress.title && (
- <p dir="auto" className="text-xs text-foreground/45 mt-1 truncate max-w-50">
+ <p
+ dir="auto"
+ className="mt-1 w-full max-w-sm truncate text-[13px] text-muted-foreground"
+ >
{downloadProgress.title}
</p>
)}
@@ -1214,7 +1186,7 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
variant="ghost"
size="sm"
onClick={handleCancelDownload}
- className="mt-3 h-7 text-xs text-foreground/45"
+ className={cn(SECONDARY_ACTION_CLASS, "mt-5")}
>
{t("notes.upload.urlCancelDownload")}
</Button>
@@ -1252,23 +1224,69 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
)}
{(state === "idle" || state === "selected") && (
- <div className="mt-4">
- <div className="flex items-center justify-between">
- <div>
- <p className="text-xs text-foreground/45 font-medium">
- {t("notes.upload.speakerDetection")}
- </p>
- <p className="text-[10px] text-foreground/45 mt-0.5">
- {t("notes.upload.speakerDetectionDescription")}
- </p>
+ <div
+ className={cn(
+ CARD_SURFACE_CLASS,
+ "mt-5 divide-y divide-border/60 dark:divide-white/10"
+ )}
+ >
+ <div className="flex items-center gap-4 px-5 py-4">
+ <div className="flex min-w-0 flex-1 items-start gap-3">
+ <Users size={16} className="mt-0.5 shrink-0 text-foreground/45" />
+ <div className="min-w-0">
+ <p className="text-sm font-medium text-foreground">
+ {t("notes.upload.speakerDetection")}
+ </p>
+ <p className="mt-0.5 text-sm leading-relaxed text-muted-foreground">
+ {t("notes.upload.speakerDetectionDescription")}
+ </p>
+
+ {diarizationEnabled &&
+ !useLocalWhisper &&
+ !isOpenWhisprCloud &&
+ !isSelfHosted &&
+ cloudTranscriptionProvider === "openai" && (
+ <p className="mt-1.5 text-xs leading-relaxed text-muted-foreground">
+ {t("notes.upload.openaiDiarizeNote")}
+ </p>
+ )}
+ {diarizationEnabled &&
+ !useLocalWhisper &&
+ !isOpenWhisprCloud &&
+ !isSelfHosted &&
+ cloudTranscriptionProvider === "mistral" && (
+ <p className="mt-1.5 text-xs leading-relaxed text-muted-foreground">
+ {t("notes.upload.mistralDiarizeNote")}
+ </p>
+ )}
+ {diarizationEnabled &&
+ !useLocalWhisper &&
+ !isOpenWhisprCloud &&
+ !isSelfHosted &&
+ cloudTranscriptionProvider === "groq" && (
+ <p className="mt-1.5 text-xs leading-relaxed text-warning">
+ {t("notes.upload.groqDiarizeNote")}
+ </p>
+ )}
+
+ {diarizationDownloading && (
+ <p className="mt-1.5 text-xs leading-relaxed text-primary">
+ {t("notes.upload.downloadingModels")}
+ </p>
+ )}
+
+ {diarizationEnabled && isOpenWhisprCloud && (
+ <p className="mt-1.5 text-xs leading-relaxed text-muted-foreground">
+ {t("notes.upload.diarizationRunsLocally")}
+ </p>
+ )}
+ </div>
</div>
- <button
- role="switch"
- aria-checked={diarizationEnabled}
- aria-label={t("notes.upload.speakerDetection")}
- onClick={async () => {
- if (diarizationDownloading) return;
- const next = !diarizationEnabled;
+ <Toggle
+ checked={diarizationEnabled}
+ disabled={diarizationDownloading}
+ ariaLabel={t("notes.upload.speakerDetection")}
+ onChange={async (next) => {
setDiarizationEnabled(next);
// BYOK-native diarization needs no local models — don't download them.
if (
@@ -1280,73 +1298,22 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
if (!ready) setDiarizationEnabled(false);
}
}}
- className={cn(
- "relative w-7 h-4 rounded-full transition-colors shrink-0",
- diarizationDownloading
- ? "bg-primary/50 animate-pulse"
- : diarizationEnabled
- ? "bg-primary"
- : "bg-muted"
- )}
- disabled={diarizationDownloading}
- >
- <div
- className={cn(
- "absolute top-0.5 start-0.5 w-3 h-3 rounded-full bg-white transition-transform",
- diarizationEnabled ? "translate-x-3 rtl:-translate-x-3" : ""
- )}
- />
- </button>
+ />
</div>
- {diarizationEnabled &&
- !useLocalWhisper &&
- !isOpenWhisprCloud &&
- !isSelfHosted &&
- cloudTranscriptionProvider === "openai" && (
- <p className="text-[10px] text-foreground/45 mt-1.5">
- {t("notes.upload.openaiDiarizeNote")}
- </p>
- )}
- {diarizationEnabled &&
- !useLocalWhisper &&
- !isOpenWhisprCloud &&
- !isSelfHosted &&
- cloudTranscriptionProvider === "mistral" && (
- <p className="text-[10px] text-foreground/45 mt-1.5">
- {t("notes.upload.mistralDiarizeNote")}
- </p>
- )}
- {diarizationEnabled &&
- !useLocalWhisper &&
- !isOpenWhisprCloud &&
- !isSelfHosted &&
- cloudTranscriptionProvider === "groq" && (
- <p className="text-[10px] text-amber-500/60 mt-1.5">
- {t("notes.upload.groqDiarizeNote")}
- </p>
- )}
-
- {diarizationDownloading && (
- <p className="text-[10px] text-primary/50 mt-1.5">
- {t("notes.upload.downloadingModels")}
- </p>
- )}
-
- {diarizationEnabled && isOpenWhisprCloud && (
- <p className="text-[10px] text-foreground/45 mt-1.5">
- {t("notes.upload.diarizationRunsLocally")}
- </p>
- )}
-
{diarizationEnabled && diarizationModelsReady && (
- <div className="mt-2">
- <label
- htmlFor="upload-num-speakers"
- className="block text-xs font-medium text-foreground/50"
- >
- {t("notes.upload.numSpeakersLabel")}
- </label>
+ <div className="flex items-center gap-4 px-5 py-4">
+ <div className="min-w-0 flex-1 ps-7">
+ <label
+ htmlFor="upload-num-speakers"
+ className="block text-sm font-medium text-foreground"
+ >
+ {t("notes.upload.numSpeakersLabel")}
+ </label>
+ <p className="mt-0.5 text-sm leading-relaxed text-muted-foreground">
+ {t("notes.upload.numSpeakersHint")}
+ </p>
+ </div>
<input
id="upload-num-speakers"
type="number"
@@ -1363,14 +1330,8 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
setDiarizationNumSpeakers(String(isNaN(n) ? "" : n));
}}
placeholder={t("notes.upload.numSpeakersPlaceholder")}
- className={cn(
- uploadFieldClass,
- "mt-1 w-full h-8 px-2.5 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"
- )}
+ className="h-9 w-32 shrink-0 rounded-xl! px-3 text-sm placeholder:text-foreground/45 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"
/>
- <p className="text-[10px] text-foreground/45 mt-1.5">
- {t("notes.upload.numSpeakersHint")}
- </p>
</div>
)}
</div>
@@ -1417,6 +1378,39 @@ export default function UploadAudioView({ onNoteCreated, onOpenSettings }: Uploa
);
}
+function ProgressWaveform() {
+ return (
+ <div className="mb-6 flex h-10 items-end justify-center gap-[3px]" aria-hidden="true">
+ {[0, 1, 2, 3, 4, 5, 6].map((i) => (
+ <div
+ key={i}
+ className="w-[3px] origin-bottom rounded-full bg-primary/60"
+ style={{
+ height: "100%",
+ animation: `waveform-bar ${0.8 + i * 0.12}s ease-in-out infinite`,
+ animationDelay: `${i * 0.08}s`,
+ }}
+ />
+ ))}
+ </div>
+ );
+}
+
+// null = size unknown (no content-length): pulse a full bar instead of sitting on an empty one.
+function ProgressBar({ percent }: { percent: number | null }) {
+ return (
+ <div className="mb-4 h-1 w-full max-w-xs overflow-hidden rounded-full bg-foreground/8 dark:bg-white/10">
+ <div
+ className={cn(
+ "h-full rounded-full bg-primary transition-[width] duration-500 ease-out",
+ percent === null && "animate-pulse"
+ )}
+ style={{ width: `${percent === null ? 100 : Math.min(percent, 100)}%` }}
+ />
+ </div>
+ );
+}
+
interface NoProviderViewProps {
t: (key: string, options?: Record<string, unknown>) => string;
onOpenSettings: () => void;
@@ -1424,29 +1418,17 @@ interface NoProviderViewProps {
function NoProviderView({ t, onOpenSettings }: NoProviderViewProps) {
return (
- <div
- className="flex flex-col items-center gap-4 py-2"
- style={{ animation: "float-up 0.4s ease-out" }}
+ <EmptyStateCard
+ icon={Settings}
+ title={t("notes.upload.noProviderTitle")}
+ description={t("notes.upload.noProviderDescription")}
+ headingLevel={2}
+ className="py-12"
>
- <div className="w-10 h-10 rounded-[10px] bg-linear-to-b from-foreground/5 to-foreground/2 dark:from-white/8 dark:to-white/3 border border-foreground/8 dark:border-white/10 flex items-center justify-center">
- <Settings
- size={17}
- strokeWidth={1.5}
- className="text-foreground/45 dark:text-foreground/45"
- />
- </div>
- <div className="text-center">
- <h2 className="text-xs font-semibold text-foreground mb-1">
- {t("notes.upload.noProviderTitle")}
- </h2>
- <p className="text-xs text-foreground/45 leading-relaxed max-w-60">
- {t("notes.upload.noProviderDescription")}
- </p>
- </div>
- <Button variant="default" size="sm" className="h-7 text-xs px-4" onClick={onOpenSettings}>
+ <Button onClick={onOpenSettings} className={PRIMARY_ACTION_CLASS}>
{t("notes.upload.noProviderAction")}
</Button>
- </div>
+ </EmptyStateCard>
);
}
@@ -1478,20 +1460,15 @@ function IdleView({
return (
<>
- <div className="flex flex-col items-center mb-5">
- <div className="w-10 h-10 rounded-[10px] bg-linear-to-b from-foreground/5 to-foreground/[0.02] dark:from-white/8 dark:to-white/3 border border-foreground/8 dark:border-white/10 flex items-center justify-center mb-4">
- <Upload
- size={17}
- strokeWidth={1.5}
- className="text-foreground/45 dark:text-foreground/45"
- />
- </div>
- <h2 className="text-xs font-semibold text-foreground mb-1">{t("notes.upload.title")}</h2>
+ <div className="flex flex-col items-center gap-2 text-center">
+ <h2 className="text-xl font-semibold tracking-tight text-foreground">
+ {t("notes.upload.title")}
+ </h2>
<UploadModelSettingsButton
label={t("notes.upload.using", { model: getActiveModelLabel() })}
actionLabel={t("notes.upload.noProviderAction")}
onOpenSettings={onOpenSettings}
- className="text-xs text-foreground/70"
+ className="text-[13px] text-muted-foreground"
/>
</div>
@@ -1511,42 +1488,37 @@ function IdleView({
onClick={handleBrowse}
onKeyDown={handleKeyDown}
className={cn(
- "relative rounded-lg p-8 text-center cursor-pointer transition-[background-color,border-color,transform] duration-300 group",
- "bg-surface-1/40 dark:bg-white/[0.03] backdrop-blur-sm",
- "border border-foreground/6 dark:border-white/10",
- "hover:bg-surface-1/60 dark:hover:bg-white/[0.05] hover:border-foreground/12 dark:hover:border-white/10",
- "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/30",
- isDragOver && "border-primary/30 bg-primary/[0.04] dark:bg-primary/[0.06] scale-[1.01]"
+ "group mt-6 flex cursor-pointer flex-col items-center rounded-2xl border border-dashed px-6 py-12 text-center",
+ "transition-[background-color,border-color,transform] duration-200",
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30",
+ isDragOver
+ ? "scale-[1.01] border-primary/60 bg-primary/5 dark:bg-primary/10"
+ : "border-border bg-card/50 hover:border-primary/40 hover:bg-primary/5 dark:border-white/15 dark:bg-surface-2/60 dark:hover:bg-primary/10"
)}
style={isDragOver ? { animation: "drag-pulse 1.5s ease-in-out infinite" } : undefined}
>
- <div className="absolute inset-0 rounded-lg overflow-hidden pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity duration-500">
- <div
- className="absolute inset-0 bg-gradient-to-r from-transparent via-foreground/[0.02] dark:via-white/[0.03] to-transparent"
- style={{ animation: "shimmer-slide 3s ease-in-out infinite" }}
- />
- </div>
-
- {!isDragOver ? (
- <div className="flex flex-col items-center gap-2 relative">
- <div className="w-8 h-8 rounded-full bg-foreground/[0.03] dark:bg-white/[0.04] flex items-center justify-center mb-1">
- <Upload
- size={14}
- className="text-foreground/45 dark:text-foreground/45 transition-colors"
- />
- </div>
- <p className="text-xs text-foreground/45 group-hover:text-foreground/50 transition-colors">
- {t("notes.upload.dropOrBrowse")}
- </p>
- <p className="text-xs text-foreground/45 tracking-wide">
- {t("notes.upload.supportedFormats")}
- </p>
- </div>
- ) : (
- <div className="flex flex-col items-center gap-2 relative">
- <Upload size={18} className="text-primary/60" />
- <p className="text-xs text-primary/60 font-medium">{t("notes.upload.dropToUpload")}</p>
- </div>
+ <span
+ className={cn(
+ "flex h-11 w-11 items-center justify-center rounded-xl transition-colors",
+ isDragOver
+ ? "bg-primary/15 text-primary"
+ : "bg-surface-3 text-foreground/70 group-hover:text-primary"
+ )}
+ >
+ <Upload size={20} />
+ </span>
+ <p
+ className={cn(
+ "mt-4 text-[15px] font-medium",
+ isDragOver ? "text-primary" : "text-foreground"
+ )}
+ >
+ {isDragOver ? t("notes.upload.dropToUpload") : t("notes.upload.dropOrBrowse")}
+ </p>
+ {!isDragOver && (
+ <p className="mt-1 max-w-md text-[13px] leading-relaxed text-foreground/60">
+ {t("notes.upload.supportedFormats")}
+ </p>
)}
</div>
</>
@@ -1597,34 +1569,43 @@ function SelectedView({
const canTranscribe = !fileTooLarge && !requiresUpgrade && !byokTooLarge;
return (
- <div style={{ animation: "float-up 0.3s ease-out" }}>
- <div className="rounded-lg border border-foreground/8 dark:border-white/10 bg-surface-1/40 dark:bg-white/[0.03] backdrop-blur-sm p-4 mb-3">
- <div className="flex items-center gap-3">
- <div className="w-9 h-9 rounded-[8px] bg-primary/8 dark:bg-primary/12 border border-primary/10 dark:border-primary/15 flex items-center justify-center shrink-0">
- <FileAudio size={15} className="text-primary/60" />
- </div>
- <div className="min-w-0 flex-1">
- <p dir="ltr" className="text-xs text-foreground/70 truncate font-medium">
- {file.name}
- </p>
- {file.size && <p className="text-xs text-foreground/45 mt-0.5">{file.size}</p>}
+ <div className="flex flex-col gap-3" style={{ animation: "float-up 0.3s ease-out" }}>
+ <div className={cn(CARD_SURFACE_CLASS, "flex items-center gap-4 p-4")}>
+ <span className="flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary dark:bg-primary/15">
+ <FileAudio size={20} />
+ </span>
+ <div className="min-w-0 flex-1">
+ <p dir="ltr" className="truncate text-sm font-medium text-foreground">
+ {file.name}
+ </p>
+ <div className="mt-0.5 flex min-w-0 items-center gap-1.5 text-[13px] text-muted-foreground">
+ {file.size && (
+ <>
+ <span className="shrink-0">{file.size}</span>
+ <span aria-hidden="true">·</span>
+ </>
+ )}
<UploadModelSettingsButton
label={getActiveModelLabel()}
actionLabel={t("notes.upload.noProviderAction")}
onOpenSettings={onOpenSettings}
- className="block max-w-full truncate text-start text-xs text-foreground/70 mt-0.5"
+ className="min-w-0 truncate text-start"
/>
</div>
- <button onClick={reset} className="text-foreground/45 transition-colors p-1 rounded">
- <X size={12} />
- </button>
</div>
+ <button
+ onClick={reset}
+ aria-label={t("notes.upload.cancel")}
+ className="flex size-8 shrink-0 items-center justify-center rounded-full text-foreground/45 transition-colors hover:bg-foreground/5 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30"
+ >
+ <X size={14} />
+ </button>
</div>
{/* Cloud absolute limit (500 MB) */}
{fileTooLarge && (
- <div className="rounded-lg border border-destructive/12 dark:border-destructive/15 bg-destructive/[0.03] px-3 py-2.5 mb-3">
- <p className="text-xs text-destructive/60 leading-relaxed">
+ <div className="rounded-xl border border-destructive/20 bg-destructive/5 px-4 py-3 dark:bg-destructive/10">
+ <p className="text-[13px] leading-relaxed text-destructive">
{t("notes.upload.fileTooLarge")}
</p>
</div>
@@ -1632,14 +1613,14 @@ function SelectedView({
{/* BYOK file too large — shared explanation */}
{byokTooLarge && (
- <div className="rounded-lg border border-primary/12 dark:border-primary/15 bg-primary/[0.03] px-3 py-2.5 mb-3">
- <p className="text-xs text-foreground/50 leading-relaxed">
+ <div className="rounded-xl border border-primary/15 bg-primary/5 px-4 py-3 dark:bg-primary/10">
+ <p className="text-[13px] leading-relaxed text-foreground/80">
{t("notes.upload.byokTooLarge", { size: byokMaxFileSizeMb })}
</p>
- <p className="text-xs text-foreground/45 leading-relaxed mt-1.5">
+ <p className="mt-1.5 text-[13px] leading-relaxed text-muted-foreground">
{t("notes.upload.byokTooLargeDetail", { size: byokMaxFileSizeMb })}
</p>
- <p className="text-xs text-foreground/50 leading-relaxed mt-1.5 font-medium">
+ <p className="mt-1.5 text-[13px] font-medium leading-relaxed text-foreground">
{requiresAccount
? t("notes.upload.byokTooLargeNeedsAccount")
: isProUser
@@ -1651,8 +1632,8 @@ function SelectedView({
{/* Cloud free user, file > 25 MB → needs paid plan */}
{requiresUpgrade && !fileTooLarge && (
- <div className="rounded-lg border border-primary/12 dark:border-primary/15 bg-primary/[0.03] px-3 py-2.5 mb-3">
- <p className="text-xs text-foreground/50 leading-relaxed">
+ <div className="rounded-xl border border-primary/15 bg-primary/5 px-4 py-3 dark:bg-primary/10">
+ <p className="text-[13px] leading-relaxed text-foreground/80">
{t("notes.upload.paidPlanRequired")}
</p>
</div>
@@ -1660,46 +1641,36 @@ function SelectedView({
{/* Cloud large file info (Pro user, will be chunked) */}
{isLargeFile && !requiresUpgrade && !fileTooLarge && isOpenWhisprCloud && (
- <p className="text-xs text-foreground/45 text-center mb-3">
+ <p className="text-center text-[13px] text-muted-foreground">
{t("notes.upload.largeFileNote")}
</p>
)}
- <div className="flex items-center gap-2 justify-center flex-wrap">
+ <div className="flex flex-wrap items-center justify-center gap-2 pt-1">
{/* BYOK too large — not signed in: Create Account */}
{byokTooLarge && requiresAccount && (
- <Button
- variant="default"
- size="sm"
- onClick={onCreateAccount}
- className="h-8 text-xs px-5"
- >
+ <Button onClick={onCreateAccount} className={PRIMARY_ACTION_CLASS}>
{t("notes.upload.createAccount")}
</Button>
)}
{/* BYOK too large — signed in, Pro: Switch to Cloud */}
{byokTooLarge && !requiresAccount && isProUser && (
- <Button
- variant="default"
- size="sm"
- onClick={onSwitchToCloud}
- className="h-8 text-xs px-5"
- >
+ <Button onClick={onSwitchToCloud} className={PRIMARY_ACTION_CLASS}>
{t("notes.upload.switchToCloud")}
</Button>
)}
{/* BYOK too large — signed in, Free: Upgrade */}
{byokTooLarge && !requiresAccount && !isProUser && (
- <Button variant="default" size="sm" onClick={onUpgrade} className="h-8 text-xs px-5">
+ <Button onClick={onUpgrade} className={PRIMARY_ACTION_CLASS}>
{t("notes.upload.upgrade")}
</Button>
)}
{/* Cloud requires upgrade */}
{!byokTooLarge && requiresUpgrade && (
- <Button variant="default" size="sm" onClick={onUpgrade} className="h-8 text-xs px-5">
+ <Button onClick={onUpgrade} className={PRIMARY_ACTION_CLASS}>
{t("notes.upload.upgrade")}
</Button>
)}
@@ -1707,23 +1678,16 @@ function SelectedView({
{/* Normal: can transcribe */}
{canTranscribe && (
<Button
- variant="default"
- size="sm"
onClick={handleTranscribe}
disabled={transcribeDisabled}
- className="h-8 text-xs px-5"
+ className={PRIMARY_ACTION_CLASS}
>
{t("notes.upload.transcribe")}
</Button>
)}
{/* Cancel button — always shown */}
- <Button
- variant="ghost"
- size="sm"
- onClick={reset}
- className="h-8 text-xs text-foreground/45"
- >
+ <Button variant="ghost" onClick={reset} className={SECONDARY_ACTION_CLASS}>
{t("notes.upload.cancel")}
</Button>
</div>
@@ -1751,31 +1715,16 @@ function TranscribingView({
const hasChunkInfo = chunkProgress !== null && chunkProgress.chunksTotal > 0;
return (
- <div className="flex flex-col items-center" style={{ animation: "float-up 0.3s ease-out" }}>
- <div className="flex items-end justify-center gap-[3px] h-10 mb-5">
- {[0, 1, 2, 3, 4, 5, 6].map((i) => (
- <div
- key={i}
- className="w-[3px] rounded-full bg-primary/40 dark:bg-primary/50 origin-bottom"
- style={{
- height: "100%",
- animation: `waveform-bar ${0.8 + i * 0.12}s ease-in-out infinite`,
- animationDelay: `${i * 0.08}s`,
- }}
- />
- ))}
- </div>
-
- <div className="w-full max-w-[200px] h-[3px] rounded-full bg-foreground/5 dark:bg-white/5 overflow-hidden mb-3">
- <div
- className="h-full rounded-full bg-primary/50 transition-[width] duration-500 ease-out"
- style={{ width: `${Math.min(progress, 100)}%` }}
- />
- </div>
+ <div
+ className={cn(CARD_SURFACE_CLASS, "flex flex-col items-center px-6 py-10 text-center")}
+ style={{ animation: "float-up 0.3s ease-out" }}
+ >
+ <ProgressWaveform />
+ <ProgressBar percent={progress} />
- <p className="text-xs text-foreground/50 font-medium">{getTranscribingLabel()}</p>
+ <p className="text-[15px] font-medium text-foreground">{getTranscribingLabel()}</p>
{hasChunkInfo ? (
- <p className="text-xs text-foreground/45 mt-1">
+ <p className="mt-1 text-[13px] text-muted-foreground">
{t("notes.upload.chunkProgress", {
completed: chunkProgress.chunksCompleted,
total: chunkProgress.chunksTotal,
@@ -1783,7 +1732,7 @@ function TranscribingView({
</p>
) : null}
{!hasChunkInfo && file ? (
- <p dir="ltr" className="text-xs text-foreground/45 mt-1 truncate max-w-50">
+ <p dir="ltr" className="mt-1 w-full max-w-sm truncate text-[13px] text-muted-foreground">
{file.name}
</p>
) : null}
@@ -1791,7 +1740,7 @@ function TranscribingView({
variant="ghost"
size="sm"
onClick={onCancel}
- className="h-7 text-xs text-foreground/45 mt-4"
+ className={cn(SECONDARY_ACTION_CLASS, "mt-5")}
>
{t("notes.upload.cancelTranscription")}
</Button>
@@ -1818,9 +1767,9 @@ function FolderSelect({
}: FolderSelectProps) {
return (
<div className={cn("flex items-center justify-center gap-2", className)}>
- <FolderOpen size={12} className="text-foreground/45 shrink-0" />
+ <FolderOpen size={14} className="shrink-0 text-muted-foreground" />
<Select value={value} onValueChange={onChange}>
- <SelectTrigger className="h-7 w-44 text-xs rounded-lg px-2.5 [&>svg]:h-3 [&>svg]:w-3">
+ <SelectTrigger className="h-9 w-52 rounded-full px-3.5 text-sm [&>svg]:h-3.5 [&>svg]:w-3.5">
<SelectValue placeholder={t("notes.upload.selectFolder")} />
</SelectTrigger>
<SelectContent>
@@ -1831,12 +1780,12 @@ function FolderSelect({
key={f.id}
value={String(f.id)}
disabled={isMeetings}
- className="text-xs py-1.5 ps-2.5 pe-7 rounded-md"
+ className="text-sm py-1.5 ps-2.5 pe-7 rounded-md"
>
<span className="flex items-center gap-1.5">
<span dir="auto">{f.name}</span>
{isMeetings && (
- <span className="text-[8px] uppercase tracking-wider text-foreground/45 font-medium">
+ <span className="text-[9px] uppercase tracking-wider text-foreground/45 font-medium">
{t("notes.folders.soon")}
</span>
)}
@@ -1847,9 +1796,9 @@ function FolderSelect({
{includeCreateNew && (
<>
<SelectSeparator />
- <SelectItem value="__create_new__" className="text-xs py-1.5 ps-2.5 pe-7 rounded-md">
- <span className="flex items-center gap-1.5 text-primary/60">
- <Plus size={11} />
+ <SelectItem value="__create_new__" className="text-sm py-1.5 ps-2.5 pe-7 rounded-md">
+ <span className="flex items-center gap-1.5 text-primary">
+ <Plus size={12} />
{t("notes.upload.newFolder")}
</span>
</SelectItem>
@@ -1887,7 +1836,10 @@ function CompleteView({
reset,
}: CompleteViewProps) {
return (
- <div className="flex flex-col items-center" style={{ animation: "float-up 0.3s ease-out" }}>
+ <div
+ className={cn(CARD_SURFACE_CLASS, "flex flex-col items-center px-6 py-10 text-center")}
+ style={{ animation: "float-up 0.3s ease-out" }}
+ >
<div className="relative w-12 h-12 mb-4">
<svg className="w-12 h-12 -rotate-90" viewBox="0 0 36 36">
<circle
@@ -1896,7 +1848,7 @@ function CompleteView({
r="15"
fill="none"
strokeWidth="1.5"
- className="stroke-success/15"
+ className="stroke-success/20"
/>
<circle
cx="18"
@@ -1904,14 +1856,14 @@ function CompleteView({
r="15"
fill="none"
strokeWidth="1.5"
- className="stroke-success/60"
+ className="stroke-success"
strokeDasharray="94.25"
strokeLinecap="round"
style={{ animation: "ring-fill 0.8s ease-out forwards" }}
/>
</svg>
<div className="absolute inset-0 flex items-center justify-center">
- <svg className="w-5 h-5 text-success/70" viewBox="0 0 24 24" fill="none">
+ <svg className="w-5 h-5 text-success" viewBox="0 0 24 24" fill="none">
<path
d="M5 13l4 4L19 7"
stroke="currentColor"
@@ -1926,10 +1878,10 @@ function CompleteView({
</div>
</div>
- <p className="text-xs text-foreground/60 font-medium mb-1">
+ <p className="text-[15px] font-medium text-foreground">
{t("notes.upload.transcriptionComplete")}
</p>
- <p className="text-xs text-foreground/45 max-w-[240px] text-center line-clamp-2 mb-4">
+ <p className="mt-1 max-w-md text-[13px] leading-relaxed text-muted-foreground line-clamp-2">
{result.slice(0, 150)}
</p>
@@ -1946,29 +1898,22 @@ function CompleteView({
value={selectedFolderId}
onChange={handleFolderChange}
includeCreateNew
- className="mb-4"
+ className="mt-5"
/>
)}
- <div className="flex items-center gap-2">
+ <div className="mt-5 flex items-center gap-2">
{noteId != null && onNoteCreated && (
<Button
- variant="default"
- size="sm"
onClick={() =>
onNoteCreated(noteId, selectedFolderId ? Number(selectedFolderId) : null)
}
- className="h-8 text-xs"
+ className={PRIMARY_ACTION_CLASS}
>
{t("notes.upload.openNote")}
</Button>
)}
- <Button
- variant="ghost"
- size="sm"
- onClick={reset}
- className="h-8 text-xs text-foreground/45"
- >
+ <Button variant="ghost" onClick={reset} className={SECONDARY_ACTION_CLASS}>
{t("notes.upload.uploadAnother")}
</Button>
</div>
@@ -1985,35 +1930,24 @@ interface ErrorViewProps {
function ErrorView({ t, error, reset, onRetry }: ErrorViewProps) {
return (
- <div style={{ animation: "float-up 0.3s ease-out" }}>
- <div className="rounded-lg border border-destructive/15 dark:border-destructive/20 bg-destructive/[0.03] dark:bg-destructive/[0.05] backdrop-blur-sm p-4 mb-4">
- <div className="flex items-start gap-2.5">
- <AlertCircle size={14} className="text-destructive/50 shrink-0 mt-0.5" />
- <p className="flex-1 text-xs text-destructive/70 leading-relaxed">{error}</p>
- <button
- onClick={reset}
- className="text-foreground/45 transition-colors shrink-0 p-0.5 rounded"
- >
- <X size={11} />
- </button>
- </div>
+ <div className="flex flex-col gap-4" style={{ animation: "float-up 0.3s ease-out" }}>
+ <div className="flex items-start gap-3 rounded-2xl border border-destructive/20 bg-destructive/5 p-4 dark:bg-destructive/10">
+ <AlertCircle size={16} className="mt-0.5 shrink-0 text-destructive" />
+ <p className="flex-1 text-sm leading-relaxed text-destructive">{error}</p>
+ <button
+ onClick={reset}
+ aria-label={t("common.close")}
+ className="flex size-7 shrink-0 items-center justify-center rounded-full text-foreground/45 transition-colors hover:bg-foreground/5 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30"
+ >
+ <X size={14} />
+ </button>
</div>
- <div className="flex items-center gap-2 justify-center">
- <Button
- variant="ghost"
- size="sm"
- onClick={onRetry}
- className="h-7 text-xs text-foreground/45"
- >
+ <div className="flex items-center justify-center gap-2">
+ <Button onClick={onRetry} className={PRIMARY_ACTION_CLASS}>
{t("notes.upload.retry")}
</Button>
- <Button
- variant="ghost"
- size="sm"
- onClick={reset}
- className="h-7 text-xs text-foreground/45"
- >
+ <Button variant="ghost" onClick={reset} className={SECONDARY_ACTION_CLASS}>
{t("notes.upload.startOver")}
</Button>
</div>
diff --git a/src/components/notes/floatingChatLayout.ts b/src/components/notes/floatingChatLayout.ts
index c8623aeaa..e4ceb15e6 100644
--- a/src/components/notes/floatingChatLayout.ts
+++ b/src/components/notes/floatingChatLayout.ts
@@ -4,11 +4,12 @@ import {
type ScrollMetrics,
} from "../../utils/scrollFollowState";
-export const FLOATING_CHAT_INSET_EXTRA_PX = 32;
-export const FLOATING_CHAT_MIN_VISIBLE_CONTENT_PX = 80;
-export const FLOATING_CHAT_MAX_HEIGHT_CSS = "calc(100% - 7rem)";
+const FLOATING_CHAT_INSET_EXTRA_PX = 32;
+const FLOATING_CHAT_MIN_VISIBLE_CONTENT_PX = 80;
const SCROLL_BOTTOM_THRESHOLD_PX = 80;
+const FLOATING_CHAT_TOP_CLEARANCE_PX =
+ FLOATING_CHAT_MIN_VISIBLE_CONTENT_PX + FLOATING_CHAT_INSET_EXTRA_PX;
export type { ScrollMetrics };
@@ -30,6 +31,28 @@ interface FloatingChatLayoutDependencies {
cancelFrame?: (frameId: number) => void;
}
+interface FloatingChatSizeOptions {
+ panel: HTMLElement;
+ container: HTMLElement;
+}
+
+export function observeFloatingChatSize(
+ { panel, container }: FloatingChatSizeOptions,
+ createResizeObserver: (callback: () => void) => ResizeObserverHandle = (callback) =>
+ new ResizeObserver(callback)
+): () => void {
+ const updateHeight = (): void => {
+ const availableHeight = Math.max(0, container.clientHeight - FLOATING_CHAT_TOP_CLEARANCE_PX);
+ panel.style.height = `${Math.min((container.clientHeight * 2) / 3, availableHeight)}px`;
+ };
+
+ updateHeight();
+ const observer = createResizeObserver(updateHeight);
+ observer.observe(container);
+
+ return (): void => observer.disconnect();
+}
+
export function isNearScrollBottom(metrics: ScrollMetrics): boolean {
return getScrollBottomDistance(metrics) <= SCROLL_BOTTOM_THRESHOLD_PX;
}
@@ -85,7 +108,7 @@ export function observeFloatingChatLayout(
};
// The capture listeners on the content root also see gestures over chrome
- // that never scrolls the active scroller (consent strip, recording header).
+ // that never scrolls the active scroller (recording header).
// A wheel there moves nothing, so no scroll event could ever rejoin follow
// mode — only a gesture aimed at the scroller itself counts as leaving.
const stopFollowing = (target: EventTarget | null): void => {
diff --git a/src/components/notes/overview/ContainerOverview.tsx b/src/components/notes/overview/ContainerOverview.tsx
index afe368073..f8aaaee72 100644
--- a/src/components/notes/overview/ContainerOverview.tsx
+++ b/src/components/notes/overview/ContainerOverview.tsx
@@ -10,10 +10,13 @@ import {
useFolders,
useFolderCounts,
useSpaceRootCounts,
+ folderContainerKey,
+ ensureContainerLoaded,
} from "../../../stores/noteStore";
import { useContainerChat } from "../../../hooks/useContainerChat";
import { cn } from "../../lib/utils";
import { PAGE_CONTENT_WIDTH_CLASS } from "../../ui/pageWidth";
+import { PAGE_HERO_ICON_TILE_CLASS } from "../../ui/surfaces";
import { ContainerIcon } from "./ContainerIcon";
import { OverviewExplainerBanner } from "./OverviewExplainerBanner";
import { OverviewAskSection } from "./OverviewAskSection";
@@ -46,6 +49,9 @@ export function ContainerOverview({
const folderCounts = useFolderCounts();
const spaceRootCounts = useSpaceRootCounts();
const [spaceNotes, setSpaceNotes] = useState<NoteItem[] | null>(null);
+ const [spaceNotesError, setSpaceNotesError] = useState(false);
+ const [folderNotesError, setFolderNotesError] = useState(false);
+ const [reloadKey, setReloadKey] = useState(0);
const [showInviteDialog, setShowInviteDialog] = useState(false);
// Folder overviews mirror the store's active container; space overviews list
@@ -57,17 +63,43 @@ export function ContainerOverview({
window.electronAPI
.getSpaceNotes(space.id, SPACE_NOTES_LIMIT)
.then((rows) => {
- if (!stale) setSpaceNotes(rows ?? []);
+ if (!stale) {
+ setSpaceNotes(rows ?? []);
+ setSpaceNotesError(false);
+ }
})
.catch(() => {
- if (!stale) setSpaceNotes([]);
+ if (!stale) setSpaceNotesError(true);
});
return () => {
stale = true;
};
- }, [folder, space.id, notesByContainer]);
+ }, [folder, space.id, notesByContainer, reloadKey]);
+
+ useEffect(() => {
+ if (!folder) return;
+ const key = folderContainerKey(folder.id);
+ if (notesByContainer[key] !== undefined) return;
+ let stale = false;
+ void ensureContainerLoaded(key)
+ .then(() => {
+ if (!stale) setFolderNotesError(false);
+ })
+ .catch(() => {
+ if (!stale) setFolderNotesError(true);
+ });
+ return () => {
+ stale = true;
+ };
+ }, [folder, notesByContainer]);
const notes = folder ? containerNotes : (spaceNotes ?? []);
+ const folderKey = folder ? folderContainerKey(folder.id) : null;
+ const folderNotesLoaded = folderKey !== null && notesByContainer[folderKey] !== undefined;
+ const isLoaded = folder ? folderNotesLoaded : spaceNotes !== null;
+ const loadFailed = folder
+ ? folderNotesError && !folderNotesLoaded
+ : spaceNotesError && spaceNotes === null;
const chat = useContainerChat({ space, folder, notes });
@@ -101,11 +133,53 @@ export function ContainerOverview({
metaParts.push(t("notes.overview.meta.members", { count: space.member_count }));
}
+ if (loadFailed || !isLoaded) {
+ return (
+ <div className="flex flex-1 flex-col items-center justify-center gap-3 px-6 text-sm text-muted-foreground">
+ <p>{t(loadFailed ? "common.error" : "common.loading")}</p>
+ {loadFailed && (
+ <button
+ onClick={() => {
+ if (folderKey) {
+ setFolderNotesError(false);
+ void ensureContainerLoaded(folderKey).catch(() => setFolderNotesError(true));
+ } else {
+ setSpaceNotes(null);
+ setSpaceNotesError(false);
+ setReloadKey((value) => value + 1);
+ }
+ }}
+ className="text-primary hover:underline focus-visible:underline"
+ >
+ {t("common.retry")}
+ </button>
+ )}
+ </div>
+ );
+ }
+
+ // Keyed, and a direct child of the same parent in both of its slots, so crossing
+ // zero notes moves the composer instead of remounting it and losing its draft.
+ const askSection = (
+ <OverviewAskSection
+ key="ask"
+ messages={chat.messages}
+ agentState={chat.agentState}
+ onTextSubmit={chat.sendMessage}
+ onCancel={chat.cancelStream}
+ conversations={chat.conversations}
+ activeConversationId={chat.activeConversationId}
+ onSwitchConversation={chat.switchConversation}
+ onNewChat={chat.startNewChat}
+ onOpenNote={onOpenNote}
+ />
+ );
+
return (
<div className="flex-1 overflow-y-auto min-h-0">
<div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 py-8 flex flex-col gap-5")}>
<div className="flex flex-col items-center text-center gap-2 pt-4">
- <div className="h-12 w-12 rounded-xl bg-foreground/4 dark:bg-white/5 border border-border/70 dark:border-white/10 flex items-center justify-center mb-1">
+ <div className={cn(PAGE_HERO_ICON_TILE_CLASS, "mb-1")}>
<ContainerIcon space={space} folder={folder} size={20} />
</div>
<h1 className="text-xl font-semibold text-foreground tracking-tight">
@@ -140,21 +214,11 @@ export function ContainerOverview({
</div>
</div>
- <OverviewExplainerBanner kind={space.kind === "team" ? "team" : "private"} />
-
- <OverviewAskSection
- messages={chat.messages}
- agentState={chat.agentState}
- onTextSubmit={chat.sendMessage}
- onCancel={chat.cancelStream}
- conversations={chat.conversations}
- activeConversationId={chat.activeConversationId}
- onSwitchConversation={chat.switchConversation}
- onNewChat={chat.startNewChat}
- onOpenNote={onOpenNote}
- />
-
- <div className="border-t border-border/70 dark:border-white/10">
+ {notes.length > 0 && (
+ <OverviewExplainerBanner kind={space.kind === "team" ? "team" : "private"} />
+ )}
+ {notes.length > 0 && askSection}
+ <div className={notes.length > 0 ? "border-t border-border/70 dark:border-white/10" : ""}>
<OverviewNoteList
notes={notes}
space={space}
@@ -163,6 +227,7 @@ export function ContainerOverview({
onAddExisting={onAddExisting}
/>
</div>
+ {notes.length === 0 && askSection}
</div>
{canInvite && workspace && space.cloud_space_id && (
diff --git a/src/components/notes/overview/OverviewAskSection.tsx b/src/components/notes/overview/OverviewAskSection.tsx
index ff721f37f..e16e57599 100644
--- a/src/components/notes/overview/OverviewAskSection.tsx
+++ b/src/components/notes/overview/OverviewAskSection.tsx
@@ -1,7 +1,9 @@
+import { useCallback, useRef } from "react";
import { Sparkles } from "../../icons";
import { useTranslation } from "react-i18next";
import { ChatMessages } from "../../chat/ChatMessages";
import { ChatInput } from "../../chat/ChatInput";
+import { observeChatComposerInset } from "../../chat/composerLayout";
import type { Message, AgentState } from "../../chat/types";
import type { ContainerConversationItem } from "../../../hooks/useContainerChat";
import { ConversationPicker } from "../ConversationPicker";
@@ -37,9 +39,16 @@ export function OverviewAskSection({
}: OverviewAskSectionProps) {
const { t } = useTranslation();
const hasMessages = messages.length > 0;
+ const composerElementRef = useRef<HTMLDivElement | null>(null);
+ const composerRef = useCallback((composer: HTMLDivElement | null) => {
+ composerElementRef.current = composer;
+ const container = composer?.parentElement?.parentElement;
+ if (!composer || !container) return;
+ return observeChatComposerInset(composer, container);
+ }, []);
const conversationPicker = (conversations.length > 0 || hasMessages) && (
- <div className="flex items-center px-3 pt-2">
+ <div className="flex items-center pb-2">
<ConversationPicker
conversations={conversations}
activeConversationId={activeConversationId}
@@ -50,35 +59,54 @@ export function OverviewAskSection({
);
return (
- <div className="rounded-xl bg-surface-1/50 dark:bg-white/2 border border-border/70 dark:border-white/10">
+ <div className="relative isolate mx-auto w-full max-w-2xl">
{conversationPicker}
{hasMessages && (
- <div className="max-h-[min(26rem,50vh)] flex flex-col">
- <ChatMessages messages={messages} onOpenNote={onOpenNote} />
+ <div className="flex h-[min(26rem,50vh)] min-h-0 flex-col">
+ <ChatMessages
+ messages={messages}
+ onOpenNote={onOpenNote}
+ contentClassName="pb-[var(--chat-composer-inset,5rem)]"
+ />
</div>
)}
- <ChatInput
- agentState={agentState}
- partialTranscript=""
- onTextSubmit={onTextSubmit}
- onCancel={onCancel}
- placeholder={t("notes.overview.ask.placeholder")}
- />
- {!hasMessages && (
- <div className="flex items-center flex-wrap gap-1.5 px-3 pb-3">
- {PROMPT_CHIP_KEYS.map((key) => (
- <button
- key={key}
- onClick={() => onTextSubmit(t(key))}
- disabled={agentState !== "idle"}
- className="inline-flex items-center gap-1.5 px-2.5 h-7 rounded-md border border-border/70 dark:border-white/10 text-[11px] text-foreground/55 hover:text-foreground/80 hover:border-border/70 hover:bg-foreground/3 dark:hover:bg-white/3 disabled:opacity-50 disabled:pointer-events-none transition-colors duration-150 focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/30"
- >
- <Sparkles size={10} className="text-foreground/45 shrink-0" />
- {t(key)}
- </button>
- ))}
+ <div className={hasMessages ? "relative h-14" : "relative h-24"}>
+ <div ref={composerRef} className="absolute inset-x-0 bottom-0 z-10 py-1">
+ {!hasMessages && (
+ <div className="scrollbar-hidden flex items-center gap-1.5 overflow-x-auto pb-2">
+ {PROMPT_CHIP_KEYS.map((key) => (
+ <button
+ key={key}
+ // Keep focus in the composer so it doesn't collapse and slide the chips away.
+ onMouseDown={(event) => event.preventDefault()}
+ onClick={() => {
+ // The chips unmount once the message lands; keep focus in the composer.
+ composerElementRef.current?.querySelector("textarea")?.focus();
+ onTextSubmit(t(key));
+ }}
+ disabled={agentState !== "idle"}
+ className="inline-flex shrink-0 items-center gap-1.5 px-2.5 h-7 whitespace-nowrap rounded-full border border-border/70 bg-card shadow-sm dark:border-white/10 text-[11px] text-foreground/55 hover:text-foreground/80 hover:border-border/70 hover:bg-surface-3 disabled:text-foreground/30 disabled:pointer-events-none transition-colors duration-150 focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/30"
+ >
+ <Sparkles size={10} className="text-foreground/45 shrink-0" />
+ {t(key)}
+ </button>
+ ))}
+ </div>
+ )}
+ <ChatInput
+ className="w-full"
+ agentState={agentState}
+ partialTranscript=""
+ onTextSubmit={onTextSubmit}
+ onCancel={onCancel}
+ focusOnIdle={false}
+ expandOnFocus
+ expandOnFocusSize="compact"
+ variant="assistant"
+ placeholder={t("notes.overview.ask.placeholder")}
+ />
</div>
- )}
+ </div>
</div>
);
}
diff --git a/src/components/notes/overview/OverviewNoteList.tsx b/src/components/notes/overview/OverviewNoteList.tsx
index 74dd6e321..7d69f3713 100644
--- a/src/components/notes/overview/OverviewNoteList.tsx
+++ b/src/components/notes/overview/OverviewNoteList.tsx
@@ -8,6 +8,10 @@ import { formatRelativeTime } from "../../../utils/dateFormatting";
import { useSpaceRoster } from "../../../hooks/useSpaceRoster";
import { useAuth } from "../../../hooks/useAuth";
import type { NoteItem, SpaceItem } from "../../../types/electron";
+import { Button } from "../../ui/button";
+import ThemedEmptyIllustration from "../../ui/ThemedEmptyIllustration";
+import notesEmptyLight from "../../../assets/empty-states/notes-empty-light.svg";
+import notesEmptyDark from "../../../assets/empty-states/notes-empty-dark.svg";
interface OverviewNoteListProps {
notes: NoteItem[];
@@ -34,25 +38,27 @@ export function OverviewNoteList({
if (notes.length === 0) {
return (
- <div className="flex flex-col items-center py-8">
- <p className="text-xs text-foreground/45 dark:text-foreground/45 mb-3">
- {t("notes.overview.list.empty")}
+ <div className="flex min-h-80 flex-col items-center justify-center px-4 py-8 text-center">
+ <ThemedEmptyIllustration
+ light={notesEmptyLight}
+ dark={notesEmptyDark}
+ width={327}
+ height={117}
+ className="[mask-image:linear-gradient(to_right,transparent,black_20%,black_80%,transparent)]"
+ />
+ <h2 className="mt-6 text-lg font-semibold text-foreground">{t("notes.empty.title")}</h2>
+ <p className="mt-2 max-w-sm text-sm text-muted-foreground">
+ {t("notes.empty.description")}
</p>
- <div className="flex items-center gap-2">
- <button
- onClick={onNewNote}
- className="flex items-center gap-1.5 px-4 h-7 rounded-md bg-primary/8 dark:bg-primary/10 border border-primary/12 dark:border-primary/15 text-xs font-medium text-primary/70 hover:bg-primary/12 hover:text-primary hover:border-primary/20 transition-colors"
- >
+ <div className="mt-5 flex flex-wrap items-center justify-center gap-2">
+ <Button onClick={onNewNote} className="px-5 font-medium">
<Plus size={11} />
{t("notes.empty.createNote")}
- </button>
+ </Button>
{onAddExisting && (
- <button
- onClick={onAddExisting}
- className="flex items-center gap-1.5 px-4 h-7 rounded-md border border-foreground/8 dark:border-white/10 text-xs text-foreground/45 hover:text-foreground/60 hover:border-foreground/15 hover:bg-foreground/3 dark:hover:bg-white/3 transition-colors"
- >
+ <Button variant="outline" onClick={onAddExisting}>
{t("notes.addToFolder.addExisting")}
- </button>
+ </Button>
)}
</div>
</div>
diff --git a/src/components/ui/DictationHotkeyHint.tsx b/src/components/ui/DictationHotkeyHint.tsx
new file mode 100644
index 000000000..cfc6cba3b
--- /dev/null
+++ b/src/components/ui/DictationHotkeyHint.tsx
@@ -0,0 +1,40 @@
+import { Fragment } from "react";
+import { useTranslation } from "react-i18next";
+import { cn } from "../lib/utils";
+import { formatHotkeyLabel, parseHotkeyList } from "../../utils/hotkeys";
+import { BIDI_VALUE_TOKEN, BidiInterpolatedText } from "./BidiInterpolatedText";
+
+/** "Press <hotkey> and start speaking.", with each dictation hotkey drawn as a key cap. */
+export default function DictationHotkeyHint({
+ hotkey,
+ className,
+}: {
+ hotkey: string;
+ className?: string;
+}) {
+ const { t } = useTranslation();
+ return (
+ <span
+ className={cn(
+ "inline-flex flex-wrap items-center justify-center gap-1.5 text-sm text-muted-foreground",
+ className
+ )}
+ >
+ <BidiInterpolatedText
+ text={t("controlPanel.history.shortcutHint", { shortcut: BIDI_VALUE_TOKEN })}
+ value={
+ <span className="inline-flex items-center gap-1">
+ {parseHotkeyList(hotkey).map((hk, index) => (
+ <Fragment key={hk}>
+ {index > 0 && <span className="text-foreground/45">/</span>}
+ <kbd className="rounded-md bg-background px-1.5 py-px font-sans text-[11px] font-medium text-foreground/80 shadow-sm dark:bg-surface-2">
+ {formatHotkeyLabel(hk)}
+ </kbd>
+ </Fragment>
+ ))}
+ </span>
+ }
+ />
+ </span>
+ );
+}
diff --git a/src/components/ui/EmptyStateCard.tsx b/src/components/ui/EmptyStateCard.tsx
index 7df6464ca..d46a8aa2d 100644
--- a/src/components/ui/EmptyStateCard.tsx
+++ b/src/components/ui/EmptyStateCard.tsx
@@ -5,6 +5,8 @@ interface EmptyStateCardProps {
icon: ComponentType<{ size?: number; className?: string }>;
title?: string;
description?: string;
+ /** Announce the title as a heading when the card is the page's main content. */
+ headingLevel?: 2 | 3;
/** Actions or previews, stacked and centred under the copy. */
children?: ReactNode;
className?: string;
@@ -15,6 +17,7 @@ export default function EmptyStateCard({
icon: Icon,
title,
description,
+ headingLevel,
children,
className,
}: EmptyStateCardProps) {
@@ -28,7 +31,15 @@ export default function EmptyStateCard({
<span className="flex h-11 w-11 items-center justify-center rounded-xl bg-surface-3 text-foreground/70 dark:bg-surface-3">
<Icon size={20} />
</span>
- {title && <p className="mt-4 text-[15px] font-medium text-foreground">{title}</p>}
+ {title && (
+ <p
+ role={headingLevel ? "heading" : undefined}
+ aria-level={headingLevel}
+ className="mt-4 text-[15px] font-medium text-foreground"
+ >
+ {title}
+ </p>
+ )}
{description && (
<p className="mt-1 max-w-xs text-[13px] leading-relaxed text-foreground/70">
{description}
diff --git a/src/components/ui/ThemedEmptyIllustration.tsx b/src/components/ui/ThemedEmptyIllustration.tsx
new file mode 100644
index 000000000..a3d69bbe9
--- /dev/null
+++ b/src/components/ui/ThemedEmptyIllustration.tsx
@@ -0,0 +1,40 @@
+import { cn } from "../lib/utils";
+
+interface ThemedEmptyIllustrationProps {
+ light: string;
+ dark: string;
+ width: number;
+ height: number;
+ className?: string;
+}
+
+export default function ThemedEmptyIllustration({
+ light,
+ dark,
+ width,
+ height,
+ className,
+}: ThemedEmptyIllustrationProps) {
+ return (
+ <span className={cn("inline-block max-w-full", className)} aria-hidden="true">
+ <img
+ src={light}
+ width={width}
+ height={height}
+ alt=""
+ decoding="async"
+ draggable={false}
+ className="block h-auto max-w-full dark:hidden"
+ />
+ <img
+ src={dark}
+ width={width}
+ height={height}
+ alt=""
+ decoding="async"
+ draggable={false}
+ className="hidden h-auto max-w-full dark:block"
+ />
+ </span>
+ );
+}
diff --git a/src/components/ui/gradientCircle.ts b/src/components/ui/gradientCircle.ts
index 0aefef647..3b487b0f1 100644
--- a/src/components/ui/gradientCircle.ts
+++ b/src/components/ui/gradientCircle.ts
@@ -1,7 +1,7 @@
// Brand blue as glass, matched to the app icon: the --gradient-brand-glass ramp under the
// rim stack in --shadow-brand-glass (bright top edge, hairline, darker bottom edge). Every
-// primary action wears this: the Button default variant, the mic/send circles, the upcoming
-// events today header, the onboarding brand tile.
+// primary action wears this: the Button default variant, the mic/send circles, the onboarding
+// brand tile.
export const BRAND_GLASS_SURFACE =
"bg-[image:var(--gradient-brand-glass)] shadow-(--shadow-brand-glass) text-white";
diff --git a/src/components/ui/surfaces.ts b/src/components/ui/surfaces.ts
new file mode 100644
index 000000000..86165262c
--- /dev/null
+++ b/src/components/ui/surfaces.ts
@@ -0,0 +1,8 @@
+// Surfaces shared by the redesigned control panel pages.
+
+export const CARD_SURFACE_CLASS =
+ "rounded-2xl border border-border/70 bg-card/50 dark:border-white/10 dark:bg-surface-2/60";
+
+// Icon tile above a centered page title: Notes overview and the Notes actions setup.
+export const PAGE_HERO_ICON_TILE_CLASS =
+ "flex h-12 w-12 items-center justify-center rounded-xl border border-border/70 bg-foreground/4 dark:border-white/10 dark:bg-white/5";
diff --git a/src/components/ui/toggle.tsx b/src/components/ui/toggle.tsx
index c3c1b506d..623639c91 100644
--- a/src/components/ui/toggle.tsx
+++ b/src/components/ui/toggle.tsx
@@ -4,9 +4,10 @@ interface ToggleProps {
checked: boolean;
onChange: (checked: boolean) => void;
disabled?: boolean;
+ ariaLabel?: string;
}
-export const Toggle = ({ checked, onChange, disabled = false }: ToggleProps) => {
+export const Toggle = ({ checked, onChange, disabled = false, ariaLabel }: ToggleProps) => {
const getTrackClasses = () => {
if (disabled) {
return checked ? "bg-primary/40" : "bg-muted";
@@ -18,6 +19,9 @@ export const Toggle = ({ checked, onChange, disabled = false }: ToggleProps) =>
return (
<button
+ role="switch"
+ aria-checked={checked}
+ aria-label={ariaLabel}
onClick={() => !disabled && onChange(!checked)}
disabled={disabled}
className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:ring-offset-1 ${getTrackClasses()} ${
diff --git a/src/hooks/useEmbeddedChat.ts b/src/hooks/useEmbeddedChat.ts
index 64359b292..46fc77365 100644
--- a/src/hooks/useEmbeddedChat.ts
+++ b/src/hooks/useEmbeddedChat.ts
@@ -182,11 +182,13 @@ export function useEmbeddedChat({
},
[fetchNoteConversations, noteId, noteTitle, persistence]
);
+ const [submissionInFlight, setSubmissionInFlight] = useState(false);
const sendMessageWithResult = useChatMessageSender({
conversationId,
persistence,
streaming,
createConversation,
+ onSendingChange: setSubmissionInFlight,
});
const sendMessage = useCallback(
async (text: string): Promise<void> => {
@@ -197,7 +199,11 @@ export function useEmbeddedChat({
return {
messages: persistence.messages,
- agentState: streaming.agentState,
+ // As in ChatView: a cancelled send can hold the submission lock until an in-flight
+ // tool returns, and the lock would drop a message sent before then, so the chat
+ // reads busy until it lets go.
+ agentState:
+ submissionInFlight && streaming.agentState === "idle" ? "thinking" : streaming.agentState,
sendMessage,
cancelStream: streaming.cancelStream,
noteConversations,
diff --git a/src/hooks/useStickToBottom.ts b/src/hooks/useStickToBottom.ts
index 74dac9156..115a911df 100644
--- a/src/hooks/useStickToBottom.ts
+++ b/src/hooks/useStickToBottom.ts
@@ -76,7 +76,8 @@ export function useStickToBottom<T extends HTMLElement>(
if (followerRef.current?.isFollowing()) pinToBottom(node);
});
ro.observe(node);
- if (content) ro.observe(content);
+ // Border box, so bottom padding that makes room for an overlay (the chat composer) re-pins too.
+ if (content) ro.observe(content, { box: "border-box" });
return () => ro.disconnect();
}, [dep, resetToTop]);
diff --git a/src/hooks/useUpcomingEvents.ts b/src/hooks/useUpcomingEvents.ts
index fb6f40249..2b3c9bce2 100644
--- a/src/hooks/useUpcomingEvents.ts
+++ b/src/hooks/useUpcomingEvents.ts
@@ -1,4 +1,4 @@
-import { useState, useEffect, useCallback } from "react";
+import { useState, useEffect, useCallback, useRef } from "react";
import { useSettingsStore } from "../stores/settingsStore";
import type { CalendarEvent } from "../types/calendar";
import { hasOtherAttendees } from "../utils/calendarAttendees";
@@ -27,13 +27,18 @@ export function useUpcomingEvents(): UseUpcomingEventsReturn {
const [events, setEvents] = useState<CalendarEvent[]>([]);
const [isLoading, setIsLoading] = useState(false);
+ // Only the first load shows as loading. A refresh after a sync keeps the current
+ // events on screen, so the list doesn't flash (or unmount whatever the user is doing
+ // in it) every time a calendar syncs.
+ const hasLoadedRef = useRef(false);
const fetchEvents = useCallback(async () => {
if (!isConnected) {
+ hasLoadedRef.current = false;
setEvents([]);
return;
}
- setIsLoading(true);
+ if (!hasLoadedRef.current) setIsLoading(true);
try {
const windowMinutes = getLookaheadMinutes();
const result = await window.electronAPI?.gcalGetUpcomingEvents?.(windowMinutes);
@@ -45,6 +50,7 @@ export function useUpcomingEvents(): UseUpcomingEventsReturn {
} catch {
setEvents([]);
} finally {
+ hasLoadedRef.current = true;
setIsLoading(false);
}
}, [isConnected]);
diff --git a/src/index.css b/src/index.css
index 01aa72d33..4dbb09df9 100644
--- a/src/index.css
+++ b/src/index.css
@@ -102,13 +102,26 @@
--shadow-glass:
inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.45),
0 2px 10px rgba(15, 23, 42, 0.06);
- /* Same rim on brand-blue surfaces (mic/send buttons, today header): the app
- icon's glass. Softer than --shadow-glass because it sits on colour. */
+ /* Same rim on brand-blue surfaces (mic/send buttons): the app icon's glass.
+ Softer than --shadow-glass because it sits on colour. */
--shadow-brand-glass:
inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.16),
inset 0 -1px 1px rgba(0, 0, 0, 0.12);
/* The fill under that rim: Button default, mic/send circles, the onboarding brand tile. */
--gradient-brand-glass: linear-gradient(180deg, #5588f0 0%, #3466e2 100%);
+ /* Today's upcoming-events card: a brand-blue band lit at both ends, crossed by two soft
+ diagonal highlights, as in the Home design. */
+ --gradient-calendar-today:
+ linear-gradient(
+ 115deg,
+ transparent 36%,
+ rgb(255 255 255 / 0.12) 42%,
+ transparent 50%,
+ transparent 58%,
+ rgb(255 255 255 / 0.08) 64%,
+ transparent 72%
+ ),
+ linear-gradient(90deg, #58a7fe 0%, #1a7bff 22%, #1f80ff 55%, #2a88ff 72%, #62afff 100%);
/* The brand tile floats over the onboarding hero, so it adds a soft coloured lift. */
--shadow-brand-tile: var(--shadow-brand-glass), 0 10px 24px -8px rgb(52 102 226 / 0.45);
}
@@ -794,6 +807,35 @@ body:has(.onboarding-canvas) kbd {
0 12px 20px color-mix(in oklch, var(--onboarding-keycap-shadow) 8%, transparent);
}
+/* Today's day-card header: a mosaic of faint tiles over --gradient-calendar-today,
+ fading in toward the right, as in the Home design. The tiles are a white wash cut by
+ a mask of vertical and horizontal stripes; it sits behind the header's text. */
+.calendar-today-header {
+ position: relative;
+ isolation: isolate;
+}
+
+.calendar-today-header::before {
+ content: "";
+ position: absolute;
+ inset: 0;
+ z-index: -1;
+ pointer-events: none;
+ background: rgb(255 255 255 / 0.13);
+ mask-image:
+ linear-gradient(to right, transparent 22%, #000 70%),
+ linear-gradient(90deg, #000 5px, transparent 5px), linear-gradient(#000 5px, transparent 5px);
+ mask-size:
+ 100% 100%,
+ 7px 100%,
+ 100% 7px;
+ mask-position:
+ 0 0,
+ 1px 0,
+ 0 1.5px;
+ mask-composite: intersect;
+}
+
/* OpenWhispr Brand Typography */
.brand-heading {
font-family: var(--font-family-display);
@@ -1256,15 +1298,6 @@ a:hover {
}
}
-@keyframes shimmer-slide {
- from {
- transform: translateX(-100%);
- }
- to {
- transform: translateX(100%);
- }
-}
-
@keyframes fade-in-up {
from {
opacity: 0;
diff --git a/src/locales/ar/translation.json b/src/locales/ar/translation.json
index 3088850a4..8f1c57956 100644
--- a/src/locales/ar/translation.json
+++ b/src/locales/ar/translation.json
@@ -524,12 +524,14 @@
"couldNotDeleteTitle": "تعذر الحذف",
"couldNotDeleteDescription": "ربما تمت إزالة هذا النص المفرَّغ بالفعل.",
"couldNotDeleteDescriptionGeneric": "حدث خطأ ما. يرجى المحاولة مرة أخرى.",
- "empty": "لا توجد أي نصوص مفرَّغة حتى الآن",
- "emptyDescription": "اضغط مفتاح الاختصار في أي تطبيق وابدأ الحديث. يُحفظ كل نص هنا بخصوصية على جهازك.",
- "sectionTitle": "النصوص المكتوبة",
+ "empty": "ابدأ أول إملاء لك",
+ "emptyDescription": "سيظهر النص الذي تمليه هنا.",
+ "shortcutHint": "اضغط على {{shortcut}} وابدأ في التحدث.",
"dataRetentionDisabled": "الاحتفاظ بالبيانات قيد الإيقاف. لا يتم حفظ النصوص المفرَّغة والصوت في السجل.",
- "press": "اضغط",
- "toStart": "للبدء",
+ "welcomeBack": "مرحبًا بك مرة أخرى",
+ "welcomeBackNamed": "مرحبًا بك مرة أخرى، {{name}}",
+ "welcome": "مرحبًا بك",
+ "welcomeNamed": "مرحبًا بك، {{name}}",
"dateGroups": {
"today": "اليوم",
"yesterday": "أمس"
@@ -1365,19 +1367,14 @@
"examples": {
"linkedinTrigger": "حسابي على LinkedIn",
"linkedinText": "linkedin.com/in/you",
- "rewriteTrigger": "مطالبة إعادة الكتابة",
- "rewriteText": "أعد كتابة هذا ليكون أكثر إيجازًا واحترافية",
- "introTrigger": "بريد المقدمة",
- "introText": "مرحبًا، أود أن نجد بعض الوقت للدردشة في وقت لاحق من هذا الأسبوع…",
"signoffTrigger": "ختام الرسالة",
"signoffText": "أطيب التحيات، Alex · [email protected]"
},
"addPlaceholder": "أضف عبارة مفتاحية — \"طلب مستثمر\"، \"رابط التقويم\""
},
- "emptyTitle": "قاموسك فارغ",
+ "emptyTitle": "أضف كلمات إلى قاموسك",
"emptyDescription": "أضف الكلمات التي يجب أن يكتبها {{agentName}} بشكل صحيح دائمًا: الأسماء، الأدوات، الاختصارات.",
"addFirstWord": "أضف كلمتك الأولى",
- "importList": "استيراد قائمة",
"agentDefault": "تمت الإضافة افتراضيًا",
"promptLimitNotice": "عدد أحرف قاموسك: {{chars}}. لا تقرأ نماذج Groq وWhisper سوى بضع مئات من الأحرف الأخيرة منه، لذا تعمل القوائم الأقصر بشكل أفضل معها. أما النماذج الأخرى فتحصل على القائمة كاملة."
},
@@ -1880,12 +1877,14 @@
"tomorrow": "غدًا"
},
"upcoming": {
- "title": "القادم",
"now": "الآن",
"untitledEvent": "حدث بدون عنوان",
"joinAndTranscribe": "انضمام وتفريغ صوتي",
"takeNotes": "تدوين ملاحظات",
- "noEventsToday": "لا توجد أحداث اليوم",
+ "noEventsToday": "لا مزيد من الاجتماعات اليوم",
+ "emptyDayDescription": "حان وقت لمس بعض العشب",
+ "touchGrass": "المس العشب",
+ "touchGrassLabel": "رقعة من العشب. مرّر المؤشر أو مفاتيح الأسهم فوقها. اضغط Escape للرجوع.",
"noUpcomingEvents": "لا توجد أحداث قادمة",
"moreCalendarsHint": "هل تريد تقاويم إضافية؟",
"connectHere": "قم بربطها هنا",
@@ -1967,6 +1966,7 @@
"undo": "تراجع",
"emptySpace": "لا توجد ملاحظات بعد. الملاحظات هنا مرئية للجميع في {{space}}.",
"emptyTeamHint": "ستظهر المساحات المشتركة معك هنا.",
+ "emptyTeamTitle": "لا توجد مساحات مشتركة",
"noteCount_zero": "{{count}} ملاحظات",
"noteCount_one": "{{count}} ملاحظة",
"noteCount_two": "{{count}} ملاحظتان",
@@ -2110,8 +2110,8 @@
"raw": "خام",
"aiSummary": "ملخص بالذكاء الاصطناعي",
"saving": "جاري الحفظ",
- "transcriptEmptyTitle": "لم يتم تسجيل أي شيء بعد",
- "transcriptEmptyDescription": "اضغط على تسجيل لبدء النسخ. كل ما يُقال يظهر هنا لحظيًا.",
+ "transcriptEmptyTitle": "لا يوجد نص مفرَّغ بعد",
+ "transcriptEmptyDescription": "ابدأ التسجيل وسيظهر هنا كل ما يُقال.",
"startRecording": "بدء التسجيل",
"generateSummary": "إنشاء ملخص بالذكاء الاصطناعي",
"startWriting": "ابدأ الكتابة...",
@@ -2458,9 +2458,6 @@
}
},
"invite": "دعوة",
- "list": {
- "empty": "لا توجد ملاحظات هنا بعد"
- },
"author": {
"you": "أنت"
}
@@ -4586,8 +4583,10 @@
"newChat": "محادثة جديدة",
"search": "البحث في المحادثات...",
"archived": "مؤرشفة",
- "noConversations": "ابدأ محادثتك الأولى",
- "selectChat": "حدد محادثة أو ابدأ محادثة جديدة",
+ "noConversations": "لا توجد محادثات بعد",
+ "allArchived": "جميع المحادثات مؤرشفة",
+ "noConversationsDescription": "ستظهر محادثاتك مع المساعد هنا.",
+ "loadFailed": "تعذر تحميل المحادثات",
"noResults": "لا توجد محادثات مطابقة",
"today": "اليوم",
"yesterday": "أمس",
@@ -4602,7 +4601,12 @@
"searchChats": "البحث في المحادثات",
"searchTitle": "البحث في المحادثات",
"searchDescription": "البحث في جميع محادثاتك",
- "newChatEmpty": "اسأل عن ملاحظاتك أو نصوصك المفرَّغة أو أي شيء آخر"
+ "inputPlaceholder": "اسأل عن أي شيء...",
+ "starters": {
+ "todos": "اعرض مهامي الأخيرة",
+ "meeting": "حضّرني لاجتماعي القادم",
+ "sharedNotes": "أبرِز ملاحظاتي المشتركة"
+ }
},
"support": {
"documentation": "الوثائق",
@@ -4721,15 +4725,19 @@
"continue": "متابعة"
},
"embeddedChat": {
- "askPlaceholder": "اسأل عن أي شيء...",
- "send": "إرسال",
+ "askPlaceholder": "اسأل أي شيء عن ملاحظتك",
"title": "الدردشة",
"emptyState": "اسأل سؤالًا حول هذه الملاحظة",
"dock": "إرساء في الشريط الجانبي",
"undock": "إلغاء الإرساء من الشريط الجانبي",
"close": "إغلاق الدردشة",
"newChat": "محادثة جديدة",
- "conversationSelector": "تبديل المحادثة"
+ "conversationSelector": "تبديل المحادثة",
+ "history": "السجل",
+ "quickActions": "إجراءات سريعة",
+ "generateSummary": "إنشاء ملخص",
+ "makeTodos": "إنشاء قائمة مهام",
+ "createOutline": "إنشاء مخطط"
},
"transcriptionPreview": {
"label": "معاينة",
diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json
index 4f3149f4b..e69b7d7d3 100644
--- a/src/locales/de/translation.json
+++ b/src/locales/de/translation.json
@@ -637,12 +637,14 @@
"couldNotDeleteTitle": "Löschen fehlgeschlagen",
"couldNotDeleteDescription": "Diese Transkription wurde möglicherweise bereits entfernt.",
"couldNotDeleteDescriptionGeneric": "Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut.",
- "empty": "Noch keine Transkriptionen",
- "emptyDescription": "Drücke deinen Hotkey in einer beliebigen App und sprich los. Jede Transkription wird hier privat auf deinem Gerät gespeichert.",
- "sectionTitle": "Transkriptionen",
+ "empty": "Starte dein erstes Diktat",
+ "emptyDescription": "Dein diktierter Text erscheint hier.",
+ "shortcutHint": "Drücke {{shortcut}} und sprich los.",
"dataRetentionDisabled": "Datenaufbewahrung ist deaktiviert. Transkriptionen und Audio werden nicht im Verlauf gespeichert.",
- "press": "Drücken Sie",
- "toStart": "zum Starten",
+ "welcomeBack": "Willkommen zurück",
+ "welcomeBackNamed": "Willkommen zurück, {{name}}",
+ "welcome": "Willkommen",
+ "welcomeNamed": "Willkommen, {{name}}",
"dateGroups": {
"today": "Heute",
"yesterday": "Gestern"
@@ -1184,12 +1186,14 @@
"tomorrow": "Morgen"
},
"upcoming": {
- "title": "Demnächst",
"now": "Jetzt",
"untitledEvent": "Unbenanntes Ereignis",
"joinAndTranscribe": "Beitreten & transkribieren",
"takeNotes": "Notizen machen",
- "noEventsToday": "Heute keine Termine",
+ "noEventsToday": "Heute keine Meetings mehr",
+ "emptyDayDescription": "Zeit, ein bisschen Gras anzufassen",
+ "touchGrass": "Gras anfassen",
+ "touchGrassLabel": "Ein Stück Rasen. Streich mit dem Mauszeiger oder den Pfeiltasten darüber. Mit Escape geht es zurück.",
"noUpcomingEvents": "Keine anstehenden Termine",
"moreCalendarsHint": "Weitere Kalender gewünscht?",
"connectHere": "Hier verbinden",
@@ -2810,7 +2814,7 @@
"enableDescription_one": "Nutzung aus {{count}} vorhandenem Diktat synchronisieren. Transkripte bleiben privat.",
"enableDescription_other": "Nutzung aus {{count}} vorhandenen Diktaten synchronisieren. Transkripte bleiben privat.",
"emptyTitle": "Noch keine Diktate",
- "emptyBody": "Beginnen Sie zu diktieren – Ihre Wörter, Serien und tägliche Aktivität erscheinen dann hier.",
+ "emptyBody": "Fang an zu diktieren – deine Wörter, Serien und tägliche Aktivität erscheinen dann hier.",
"loadError": "Insights konnten von diesem Gerät nicht gelesen werden.",
"leaderboard": {
"title": "Bestenliste",
@@ -3003,8 +3007,10 @@
"newChat": "Neuer Chat",
"search": "Unterhaltungen suchen...",
"archived": "Archiviert",
- "noConversations": "Starten Sie Ihre erste Unterhaltung",
- "selectChat": "Wählen Sie eine Unterhaltung oder starten Sie eine neue",
+ "noConversations": "Noch keine Chats",
+ "allArchived": "Alle Chats sind archiviert",
+ "noConversationsDescription": "Deine Chats mit dem Assistenten erscheinen hier.",
+ "loadFailed": "Chats konnten nicht geladen werden",
"noResults": "Keine passenden Unterhaltungen",
"today": "Heute",
"yesterday": "Gestern",
@@ -3019,7 +3025,12 @@
"searchChats": "Chats suchen",
"searchTitle": "Unterhaltungen suchen",
"searchDescription": "In allen Unterhaltungen suchen",
- "newChatEmpty": "Fragen Sie zu Ihren Notizen, Transkripten oder anderem"
+ "inputPlaceholder": "Frag etwas...",
+ "starters": {
+ "todos": "Liste meine letzten Aufgaben auf",
+ "meeting": "Bereite mich auf mein nächstes Meeting vor",
+ "sharedNotes": "Hebe meine geteilten Notizen hervor"
+ }
},
"referral": {
"title": "Empfehlen und Belohnungen erhalten",
@@ -3164,6 +3175,7 @@
"undo": "Rückgängig",
"emptySpace": "Noch keine Notizen. Notizen hier sind für alle in {{space}} sichtbar.",
"emptyTeamHint": "Mit Ihnen geteilte Bereiche erscheinen hier.",
+ "emptyTeamTitle": "Keine geteilten Bereiche",
"noteCount_one": "{{count}} Notiz",
"noteCount_other": "{{count}} Notizen",
"accessRevoked": "Du hast keinen Zugriff mehr auf {{space}}",
@@ -3299,8 +3311,8 @@
"raw": "Roh",
"aiSummary": "KI-Zusammenfassung",
"saving": "Wird gespeichert",
- "transcriptEmptyTitle": "Noch nichts aufgenommen",
- "transcriptEmptyDescription": "Drücke auf Aufnahme, um mit der Transkription zu beginnen. Alles Gesagte erscheint hier in Echtzeit.",
+ "transcriptEmptyTitle": "Noch kein Transkript",
+ "transcriptEmptyDescription": "Starte eine Aufnahme, und alles Gesagte erscheint hier.",
"startRecording": "Aufnahme starten",
"generateSummary": "KI-Zusammenfassung erstellen",
"startWriting": "Schreibe los...",
@@ -3633,9 +3645,6 @@
}
},
"invite": "Einladen",
- "list": {
- "empty": "Hier gibt es noch keine Notizen"
- },
"author": {
"you": "Du"
}
@@ -3682,19 +3691,14 @@
"examples": {
"linkedinTrigger": "Mein LinkedIn",
"linkedinText": "linkedin.com/in/du",
- "rewriteTrigger": "Umschreib-Prompt",
- "rewriteText": "Schreibe das prägnanter und professioneller um",
- "introTrigger": "Intro-E-Mail",
- "introText": "Hallo, ich würde mich freuen, diese Woche Zeit für ein Gespräch zu finden …",
"signoffTrigger": "Grußformel",
"signoffText": "Viele Grüße, Alex · [email protected]"
},
"addPlaceholder": "Auslöser-Phrase hinzufügen – „mein Kalender“, „mein LinkedIn“"
},
- "emptyTitle": "Dein Wörterbuch ist leer",
+ "emptyTitle": "Füge Wörter zu deinem Wörterbuch hinzu",
"emptyDescription": "Füge Wörter hinzu, die {{agentName}} immer richtig erkennen soll: Namen, Tools, Abkürzungen.",
"addFirstWord": "Füge dein erstes Wort hinzu",
- "importList": "Liste importieren",
"agentDefault": "Standardmäßig enthalten"
},
"support": {
@@ -4599,15 +4603,19 @@
"continue": "Weiter"
},
"embeddedChat": {
- "askPlaceholder": "Frag etwas...",
- "send": "Senden",
+ "askPlaceholder": "Frag etwas zu deiner Notiz",
"title": "Chat",
"emptyState": "Stelle eine Frage zu dieser Notiz",
"dock": "In Seitenleiste andocken",
"undock": "Von Seitenleiste abdocken",
"close": "Chat schließen",
"newChat": "Neuer Chat",
- "conversationSelector": "Unterhaltung wechseln"
+ "conversationSelector": "Unterhaltung wechseln",
+ "history": "Verlauf",
+ "quickActions": "Schnellaktionen",
+ "generateSummary": "Zusammenfassung erstellen",
+ "makeTodos": "Aufgabenliste erstellen",
+ "createOutline": "Gliederung erstellen"
},
"transcriptionPreview": {
"label": "Vorschau",
diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index ace6ab1c1..4853df327 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -637,12 +637,14 @@
"couldNotDeleteTitle": "Couldn't delete",
"couldNotDeleteDescription": "This transcription may have already been removed.",
"couldNotDeleteDescriptionGeneric": "Something went wrong. Please try again.",
- "empty": "No transcriptions yet",
- "emptyDescription": "Press your hotkey in any app and start talking. Every transcription is saved privately here on your device.",
- "sectionTitle": "Transcriptions",
+ "empty": "Start your first dictation",
+ "emptyDescription": "Your dictated text will appear here.",
+ "shortcutHint": "Press {{shortcut}} and start speaking.",
"dataRetentionDisabled": "Data retention is off. Transcriptions and audio are not saved to history.",
- "press": "Press",
- "toStart": "to start",
+ "welcomeBack": "Welcome Back",
+ "welcomeBackNamed": "Welcome Back, {{name}}",
+ "welcome": "Welcome",
+ "welcomeNamed": "Welcome, {{name}}",
"dateGroups": {
"today": "Today",
"yesterday": "Yesterday"
@@ -1184,12 +1186,14 @@
"tomorrow": "Tomorrow"
},
"upcoming": {
- "title": "Coming up",
"now": "Now",
"untitledEvent": "Untitled Event",
"joinAndTranscribe": "Join & transcribe",
"takeNotes": "Take notes",
- "noEventsToday": "No events today",
+ "noEventsToday": "No more meetings today",
+ "emptyDayDescription": "Time to touch some grass",
+ "touchGrass": "Touch Grass",
+ "touchGrassLabel": "A patch of grass. Brush it with your pointer or the arrow keys. Press Escape to go back.",
"noUpcomingEvents": "No upcoming events",
"moreCalendarsHint": "Want additional calendars?",
"connectHere": "Connect them here",
@@ -3003,8 +3007,10 @@
"newChat": "New chat",
"search": "Search conversations...",
"archived": "Archived",
- "noConversations": "Start your first conversation",
- "selectChat": "Select a conversation or start a new one",
+ "noConversations": "No chats yet",
+ "allArchived": "All chats are archived",
+ "noConversationsDescription": "Your chats with Assistant will appear here.",
+ "loadFailed": "Couldn't load chats",
"noResults": "No matching conversations",
"today": "Today",
"yesterday": "Yesterday",
@@ -3019,7 +3025,12 @@
"searchChats": "Search chats",
"searchTitle": "Search conversations",
"searchDescription": "Search across all your conversations",
- "newChatEmpty": "Ask about your notes, transcripts, or anything else"
+ "inputPlaceholder": "Ask anything...",
+ "starters": {
+ "todos": "List my recent to-dos",
+ "meeting": "Prepare me for my next meeting",
+ "sharedNotes": "Highlight my shared notes"
+ }
},
"referral": {
"title": "Refer and earn rewards",
@@ -3164,6 +3175,7 @@
"undo": "Undo",
"emptySpace": "No notes yet. Notes here are visible to everyone in {{space}}.",
"emptyTeamHint": "Spaces shared with you will appear here.",
+ "emptyTeamTitle": "No shared spaces",
"noteCount_one": "{{count}} note",
"noteCount_other": "{{count}} notes",
"accessRevoked": "You no longer have access to {{space}}",
@@ -3299,8 +3311,8 @@
"raw": "Raw",
"aiSummary": "AI Summary",
"saving": "Saving",
- "transcriptEmptyTitle": "Nothing recorded yet",
- "transcriptEmptyDescription": "Hit record to start transcribing. Everything said shows up here as it happens.",
+ "transcriptEmptyTitle": "No transcript yet",
+ "transcriptEmptyDescription": "Start a recording and everything said will appear here.",
"startRecording": "Start recording",
"generateSummary": "Generate AI Summary",
"startWriting": "Start writing...",
@@ -3633,9 +3645,6 @@
}
},
"invite": "Invite",
- "list": {
- "empty": "No notes here yet"
- },
"author": {
"you": "You"
}
@@ -3675,26 +3684,21 @@
"replacementPlaceholder": "Text to insert when you say the trigger…",
"create": "Create snippet",
"duplicate": "A snippet with this trigger already exists",
- "emptyTitle": "The stuff you shouldn't have to say",
+ "emptyTitle": "Stuff you shouldn't have to say",
"emptyTitleAccent": "twice",
"emptyDescription": "Speak a trigger word and OpenWhispr replaces it with whatever you saved — URLs, intros, sign-offs, prompts.",
"new": "New snippet",
"examples": {
"linkedinTrigger": "My LinkedIn",
"linkedinText": "linkedin.com/in/you",
- "rewriteTrigger": "Rewrite prompt",
- "rewriteText": "Rewrite this to be more concise and professional",
- "introTrigger": "Intro email",
- "introText": "Hey, would love to find some time to chat later this week…",
"signoffTrigger": "Sign off",
"signoffText": "Best, Alex · [email protected]"
},
"addPlaceholder": "Add a trigger phrase — \"investor ask\", \"cal link\""
},
- "emptyTitle": "Your dictionary is empty",
+ "emptyTitle": "Add words to your dictionary",
"emptyDescription": "Add words for {{agentName}} to always get right: names, tools, acronyms.",
"addFirstWord": "Add your first word",
- "importList": "Import a list",
"agentDefault": "Added by default"
},
"support": {
@@ -4599,15 +4603,19 @@
"continue": "Continue"
},
"embeddedChat": {
- "askPlaceholder": "Ask anything...",
- "send": "Send",
+ "askPlaceholder": "Ask anything about your note",
"title": "Chat",
"emptyState": "Ask a question about this note",
"dock": "Dock to sidebar",
"undock": "Undock from sidebar",
"close": "Close chat",
"newChat": "New chat",
- "conversationSelector": "Switch conversation"
+ "conversationSelector": "Switch conversation",
+ "history": "History",
+ "quickActions": "Quick actions",
+ "generateSummary": "Generate summary",
+ "makeTodos": "Make to-dos",
+ "createOutline": "Create outline"
},
"transcriptionPreview": {
"label": "Preview",
diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json
index 3bbc2776e..0d39c3317 100644
--- a/src/locales/es/translation.json
+++ b/src/locales/es/translation.json
@@ -646,12 +646,14 @@
"couldNotDeleteTitle": "No se pudo eliminar",
"couldNotDeleteDescription": "Puede que esta transcripción ya se haya eliminado.",
"couldNotDeleteDescriptionGeneric": "Algo salió mal. Inténtalo de nuevo.",
- "empty": "Aún no hay transcripciones",
- "emptyDescription": "Pulsa tu atajo en cualquier app y empieza a hablar. Cada transcripción se guarda aquí de forma privada en tu dispositivo.",
- "sectionTitle": "Transcripciones",
+ "empty": "Empieza tu primer dictado",
+ "emptyDescription": "Tu texto dictado aparecerá aquí.",
+ "shortcutHint": "Pulsa {{shortcut}} y empieza a hablar.",
"dataRetentionDisabled": "La retención de datos está desactivada. Las transcripciones y el audio no se guardan en el historial.",
- "press": "Pulsa",
- "toStart": "para empezar",
+ "welcomeBack": "Bienvenido de nuevo",
+ "welcomeBackNamed": "Bienvenido de nuevo, {{name}}",
+ "welcome": "Bienvenido",
+ "welcomeNamed": "Bienvenido, {{name}}",
"dateGroups": {
"today": "Hoy",
"yesterday": "Ayer"
@@ -2874,6 +2876,7 @@
"undo": "Deshacer",
"emptySpace": "Aún no hay notas. Las notas aquí son visibles para todos en {{space}}.",
"emptyTeamHint": "Los espacios compartidos contigo aparecerán aquí.",
+ "emptyTeamTitle": "No hay espacios compartidos",
"noteCount_one": "{{count}} nota",
"noteCount_other": "{{count}} notas",
"accessRevoked": "Ya no tienes acceso a {{space}}",
@@ -3009,8 +3012,8 @@
"raw": "Sin procesar",
"aiSummary": "Resumen con IA",
"saving": "Guardando",
- "transcriptEmptyTitle": "Aún no hay grabaciones",
- "transcriptEmptyDescription": "Pulsa grabar para empezar a transcribir. Todo lo que se diga aparecerá aquí en tiempo real.",
+ "transcriptEmptyTitle": "Aún no hay transcripción",
+ "transcriptEmptyDescription": "Inicia una grabación y todo lo que se diga aparecerá aquí.",
"startRecording": "Empezar a grabar",
"generateSummary": "Generar resumen con IA",
"startWriting": "Comienza a escribir...",
@@ -3343,9 +3346,6 @@
}
},
"invite": "Invitar",
- "list": {
- "empty": "Aún no hay notas aquí"
- },
"author": {
"you": "Tú"
}
@@ -3392,19 +3392,14 @@
"examples": {
"linkedinTrigger": "Mi LinkedIn",
"linkedinText": "linkedin.com/in/tu",
- "rewriteTrigger": "Prompt de reescritura",
- "rewriteText": "Reescribe esto para que sea más conciso y profesional",
- "introTrigger": "Email de presentación",
- "introText": "Hola, me encantaría encontrar un momento para hablar esta semana…",
"signoffTrigger": "Despedida",
"signoffText": "Saludos, Alex · [email protected]"
},
"addPlaceholder": "Añade una frase disparadora: \"mi agenda\", \"mi LinkedIn\""
},
- "emptyTitle": "Tu diccionario está vacío",
+ "emptyTitle": "Añade palabras a tu diccionario",
"emptyDescription": "Añade palabras que {{agentName}} siempre debe reconocer: nombres, herramientas, siglas.",
"addFirstWord": "Añade tu primera palabra",
- "importList": "Importar una lista",
"agentDefault": "Añadido por defecto"
},
"insights": {
@@ -3563,8 +3558,10 @@
"newChat": "Nuevo chat",
"search": "Buscar conversaciones...",
"archived": "Archivadas",
- "noConversations": "Inicia tu primera conversación",
- "selectChat": "Selecciona una conversación o inicia una nueva",
+ "noConversations": "Aún no hay chats",
+ "allArchived": "Todos los chats están archivados",
+ "noConversationsDescription": "Tus chats con el Asistente aparecerán aquí.",
+ "loadFailed": "No se pudieron cargar los chats",
"noResults": "Sin conversaciones coincidentes",
"today": "Hoy",
"yesterday": "Ayer",
@@ -3579,7 +3576,12 @@
"searchChats": "Buscar chats",
"searchTitle": "Buscar conversaciones",
"searchDescription": "Buscar en todas tus conversaciones",
- "newChatEmpty": "Pregunta sobre tus notas, transcripciones o lo que quieras"
+ "inputPlaceholder": "Pregunta algo...",
+ "starters": {
+ "todos": "Enumera mis tareas recientes",
+ "meeting": "Prepárame para mi próxima reunión",
+ "sharedNotes": "Destaca mis notas compartidas"
+ }
},
"support": {
"documentation": "Documentación",
@@ -4389,12 +4391,14 @@
"tomorrow": "Mañana"
},
"upcoming": {
- "title": "Próximamente",
"now": "Ahora",
"untitledEvent": "Evento sin título",
"joinAndTranscribe": "Unirse y transcribir",
"takeNotes": "Tomar notas",
- "noEventsToday": "Hoy no hay eventos",
+ "noEventsToday": "Hoy no hay más reuniones",
+ "emptyDayDescription": "Es hora de tocar un poco de césped",
+ "touchGrass": "Tocar césped",
+ "touchGrassLabel": "Un trozo de césped. Acarícialo con el puntero o con las teclas de flecha. Pulsa Escape para volver.",
"noUpcomingEvents": "No hay próximos eventos",
"moreCalendarsHint": "¿Quieres añadir más calendarios?",
"connectHere": "Conéctalos aquí",
@@ -4523,15 +4527,19 @@
"continue": "Continuar"
},
"embeddedChat": {
- "askPlaceholder": "Pregunta algo...",
- "send": "Enviar",
+ "askPlaceholder": "Pregunta sobre tu nota",
"title": "Chat",
"emptyState": "Haz una pregunta sobre esta nota",
"dock": "Anclar a la barra lateral",
"undock": "Desanclar de la barra lateral",
"close": "Cerrar chat",
"newChat": "Nuevo chat",
- "conversationSelector": "Cambiar conversación"
+ "conversationSelector": "Cambiar conversación",
+ "history": "Historial",
+ "quickActions": "Acciones rápidas",
+ "generateSummary": "Generar resumen",
+ "makeTodos": "Crear tareas",
+ "createOutline": "Crear esquema"
},
"transcriptionPreview": {
"label": "Vista previa",
diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json
index 8e24901f8..8a9249c51 100644
--- a/src/locales/fr/translation.json
+++ b/src/locales/fr/translation.json
@@ -637,12 +637,14 @@
"couldNotDeleteTitle": "Impossible de supprimer",
"couldNotDeleteDescription": "Cette transcription a peut-être déjà été supprimée.",
"couldNotDeleteDescriptionGeneric": "Une erreur est survenue. Veuillez réessayer.",
- "empty": "Aucune transcription pour le moment",
- "emptyDescription": "Appuyez sur votre raccourci dans n’importe quelle app et parlez. Chaque transcription est enregistrée ici, en privé, sur votre appareil.",
- "sectionTitle": "Transcriptions",
+ "empty": "Commencez votre première dictée",
+ "emptyDescription": "Votre texte dicté apparaîtra ici.",
+ "shortcutHint": "Appuyez sur {{shortcut}} et commencez à parler.",
"dataRetentionDisabled": "La conservation des données est désactivée. Les transcriptions et l'audio ne sont pas sauvegardés dans l'historique.",
- "press": "Appuyez sur",
- "toStart": "pour démarrer",
+ "welcomeBack": "Bon retour",
+ "welcomeBackNamed": "Bon retour, {{name}}",
+ "welcome": "Bienvenue",
+ "welcomeNamed": "Bienvenue, {{name}}",
"dateGroups": {
"today": "Aujourd'hui",
"yesterday": "Hier"
@@ -1184,12 +1186,14 @@
"tomorrow": "Demain"
},
"upcoming": {
- "title": "À venir",
"now": "En cours",
"untitledEvent": "Événement sans titre",
"joinAndTranscribe": "Rejoindre et transcrire",
"takeNotes": "Prendre des notes",
- "noEventsToday": "Aucun événement aujourd'hui",
+ "noEventsToday": "Plus de réunions aujourd'hui",
+ "emptyDayDescription": "L'heure d'aller toucher un peu d'herbe",
+ "touchGrass": "Toucher l'herbe",
+ "touchGrassLabel": "Un carré d'herbe. Effleurez-le avec le pointeur ou les touches fléchées. Appuyez sur Échap pour revenir.",
"noUpcomingEvents": "Aucun événement à venir",
"moreCalendarsHint": "Vous voulez d'autres calendriers ?",
"connectHere": "Connectez-les ici",
@@ -3003,8 +3007,10 @@
"newChat": "Nouveau chat",
"search": "Rechercher des conversations...",
"archived": "Archivées",
- "noConversations": "Démarrez votre première conversation",
- "selectChat": "Sélectionnez une conversation ou démarrez-en une nouvelle",
+ "noConversations": "Aucune discussion pour l’instant",
+ "allArchived": "Toutes les discussions sont archivées",
+ "noConversationsDescription": "Vos discussions avec l’assistant apparaîtront ici.",
+ "loadFailed": "Impossible de charger les discussions",
"noResults": "Aucune conversation correspondante",
"today": "Aujourd'hui",
"yesterday": "Hier",
@@ -3019,7 +3025,12 @@
"searchChats": "Rechercher",
"searchTitle": "Rechercher des conversations",
"searchDescription": "Rechercher dans toutes vos conversations",
- "newChatEmpty": "Posez des questions sur vos notes, transcriptions ou autre"
+ "inputPlaceholder": "Posez une question...",
+ "starters": {
+ "todos": "Liste mes tâches récentes",
+ "meeting": "Prépare-moi pour ma prochaine réunion",
+ "sharedNotes": "Mets en avant mes notes partagées"
+ }
},
"referral": {
"title": "Parrainez et gagnez des récompenses",
@@ -3164,6 +3175,7 @@
"undo": "Annuler",
"emptySpace": "Aucune note pour le moment. Les notes ici sont visibles par tous les membres de {{space}}.",
"emptyTeamHint": "Les espaces partagés avec vous apparaîtront ici.",
+ "emptyTeamTitle": "Aucun espace partagé",
"noteCount_one": "{{count}} note",
"noteCount_other": "{{count}} notes",
"accessRevoked": "Vous n'avez plus accès à {{space}}",
@@ -3299,8 +3311,8 @@
"raw": "Brut",
"aiSummary": "Résumé IA",
"saving": "Enregistrement",
- "transcriptEmptyTitle": "Rien d'enregistré pour l'instant",
- "transcriptEmptyDescription": "Lancez l'enregistrement pour commencer la transcription. Tout ce qui est dit s'affiche ici en direct.",
+ "transcriptEmptyTitle": "Pas encore de transcription",
+ "transcriptEmptyDescription": "Lancez un enregistrement et tout ce qui est dit apparaîtra ici.",
"startRecording": "Démarrer l'enregistrement",
"generateSummary": "Générer un résumé IA",
"startWriting": "Commencez à écrire...",
@@ -3633,9 +3645,6 @@
}
},
"invite": "Inviter",
- "list": {
- "empty": "Aucune note ici pour l'instant"
- },
"author": {
"you": "Vous"
}
@@ -3682,19 +3691,14 @@
"examples": {
"linkedinTrigger": "Mon LinkedIn",
"linkedinText": "linkedin.com/in/vous",
- "rewriteTrigger": "Prompt de réécriture",
- "rewriteText": "Réécris ceci de façon plus concise et professionnelle",
- "introTrigger": "Email d'intro",
- "introText": "Bonjour, j'aimerais trouver un moment pour échanger cette semaine…",
"signoffTrigger": "Signature",
"signoffText": "Cordialement, Alex · [email protected]"
},
"addPlaceholder": "Ajoutez une phrase déclencheur — « mon agenda », « mon LinkedIn »"
},
- "emptyTitle": "Votre dictionnaire est vide",
+ "emptyTitle": "Ajoutez des mots à votre dictionnaire",
"emptyDescription": "Ajoutez les mots que {{agentName}} doit toujours reconnaître : noms, outils, acronymes.",
"addFirstWord": "Ajoutez votre premier mot",
- "importList": "Importer une liste",
"agentDefault": "Ajouté par défaut"
},
"support": {
@@ -4599,15 +4603,19 @@
"continue": "Continuer"
},
"embeddedChat": {
- "askPlaceholder": "Posez une question...",
- "send": "Envoyer",
+ "askPlaceholder": "Posez une question sur votre note",
"title": "Chat",
"emptyState": "Posez une question sur cette note",
"dock": "Ancrer dans la barre latérale",
"undock": "Détacher de la barre latérale",
"close": "Fermer le chat",
"newChat": "Nouvelle discussion",
- "conversationSelector": "Changer de conversation"
+ "conversationSelector": "Changer de conversation",
+ "history": "Historique",
+ "quickActions": "Actions rapides",
+ "generateSummary": "Générer un résumé",
+ "makeTodos": "Créer des tâches",
+ "createOutline": "Créer un plan"
},
"transcriptionPreview": {
"label": "Aperçu",
diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json
index fe85c0b43..1845ab07e 100644
--- a/src/locales/it/translation.json
+++ b/src/locales/it/translation.json
@@ -637,12 +637,14 @@
"couldNotDeleteTitle": "Impossibile eliminare",
"couldNotDeleteDescription": "Questa trascrizione potrebbe essere già stata rimossa.",
"couldNotDeleteDescriptionGeneric": "Qualcosa è andato storto. Riprova.",
- "empty": "Nessuna trascrizione",
- "emptyDescription": "Premi la scorciatoia in qualsiasi app e inizia a parlare. Ogni trascrizione viene salvata qui, in privato, sul tuo dispositivo.",
- "sectionTitle": "Trascrizioni",
+ "empty": "Inizia la tua prima dettatura",
+ "emptyDescription": "Il tuo testo dettato apparirà qui.",
+ "shortcutHint": "Premi {{shortcut}} e inizia a parlare.",
"dataRetentionDisabled": "La conservazione dei dati è disattivata. Trascrizioni e audio non vengono salvati nella cronologia.",
- "press": "Premi",
- "toStart": "per iniziare",
+ "welcomeBack": "Bentornato",
+ "welcomeBackNamed": "Bentornato, {{name}}",
+ "welcome": "Benvenuto",
+ "welcomeNamed": "Benvenuto, {{name}}",
"dateGroups": {
"today": "Oggi",
"yesterday": "Ieri"
@@ -2821,6 +2823,7 @@
"undo": "Annulla",
"emptySpace": "Ancora nessuna nota. Le note qui sono visibili a tutti in {{space}}.",
"emptyTeamHint": "Gli spazi condivisi con te appariranno qui.",
+ "emptyTeamTitle": "Nessuno spazio condiviso",
"noteCount_one": "{{count}} nota",
"noteCount_other": "{{count}} note",
"accessRevoked": "Non hai più accesso a {{space}}",
@@ -2956,8 +2959,8 @@
"raw": "Originale",
"aiSummary": "Riepilogo AI",
"saving": "Salvataggio",
- "transcriptEmptyTitle": "Nessuna registrazione",
- "transcriptEmptyDescription": "Premi registra per iniziare a trascrivere. Tutto ciò che viene detto compare qui in tempo reale.",
+ "transcriptEmptyTitle": "Ancora nessuna trascrizione",
+ "transcriptEmptyDescription": "Avvia una registrazione e tutto ciò che viene detto apparirà qui.",
"startRecording": "Avvia registrazione",
"generateSummary": "Genera riepilogo AI",
"startWriting": "Inizia a scrivere...",
@@ -3290,9 +3293,6 @@
}
},
"invite": "Invita",
- "list": {
- "empty": "Ancora nessuna nota qui"
- },
"author": {
"you": "Tu"
}
@@ -3339,19 +3339,14 @@
"examples": {
"linkedinTrigger": "Il mio LinkedIn",
"linkedinText": "linkedin.com/in/tu",
- "rewriteTrigger": "Prompt di riscrittura",
- "rewriteText": "Riscrivi questo testo in modo più conciso e professionale",
- "introTrigger": "Email di presentazione",
- "introText": "Ciao, mi piacerebbe trovare un momento per parlare questa settimana…",
"signoffTrigger": "Firma",
"signoffText": "Saluti, Alex · [email protected]"
},
"addPlaceholder": "Aggiungi una frase trigger: \"mio calendario\", \"il mio LinkedIn\""
},
- "emptyTitle": "Il tuo dizionario è vuoto",
+ "emptyTitle": "Aggiungi parole al tuo dizionario",
"emptyDescription": "Aggiungi le parole che {{agentName}} deve sempre riconoscere: nomi, strumenti, acronimi.",
"addFirstWord": "Aggiungi la tua prima parola",
- "importList": "Importa un elenco",
"agentDefault": "Aggiunto di default"
},
"insights": {
@@ -3510,8 +3505,10 @@
"newChat": "Nuova chat",
"search": "Cerca conversazioni...",
"archived": "Archiviate",
- "noConversations": "Inizia la tua prima conversazione",
- "selectChat": "Seleziona una conversazione o avviane una nuova",
+ "noConversations": "Ancora nessuna chat",
+ "allArchived": "Tutte le chat sono archiviate",
+ "noConversationsDescription": "Le tue chat con l'Assistente appariranno qui.",
+ "loadFailed": "Impossibile caricare le chat",
"noResults": "Nessuna conversazione corrispondente",
"today": "Oggi",
"yesterday": "Ieri",
@@ -3526,7 +3523,12 @@
"searchChats": "Cerca chat",
"searchTitle": "Cerca conversazioni",
"searchDescription": "Cerca in tutte le conversazioni",
- "newChatEmpty": "Chiedi delle tue note, trascrizioni o qualsiasi altra cosa"
+ "inputPlaceholder": "Chiedi qualcosa...",
+ "starters": {
+ "todos": "Elenca le mie attività recenti",
+ "meeting": "Preparami per la prossima riunione",
+ "sharedNotes": "Evidenzia le mie note condivise"
+ }
},
"support": {
"documentation": "Documentazione",
@@ -4336,12 +4338,14 @@
"tomorrow": "Domani"
},
"upcoming": {
- "title": "In arrivo",
"now": "In corso",
"untitledEvent": "Evento senza titolo",
"joinAndTranscribe": "Partecipa e trascrivi",
"takeNotes": "Prendi note",
- "noEventsToday": "Nessun evento oggi",
+ "noEventsToday": "Oggi niente più riunioni",
+ "emptyDayDescription": "È ora di toccare un po' d'erba",
+ "touchGrass": "Tocca l'erba",
+ "touchGrassLabel": "Un prato. Accarezzalo con il puntatore o con i tasti freccia. Premi Esc per tornare indietro.",
"noUpcomingEvents": "Nessun evento in programma",
"moreCalendarsHint": "Vuoi altri calendari?",
"connectHere": "Collegali qui",
@@ -4523,15 +4527,19 @@
}
},
"embeddedChat": {
- "askPlaceholder": "Chiedi qualcosa...",
- "send": "Invia",
+ "askPlaceholder": "Chiedi qualcosa sulla tua nota",
"title": "Chat",
"emptyState": "Fai una domanda su questa nota",
"dock": "Ancora nella barra laterale",
"undock": "Sgancia dalla barra laterale",
"close": "Chiudi chat",
"newChat": "Nuova chat",
- "conversationSelector": "Cambia conversazione"
+ "conversationSelector": "Cambia conversazione",
+ "history": "Cronologia",
+ "quickActions": "Azioni rapide",
+ "generateSummary": "Genera riepilogo",
+ "makeTodos": "Crea attività",
+ "createOutline": "Crea scaletta"
},
"transcriptionPreview": {
"label": "Anteprima",
diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.json
index 681525c74..2d7b1fab2 100644
--- a/src/locales/ja/translation.json
+++ b/src/locales/ja/translation.json
@@ -637,12 +637,14 @@
"couldNotDeleteTitle": "削除できませんでした",
"couldNotDeleteDescription": "この文字起こしは既に削除されている可能性があります。",
"couldNotDeleteDescriptionGeneric": "問題が発生しました。もう一度お試しください。",
- "empty": "文字起こし履歴はまだありません",
- "emptyDescription": "どのアプリでもホットキーを押して話し始めてください。すべての文字起こしは、このデバイス上にプライベートに保存されます。",
- "sectionTitle": "文字起こし",
+ "empty": "最初のディクテーションを始めましょう",
+ "emptyDescription": "ディクテーションしたテキストがここに表示されます。",
+ "shortcutHint": "{{shortcut}} を押して話し始めてください。",
"dataRetentionDisabled": "データ保持が無効です。文字起こしと音声は履歴に保存されません。",
- "press": "押してください",
- "toStart": "開始するには",
+ "welcomeBack": "おかえりなさい",
+ "welcomeBackNamed": "おかえりなさい、{{name}}さん",
+ "welcome": "ようこそ",
+ "welcomeNamed": "ようこそ、{{name}}さん",
"dateGroups": {
"today": "今日",
"yesterday": "昨日"
@@ -2749,6 +2751,7 @@
"undo": "元に戻す",
"emptySpace": "まだノートがありません。ここのノートは{{space}}の全員に表示されます。",
"emptyTeamHint": "共有されたスペースはここに表示されます。",
+ "emptyTeamTitle": "共有スペースはありません",
"noteCount_one": "{{count}} 件のノート",
"noteCount_other": "{{count}} 件のノート",
"accessRevoked": "{{space}} へのアクセス権がなくなりました",
@@ -2858,8 +2861,8 @@
"raw": "元のテキスト",
"aiSummary": "AI要約",
"saving": "保存中",
- "transcriptEmptyTitle": "まだ録音がありません",
- "transcriptEmptyDescription": "録音ボタンを押すと文字起こしが始まります。話した内容がここにリアルタイムで表示されます。",
+ "transcriptEmptyTitle": "文字起こしはまだありません",
+ "transcriptEmptyDescription": "録音を始めると、話した内容がここに表示されます。",
"startRecording": "録音を開始",
"generateSummary": "AI要約を生成",
"startWriting": "書き始める...",
@@ -3218,9 +3221,6 @@
}
},
"invite": "招待",
- "list": {
- "empty": "まだノートがありません"
- },
"author": {
"you": "自分"
}
@@ -3267,19 +3267,14 @@
"examples": {
"linkedinTrigger": "私のLinkedIn",
"linkedinText": "linkedin.com/in/you",
- "rewriteTrigger": "書き直しプロンプト",
- "rewriteText": "これをより簡潔でプロフェッショナルに書き直して",
- "introTrigger": "挨拶メール",
- "introText": "こんにちは、今週どこかでお話しできれば嬉しいです…",
"signoffTrigger": "署名",
"signoffText": "よろしくお願いします。Alex · [email protected]"
},
"addPlaceholder": "トリガーフレーズを追加 — 「カレンダーリンク」「署名」など"
},
- "emptyTitle": "辞書は空です",
+ "emptyTitle": "辞書に単語を追加しましょう",
"emptyDescription": "{{agentName}}に正しく認識してほしい言葉を追加しましょう。名前、ツール、略語など。",
"addFirstWord": "最初の単語を追加",
- "importList": "リストをインポート",
"agentDefault": "デフォルトで追加済み"
},
"referral": {
@@ -3510,8 +3505,10 @@
"newChat": "新しいチャット",
"search": "会話を検索...",
"archived": "アーカイブ済み",
- "noConversations": "最初の会話を始めましょう",
- "selectChat": "会話を選択するか、新しく始めてください",
+ "noConversations": "チャットはまだありません",
+ "allArchived": "すべてのチャットはアーカイブ済みです",
+ "noConversationsDescription": "アシスタントとのチャットはここに表示されます。",
+ "loadFailed": "チャットを読み込めませんでした",
"noResults": "該当する会話がありません",
"today": "今日",
"yesterday": "昨日",
@@ -3526,7 +3523,12 @@
"searchChats": "チャットを検索",
"searchTitle": "会話を検索",
"searchDescription": "すべての会話を検索",
- "newChatEmpty": "ノートや文字起こし、その他なんでも聞いてください"
+ "inputPlaceholder": "何でも聞いてください...",
+ "starters": {
+ "todos": "最近のTo Doを一覧にして",
+ "meeting": "次の会議に備えさせて",
+ "sharedNotes": "共有ノートのハイライトを見せて"
+ }
},
"support": {
"documentation": "ドキュメント",
@@ -4336,12 +4338,14 @@
"tomorrow": "明日"
},
"upcoming": {
- "title": "今後の予定",
"now": "進行中",
"untitledEvent": "無題のイベント",
"joinAndTranscribe": "参加して文字起こし",
"takeNotes": "メモを取る",
- "noEventsToday": "今日の予定はありません",
+ "noEventsToday": "今日の会議はもうありません",
+ "emptyDayDescription": "そろそろ芝生に触れる時間です",
+ "touchGrass": "芝生に触れる",
+ "touchGrassLabel": "芝生です。ポインターか矢印キーでなでてみてください。Esc キーで戻ります。",
"noUpcomingEvents": "今後の予定はありません",
"moreCalendarsHint": "他のカレンダーも連携しますか?",
"connectHere": "ここから連携",
@@ -4523,15 +4527,19 @@
}
},
"embeddedChat": {
- "askPlaceholder": "何でも聞いてください...",
- "send": "送信",
+ "askPlaceholder": "ノートについて何でも質問",
"title": "チャット",
"emptyState": "このノートについて質問してください",
"dock": "サイドバーに固定",
"undock": "サイドバーから外す",
"close": "チャットを閉じる",
"newChat": "新しいチャット",
- "conversationSelector": "会話を切り替え"
+ "conversationSelector": "会話を切り替え",
+ "history": "履歴",
+ "quickActions": "クイックアクション",
+ "generateSummary": "要約を作成",
+ "makeTodos": "ToDoを作成",
+ "createOutline": "アウトラインを作成"
},
"transcriptionPreview": {
"label": "プレビュー",
diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json
index b2d79fe57..3d552e26b 100644
--- a/src/locales/pt/translation.json
+++ b/src/locales/pt/translation.json
@@ -616,12 +616,14 @@
"couldNotDeleteTitle": "Não foi possível excluir",
"couldNotDeleteDescription": "Esta transcrição pode já ter sido removida.",
"couldNotDeleteDescriptionGeneric": "Algo deu errado. Tente novamente.",
- "empty": "Ainda sem transcrições",
- "emptyDescription": "Pressione o seu atalho em qualquer app e comece a falar. Cada transcrição é salva aqui, de forma privada, no seu dispositivo.",
- "sectionTitle": "Transcrições",
+ "empty": "Comece seu primeiro ditado",
+ "emptyDescription": "Seu texto ditado aparecerá aqui.",
+ "shortcutHint": "Pressione {{shortcut}} e comece a falar.",
"dataRetentionDisabled": "A retenção de dados está desativada. Transcrições e áudio não são salvos no histórico.",
- "press": "Pressione",
- "toStart": "para iniciar",
+ "welcomeBack": "Que bom ter você de volta",
+ "welcomeBackNamed": "Que bom ter você de volta, {{name}}",
+ "welcome": "Boas-vindas",
+ "welcomeNamed": "Boas-vindas, {{name}}",
"dateGroups": {
"today": "Hoje",
"yesterday": "Ontem"
@@ -2821,6 +2823,7 @@
"undo": "Desfazer",
"emptySpace": "Nenhuma nota ainda. As notas aqui são visíveis para todos em {{space}}.",
"emptyTeamHint": "Os espaços compartilhados com você aparecerão aqui.",
+ "emptyTeamTitle": "Nenhum espaço compartilhado",
"noteCount_one": "{{count}} nota",
"noteCount_other": "{{count}} notas",
"accessRevoked": "Você não tem mais acesso a {{space}}",
@@ -2956,8 +2959,8 @@
"raw": "Original",
"aiSummary": "Resumo com IA",
"saving": "Salvando",
- "transcriptEmptyTitle": "Nada gravado ainda",
- "transcriptEmptyDescription": "Toque em gravar para começar a transcrever. Tudo o que for dito aparece aqui em tempo real.",
+ "transcriptEmptyTitle": "Nenhuma transcrição ainda",
+ "transcriptEmptyDescription": "Inicie uma gravação e tudo o que for dito aparecerá aqui.",
"startRecording": "Começar a gravar",
"generateSummary": "Gerar resumo com IA",
"startWriting": "Comece a escrever...",
@@ -3290,9 +3293,6 @@
}
},
"invite": "Convidar",
- "list": {
- "empty": "Ainda não há notas aqui"
- },
"author": {
"you": "Você"
}
@@ -3339,19 +3339,14 @@
"examples": {
"linkedinTrigger": "Meu LinkedIn",
"linkedinText": "linkedin.com/in/voce",
- "rewriteTrigger": "Prompt de reescrita",
- "rewriteText": "Reescreva isto para ficar mais conciso e profissional",
- "introTrigger": "Email de apresentação",
- "introText": "Olá, adoraria encontrar um horário para conversar esta semana…",
"signoffTrigger": "Assinatura",
"signoffText": "Abraços, Alex · [email protected]"
},
"addPlaceholder": "Adicione uma frase-gatilho — \"minha agenda\", \"meu LinkedIn\""
},
- "emptyTitle": "Seu dicionário está vazio",
+ "emptyTitle": "Adicione palavras ao seu dicionário",
"emptyDescription": "Adicione palavras que {{agentName}} deve sempre acertar: nomes, ferramentas, siglas.",
"addFirstWord": "Adicione sua primeira palavra",
- "importList": "Importar uma lista",
"agentDefault": "Adicionado por padrão"
},
"insights": {
@@ -3510,8 +3505,10 @@
"newChat": "Novo chat",
"search": "Pesquisar conversas...",
"archived": "Arquivadas",
- "noConversations": "Inicie sua primeira conversa",
- "selectChat": "Selecione uma conversa ou inicie uma nova",
+ "noConversations": "Nenhuma conversa ainda",
+ "allArchived": "Todas as conversas estão arquivadas",
+ "noConversationsDescription": "Suas conversas com o Assistente aparecerão aqui.",
+ "loadFailed": "Não foi possível carregar as conversas",
"noResults": "Nenhuma conversa encontrada",
"today": "Hoje",
"yesterday": "Ontem",
@@ -3526,7 +3523,12 @@
"searchChats": "Pesquisar chats",
"searchTitle": "Pesquisar conversas",
"searchDescription": "Pesquisar em todas as conversas",
- "newChatEmpty": "Pergunte sobre suas notas, transcrições ou qualquer coisa"
+ "inputPlaceholder": "Pergunte algo...",
+ "starters": {
+ "todos": "Liste minhas tarefas recentes",
+ "meeting": "Prepare-me para minha próxima reunião",
+ "sharedNotes": "Destaque minhas notas compartilhadas"
+ }
},
"support": {
"documentation": "Documentação",
@@ -4336,12 +4338,14 @@
"tomorrow": "Amanhã"
},
"upcoming": {
- "title": "Em breve",
"now": "Agora",
"untitledEvent": "Evento sem título",
"joinAndTranscribe": "Entrar e transcrever",
"takeNotes": "Fazer anotações",
- "noEventsToday": "Nenhum evento hoje",
+ "noEventsToday": "Sem mais reuniões hoje",
+ "emptyDayDescription": "Hora de tocar um pouco de grama",
+ "touchGrass": "Tocar grama",
+ "touchGrassLabel": "Um pedaço de grama. Passe o ponteiro ou use as setas do teclado. Pressione Esc para voltar.",
"noUpcomingEvents": "Nenhum evento próximo",
"moreCalendarsHint": "Quer calendários adicionais?",
"connectHere": "Conecte-os aqui",
@@ -4523,15 +4527,19 @@
}
},
"embeddedChat": {
- "askPlaceholder": "Pergunte algo...",
- "send": "Enviar",
+ "askPlaceholder": "Pergunte sobre sua nota",
"title": "Chat",
"emptyState": "Faça uma pergunta sobre esta nota",
"dock": "Fixar na barra lateral",
"undock": "Desafixar da barra lateral",
"close": "Fechar chat",
"newChat": "Novo chat",
- "conversationSelector": "Trocar conversa"
+ "conversationSelector": "Trocar conversa",
+ "history": "Histórico",
+ "quickActions": "Ações rápidas",
+ "generateSummary": "Gerar resumo",
+ "makeTodos": "Criar tarefas",
+ "createOutline": "Criar esboço"
},
"transcriptionPreview": {
"label": "Pré-visualização",
diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json
index ce9e7467f..105376862 100644
--- a/src/locales/ru/translation.json
+++ b/src/locales/ru/translation.json
@@ -637,12 +637,14 @@
"couldNotDeleteTitle": "Не удалось удалить",
"couldNotDeleteDescription": "Эта транскрипция, возможно, уже была удалена.",
"couldNotDeleteDescriptionGeneric": "Что-то пошло не так. Попробуйте снова.",
- "empty": "Транскрипций пока нет",
- "emptyDescription": "Нажмите горячую клавишу в любом приложении и начните говорить. Каждая транскрипция сохраняется здесь, приватно, на вашем устройстве.",
- "sectionTitle": "Транскрипции",
+ "empty": "Начните первую диктовку",
+ "emptyDescription": "Здесь появится ваш надиктованный текст.",
+ "shortcutHint": "Нажмите {{shortcut}} и начните говорить.",
"dataRetentionDisabled": "Хранение данных отключено. Транскрипции и аудио не сохраняются в истории.",
- "press": "Нажмите",
- "toStart": "чтобы начать",
+ "welcomeBack": "С возвращением",
+ "welcomeBackNamed": "С возвращением, {{name}}",
+ "welcome": "Добро пожаловать",
+ "welcomeNamed": "Добро пожаловать, {{name}}",
"dateGroups": {
"today": "Сегодня",
"yesterday": "Вчера"
@@ -2837,6 +2839,7 @@
"undo": "Отменить",
"emptySpace": "Пока нет заметок. Заметки здесь видны всем в {{space}}.",
"emptyTeamHint": "Пространства, которыми с вами поделились, появятся здесь.",
+ "emptyTeamTitle": "Нет общих пространств",
"noteCount_one": "{{count}} заметка",
"noteCount_few": "{{count}} заметки",
"noteCount_many": "{{count}} заметок",
@@ -2976,8 +2979,8 @@
"raw": "Исходный",
"aiSummary": "ИИ-сводка",
"saving": "Сохранение",
- "transcriptEmptyTitle": "Пока ничего не записано",
- "transcriptEmptyDescription": "Нажмите «Запись», чтобы начать транскрипцию. Всё сказанное появится здесь в реальном времени.",
+ "transcriptEmptyTitle": "Транскрипции пока нет",
+ "transcriptEmptyDescription": "Начните запись, и всё сказанное появится здесь.",
"startRecording": "Начать запись",
"generateSummary": "Создать ИИ-сводку",
"startWriting": "Начните писать...",
@@ -3314,9 +3317,6 @@
}
},
"invite": "Пригласить",
- "list": {
- "empty": "Здесь пока нет заметок"
- },
"author": {
"you": "Вы"
}
@@ -3365,19 +3365,14 @@
"examples": {
"linkedinTrigger": "Мой LinkedIn",
"linkedinText": "linkedin.com/in/you",
- "rewriteTrigger": "Промпт для переписывания",
- "rewriteText": "Перепиши это более кратко и профессионально",
- "introTrigger": "Вступительное письмо",
- "introText": "Привет, буду рад найти время пообщаться на этой неделе…",
"signoffTrigger": "Подпись",
"signoffText": "С уважением, Алекс · [email protected]"
},
"addPlaceholder": "Добавьте фразу-триггер — «мой календарь», «мой LinkedIn»"
},
- "emptyTitle": "Ваш словарь пуст",
+ "emptyTitle": "Добавьте слова в словарь",
"emptyDescription": "Добавьте слова, которые {{agentName}} всегда должен распознавать: имена, инструменты, аббревиатуры.",
"addFirstWord": "Добавьте первое слово",
- "importList": "Импортировать список",
"agentDefault": "Добавлено по умолчанию"
},
"insights": {
@@ -3554,8 +3549,10 @@
"newChat": "Новый чат",
"search": "Поиск бесед...",
"archived": "Архив",
- "noConversations": "Начните свою первую беседу",
- "selectChat": "Выберите беседу или начните новую",
+ "noConversations": "Чатов пока нет",
+ "allArchived": "Все чаты в архиве",
+ "noConversationsDescription": "Здесь появятся ваши чаты с ассистентом.",
+ "loadFailed": "Не удалось загрузить чаты",
"noResults": "Совпадений не найдено",
"today": "Сегодня",
"yesterday": "Вчера",
@@ -3570,7 +3567,12 @@
"searchChats": "Поиск чатов",
"searchTitle": "Поиск бесед",
"searchDescription": "Поиск по всем беседам",
- "newChatEmpty": "Спросите о заметках, транскрипциях или о чём угодно"
+ "inputPlaceholder": "Спросите что-нибудь...",
+ "starters": {
+ "todos": "Перечисли мои последние задачи",
+ "meeting": "Подготовь меня к следующей встрече",
+ "sharedNotes": "Выдели мои общие заметки"
+ }
},
"support": {
"documentation": "Документация",
@@ -4380,12 +4382,14 @@
"tomorrow": "Завтра"
},
"upcoming": {
- "title": "Скоро",
"now": "Сейчас",
"untitledEvent": "Без названия",
"joinAndTranscribe": "Присоединиться и вести заметки",
"takeNotes": "Вести заметки",
- "noEventsToday": "Сегодня событий нет",
+ "noEventsToday": "На сегодня встреч больше нет",
+ "emptyDayDescription": "Самое время потрогать траву",
+ "touchGrass": "Потрогать траву",
+ "touchGrassLabel": "Лужайка. Проведите по ней указателем или клавишами со стрелками. Нажмите Escape, чтобы вернуться.",
"noUpcomingEvents": "Нет предстоящих событий",
"moreCalendarsHint": "Нужны другие календари?",
"connectHere": "Подключите их здесь",
@@ -4567,15 +4571,19 @@
}
},
"embeddedChat": {
- "askPlaceholder": "Спросите что-нибудь...",
- "send": "Отправить",
+ "askPlaceholder": "Спросите о своей заметке",
"title": "Чат",
"emptyState": "Задайте вопрос об этой заметке",
"dock": "Закрепить на боковой панели",
"undock": "Открепить от боковой панели",
"close": "Закрыть чат",
"newChat": "Новый чат",
- "conversationSelector": "Сменить беседу"
+ "conversationSelector": "Сменить беседу",
+ "history": "История",
+ "quickActions": "Быстрые действия",
+ "generateSummary": "Создать сводку",
+ "makeTodos": "Составить список дел",
+ "createOutline": "Создать план"
},
"transcriptionPreview": {
"label": "Предпросмотр",
diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json
index 3424e3f78..77e4feebf 100644
--- a/src/locales/zh-CN/translation.json
+++ b/src/locales/zh-CN/translation.json
@@ -637,12 +637,14 @@
"couldNotDeleteTitle": "无法删除",
"couldNotDeleteDescription": "此转录记录可能已被删除。",
"couldNotDeleteDescriptionGeneric": "出了点问题,请重试。",
- "empty": "暂无转录记录",
- "emptyDescription": "在任意应用中按下快捷键开始说话。每条转写都会私密地保存在你的设备上。",
- "sectionTitle": "转写记录",
+ "empty": "开始你的第一次听写",
+ "emptyDescription": "你听写的文字会显示在这里。",
+ "shortcutHint": "按 {{shortcut}} 开始说话。",
"dataRetentionDisabled": "数据保留已关闭。转录和音频不会保存到历史记录。",
- "press": "按下",
- "toStart": "开始",
+ "welcomeBack": "欢迎回来",
+ "welcomeBackNamed": "欢迎回来,{{name}}",
+ "welcome": "欢迎",
+ "welcomeNamed": "欢迎,{{name}}",
"dateGroups": {
"today": "今天",
"yesterday": "昨天"
@@ -2821,6 +2823,7 @@
"undo": "撤销",
"emptySpace": "还没有笔记。这里的笔记对 {{space}} 中的所有人可见。",
"emptyTeamHint": "与你共享的空间将显示在这里。",
+ "emptyTeamTitle": "暂无共享空间",
"noteCount_one": "{{count}} 条笔记",
"noteCount_other": "{{count}} 条笔记",
"accessRevoked": "你已无法访问 {{space}}",
@@ -2956,8 +2959,8 @@
"raw": "原始内容",
"aiSummary": "AI 摘要",
"saving": "保存中",
- "transcriptEmptyTitle": "尚未录制任何内容",
- "transcriptEmptyDescription": "点击录制开始转写。所说的内容会实时显示在这里。",
+ "transcriptEmptyTitle": "暂无转录",
+ "transcriptEmptyDescription": "开始录音后,所说的一切都会显示在这里。",
"startRecording": "开始录制",
"generateSummary": "生成 AI 摘要",
"startWriting": "开始书写...",
@@ -3290,9 +3293,6 @@
}
},
"invite": "邀请",
- "list": {
- "empty": "这里还没有笔记"
- },
"author": {
"you": "你"
}
@@ -3339,19 +3339,14 @@
"examples": {
"linkedinTrigger": "我的 LinkedIn",
"linkedinText": "linkedin.com/in/you",
- "rewriteTrigger": "改写提示词",
- "rewriteText": "把这段话改写得更简洁、更专业",
- "introTrigger": "开场邮件",
- "introText": "你好,希望本周能找个时间聊聊…",
"signoffTrigger": "签名",
"signoffText": "祝好,Alex · [email protected]"
},
"addPlaceholder": "添加触发词——“我的日程链接”“签名”"
},
- "emptyTitle": "你的词典是空的",
+ "emptyTitle": "向词典添加词语",
"emptyDescription": "添加希望{{agentName}}始终识别正确的词:名字、工具、缩写。",
"addFirstWord": "添加第一个词",
- "importList": "导入列表",
"agentDefault": "默认添加"
},
"insights": {
@@ -3510,8 +3505,10 @@
"newChat": "新对话",
"search": "搜索对话...",
"archived": "已归档",
- "noConversations": "开始你的第一个对话",
- "selectChat": "选择一个对话或开始新的对话",
+ "noConversations": "暂无聊天",
+ "allArchived": "所有聊天均已归档",
+ "noConversationsDescription": "与助手的聊天会显示在这里。",
+ "loadFailed": "无法加载聊天记录",
"noResults": "没有匹配的对话",
"today": "今天",
"yesterday": "昨天",
@@ -3526,7 +3523,12 @@
"searchChats": "搜索聊天",
"searchTitle": "搜索对话",
"searchDescription": "搜索所有对话",
- "newChatEmpty": "询问关于笔记、转录或其他任何内容"
+ "inputPlaceholder": "随便问点什么...",
+ "starters": {
+ "todos": "列出我最近的待办事项",
+ "meeting": "帮我准备下一场会议",
+ "sharedNotes": "突出显示我的共享笔记"
+ }
},
"support": {
"documentation": "文档",
@@ -4336,12 +4338,14 @@
"tomorrow": "明天"
},
"upcoming": {
- "title": "即将开始",
"now": "进行中",
"untitledEvent": "无标题事件",
"joinAndTranscribe": "加入并转录",
"takeNotes": "记笔记",
- "noEventsToday": "今天没有日程",
+ "noEventsToday": "今天没有会议了",
+ "emptyDayDescription": "是时候去摸摸草地了",
+ "touchGrass": "摸摸草地",
+ "touchGrassLabel": "一片草地。用指针或方向键拂过它。按 Esc 返回。",
"noUpcomingEvents": "暂无即将开始的日程",
"moreCalendarsHint": "想连接更多日历?",
"connectHere": "在这里连接",
@@ -4523,15 +4527,19 @@
}
},
"embeddedChat": {
- "askPlaceholder": "随便问点什么...",
- "send": "发送",
+ "askPlaceholder": "询问关于笔记的任何问题",
"title": "聊天",
"emptyState": "就这条笔记提个问题",
"dock": "固定到侧边栏",
"undock": "从侧边栏取消固定",
"close": "关闭聊天",
"newChat": "新对话",
- "conversationSelector": "切换对话"
+ "conversationSelector": "切换对话",
+ "history": "历史记录",
+ "quickActions": "快捷操作",
+ "generateSummary": "生成摘要",
+ "makeTodos": "创建待办事项",
+ "createOutline": "创建大纲"
},
"transcriptionPreview": {
"label": "预览",
diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json
index fa92687e3..4bf53a3bd 100644
--- a/src/locales/zh-TW/translation.json
+++ b/src/locales/zh-TW/translation.json
@@ -637,12 +637,14 @@
"couldNotDeleteTitle": "無法刪除",
"couldNotDeleteDescription": "這筆轉錄記錄可能已被移除。",
"couldNotDeleteDescriptionGeneric": "發生錯誤,請再試一次。",
- "empty": "目前沒有轉錄記錄",
- "emptyDescription": "在任何應用程式中按下快捷鍵開始說話。每則轉錄都會私密地儲存在你的裝置上。",
- "sectionTitle": "轉錄記錄",
+ "empty": "開始你的第一次聽寫",
+ "emptyDescription": "你聽寫的文字會顯示在這裡。",
+ "shortcutHint": "按 {{shortcut}} 開始說話。",
"dataRetentionDisabled": "資料保留已關閉。轉錄和音訊不會儲存至歷史記錄。",
- "press": "按下",
- "toStart": "開始",
+ "welcomeBack": "歡迎回來",
+ "welcomeBackNamed": "歡迎回來,{{name}}",
+ "welcome": "歡迎",
+ "welcomeNamed": "歡迎,{{name}}",
"dateGroups": {
"today": "今天",
"yesterday": "昨天"
@@ -2821,6 +2823,7 @@
"undo": "復原",
"emptySpace": "還沒有筆記。這裡的筆記對 {{space}} 中的所有人可見。",
"emptyTeamHint": "與你共享的空間將顯示在這裡。",
+ "emptyTeamTitle": "尚無共享空間",
"noteCount_one": "{{count}} 則筆記",
"noteCount_other": "{{count}} 則筆記",
"accessRevoked": "你已無法存取 {{space}}",
@@ -2956,8 +2959,8 @@
"raw": "原始",
"aiSummary": "AI 摘要",
"saving": "儲存中",
- "transcriptEmptyTitle": "尚未錄製任何內容",
- "transcriptEmptyDescription": "點擊錄製開始轉錄。所說的內容會即時顯示在這裡。",
+ "transcriptEmptyTitle": "尚無轉錄",
+ "transcriptEmptyDescription": "開始錄音後,所說的一切都會顯示在這裡。",
"startRecording": "開始錄製",
"generateSummary": "產生 AI 摘要",
"startWriting": "開始撰寫...",
@@ -3290,9 +3293,6 @@
}
},
"invite": "邀請",
- "list": {
- "empty": "這裡還沒有筆記"
- },
"author": {
"you": "你"
}
@@ -3339,19 +3339,14 @@
"examples": {
"linkedinTrigger": "我的 LinkedIn",
"linkedinText": "linkedin.com/in/you",
- "rewriteTrigger": "改寫提示詞",
- "rewriteText": "把這段話改寫得更簡潔、更專業",
- "introTrigger": "開場郵件",
- "introText": "你好,希望本週能找個時間聊聊…",
"signoffTrigger": "簽名",
"signoffText": "祝好,Alex · [email protected]"
},
"addPlaceholder": "新增觸發詞——「我的行事曆連結」「簽名」"
},
- "emptyTitle": "你的字典是空的",
+ "emptyTitle": "將詞語加入字典",
"emptyDescription": "新增希望{{agentName}}始終辨識正確的詞:名字、工具、縮寫。",
"addFirstWord": "新增第一個詞",
- "importList": "匯入清單",
"agentDefault": "預設加入"
},
"insights": {
@@ -3510,8 +3505,10 @@
"newChat": "新對話",
"search": "搜尋對話...",
"archived": "已封存",
- "noConversations": "開始你的第一個對話",
- "selectChat": "選擇一個對話或開始新的對話",
+ "noConversations": "尚無聊天",
+ "allArchived": "所有聊天皆已封存",
+ "noConversationsDescription": "與助理的聊天會顯示在這裡。",
+ "loadFailed": "無法載入聊天紀錄",
"noResults": "沒有符合的對話",
"today": "今天",
"yesterday": "昨天",
@@ -3526,7 +3523,12 @@
"searchChats": "搜尋聊天",
"searchTitle": "搜尋對話",
"searchDescription": "搜尋所有對話",
- "newChatEmpty": "詢問關於筆記、轉錄或其他任何內容"
+ "inputPlaceholder": "隨便問點什麼...",
+ "starters": {
+ "todos": "列出我最近的待辦事項",
+ "meeting": "幫我準備下一場會議",
+ "sharedNotes": "突顯我的共享筆記"
+ }
},
"support": {
"documentation": "文件",
@@ -4336,12 +4338,14 @@
"tomorrow": "明天"
},
"upcoming": {
- "title": "即將開始",
"now": "進行中",
"untitledEvent": "無標題事件",
"joinAndTranscribe": "加入並轉錄",
"takeNotes": "記筆記",
- "noEventsToday": "今天沒有行程",
+ "noEventsToday": "今天沒有會議了",
+ "emptyDayDescription": "是時候去摸摸草地了",
+ "touchGrass": "摸摸草地",
+ "touchGrassLabel": "一片草地。用指標或方向鍵拂過它。按 Esc 返回。",
"noUpcomingEvents": "暫無即將開始的行程",
"moreCalendarsHint": "想連接更多日曆?",
"connectHere": "在這裡連接",
@@ -4523,15 +4527,19 @@
}
},
"embeddedChat": {
- "askPlaceholder": "隨便問點什麼...",
- "send": "傳送",
+ "askPlaceholder": "詢問關於筆記的任何問題",
"title": "聊天",
"emptyState": "就這條筆記提個問題",
"dock": "固定到側邊欄",
"undock": "從側邊欄取消固定",
"close": "關閉聊天",
"newChat": "新對話",
- "conversationSelector": "切換對話"
+ "conversationSelector": "切換對話",
+ "history": "歷史記錄",
+ "quickActions": "快速操作",
+ "generateSummary": "產生摘要",
+ "makeTodos": "建立待辦事項",
+ "createOutline": "建立大綱"
},
"transcriptionPreview": {
"label": "預覽",
diff --git a/src/styles/touch-grass.css b/src/styles/touch-grass.css
new file mode 100644
index 000000000..f32e71ee4
--- /dev/null
+++ b/src/styles/touch-grass.css
@@ -0,0 +1,183 @@
+/* "Touch grass" scene on the empty day card (TouchGrass.tsx). CSS only: a flat, dark
+ olive field from the bottom of the scene to the horizon, which grows in over bare
+ soil, covered by rows of curved blades in perspective. Every animation runs on
+ transform properties, so the compositor carries the breeze; JS only re-leans the
+ tufts near the hand. */
+
+.touch-grass {
+ /* Grass grain: fractal noise stretched vertically so it reads as blades. Rendered once
+ from these inline SVGs, then only composited. */
+ --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='90'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.12' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.1 0 0 0 0 0.02 0 0 0 1.2 -0.4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
+ --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='90'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.12' numOctaves='3' seed='13' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.78 0 0 0 0 0.84 0 0 0 0 0.52 0.9 0 0 0 -0.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
+
+ position: relative;
+ overflow: hidden;
+ min-height: 12rem;
+ cursor: grab;
+ touch-action: none;
+ user-select: none;
+}
+
+.touch-grass:active {
+ cursor: grabbing;
+}
+
+/* The field starts as bare soil; the turf fades in over it. */
+.touch-grass__ground {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ pointer-events: none;
+ background: linear-gradient(#3e3325, #2a2219);
+}
+
+/* Dark olive turf under the blades: hazier and lighter at the horizon, darkest in the
+ shadowed gaps at the front, with a fine grain and a few pale glints. */
+.touch-grass__ground::after {
+ content: "";
+ position: absolute;
+ inset: 0;
+ background:
+ linear-gradient(to bottom, rgb(206 214 160 / 0.22), transparent 10%),
+ var(--grain-light) 0 0 / 120px 40px,
+ var(--grain-dark) 0 0 / 150px 60px,
+ linear-gradient(to bottom, #56682a, #3a4a17 28%, #212b0b);
+ animation: touch-grass-cover 2.4s ease-out 0.1s backwards;
+}
+
+/* A patch is a row segment of the lawn, anchored on its row's baseline. Patches (and
+ the gust sheen) are the only animated layers here: a patch grows from the ground and
+ bends in the breeze with skewX, which moves the tips while the roots stay put. */
+.touch-grass__patch {
+ position: absolute;
+ transform-origin: 50% 100%;
+ pointer-events: none;
+ animation:
+ touch-grass-grow var(--grow-dur) cubic-bezier(0.2, 0.7, 0.3, 1) var(--grow-delay) backwards,
+ touch-grass-sway var(--sway-dur) ease-in-out var(--sway-delay) infinite;
+}
+
+/* The light a gust throws across the lawn as it bends the blades, sweeping left to
+ right. One layer moved by transform, so it costs the compositor next to nothing. */
+.touch-grass__gust {
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ width: 60%;
+ pointer-events: none;
+ background: linear-gradient(
+ 115deg,
+ transparent 10%,
+ rgb(214 224 160 / 0.05) 38%,
+ rgb(214 224 160 / 0.08) 50%,
+ rgb(214 224 160 / 0.05) 62%,
+ transparent 90%
+ );
+ transform: translateX(-100%);
+ animation: touch-grass-gust 7s ease-in-out 3s infinite;
+}
+
+/* A tuft is several curved blades cut from one element by a clip-path, sized, placed
+ and bent by plain inline values. Tufts are paint inside their patch (no animation of
+ their own, so no layer or render pass each); only their rotate changes, while the
+ hand parts them. */
+.touch-grass__tuft {
+ position: absolute;
+ transform-origin: 50% 100%;
+}
+
+/* Six olives, darker to lighter, from shadowed roots to pale tips. Written out in
+ full: no var() in a tuft's rules, so restyling one while it parts never re-parses its
+ colours. */
+.touch-grass__tuft--0 {
+ background:
+ linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),
+ linear-gradient(to top, #26320d, #4d6119 45%, #758b2c);
+}
+
+.touch-grass__tuft--1 {
+ background:
+ linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),
+ linear-gradient(to top, #2b3810, #56691d 45%, #7f9432);
+}
+
+.touch-grass__tuft--2 {
+ background:
+ linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),
+ linear-gradient(to top, #303e12, #5e7322 45%, #8a9d3a);
+}
+
+.touch-grass__tuft--3 {
+ background:
+ linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),
+ linear-gradient(to top, #34430f, #677c25 45%, #96a843);
+}
+
+.touch-grass__tuft--4 {
+ background:
+ linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),
+ linear-gradient(to top, #394714, #70852b 45%, #a1b24c);
+}
+
+.touch-grass__tuft--5 {
+ background:
+ linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),
+ linear-gradient(to top, #3f4d18, #7a8e33 45%, #adbc5a);
+}
+
+@keyframes touch-grass-cover {
+ from {
+ opacity: 0;
+ }
+}
+
+@keyframes touch-grass-grow {
+ from {
+ scale: 1 0;
+ }
+}
+
+/* A gust: the tips lean with the wind, ease, then spring back past upright. */
+@keyframes touch-grass-sway {
+ 0%,
+ 100% {
+ transform: skewX(0deg);
+ }
+ 35% {
+ transform: skewX(var(--amp));
+ }
+ 55% {
+ transform: skewX(calc(var(--amp) * 0.55));
+ }
+ 78% {
+ transform: skewX(calc(var(--amp) * -0.22));
+ }
+}
+
+@keyframes touch-grass-gust {
+ from {
+ transform: translateX(-100%);
+ }
+ to {
+ transform: translateX(170%);
+ }
+}
+
+/* The lawn holds still while the window is in the background (TouchGrass.tsx). */
+.touch-grass--resting .touch-grass__ground::after,
+.touch-grass--resting .touch-grass__patch,
+.touch-grass--resting .touch-grass__gust {
+ animation-play-state: paused;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .touch-grass__ground::after,
+ .touch-grass__patch {
+ animation: none;
+ }
+
+ .touch-grass__gust {
+ display: none;
+ }
+}
diff --git a/src/utils/grassRustle.ts b/src/utils/grassRustle.ts
new file mode 100644
index 000000000..abe3c7e8f
--- /dev/null
+++ b/src/utils/grassRustle.ts
@@ -0,0 +1,154 @@
+// Quiet, dry rustling for the "touch grass" scene, synthesized as grains: each grain is
+// a few milliseconds of band-passed noise with its own pitch, loudness and decay, like
+// one blade brushing past another. Grains fire at random (Poisson) intervals whose rate
+// follows brushing speed, over a faint swish, so a fast brush crackles densely and a
+// slow one ticks sparsely. A steady filtered noise, by contrast, sounds like hiss.
+
+// Grains per second at the lightest and the fastest brush.
+const MIN_GRAIN_RATE = 14;
+const MAX_GRAIN_RATE = 110;
+const GRAIN_GAIN = 0.16;
+const SWISH_GAIN = 0.018;
+// Pointer speed (px/ms) that counts as a full-intensity brush.
+const FULL_SPEED = 1.5;
+// Rustling carries on this long after the last brush, then fades out.
+const HOLD_MS = 60;
+const FADE_MS = 140;
+// Grains are scheduled this far ahead on the audio clock, every SCHEDULE_MS.
+const LOOKAHEAD_S = 0.1;
+const SCHEDULE_MS = 25;
+
+export interface GrassRustle {
+ /** Rustle for a brush at `speed` px/ms; faster brushing is denser and a little louder. */
+ brush(speed: number): void;
+ /** Silence at once, e.g. when the window goes to the background. */
+ hush(): void;
+ dispose(): void;
+}
+
+const SILENT: GrassRustle = { brush() {}, hush() {}, dispose() {} };
+
+function createNoiseBuffer(ctx: AudioContext): AudioBuffer {
+ const buffer = ctx.createBuffer(1, ctx.sampleRate, ctx.sampleRate);
+ const data = buffer.getChannelData(0);
+ for (let i = 0; i < data.length; i++) data[i] = Math.random() * 2 - 1;
+ return buffer;
+}
+
+/** Create inside a user gesture so the browser lets the audio start. */
+export function createGrassRustle(): GrassRustle {
+ if (typeof AudioContext === "undefined") return SILENT;
+
+ const ctx = new AudioContext();
+ const noise = createNoiseBuffer(ctx);
+
+ // Round off the very top so the crackle stays dry rather than harsh.
+ const tone = ctx.createBiquadFilter();
+ tone.type = "lowpass";
+ tone.frequency.value = 8500;
+ const master = ctx.createGain();
+ master.connect(tone).connect(ctx.destination);
+
+ // The faint swish of blades moving together under the crackle.
+ const swish = ctx.createBufferSource();
+ swish.buffer = noise;
+ swish.loop = true;
+ const swishFilter = ctx.createBiquadFilter();
+ swishFilter.type = "bandpass";
+ swishFilter.frequency.value = 2600;
+ swishFilter.Q.value = 0.5;
+ const swishGain = ctx.createGain();
+ swishGain.gain.value = 0;
+ swish.connect(swishFilter).connect(swishGain).connect(master);
+ swish.start();
+
+ let intensity = 0;
+ let lastBrushAt = 0;
+ let nextGrainAt = 0;
+ let timer: number | undefined;
+ // A running context keeps the audio device busy (and the looping swish playing) even in
+ // silence, so it runs only while there is rustling to play.
+ let suspended = false;
+ const suspend = () => {
+ if (suspended) return;
+ suspended = true;
+ void ctx.suspend();
+ };
+ suspend();
+
+ const playGrain = (when: number, level: number) => {
+ const source = ctx.createBufferSource();
+ source.buffer = noise;
+ const filter = ctx.createBiquadFilter();
+ filter.type = "bandpass";
+ // Log-uniform between 1.2 and 6.5 kHz: low rustles and bright ticks.
+ filter.frequency.value = 1200 * 5.4 ** Math.random();
+ filter.Q.value = 0.8 + Math.random() * 2.2;
+ const envelope = ctx.createGain();
+ const length = 0.005 + Math.random() ** 2 * 0.04;
+ envelope.gain.setValueAtTime(0, when);
+ envelope.gain.linearRampToValueAtTime(level * (0.2 + Math.random() * 0.8), when + 0.0015);
+ envelope.gain.exponentialRampToValueAtTime(0.0001, when + length);
+ source.connect(filter).connect(envelope).connect(master);
+ source.start(when, Math.random() * (noise.duration - 0.05), length + 0.01);
+ };
+
+ const schedule = () => {
+ const idleMs = performance.now() - lastBrushAt;
+ const activity =
+ idleMs < HOLD_MS ? intensity : intensity * Math.exp(-(idleMs - HOLD_MS) / FADE_MS);
+ const now = ctx.currentTime;
+ swishGain.gain.setTargetAtTime(activity * SWISH_GAIN, now, 0.06);
+ if (activity < 0.02) {
+ nextGrainAt = now;
+ if (idleMs > HOLD_MS + FADE_MS * 4) {
+ window.clearInterval(timer);
+ timer = undefined;
+ suspend();
+ }
+ return;
+ }
+ const rate = MIN_GRAIN_RATE + activity * (MAX_GRAIN_RATE - MIN_GRAIN_RATE);
+ nextGrainAt = Math.max(nextGrainAt, now);
+ while (nextGrainAt < now + LOOKAHEAD_S) {
+ playGrain(nextGrainAt, GRAIN_GAIN * (0.5 + activity * 0.5));
+ nextGrainAt += -Math.log(1 - Math.random()) / rate;
+ }
+ };
+
+ const hush = () => {
+ intensity = 0;
+ window.clearInterval(timer);
+ timer = undefined;
+ // Grains already queued inside the lookahead window are cut by the master fade.
+ master.gain.cancelScheduledValues(ctx.currentTime);
+ master.gain.setTargetAtTime(0, ctx.currentTime, 0.01);
+ swishGain.gain.cancelScheduledValues(ctx.currentTime);
+ swishGain.gain.setValueAtTime(0, ctx.currentTime);
+ suspend();
+ };
+
+ return {
+ brush(speed) {
+ if (suspended) {
+ suspended = false;
+ void ctx.resume();
+ }
+ intensity = intensity * 0.6 + Math.min(1, speed / FULL_SPEED) * 0.4;
+ lastBrushAt = performance.now();
+ if (timer === undefined) {
+ master.gain.cancelScheduledValues(ctx.currentTime);
+ master.gain.setValueAtTime(1, ctx.currentTime);
+ nextGrainAt = ctx.currentTime;
+ timer = window.setInterval(schedule, SCHEDULE_MS);
+ schedule();
+ }
+ },
+ hush,
+ dispose() {
+ hush();
+ swish.stop();
+ void ctx.close();
+ },
+ };
+}
diff --git a/test/components/chatComposerLayout.test.js b/test/components/chatComposerLayout.test.js
new file mode 100644
index 000000000..9df697a20
--- /dev/null
+++ b/test/components/chatComposerLayout.test.js
@@ -0,0 +1,41 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+
+test("composer growth adds scroll room without changing the conversation viewport", async () => {
+ const { observeChatComposerInset } = await import("../../src/components/chat/composerLayout.ts");
+ const values = new Map();
+ const container = {
+ style: {
+ setProperty(name, value) {
+ values.set(name, value);
+ },
+ removeProperty(name) {
+ values.delete(name);
+ },
+ },
+ };
+ const composer = { offsetHeight: 64 };
+ let onResize;
+ let disconnected = false;
+
+ const cleanup = observeChatComposerInset(composer, container, (callback) => {
+ onResize = callback;
+ return {
+ observe(element) {
+ assert.equal(element, composer);
+ },
+ disconnect() {
+ disconnected = true;
+ },
+ };
+ });
+
+ assert.equal(values.get("--chat-composer-inset"), "72px");
+ composer.offsetHeight = 120;
+ onResize();
+ assert.equal(values.get("--chat-composer-inset"), "128px");
+
+ cleanup();
+ assert.equal(disconnected, true);
+ assert.equal(values.has("--chat-composer-inset"), false);
+});
diff --git a/test/components/chatInputFocus.test.js b/test/components/chatInputFocus.test.js
new file mode 100644
index 000000000..3fa9315ab
--- /dev/null
+++ b/test/components/chatInputFocus.test.js
@@ -0,0 +1,209 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+const React = require("react");
+const { createRoot } = require("react-dom/client");
+const {
+ createRendererServer,
+ installBrowserGlobals,
+ installHostDom,
+} = require("../lib/rendererTestHarness");
+const { installInteractiveDom, findElement } = require("../lib/interactiveDom");
+
+function findNode(root, name) {
+ if (root.localName === name) return root;
+ for (const child of root.childNodes) {
+ const found = findNode(child, name);
+ if (found) return found;
+ }
+ return null;
+}
+
+async function mountChatInput(t, installDom = installHostDom) {
+ let root;
+ t.after(async () => {
+ if (root) await React.act(async () => root.unmount());
+ });
+ installBrowserGlobals(t);
+ const container = installDom(t);
+ const vite = await createRendererServer(t, {
+ cachePrefix: "openwhispr-note-chat-focus-test-",
+ mockModules: {
+ "/ui/useToast": `export const useToast = () => ({ toast: () => {} });`,
+ "/useVoiceDraft": `export const useVoiceDraft = () => ({ status: "idle", streamingOnlyProvider: false });`,
+ "/stores/meetingRecordingStore": `
+ export const getMicAnalyser = () => null;
+ export const useMeetingRecordingStore = { getState: () => ({ currentMicLevel: 0 }) };
+ `,
+ },
+ });
+ const { ChatInput } = await vite.ssrLoadModule("/components/chat/ChatInput.tsx");
+ root = createRoot(container);
+ return { root, container, ChatInput };
+}
+
+test("closing the Notes composer cancels a pending auto-focus", async (t) => {
+ const { root, container, ChatInput } = await mountChatInput(t);
+ const frames = new Map();
+ let nextFrame = 0;
+ globalThis.requestAnimationFrame = (callback) => {
+ const id = ++nextFrame;
+ frames.set(id, callback);
+ return id;
+ };
+ globalThis.cancelAnimationFrame = (id) => frames.delete(id);
+ const props = {
+ variant: "note",
+ agentState: "idle",
+ partialTranscript: "",
+ onTextSubmit: () => {},
+ };
+
+ await React.act(async () =>
+ root.render(React.createElement(ChatInput, { ...props, focusOnIdle: true }))
+ );
+ const textarea = findNode(container, "textarea");
+ assert.ok(textarea);
+ const pendingFocus = frames.values().next().value;
+ assert.ok(pendingFocus);
+
+ await React.act(async () =>
+ root.render(React.createElement(ChatInput, { ...props, focusOnIdle: false }))
+ );
+ assert.equal(frames.size, 0, "the scheduled focus is canceled on close");
+});
+
+test("a streaming reply keeps the composer focusable", async (t) => {
+ const { root, container, ChatInput } = await mountChatInput(t);
+ await React.act(async () =>
+ root.render(
+ React.createElement(ChatInput, {
+ variant: "assistant",
+ agentState: "streaming",
+ partialTranscript: "",
+ draftText: "follow-up",
+ onTextSubmit: () => {},
+ focusOnIdle: false,
+ })
+ )
+ );
+ const textarea = findNode(container, "textarea");
+ assert.equal(textarea.hasAttribute("disabled"), false, "a disabled field would drop focus");
+ assert.equal(textarea.hasAttribute("readOnly"), true);
+});
+
+test("a long Notes draft scrolls inside the compact composer after closing chat", async (t) => {
+ const { root, container, ChatInput } = await mountChatInput(t);
+ const props = {
+ variant: "note",
+ outlined: true,
+ agentState: "idle",
+ partialTranscript: "",
+ draftText: "A long note draft ".repeat(40),
+ onTextSubmit: () => {},
+ focusOnIdle: false,
+ };
+
+ await React.act(async () => root.render(React.createElement(ChatInput, props)));
+ const textarea = findNode(container, "textarea");
+ assert.ok(textarea);
+ Object.defineProperty(textarea, "scrollHeight", { value: 240, configurable: true });
+
+ await React.act(async () =>
+ root.render(React.createElement(ChatInput, { ...props, draftText: `${props.draftText}more` }))
+ );
+ assert.equal(textarea.style.height, "240px", "the open composer still sizes to its draft");
+
+ await React.act(async () =>
+ root.render(React.createElement(ChatInput, { ...props, outlined: false }))
+ );
+ assert.equal(textarea.style.height, "100%", "closing chat constrains the draft to the pill");
+});
+
+test("a host that cannot send yet keeps the draft by writing it back", async (t) => {
+ const { root, container, ChatInput } = await mountChatInput(t, installInteractiveDom);
+ const drafts = [];
+ const onDraftChange = (text) => drafts.push(text);
+ await React.act(async () =>
+ root.render(
+ React.createElement(ChatInput, {
+ variant: "note",
+ agentState: "idle",
+ partialTranscript: "",
+ draftText: "Next question",
+ onDraftChange,
+ // Like the Notes composer while its chat is still replying.
+ onTextSubmit: onDraftChange,
+ focusOnIdle: false,
+ })
+ )
+ );
+ const send = findElement(
+ container,
+ (element) => element.getAttribute?.("aria-label") === "agentMode.input.send"
+ );
+ await React.act(async () =>
+ send.dispatchEvent({ type: "click", bubbles: true, button: 0, preventDefault() {} })
+ );
+ assert.equal(drafts.at(-1), "Next question");
+});
+
+test("the assistant send button reads as active only once there is a draft", async (t) => {
+ const { root, container, ChatInput } = await mountChatInput(t, installInteractiveDom);
+ const props = {
+ variant: "assistant",
+ agentState: "idle",
+ partialTranscript: "",
+ onTextSubmit: () => {},
+ focusOnIdle: false,
+ };
+ const sendCircleClass = () => {
+ const send = findElement(
+ container,
+ (element) => element.getAttribute?.("aria-label") === "agentMode.input.send"
+ );
+ return send.childNodes[0].getAttribute("class");
+ };
+
+ await React.act(async () =>
+ root.render(React.createElement(ChatInput, { ...props, draftText: "" }))
+ );
+ assert.match(sendCircleClass(), /bg-muted/, "an empty draft leaves the send button muted");
+
+ await React.act(async () =>
+ root.render(React.createElement(ChatInput, { ...props, draftText: "Summarize my week" }))
+ );
+ assert.doesNotMatch(sendCircleClass(), /bg-muted/);
+ assert.match(sendCircleClass(), /gradient-brand-glass/, "a draft lights up the send button");
+});
+
+test("cancelling a reply hands focus back to the composer", async (t) => {
+ const { root, container, ChatInput } = await mountChatInput(t, installInteractiveDom);
+ let cancelled = 0;
+ await React.act(async () =>
+ root.render(
+ React.createElement(ChatInput, {
+ variant: "assistant",
+ agentState: "streaming",
+ partialTranscript: "",
+ onTextSubmit: () => {},
+ onCancel: () => cancelled++,
+ // Like the Assistant page, which never refocuses on idle by itself.
+ focusOnIdle: false,
+ })
+ )
+ );
+ const cancel = findElement(
+ container,
+ (element) => element.getAttribute?.("aria-label") === "common.cancel"
+ );
+ cancel.focus();
+ await React.act(async () =>
+ cancel.dispatchEvent({ type: "click", bubbles: true, button: 0, preventDefault() {} })
+ );
+ assert.equal(cancelled, 1);
+ assert.equal(
+ cancel.ownerDocument.activeElement?.tagName === "TEXTAREA",
+ true,
+ "focus would otherwise fall to the page when the Cancel button unmounts"
+ );
+});
diff --git a/test/components/chatMessageRendering.test.js b/test/components/chatMessageRendering.test.js
new file mode 100644
index 000000000..9d7a6af0c
--- /dev/null
+++ b/test/components/chatMessageRendering.test.js
@@ -0,0 +1,75 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+const React = require("react");
+const { createRoot } = require("react-dom/client");
+const { createRendererServer, installBrowserGlobals } = require("../lib/rendererTestHarness");
+const { installInteractiveDom, findElement } = require("../lib/interactiveDom");
+
+async function mountChatMessages(t) {
+ let root;
+ t.after(async () => {
+ if (root) await React.act(async () => root.unmount());
+ delete globalThis.__markdownRenders;
+ });
+ installBrowserGlobals(t);
+ const container = installInteractiveDom(t);
+ globalThis.__markdownRenders = 0;
+ const vite = await createRendererServer(t, {
+ cachePrefix: "openwhispr-chat-message-rendering-test-",
+ mockModules: {
+ "/hooks/useStickToBottom": `
+ export const useStickToBottom = () => ({ scrollRef: { current: null } });
+ `,
+ "/ui/MarkdownRenderer": `
+ export function MarkdownRenderer({ content }) {
+ globalThis.__markdownRenders += 1;
+ return content;
+ }
+ `,
+ },
+ });
+ const { ChatMessages } = await vite.ssrLoadModule("/components/chat/ChatMessages.tsx");
+ root = createRoot(container);
+ const render = (props) =>
+ React.act(async () => root.render(React.createElement(ChatMessages, props)));
+ return { container, render };
+}
+
+const MESSAGES = [
+ { id: "q", role: "user", content: "Summarize the notes", isStreaming: false },
+ { id: "a", role: "assistant", content: "Here is **the summary**.", isStreaming: false },
+];
+
+// A note re-renders its chat on every keystroke in the note (or in the composer); the
+// replies must not re-parse their Markdown each time.
+test("re-rendering the conversation with the same messages doesn't re-render the replies", async (t) => {
+ const { render } = await mountChatMessages(t);
+
+ await render({ messages: MESSAGES, scrollClassName: "a" });
+ const initialRenders = globalThis.__markdownRenders;
+ assert.ok(initialRenders > 0);
+
+ await render({ messages: MESSAGES, scrollClassName: "b" });
+ assert.equal(globalThis.__markdownRenders, initialRenders);
+
+ // A streaming reply still updates.
+ await render({
+ messages: [MESSAGES[0], { ...MESSAGES[1], content: "Here is **the summary**. More" }],
+ scrollClassName: "b",
+ });
+ assert.equal(globalThis.__markdownRenders, initialRenders + 1);
+});
+
+test("a question typed on several lines keeps its line breaks", async (t) => {
+ const { container, render } = await mountChatMessages(t);
+
+ await render({
+ messages: [{ id: "q", role: "user", content: "line one\nline two", isStreaming: false }],
+ });
+ const text = findElement(
+ container,
+ (element) => element.tagName === "SPAN" && element.textContent === "line one\nline two"
+ );
+ assert.ok(text);
+ assert.match(text.getAttribute("class") ?? "", /(^|\s)whitespace-pre-wrap(\s|$)/);
+});
diff --git a/test/components/chatViewNewChat.test.js b/test/components/chatViewNewChat.test.js
index 418611032..6555fee97 100644
--- a/test/components/chatViewNewChat.test.js
+++ b/test/components/chatViewNewChat.test.js
@@ -39,9 +39,10 @@ const MOCKS = {
}
`,
"/ChatInput": `
+ import { createElement } from "react";
export function ChatInput(props) {
globalThis.__chatInput = props;
- return null;
+ return createElement("textarea");
}
`,
"/ConversationList": `
@@ -51,8 +52,6 @@ const MOCKS = {
}
`,
"/ChatMessages": `export function ChatMessages() { return null; }`,
- "/ChatEmptyIllustration": `export function ChatEmptyIllustration() { return null; }`,
- "/EmptyChatState": `export default function EmptyChatState() { return null; }`,
"/ui/dialog": `export function ConfirmDialog() { return null; }`,
"/hooks/useDialogs": `
export function useDialogs() {
@@ -70,8 +69,18 @@ async function renderChatView(t) {
delete globalThis.__conversationList;
delete globalThis.__cancelCount;
delete globalThis.__chatStreamingOptions;
+ delete globalThis.__keydown;
+ });
+ installBrowserGlobals(t, {
+ window: {
+ addEventListener(type, listener) {
+ if (type === "keydown") {
+ globalThis.__keydown = (init) => listener({ preventDefault() {}, ...init });
+ }
+ },
+ removeEventListener() {},
+ },
});
- installBrowserGlobals(t);
const container = installInteractiveDom(t);
globalThis.__cancelCount = 0;
const vite = await createRendererServer(t, {
@@ -117,3 +126,20 @@ for (const [leave, leaveConversation] of Object.entries(LEAVE_CONVERSATION)) {
assert.equal(globalThis.__chatInput.agentState, "idle");
});
}
+
+// The composer stays collapsed until focused, so nothing focuses it when the page opens;
+// starting a new chat is the moment the user means to type.
+const START_NEW_CHAT = {
+ "the New chat button": () => globalThis.__conversationList.onNewChat(),
+ "the shortcut": () => globalThis.__keydown({ key: "n", metaKey: true, ctrlKey: true }),
+};
+
+for (const [way, startNewChat] of Object.entries(START_NEW_CHAT)) {
+ test(`starting a new chat with ${way} puts the cursor in the composer`, async (t) => {
+ await renderChatView(t);
+ assert.equal(globalThis.document.activeElement, null);
+
+ await React.act(async () => startNewChat());
+ assert.equal(globalThis.document.activeElement?.tagName, "TEXTAREA");
+ });
+}
diff --git a/test/components/containerOverviewDefaultFolder.test.js b/test/components/containerOverviewDefaultFolder.test.js
index 48e17939f..734d11359 100644
--- a/test/components/containerOverviewDefaultFolder.test.js
+++ b/test/components/containerOverviewDefaultFolder.test.js
@@ -24,13 +24,15 @@ async function renderOverview(t, { lng, folder }) {
const vite = await createRendererServer(t, {
cachePrefix: `openwhispr-container-overview-${lng}-`,
mockModules: {
- "/stores/workspaceStore": "export const useWorkspaceStore = (selector) => selector({ workspaces: [] });",
+ "/stores/workspaceStore":
+ "export const useWorkspaceStore = (selector) => selector({ workspaces: [] });",
"/stores/noteStore": `
export const useNotes = () => [];
- export const useNotesByContainer = () => ({});
+ export const useNotesByContainer = () => ({ "f:7": [], "f:8": [] });
export const useFolders = () => [];
export const useFolderCounts = () => ({});
export const useSpaceRootCounts = () => ({});
+ export const folderContainerKey = (id) => "f:" + id;
`,
"/hooks/useContainerChat": "export const useContainerChat = () => ({});",
"/lib/spacePermissions": "export const canManageSpace = () => false;",
diff --git a/test/components/containerOverviewLoadError.test.js b/test/components/containerOverviewLoadError.test.js
new file mode 100644
index 000000000..36992c87c
--- /dev/null
+++ b/test/components/containerOverviewLoadError.test.js
@@ -0,0 +1,97 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+const React = require("react");
+const { createRoot } = require("react-dom/client");
+const {
+ createRendererServer,
+ installBrowserGlobals,
+ installHostDom,
+} = require("../lib/rendererTestHarness");
+
+function textOf(node) {
+ if (node.nodeType === 3) return node.nodeValue;
+ return [...node.childNodes].map(textOf).join("");
+}
+
+async function mountOverview(t, cachePrefix) {
+ let root;
+ t.after(async () => {
+ if (root) await React.act(async () => root.unmount());
+ delete globalThis.__overviewNotes;
+ delete globalThis.__overviewNotesByContainer;
+ delete globalThis.__overviewAskMounts;
+ });
+ installBrowserGlobals(t);
+ const container = installHostDom(t);
+ globalThis.__overviewNotesByContainer = {};
+ const vite = await createRendererServer(t, {
+ cachePrefix,
+ mockModules: {
+ "/stores/workspaceStore":
+ "export const useWorkspaceStore = (selector) => selector({ workspaces: [] });",
+ "/stores/noteStore": `
+ export const useNotes = () => globalThis.__overviewNotes ?? [];
+ export const useNotesByContainer = () => globalThis.__overviewNotesByContainer;
+ export const useFolders = () => [];
+ export const useFolderCounts = () => ({});
+ export const useSpaceRootCounts = () => ({});
+ export const folderContainerKey = (id) => "f:" + id;
+ export const ensureContainerLoaded = () => Promise.reject(new Error("offline"));
+ `,
+ "/hooks/useContainerChat": "export const useContainerChat = () => ({});",
+ "/lib/spacePermissions": "export const canManageSpace = () => false;",
+ "/InviteTeammateDialog": "export default function Mock() { return null; }",
+ "/OverviewExplainerBanner": "export const OverviewExplainerBanner = () => null;",
+ "/OverviewAskSection": `
+ import { useEffect } from "react";
+ export const OverviewAskSection = () => {
+ useEffect(() => {
+ globalThis.__overviewAskMounts = (globalThis.__overviewAskMounts ?? 0) + 1;
+ }, []);
+ return null;
+ };
+ `,
+ "/OverviewNoteList": "export const OverviewNoteList = () => null;",
+ },
+ });
+ const { ContainerOverview } = await vite.ssrLoadModule(
+ "/components/notes/overview/ContainerOverview.tsx"
+ );
+ const props = {
+ space: { id: 1, kind: "private", name: "Personal", sync_status: "synced" },
+ folder: { id: 7, space_id: 1, name: "Projects", is_default: 0 },
+ onOpenNote: () => {},
+ onNewNote: () => {},
+ };
+ root = createRoot(container);
+ const render = () =>
+ React.act(async () => root.render(React.createElement(ContainerOverview, props)));
+ return { container, render };
+}
+
+test("a folder load error clears once the folder's notes arrive", async (t) => {
+ const { container, render } = await mountOverview(t, "openwhispr-container-overview-load-error-");
+
+ await render();
+ assert.match(textOf(container), /common\.retry/, "a failed load offers a retry");
+
+ globalThis.__overviewNotesByContainer = { "f:7": [] };
+ await render();
+ const text = textOf(container);
+ assert.doesNotMatch(text, /common\.retry/, "notes loaded elsewhere replace the error");
+ assert.match(text, /Projects/);
+});
+
+test("the ask composer keeps its state when the note count crosses zero", async (t) => {
+ const { render } = await mountOverview(t, "openwhispr-container-overview-ask-identity-");
+ globalThis.__overviewNotesByContainer = { "f:7": [] };
+
+ await render();
+ // A chat reply that creates the folder's first note moves the composer above the list.
+ globalThis.__overviewNotes = [{ id: 1, title: "First" }];
+ await render();
+ globalThis.__overviewNotes = [];
+ await render();
+
+ assert.equal(globalThis.__overviewAskMounts, 1, "a remount would drop the draft and focus");
+});
diff --git a/test/components/conversationListEmptyState.test.js b/test/components/conversationListEmptyState.test.js
new file mode 100644
index 000000000..57737be9f
--- /dev/null
+++ b/test/components/conversationListEmptyState.test.js
@@ -0,0 +1,64 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+const React = require("react");
+const { createRoot } = require("react-dom/client");
+const { createRendererServer, installBrowserGlobals } = require("../lib/rendererTestHarness");
+const { installInteractiveDom } = require("../lib/interactiveDom");
+
+const ARCHIVED_CHAT = {
+ id: 1,
+ title: "Trip planning",
+ last_message: "Booked",
+ created_at: "2026-09-01T00:00:00.000Z",
+ updated_at: "2026-09-01T00:00:00.000Z",
+ archived_at: "2026-09-02T00:00:00.000Z",
+};
+
+async function renderConversationList(t, { active, archived }) {
+ let root;
+ t.after(async () => {
+ if (root) await React.act(async () => root.unmount());
+ });
+ installBrowserGlobals(t, {
+ window: {
+ electronAPI: {
+ getAgentConversationsWithPreview: async (_limit, _offset, isArchived) =>
+ isArchived ? archived : active,
+ },
+ },
+ });
+ const container = installInteractiveDom(t);
+ const vite = await createRendererServer(t, {
+ cachePrefix: "openwhispr-conversation-list-empty-test-",
+ });
+ const { default: ConversationList } = await vite.ssrLoadModule(
+ "/components/chat/ConversationList.tsx"
+ );
+ root = createRoot(container);
+ const noop = () => {};
+ await React.act(async () =>
+ root.render(
+ React.createElement(ConversationList, {
+ activeConversationId: null,
+ onSelectConversation: noop,
+ onNewChat: noop,
+ onOpenSearch: noop,
+ onArchive: noop,
+ onDelete: noop,
+ refreshKey: 0,
+ })
+ )
+ );
+ return container;
+}
+
+test("with every chat archived, the list says so instead of showing nothing", async (t) => {
+ const container = await renderConversationList(t, { active: [], archived: [ARCHIVED_CHAT] });
+ assert.match(container.textContent, /chat\.allArchived/);
+ assert.doesNotMatch(container.textContent, /chat\.noConversations/);
+});
+
+test("with no chats at all, the list shows its empty state", async (t) => {
+ const container = await renderConversationList(t, { active: [], archived: [] });
+ assert.match(container.textContent, /chat\.noConversations/);
+});
diff --git a/test/components/directionalContentPolicy.test.js b/test/components/directionalContentPolicy.test.js
index b8091822d..bffc8744d 100644
--- a/test/components/directionalContentPolicy.test.js
+++ b/test/components/directionalContentPolicy.test.js
@@ -99,7 +99,7 @@ test("technical output values remain LTR inside an Arabic document", () => {
],
[
"src/components/notes/UploadAudioView.tsx",
- /<p\s+dir="ltr"[^>]*max-w-50[^>]*>\s*\{file\.name\}/,
+ /<p\s+dir="ltr"[^>]*max-w-sm[^>]*>\s*\{file\.name\}/,
],
["src/components/ui/SidebarModal.tsx", /<span\s+dir="ltr"[\s\S]*?v\{version\}/],
["src/components/ui/ModelCardList.tsx", /<span\s+dir="ltr"[\s\S]*?\{model\.label\}/],
diff --git a/test/components/fieldDirectionPolicy.test.js b/test/components/fieldDirectionPolicy.test.js
index 31a6d66d4..03dd79f91 100644
--- a/test/components/fieldDirectionPolicy.test.js
+++ b/test/components/fieldDirectionPolicy.test.js
@@ -100,7 +100,6 @@ const EXPECTED_NATIVE_FIELD_DIRECTIONS = {
"src/components/notes/ActionManagerDialog.tsx": ["auto"],
"src/components/notes/AddNotesToFolderDialog.tsx": ["auto"],
"src/components/notes/MeetingTranscriptChat.tsx": ["ltr", "auto"],
- "src/components/notes/NoteBottomBar.tsx": ["auto"],
"src/components/notes/NoteEditor.tsx": ["auto", "auto"],
"src/components/notes/NoteParticipants.tsx": ["auto"],
"src/components/notes/NotesOnboarding.tsx": ["auto", "auto", "auto"],
diff --git a/test/components/floatingChatLayout.test.js b/test/components/floatingChatLayout.test.js
index 08293b2ca..4d22baad0 100644
--- a/test/components/floatingChatLayout.test.js
+++ b/test/components/floatingChatLayout.test.js
@@ -127,16 +127,62 @@ test("viewport resizes preserve pinned content without yanking a reader", async
assert.equal(container.style.getPropertyValue("--floating-inset"), "");
});
-test("the panel cap leaves the promised note content visible", async () => {
- const {
- FLOATING_CHAT_INSET_EXTRA_PX,
- FLOATING_CHAT_MAX_HEIGHT_CSS,
- FLOATING_CHAT_MIN_VISIBLE_CONTENT_PX,
- } = await load();
-
- assert.equal(FLOATING_CHAT_INSET_EXTRA_PX, 32);
- assert.equal(FLOATING_CHAT_MIN_VISIBLE_CONTENT_PX, 80);
- assert.equal(FLOATING_CHAT_MAX_HEIGHT_CSS, "calc(100% - 7rem)");
+test("the in-view chat always opens at two-thirds height and ignores content growth", async () => {
+ const { observeFloatingChatSize } = await load();
+ const panel = { style: { height: "" } };
+ const container = { clientHeight: 600 };
+ const observed = [];
+ let onResize;
+ let disconnected = false;
+
+ const cleanup = observeFloatingChatSize({ panel, container }, (callback) => {
+ onResize = callback;
+ return {
+ observe(element) {
+ observed.push(element);
+ },
+ disconnect() {
+ disconnected = true;
+ },
+ };
+ });
+
+ assert.equal(panel.style.height, "400px");
+ assert.deepEqual(observed, [container], "message and composer resizes cannot grow the panel");
+
+ onResize();
+ assert.equal(panel.style.height, "400px", "content changes scroll inside a fixed panel");
+
+ container.clientHeight = 360;
+ onResize();
+ assert.equal(panel.style.height, "240px", "the panel follows viewport changes");
+
+ cleanup();
+ assert.equal(disconnected, true);
+});
+
+test("the note viewport caps the in-view chat in a short window", async () => {
+ const { observeFloatingChatSize } = await load();
+ const panel = { style: { height: "" } };
+ const container = { clientHeight: 600 };
+ let onResize;
+ const stopSelected = observeFloatingChatSize({ panel, container }, (callback) => {
+ onResize = callback;
+ return { observe() {}, disconnect() {} };
+ });
+ assert.equal(panel.style.height, "400px");
+
+ onResize();
+ assert.equal(panel.style.height, "400px", "long chat history stays inside the panel");
+
+ container.clientHeight = 900;
+ onResize();
+ assert.equal(panel.style.height, "600px", "only viewport changes resize the panel");
+
+ container.clientHeight = 240;
+ onResize();
+ assert.equal(panel.style.height, "128px", "the top clearance caps a short viewport");
+ stopSelected();
});
function createLayoutHarness(observeFloatingChatLayout, { scroller }) {
diff --git a/test/components/historyGreeting.test.js b/test/components/historyGreeting.test.js
new file mode 100644
index 000000000..4b6e88cf9
--- /dev/null
+++ b/test/components/historyGreeting.test.js
@@ -0,0 +1,109 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+const React = require("react");
+const { createRoot } = require("react-dom/client");
+const { createRendererServer, installBrowserGlobals } = require("../lib/rendererTestHarness");
+const { installInteractiveDom, findElement } = require("../lib/interactiveDom");
+
+const ITEM = {
+ id: 1,
+ timestamp: "2026-09-30T09:00:00.000Z",
+ original_text: "Hello",
+ processed_text: null,
+ is_processed: false,
+ processing_method: "none",
+ agent_name: null,
+ error: null,
+};
+
+async function mountHistoryView(t) {
+ let root;
+ t.after(async () => {
+ if (root) await React.act(async () => root.unmount());
+ });
+ installBrowserGlobals(t);
+ const container = installInteractiveDom(t);
+ const vite = await createRendererServer(t, {
+ cachePrefix: "openwhispr-history-greeting-test-",
+ noExternal: ["react-i18next"],
+ mockModules: {
+ // Echo the key and its values, so the test sees which greeting was picked and
+ // what went where the name goes.
+ "react-i18next": `
+ const t = (key, values) => (values ? key + ":" + JSON.stringify(values) : key);
+ export function useTranslation() { return { t, i18n: { language: "en" } }; }
+ export const initReactI18next = { type: "3rdParty", init() {} };
+ `,
+ "/hooks/useUpcomingEvents": `
+ export const useUpcomingEvents = () => ({ events: [], isLoading: false, isConnected: false });
+ `,
+ "/UpcomingMeetings": `export default function UpcomingMeetings() { return null; }`,
+ "/ui/DictationHotkeyHint": `export default function DictationHotkeyHint() { return null; }`,
+ "/ui/TranscriptionItem": `export default function TranscriptionItem() { return null; }`,
+ },
+ });
+ const { default: HistoryView } = await vite.ssrLoadModule("/components/HistoryView.tsx");
+ const noop = () => {};
+ root = createRoot(container);
+ const render = (props) =>
+ React.act(async () =>
+ root.render(
+ React.createElement(HistoryView, {
+ history: [],
+ isLoading: false,
+ hotkey: "F8",
+ aiCTADismissed: true,
+ setAiCTADismissed: noop,
+ useCleanupModel: true,
+ copyToClipboard: noop,
+ deleteTranscription: noop,
+ clearAllTranscriptions: noop,
+ onOpenSettings: noop,
+ onOpenIntegrations: noop,
+ onShowAudioInFolder: noop,
+ onRetryTranscription: async () => {},
+ showDiscarded: false,
+ onToggleDiscarded: noop,
+ ...props,
+ })
+ )
+ );
+ const greeting = () =>
+ findElement(
+ container,
+ (element) =>
+ element.tagName === "H2" && element.textContent.startsWith("controlPanel.history.welcome")
+ );
+ return { render, greeting };
+}
+
+test("a user with no dictations yet is welcomed, not welcomed back", async (t) => {
+ const { render, greeting } = await mountHistoryView(t);
+
+ await render({ history: [] });
+ assert.equal(greeting().textContent, "controlPanel.history.welcome");
+
+ await render({ history: [ITEM] });
+ assert.equal(greeting().textContent, "controlPanel.history.welcomeBack");
+});
+
+test("the greeting waits for the first load before choosing", async (t) => {
+ const { render, greeting } = await mountHistoryView(t);
+
+ await render({ history: [], isLoading: true });
+ assert.match(greeting().getAttribute("class"), /\binvisible\b/);
+
+ await render({ history: [ITEM], isLoading: false });
+ assert.doesNotMatch(greeting().getAttribute("class"), /\binvisible\b/);
+});
+
+test("the user's name is isolated from the greeting's direction", async (t) => {
+ const { render, greeting } = await mountHistoryView(t);
+
+ await render({ history: [ITEM], userName: "J. Doe" });
+ const name = findElement(greeting(), (element) => element.tagName === "BDI");
+ assert.ok(name, "the name sits in its own <bdi>");
+ assert.equal(name.textContent, "J.");
+ assert.equal(name.getAttribute("dir"), "auto");
+ assert.match(greeting().textContent, /^controlPanel\.history\.welcomeBackNamed:/);
+});
diff --git a/test/components/leaderboardNavigation.test.js b/test/components/leaderboardNavigation.test.js
index 188ed5878..934f989ed 100644
--- a/test/components/leaderboardNavigation.test.js
+++ b/test/components/leaderboardNavigation.test.js
@@ -10,7 +10,6 @@ test("the leaderboard is tabbed inside the Insights view", () => {
const sidebar = read("src/components/ControlPanelSidebar.tsx");
const insights = read("src/components/InsightsView.tsx");
const leaderboard = read("src/components/LeaderboardView.tsx");
- const dictionary = read("src/components/DictionaryView.tsx");
assert.equal(sidebar.includes('| "leaderboard"'), false);
assert.equal(sidebar.includes('{ id: "leaderboard"'), false);
@@ -22,9 +21,7 @@ test("the leaderboard is tabbed inside the Insights view", () => {
assert.ok(insights.includes('value="usage"'));
assert.ok(insights.includes('t("insights.yourUsage")'));
assert.ok(insights.includes('value="leaderboard"'));
- assert.ok(dictionary.includes('className="h-7 p-0.5 rounded-[7px]"'));
assert.ok(insights.includes('className="h-7 p-0.5 rounded-[7px]"'));
- assert.ok(dictionary.includes('className="h-6 px-2.5 text-xs rounded-[5px]"'));
assert.ok(insights.includes('className="h-6 px-2.5 text-xs rounded-[5px]"'));
assert.ok(insights.includes("<LeaderboardView"));
assert.ok(insights.includes("syncService.syncAnalyticsNow()"));
diff --git a/test/components/noteBottomBar.test.js b/test/components/noteBottomBar.test.js
index 2b1a564af..3ac4053a8 100644
--- a/test/components/noteBottomBar.test.js
+++ b/test/components/noteBottomBar.test.js
@@ -10,6 +10,10 @@ async function renderBottomBar(t, props) {
const vite = await createRendererServer(t, {
cachePrefix: "openwhispr-note-bottom-bar-test-",
mockModules: {
+ "/ui/useToast": `export const useToast = () => ({ toast: () => {} });`,
+ "/useVoiceDraft": `
+ export const useVoiceDraft = () => ({ status: "idle", streamingOnlyProvider: false });
+ `,
"/stores/meetingRecordingStore": `
export const getMicAnalyser = () => null;
export const useMeetingRecordingStore = { getState: () => ({ currentMicLevel: 0 }) };
@@ -20,6 +24,8 @@ async function renderBottomBar(t, props) {
return renderToStaticMarkup(
createElement(mod.default, {
isRecording: false,
+ draftText: "",
+ onDraftChange: () => {},
onAskSubmit: () => {},
...props,
})
@@ -36,21 +42,24 @@ test("recording state renders no backdrop-filter surface over the live transcrip
assert.ok(html.includes("shadow-(--shadow-glass)"), "capsules keep the glass rim shadow");
});
-test("idle state keeps the liquid-glass capsule", async (t) => {
- const html = await renderBottomBar(t, { isRecording: false });
+test("in-view chat expands the existing capsule around one composer", async (t) => {
+ const html = await renderBottomBar(t, {
+ chatOpen: true,
+ chatContent: createElement("div", null, "Chat"),
+ });
- assert.ok(html.includes("backdrop-blur-xl"));
- assert.ok(html.includes("backdrop-saturate-150"));
+ assert.equal((html.match(/<textarea/g) ?? []).length, 1);
});
-test("the ask capsule never transitions its surface between the two states", async (t) => {
- // transition-all would tween backdrop-filter and background-color for 500ms
- // on every recording start and stop, re-paying the cost this change removes.
- for (const isRecording of [false, true]) {
- const html = await renderBottomBar(t, { isRecording });
- assert.ok(
- html.includes("transition-[max-width,opacity,padding,border-color,box-shadow]"),
- `capsule transition is property-scoped (isRecording=${isRecording})`
- );
- }
+test("closing a selected chat restores the compact actions and summary callout", async (t) => {
+ const html = await renderBottomBar(t, {
+ chatOpen: false,
+ chatContent: createElement("div", null, "Previous conversation"),
+ actionPicker: createElement("button", null, "More actions"),
+ callout: createElement("button", null, "Generate summary"),
+ });
+
+ assert.ok(html.includes("More actions"));
+ assert.ok(html.includes("Generate summary"));
+ assert.ok(html.includes("agentMode.input.send"));
});
diff --git a/test/components/noteEditorSummaryDeletion.test.js b/test/components/noteEditorSummaryDeletion.test.js
index d3884e56c..f16cfff10 100644
--- a/test/components/noteEditorSummaryDeletion.test.js
+++ b/test/components/noteEditorSummaryDeletion.test.js
@@ -191,18 +191,18 @@ async function loadNoteEditor(t) {
const NoteEditor = mod.default;
const renders = [];
- function Harness({ enhancement, note }) {
+ function Harness({ enhancement, overrides }) {
// Run the real component body + hooks under React's lifecycle without
// mounting host elements (the harness DOM has no layout), then assert on
// the tree it returned.
- renders.push(NoteEditor({ ...baseProps(enhancement), ...(note ? { note } : {}) }));
+ renders.push(NoteEditor({ ...baseProps(enhancement), ...overrides }));
return null;
}
const root = createRoot(container);
- const render = (enhancement, note) =>
+ const render = (enhancement, overrides) =>
React.act(async () => {
- root.render(React.createElement(Harness, { enhancement, note }));
+ root.render(React.createElement(Harness, { enhancement, overrides }));
});
const click = (value) =>
React.act(async () => {
@@ -295,6 +295,40 @@ test("hides the highlight instead of freezing it when no tab matches the selecti
await unmount();
});
+test("the summary callout makes way for the transcript selection bar", async (t) => {
+ const { render, click, latest, unmount } = await loadNoteEditor(t);
+ const propsWith = (key) => {
+ let found = null;
+ walk(latest(), (node) => {
+ if (!found && key in node.props) found = node.props;
+ });
+ return found;
+ };
+
+ await render(undefined, {
+ note: {
+ ...NOTE,
+ enhanced_content: null,
+ transcript: JSON.stringify([{ text: "Hello", source: "mic", timestamp: 0 }]),
+ },
+ onGenerateSummary() {},
+ });
+ findSegmentStrip(latest()).props.ref.current = measurableStrip(["transcript", "raw"]);
+ await click("transcript");
+ assert.ok(propsWith("onAskSubmit").callout, "a transcript without a summary offers one");
+
+ const transcript = propsWith("onToggleSelect");
+ await React.act(async () => transcript.onToggleSelect(transcript.segments[0].id));
+ assert.ok(propsWith("onAssignName"), "selecting a segment shows the selection bar");
+ // Both float in the same bottom strip; the callout would cover the bar's buttons.
+ assert.ok(
+ !propsWith("onAskSubmit").callout,
+ "the callout steps aside while segments are selected"
+ );
+
+ await unmount();
+});
+
test("the note's chat gets the note's participants, parsed once", async (t) => {
t.after(() => {
delete globalThis.__embeddedChatOptions;
@@ -324,19 +358,55 @@ test("the note's chat learns who is viewing the note and its calendar event", as
const options = () => globalThis.__embeddedChatOptions;
// A local note is the user's own.
- await render(ENHANCEMENT, { ...NOTE, calendar_event_id: "evt-1" });
+ await render(ENHANCEMENT, { note: { ...NOTE, calendar_event_id: "evt-1" } });
assert.equal(options().noteOwnedByUser, true);
assert.equal(options().selfEmail, "[email protected]");
assert.equal(options().noteCalendarEventId, "evt-1");
// A team note someone else recorded is not.
await render(ENHANCEMENT, {
- ...NOTE,
- cloud_id: "cloud-1",
- owner_user_id: "user-alice",
- calendar_event_id: null,
+ note: {
+ ...NOTE,
+ cloud_id: "cloud-1",
+ owner_user_id: "user-alice",
+ calendar_event_id: null,
+ },
});
assert.equal(options().noteOwnedByUser, false);
assert.equal(options().noteCalendarEventId, null);
await unmount();
});
+
+// The note's bottom bar: the element that receives the in-view chat as `chatContent`.
+function findBottomBar(tree) {
+ let bar = null;
+ walk(tree, (node) => {
+ if (!bar && "chatContent" in node.props) bar = node;
+ });
+ return bar;
+}
+
+test("the in-view chat mounts on its first open and stays to fade out", async (t) => {
+ const { render, latest, unmount } = await loadNoteEditor(t);
+ // Closing checks whether focus is inside the chat; the harness DOM has no elements.
+ const originalHTMLElement = globalThis.HTMLElement;
+ globalThis.HTMLElement ??= class {};
+ t.after(() => {
+ if (originalHTMLElement === undefined) delete globalThis.HTMLElement;
+ else globalThis.HTMLElement = originalHTMLElement;
+ });
+
+ // Every keystroke in the note re-renders the editor; a chat nobody opened isn't
+ // rendered, so its conversation isn't parsed on each one.
+ await render(ENHANCEMENT);
+ assert.ok(!findBottomBar(latest()).props.chatContent);
+
+ await React.act(async () => findBottomBar(latest()).props.onInputFocus());
+ assert.equal(findBottomBar(latest()).props.chatOpen, true);
+ assert.ok(findBottomBar(latest()).props.chatContent);
+
+ await React.act(async () => findBottomBar(latest()).props.onInputEscape());
+ assert.equal(findBottomBar(latest()).props.chatOpen, false);
+ assert.ok(findBottomBar(latest()).props.chatContent, "closing keeps it mounted for the fade");
+ await unmount();
+});
diff --git a/test/components/touchGrassResting.test.js b/test/components/touchGrassResting.test.js
new file mode 100644
index 000000000..8cd360b7c
--- /dev/null
+++ b/test/components/touchGrassResting.test.js
@@ -0,0 +1,55 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+const React = require("react");
+const { createRoot } = require("react-dom/client");
+const { createRendererServer, installBrowserGlobals } = require("../lib/rendererTestHarness");
+const { installInteractiveDom, findElement } = require("../lib/interactiveDom");
+
+// The control panel runs with backgroundThrottling off, so a hidden or minimized window
+// still reports itself visible and never fires visibilitychange; it does lose focus.
+test("the lawn rests while the window is in the background", async (t) => {
+ let root;
+ t.after(async () => {
+ if (root) await React.act(async () => root.unmount());
+ });
+ const windowListeners = new Map();
+ installBrowserGlobals(t, {
+ window: {
+ addEventListener(type, listener) {
+ windowListeners.set(type, listener);
+ },
+ removeEventListener(type, listener) {
+ if (windowListeners.get(type) === listener) windowListeners.delete(type);
+ },
+ },
+ });
+ const container = installInteractiveDom(t);
+ const vite = await createRendererServer(t, {
+ cachePrefix: "openwhispr-touch-grass-resting-test-",
+ });
+ const { default: TouchGrass } = await vite.ssrLoadModule("/components/TouchGrass.tsx");
+
+ let hushes = 0;
+ const rustle = { brush() {}, hush: () => (hushes += 1), dispose() {} };
+ root = createRoot(container);
+ await React.act(async () =>
+ root.render(
+ React.createElement(TouchGrass, { rustle, height: 240, label: "Grass", onExit() {} })
+ )
+ );
+ const scene = findElement(container, (element) => element.getAttribute("role") === "application");
+ const isResting = () => /\btouch-grass--resting\b/.test(scene.getAttribute("class"));
+ assert.equal(isResting(), false);
+
+ await React.act(async () => windowListeners.get("blur")());
+ assert.equal(hushes, 1, "the rustle falls silent");
+ assert.equal(isResting(), true, "the breeze stops");
+
+ await React.act(async () => windowListeners.get("focus")());
+ assert.equal(isResting(), false);
+
+ await React.act(async () => root.unmount());
+ root = null;
+ assert.equal(windowListeners.has("blur"), false);
+ assert.equal(windowListeners.has("focus"), false);
+});
diff --git a/test/components/upcomingMeetingsTouchGrass.test.js b/test/components/upcomingMeetingsTouchGrass.test.js
new file mode 100644
index 000000000..679f2fe8a
--- /dev/null
+++ b/test/components/upcomingMeetingsTouchGrass.test.js
@@ -0,0 +1,96 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+const React = require("react");
+const { createRoot } = require("react-dom/client");
+const { createRendererServer, installBrowserGlobals } = require("../lib/rendererTestHarness");
+const { installInteractiveDom, findElement } = require("../lib/interactiveDom");
+
+async function mountUpcomingMeetings(t) {
+ let root;
+ t.after(async () => {
+ if (root) await React.act(async () => root.unmount());
+ });
+ installBrowserGlobals(t);
+ const container = installInteractiveDom(t);
+ const vite = await createRendererServer(t, {
+ cachePrefix: "openwhispr-touch-grass-test-",
+ mockModules: {
+ "/hooks/useSystemAudioPermission": `export const useSystemAudioPermission = () => ({ granted: true });`,
+ "/TouchGrass": `export default function TouchGrass() { return null; }`,
+ "/utils/grassRustle": `
+ export const rustles = [];
+ export const createGrassRustle = () => {
+ const rustle = { disposed: false, brush() {}, dispose() { rustle.disposed = true; } };
+ rustles.push(rustle);
+ return rustle;
+ };
+ `,
+ },
+ });
+ const { default: UpcomingMeetings } = await vite.ssrLoadModule(
+ "/components/UpcomingMeetings.tsx"
+ );
+ const { rustles } = await vite.ssrLoadModule("/utils/grassRustle");
+ root = createRoot(container);
+ return { root, container, UpcomingMeetings, rustles };
+}
+
+function eventLaterToday() {
+ const start = new Date();
+ start.setHours(23, 0, 0, 0);
+ const end = new Date(start);
+ end.setMinutes(30);
+ return {
+ id: "later-today",
+ summary: "Planning",
+ start_time: start.toISOString(),
+ end_time: end.toISOString(),
+ };
+}
+
+function eventTomorrow() {
+ const start = new Date();
+ start.setDate(start.getDate() + 1);
+ start.setHours(10, 0, 0, 0);
+ const end = new Date(start);
+ end.setHours(11);
+ return {
+ id: "tomorrow",
+ summary: "Standup",
+ start_time: start.toISOString(),
+ end_time: end.toISOString(),
+ };
+}
+
+const byText = (text) => (element) => element.tagName === "BUTTON" && element.textContent === text;
+
+test("a meeting synced into today leaves the grass and releases its rustle", async (t) => {
+ const { root, container, UpcomingMeetings, rustles } = await mountUpcomingMeetings(t);
+ const props = { isLoading: false, isConnected: true, onConnectCalendar: () => {} };
+
+ await React.act(async () =>
+ root.render(React.createElement(UpcomingMeetings, { ...props, events: [eventTomorrow()] }))
+ );
+ const touchGrass = findElement(container, byText("upcoming.touchGrass"));
+ assert.ok(touchGrass, "the empty today card offers the grass");
+ await React.act(async () =>
+ touchGrass.dispatchEvent({ type: "click", bubbles: true, button: 0, preventDefault() {} })
+ );
+ assert.ok(findElement(container, byText("common.back")), "the grass is out");
+
+ await React.act(async () =>
+ root.render(
+ React.createElement(UpcomingMeetings, {
+ ...props,
+ events: [eventLaterToday(), eventTomorrow()],
+ })
+ )
+ );
+ assert.equal(
+ Boolean(findElement(container, byText("common.back"))),
+ false,
+ "Back goes with the grass"
+ );
+ assert.equal(rustles.length, 1);
+ assert.equal(rustles[0].disposed, true, "the rustle audio is released");
+});
diff --git a/test/helpers/assistantPanel.test.js b/test/helpers/assistantPanel.test.js
index ddea64887..572aa1d06 100644
--- a/test/helpers/assistantPanel.test.js
+++ b/test/helpers/assistantPanel.test.js
@@ -148,7 +148,7 @@ async function renderAssistantPanel(
test("an empty idle Assistant shows typed input and generic suggestions", async (t) => {
const markup = await renderAssistantPanel(t, []);
- assert.match(markup, /<input/);
+ assert.match(markup, /<textarea\b[^>]*dir="auto"/);
assert.match(markup, /Summarize my recent notes/);
assert.match(markup, /What is on my calendar\?/);
assert.match(markup, /Help me draft something/);
@@ -160,7 +160,7 @@ test("a populated Assistant keeps typed input without empty-state suggestions",
]);
assert.match(markup, /Existing answer/);
- assert.match(markup, /<input/);
+ assert.match(markup, /<textarea\b[^>]*dir="auto"/);
assert.doesNotMatch(markup, /Summarize my recent notes/);
});
@@ -379,7 +379,7 @@ test("the Assistant exposes an accessible new-conversation control only after me
test("a reopened Assistant blocks typed actions until retained history finishes loading", async (t) => {
const markup = await renderAssistantPanel(t, [], { initialConversationId: 42 });
- assert.match(markup, /<input[^>]*disabled=""/);
+ assert.match(markup, /<textarea\b[^>]*readOnly=""/);
assert.doesNotMatch(markup, /Summarize my recent notes/);
});
diff --git a/test/hooks/embeddedChatSendLock.test.js b/test/hooks/embeddedChatSendLock.test.js
new file mode 100644
index 000000000..ed8309c08
--- /dev/null
+++ b/test/hooks/embeddedChatSendLock.test.js
@@ -0,0 +1,70 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+const React = require("react");
+const { createRoot } = require("react-dom/client");
+const { createRendererServer, installBrowserGlobals } = require("../lib/rendererTestHarness");
+const { installInteractiveDom } = require("../lib/interactiveDom");
+
+// The streaming hook reads idle throughout, as it does right after Stop, while
+// sendToAI stays pending, as a cancelled turn does until its in-flight tool returns.
+const MOCKS = {
+ "/chat/useChatStreaming": `
+ export function useChatStreaming() {
+ return {
+ agentState: "idle",
+ sendToAI: () => new Promise((resolve) => { globalThis.__finishSend = resolve; }),
+ cancelStream() {},
+ };
+ }
+ `,
+ "/chat/useChatPersistence": `
+ export function useChatPersistence() {
+ return {
+ messages: [],
+ setMessages() {},
+ createConversation: async () => 1,
+ saveUserMessage: async () => {},
+ saveAssistantMessage() {},
+ loadConversation: async () => {},
+ handleNewChat() {},
+ };
+ }
+ `,
+};
+
+test("a note chat reads busy until a cancelled send lets go of the send lock", async (t) => {
+ let root;
+ t.after(async () => {
+ if (root) await React.act(async () => root.unmount());
+ delete globalThis.__finishSend;
+ });
+ installBrowserGlobals(t);
+ const container = installInteractiveDom(t);
+ const vite = await createRendererServer(t, {
+ cachePrefix: "openwhispr-embedded-chat-send-lock-test-",
+ mockModules: MOCKS,
+ });
+ const { useEmbeddedChat } = await vite.ssrLoadModule("/hooks/useEmbeddedChat.ts");
+ let chat;
+ function Harness() {
+ chat = useEmbeddedChat({ noteId: null, folderId: null, noteTitle: "", noteContent: "" });
+ return null;
+ }
+ root = createRoot(container);
+ await React.act(async () => root.render(React.createElement(Harness)));
+ assert.equal(chat.agentState, "idle");
+
+ let firstSend;
+ await React.act(async () => {
+ firstSend = chat.sendMessage("What did we decide?");
+ });
+ // A question sent now would be refused by the lock, so the composer and the
+ // quick actions must treat the chat as busy and keep it.
+ assert.notEqual(chat.agentState, "idle");
+
+ await React.act(async () => {
+ globalThis.__finishSend();
+ await firstSend;
+ });
+ assert.equal(chat.agentState, "idle");
+});
diff --git a/test/hooks/useStickToBottom.test.js b/test/hooks/useStickToBottom.test.js
new file mode 100644
index 000000000..4f32d9a85
--- /dev/null
+++ b/test/hooks/useStickToBottom.test.js
@@ -0,0 +1,88 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+const React = require("react");
+const { createRoot } = require("react-dom/client");
+const { createRendererServer, installBrowserGlobals } = require("../lib/rendererTestHarness");
+const { installInteractiveDom } = require("../lib/interactiveDom");
+
+// Models the platform rule the hook depends on: an observer only hears about the
+// box it observes, so a padding change reaches border-box observers alone.
+function installResizeObservers(t) {
+ const original = globalThis.ResizeObserver;
+ const observers = new Set();
+ globalThis.ResizeObserver = class {
+ constructor(callback) {
+ this.callback = callback;
+ this.targets = [];
+ observers.add(this);
+ }
+ observe(element, options = {}) {
+ this.targets.push({ element, box: options.box ?? "content-box" });
+ }
+ disconnect() {
+ observers.delete(this);
+ }
+ };
+ t.after(() => {
+ if (original === undefined) delete globalThis.ResizeObserver;
+ else globalThis.ResizeObserver = original;
+ });
+ return {
+ resizePadding(element) {
+ for (const observer of [...observers]) {
+ const hears = observer.targets.some(
+ (target) => target.element === element && target.box === "border-box"
+ );
+ if (hears) observer.callback([]);
+ }
+ },
+ };
+}
+
+async function mountScroller(t) {
+ let root;
+ t.after(async () => {
+ if (root) await React.act(async () => root.unmount());
+ });
+ installBrowserGlobals(t);
+ const container = installInteractiveDom(t);
+ const resizeObservers = installResizeObservers(t);
+ const vite = await createRendererServer(t, { cachePrefix: "openwhispr-stick-to-bottom-test-" });
+ const { useStickToBottom } = await vite.ssrLoadModule("/hooks/useStickToBottom.ts");
+ function Scroller() {
+ const { scrollRef, handleScroll } = useStickToBottom("messages");
+ return React.createElement(
+ "div",
+ { ref: scrollRef, onScroll: handleScroll },
+ React.createElement("div", null, "conversation")
+ );
+ }
+ root = createRoot(container);
+ await React.act(async () => root.render(React.createElement(Scroller)));
+ const scroller = container.childNodes[0];
+ Object.assign(scroller, { scrollHeight: 1000, clientHeight: 400, scrollTop: 600 });
+ return { scroller, content: scroller.childNodes[0], resizeObservers };
+}
+
+test("added bottom padding keeps a pinned conversation at its end", async (t) => {
+ const { scroller, content, resizeObservers } = await mountScroller(t);
+
+ // The focused composer grows over the list and pads the content by the same height.
+ scroller.scrollHeight = 1120;
+ resizeObservers.resizePadding(content);
+
+ assert.equal(scroller.scrollTop, 720, "the last lines stay above the composer");
+});
+
+test("added bottom padding never pulls a reader back down", async (t) => {
+ const { scroller, content, resizeObservers } = await mountScroller(t);
+ scroller.scrollTop = 100;
+ await React.act(async () =>
+ scroller.dispatchEvent({ type: "scroll", bubbles: false, preventDefault() {} })
+ );
+
+ scroller.scrollHeight = 1120;
+ resizeObservers.resizePadding(content);
+
+ assert.equal(scroller.scrollTop, 100);
+});
diff --git a/test/lib/interactiveDom.js b/test/lib/interactiveDom.js
index a2eb5a96d..a6fbd04e4 100644
--- a/test/lib/interactiveDom.js
+++ b/test/lib/interactiveDom.js
@@ -50,6 +50,10 @@ function installInteractiveDom(t) {
return this.childNodes[0] ?? null;
}
+ get firstElementChild() {
+ return this.childNodes.find((child) => child.nodeType === 1) ?? null;
+ }
+
get lastChild() {
return this.childNodes.at(-1) ?? null;
}
@@ -142,6 +146,28 @@ function installInteractiveDom(t) {
focus() {
this.ownerDocument.activeElement = this;
}
+
+ // Tag-name and [attribute] selectors only.
+ querySelectorAll(selector) {
+ const attribute = selector.match(/^\[([\w-]+)\]$/)?.[1];
+ const tagName = selector.toUpperCase();
+ const matches = [];
+ const visit = (node) => {
+ for (const child of node.childNodes) {
+ if (child.nodeType !== 1) continue;
+ if (attribute ? child.attributes.has(attribute) : child.tagName === tagName) {
+ matches.push(child);
+ }
+ visit(child);
+ }
+ };
+ visit(this);
+ return matches;
+ }
+
+ querySelector(selector) {
+ return this.querySelectorAll(selector)[0] ?? null;
+ }
}
const documentListeners = new Map();
diff --git a/test/utils/grassRustle.test.js b/test/utils/grassRustle.test.js
new file mode 100644
index 000000000..06776b09c
--- /dev/null
+++ b/test/utils/grassRustle.test.js
@@ -0,0 +1,110 @@
+const test = require("node:test");
+const assert = require("node:assert/strict");
+
+const load = () => import("../../src/utils/grassRustle.ts");
+
+// Just enough of the Web Audio graph for the rustle to build and schedule grains; records
+// when the context is suspended or resumed.
+function installFakeAudio(t) {
+ const calls = [];
+ const param = () => ({
+ value: 0,
+ setValueAtTime() {},
+ setTargetAtTime() {},
+ cancelScheduledValues() {},
+ linearRampToValueAtTime() {},
+ exponentialRampToValueAtTime() {},
+ });
+ const node = (extra = {}) => ({ connect: (next) => next, ...extra });
+ class FakeAudioContext {
+ constructor() {
+ this.sampleRate = 8000;
+ this.currentTime = 0;
+ this.destination = node();
+ }
+ createBuffer(_channels, length) {
+ const data = new Float32Array(length);
+ return { duration: 1, getChannelData: () => data };
+ }
+ createBiquadFilter() {
+ return node({ frequency: param(), Q: param() });
+ }
+ createGain() {
+ return node({ gain: param() });
+ }
+ createBufferSource() {
+ return node({ start() {}, stop() {} });
+ }
+ suspend() {
+ calls.push("suspend");
+ return Promise.resolve();
+ }
+ resume() {
+ calls.push("resume");
+ return Promise.resolve();
+ }
+ close() {
+ calls.push("close");
+ return Promise.resolve();
+ }
+ }
+
+ let clock = 0;
+ let tick = null;
+ const originalNow = performance.now;
+ globalThis.AudioContext = FakeAudioContext;
+ globalThis.window = {
+ setInterval: (callback) => {
+ tick = callback;
+ return 1;
+ },
+ clearInterval: () => {
+ tick = null;
+ },
+ };
+ performance.now = () => clock;
+ t.after(() => {
+ delete globalThis.AudioContext;
+ delete globalThis.window;
+ performance.now = originalNow;
+ });
+ return {
+ calls,
+ advance(ms) {
+ clock += ms;
+ tick?.();
+ },
+ };
+}
+
+test("the audio context runs only while there is rustling to play", async (t) => {
+ const audio = installFakeAudio(t);
+ const { createGrassRustle } = await load();
+
+ const rustle = createGrassRustle();
+ assert.deepEqual(audio.calls, ["suspend"], "silent until the first brush");
+
+ rustle.brush(1);
+ rustle.brush(1);
+ assert.deepEqual(audio.calls, ["suspend", "resume"]);
+
+ // The rustle fades out after the last brush, then the context sleeps again.
+ audio.advance(2000);
+ assert.deepEqual(audio.calls, ["suspend", "resume", "suspend"]);
+
+ rustle.brush(1);
+ assert.deepEqual(audio.calls, ["suspend", "resume", "suspend", "resume"]);
+ rustle.dispose();
+});
+
+test("hushing puts the context to sleep", async (t) => {
+ const audio = installFakeAudio(t);
+ const { createGrassRustle } = await load();
+
+ const rustle = createGrassRustle();
+ rustle.brush(1);
+ rustle.hush();
+ assert.deepEqual(audio.calls, ["suspend", "resume", "suspend"]);
+ rustle.dispose();
+ assert.equal(audio.calls.at(-1), "close");
+});