Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

feat: polish document motion and phone creation (#3869)

Amruth Pillai0f43aae28881
diff --git a/apps/mobile/locales/af-ZA.po b/apps/mobile/locales/af-ZA.po
index cb86fa78b..b4e6340fb 100644
--- a/apps/mobile/locales/af-ZA.po
+++ b/apps/mobile/locales/af-ZA.po
@@ -8030,6 +8030,10 @@ msgstr "Geen datums is gevind nie."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Geen dokumente"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/am-ET.po b/apps/mobile/locales/am-ET.po
index 1016822a2..e39387a82 100644
--- a/apps/mobile/locales/am-ET.po
+++ b/apps/mobile/locales/am-ET.po
@@ -8030,6 +8030,10 @@ msgstr "ምንም ቀናት አልተገኙም።"
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "ምንም ሰነዶች የሉም"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/ar-SA.po b/apps/mobile/locales/ar-SA.po
index c7e36351d..fa11a6df0 100644
--- a/apps/mobile/locales/ar-SA.po
+++ b/apps/mobile/locales/ar-SA.po
@@ -8030,6 +8030,10 @@ msgstr "لم يُعثر على أي تواريخ."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "لا توجد مستندات"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/az-AZ.po b/apps/mobile/locales/az-AZ.po
index 5e8d7b081..add330214 100644
--- a/apps/mobile/locales/az-AZ.po
+++ b/apps/mobile/locales/az-AZ.po
@@ -8030,6 +8030,10 @@ msgstr "Heç bir tarix tapılmadı."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Sənəd yoxdur"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/bg-BG.po b/apps/mobile/locales/bg-BG.po
index 897b0d2f8..766dd8e6e 100644
--- a/apps/mobile/locales/bg-BG.po
+++ b/apps/mobile/locales/bg-BG.po
@@ -8030,6 +8030,10 @@ msgstr "Не бяха открити дати."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Няма документи"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/bn-BD.po b/apps/mobile/locales/bn-BD.po
index 471ce607a..6b1aee2d1 100644
--- a/apps/mobile/locales/bn-BD.po
+++ b/apps/mobile/locales/bn-BD.po
@@ -8030,6 +8030,10 @@ msgstr "কোনো তারিখ পাওয়া যায়নি।"
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "কোনো নথি নেই"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/ca-ES.po b/apps/mobile/locales/ca-ES.po
index e807be5f1..5371bc859 100644
--- a/apps/mobile/locales/ca-ES.po
+++ b/apps/mobile/locales/ca-ES.po
@@ -8030,6 +8030,10 @@ msgstr "No s'ha trobat cap data."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Cap document"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/cs-CZ.po b/apps/mobile/locales/cs-CZ.po
index 12af273e2..8f6bf31a4 100644
--- a/apps/mobile/locales/cs-CZ.po
+++ b/apps/mobile/locales/cs-CZ.po
@@ -8030,6 +8030,10 @@ msgstr "Nebyla nalezena žádná data."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Žádné dokumenty"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/da-DK.po b/apps/mobile/locales/da-DK.po
index 2e945608e..921659b34 100644
--- a/apps/mobile/locales/da-DK.po
+++ b/apps/mobile/locales/da-DK.po
@@ -8030,6 +8030,10 @@ msgstr "Der blev ikke fundet nogen datoer."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Ingen dokumenter"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/de-DE.po b/apps/mobile/locales/de-DE.po
index 576ac1aad..fc62ce704 100644
--- a/apps/mobile/locales/de-DE.po
+++ b/apps/mobile/locales/de-DE.po
@@ -8030,6 +8030,10 @@ msgstr "Es wurden keine Datumsangaben gefunden."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Keine Dokumente"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/el-GR.po b/apps/mobile/locales/el-GR.po
index 77e3c9527..d2713305d 100644
--- a/apps/mobile/locales/el-GR.po
+++ b/apps/mobile/locales/el-GR.po
@@ -8030,6 +8030,10 @@ msgstr "Δεν βρέθηκαν ημερομηνίες."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Δεν υπάρχουν έγγραφα"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/en-GB.po b/apps/mobile/locales/en-GB.po
index 948d53f07..38a4d3c3c 100644
--- a/apps/mobile/locales/en-GB.po
+++ b/apps/mobile/locales/en-GB.po
@@ -8030,6 +8030,10 @@ msgstr "No dates were found."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "No documents"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/en-US.po b/apps/mobile/locales/en-US.po
index d51d18095..014d0e44a 100644
--- a/apps/mobile/locales/en-US.po
+++ b/apps/mobile/locales/en-US.po
@@ -8026,6 +8026,10 @@ msgstr "No dates were found."
msgid "no documents"
msgstr "no documents"
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "No documents"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
diff --git a/apps/mobile/locales/es-ES.po b/apps/mobile/locales/es-ES.po
index 58f29ceaa..847c3bc57 100644
--- a/apps/mobile/locales/es-ES.po
+++ b/apps/mobile/locales/es-ES.po
@@ -8030,6 +8030,10 @@ msgstr "No se encontraron fechas."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "No hay documentos"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/fa-IR.po b/apps/mobile/locales/fa-IR.po
index 7da366a9b..012ff1c7d 100644
--- a/apps/mobile/locales/fa-IR.po
+++ b/apps/mobile/locales/fa-IR.po
@@ -8030,6 +8030,10 @@ msgstr "هیچ تاریخی پیدا نشد."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "سندی وجود ندارد"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/fi-FI.po b/apps/mobile/locales/fi-FI.po
index fe3bf28fb..70feae635 100644
--- a/apps/mobile/locales/fi-FI.po
+++ b/apps/mobile/locales/fi-FI.po
@@ -8030,6 +8030,10 @@ msgstr "Päivämääriä ei löytynyt."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Ei asiakirjoja"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/fr-FR.po b/apps/mobile/locales/fr-FR.po
index 35b02a407..195d930c6 100644
--- a/apps/mobile/locales/fr-FR.po
+++ b/apps/mobile/locales/fr-FR.po
@@ -8030,6 +8030,10 @@ msgstr "Aucune date n'a été trouvée."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Aucun document"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/he-IL.po b/apps/mobile/locales/he-IL.po
index c6419bfac..01b9e512f 100644
--- a/apps/mobile/locales/he-IL.po
+++ b/apps/mobile/locales/he-IL.po
@@ -8030,6 +8030,10 @@ msgstr "לא נמצאו תאריכים."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "אין מסמכים"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/hi-IN.po b/apps/mobile/locales/hi-IN.po
index 54c208c6b..4723546fe 100644
--- a/apps/mobile/locales/hi-IN.po
+++ b/apps/mobile/locales/hi-IN.po
@@ -8030,6 +8030,10 @@ msgstr "कोई तारीख नहीं मिली।"
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "कोई दस्तावेज़ नहीं"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/hu-HU.po b/apps/mobile/locales/hu-HU.po
index 1f3209db4..caa7b4baf 100644
--- a/apps/mobile/locales/hu-HU.po
+++ b/apps/mobile/locales/hu-HU.po
@@ -8030,6 +8030,10 @@ msgstr "Nem található dátum."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Nincsenek dokumentumok"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/id-ID.po b/apps/mobile/locales/id-ID.po
index e7e86cfd1..1220d4845 100644
--- a/apps/mobile/locales/id-ID.po
+++ b/apps/mobile/locales/id-ID.po
@@ -8030,6 +8030,10 @@ msgstr "Tidak ditemukan tanggal."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Tidak ada dokumen"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/it-IT.po b/apps/mobile/locales/it-IT.po
index fa4e3a9d0..af4f58e34 100644
--- a/apps/mobile/locales/it-IT.po
+++ b/apps/mobile/locales/it-IT.po
@@ -8030,6 +8030,10 @@ msgstr "Non sono state trovate date."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Nessun documento"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/ja-JP.po b/apps/mobile/locales/ja-JP.po
index 7ecb18c74..c5d9a7903 100644
--- a/apps/mobile/locales/ja-JP.po
+++ b/apps/mobile/locales/ja-JP.po
@@ -8030,6 +8030,10 @@ msgstr "日付が見つかりませんでした。"
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "ドキュメントがありません"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/km-KH.po b/apps/mobile/locales/km-KH.po
index 7d4fde93e..351fc9417 100644
--- a/apps/mobile/locales/km-KH.po
+++ b/apps/mobile/locales/km-KH.po
@@ -8030,6 +8030,10 @@ msgstr "រកមិនឃើញកាលបរិច្ឆេទទេ។"
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "មិនមានឯកសារ"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/kn-IN.po b/apps/mobile/locales/kn-IN.po
index b0b974d55..98e6c0c40 100644
--- a/apps/mobile/locales/kn-IN.po
+++ b/apps/mobile/locales/kn-IN.po
@@ -8030,6 +8030,10 @@ msgstr "ಯಾವುದೇ ದಿನಾಂಕಗಳು ಕಂಡುಬಂದಿ
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "ಯಾವುದೇ ದಾಖಲೆಗಳಿಲ್ಲ"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/ko-KR.po b/apps/mobile/locales/ko-KR.po
index d8f043add..4616105c6 100644
--- a/apps/mobile/locales/ko-KR.po
+++ b/apps/mobile/locales/ko-KR.po
@@ -8030,6 +8030,10 @@ msgstr "날짜를 찾을 수 없습니다."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "문서가 없습니다"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/lt-LT.po b/apps/mobile/locales/lt-LT.po
index 88f829c3e..c7abc28ed 100644
--- a/apps/mobile/locales/lt-LT.po
+++ b/apps/mobile/locales/lt-LT.po
@@ -8030,6 +8030,10 @@ msgstr "Datų nerasta."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Nėra dokumentų"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/lv-LV.po b/apps/mobile/locales/lv-LV.po
index 86324dccc..5c27a1ae9 100644
--- a/apps/mobile/locales/lv-LV.po
+++ b/apps/mobile/locales/lv-LV.po
@@ -8030,6 +8030,10 @@ msgstr "Datumi nav atrasti."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Nav dokumentu"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/ml-IN.po b/apps/mobile/locales/ml-IN.po
index 5eea369de..749c45c0d 100644
--- a/apps/mobile/locales/ml-IN.po
+++ b/apps/mobile/locales/ml-IN.po
@@ -8030,6 +8030,10 @@ msgstr "തീയതികളൊന്നും കണ്ടെത്തിയ
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "രേഖകളൊന്നുമില്ല"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/mr-IN.po b/apps/mobile/locales/mr-IN.po
index b061a0792..13dc340c2 100644
--- a/apps/mobile/locales/mr-IN.po
+++ b/apps/mobile/locales/mr-IN.po
@@ -8030,6 +8030,10 @@ msgstr "तारखा सापडल्या नाहीत."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "कोणतीही कागदपत्रे नाहीत"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/ms-MY.po b/apps/mobile/locales/ms-MY.po
index 32577a2d8..e9b47e00c 100644
--- a/apps/mobile/locales/ms-MY.po
+++ b/apps/mobile/locales/ms-MY.po
@@ -8030,6 +8030,10 @@ msgstr "Tiada tarikh ditemui."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Tiada dokumen"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/ne-NP.po b/apps/mobile/locales/ne-NP.po
index f94852c5c..88220401b 100644
--- a/apps/mobile/locales/ne-NP.po
+++ b/apps/mobile/locales/ne-NP.po
@@ -8030,6 +8030,10 @@ msgstr "कुनै मिति फेला परेन।"
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "कुनै कागजात छैन"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/nl-NL.po b/apps/mobile/locales/nl-NL.po
index e7bcee621..6a342791b 100644
--- a/apps/mobile/locales/nl-NL.po
+++ b/apps/mobile/locales/nl-NL.po
@@ -8030,6 +8030,10 @@ msgstr "Er zijn geen data gevonden."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Geen documenten"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/no-NO.po b/apps/mobile/locales/no-NO.po
index c1a8a9e4c..f1eb8d556 100644
--- a/apps/mobile/locales/no-NO.po
+++ b/apps/mobile/locales/no-NO.po
@@ -8030,6 +8030,10 @@ msgstr "Ingen datoer ble funnet."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Ingen dokumenter"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/or-IN.po b/apps/mobile/locales/or-IN.po
index 79c80ebe7..014068fa0 100644
--- a/apps/mobile/locales/or-IN.po
+++ b/apps/mobile/locales/or-IN.po
@@ -8049,6 +8049,10 @@ msgstr "କୌଣସି ତାରିଖ ମିଳିଲା ନାହିଁ।"
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "କୌଣସି ଦଲିଲ ନାହିଁ"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/pl-PL.po b/apps/mobile/locales/pl-PL.po
index 87630dbae..8c0f53e6a 100644
--- a/apps/mobile/locales/pl-PL.po
+++ b/apps/mobile/locales/pl-PL.po
@@ -8030,6 +8030,10 @@ msgstr "Nie znaleziono dat."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Brak dokumentów"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/pt-BR.po b/apps/mobile/locales/pt-BR.po
index e8cf808b0..b3d9a464a 100644
--- a/apps/mobile/locales/pt-BR.po
+++ b/apps/mobile/locales/pt-BR.po
@@ -8030,6 +8030,10 @@ msgstr "Nenhuma data foi encontrada."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Nenhum documento"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/pt-PT.po b/apps/mobile/locales/pt-PT.po
index 3ae6a1e71..d0bf7296e 100644
--- a/apps/mobile/locales/pt-PT.po
+++ b/apps/mobile/locales/pt-PT.po
@@ -8030,6 +8030,10 @@ msgstr "Não foi encontrada nenhuma data."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Nenhum documento"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/ro-RO.po b/apps/mobile/locales/ro-RO.po
index 3336efdde..64bd138a3 100644
--- a/apps/mobile/locales/ro-RO.po
+++ b/apps/mobile/locales/ro-RO.po
@@ -8030,6 +8030,10 @@ msgstr "Nu a fost găsită nicio dată."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Niciun document"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/ru-RU.po b/apps/mobile/locales/ru-RU.po
index ce2ed7b11..e0ac471e9 100644
--- a/apps/mobile/locales/ru-RU.po
+++ b/apps/mobile/locales/ru-RU.po
@@ -8030,6 +8030,10 @@ msgstr "Даты не найдены."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Нет документов"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/sk-SK.po b/apps/mobile/locales/sk-SK.po
index 06950895f..bd0800c38 100644
--- a/apps/mobile/locales/sk-SK.po
+++ b/apps/mobile/locales/sk-SK.po
@@ -8030,6 +8030,10 @@ msgstr "Neboli nájdené žiadne dátumy."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Žiadne dokumenty"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/sl-SI.po b/apps/mobile/locales/sl-SI.po
index be9824f86..c9cfc91a3 100644
--- a/apps/mobile/locales/sl-SI.po
+++ b/apps/mobile/locales/sl-SI.po
@@ -8030,6 +8030,10 @@ msgstr "Datumov ni bilo mogoče najti."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Ni dokumentov"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/sq-AL.po b/apps/mobile/locales/sq-AL.po
index 1634fcfc7..a01801a59 100644
--- a/apps/mobile/locales/sq-AL.po
+++ b/apps/mobile/locales/sq-AL.po
@@ -8030,6 +8030,10 @@ msgstr "Nuk u gjetën data."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Nuk ka dokumente"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/sr-SP.po b/apps/mobile/locales/sr-SP.po
index 867441b0e..cd364b250 100644
--- a/apps/mobile/locales/sr-SP.po
+++ b/apps/mobile/locales/sr-SP.po
@@ -8030,6 +8030,10 @@ msgstr "Нису пронађени датуми."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Нема докумената"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/sv-SE.po b/apps/mobile/locales/sv-SE.po
index b637e26d0..391149d34 100644
--- a/apps/mobile/locales/sv-SE.po
+++ b/apps/mobile/locales/sv-SE.po
@@ -8030,6 +8030,10 @@ msgstr "Inga datum hittades."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Inga dokument"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/ta-IN.po b/apps/mobile/locales/ta-IN.po
index 3159fe370..dce9d2b4d 100644
--- a/apps/mobile/locales/ta-IN.po
+++ b/apps/mobile/locales/ta-IN.po
@@ -8030,6 +8030,10 @@ msgstr "தேதிகள் எதுவும் காணப்படவி
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "ஆவணங்கள் இல்லை"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/te-IN.po b/apps/mobile/locales/te-IN.po
index 341799289..a666a5025 100644
--- a/apps/mobile/locales/te-IN.po
+++ b/apps/mobile/locales/te-IN.po
@@ -8030,6 +8030,10 @@ msgstr "తేదీలు కనుగొనబడలేదు."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "పత్రాలు లేవు"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/th-TH.po b/apps/mobile/locales/th-TH.po
index 3977ebbc0..9b8899fa3 100644
--- a/apps/mobile/locales/th-TH.po
+++ b/apps/mobile/locales/th-TH.po
@@ -8030,6 +8030,10 @@ msgstr "ไม่พบวันที่"
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "ไม่มีเอกสาร"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/tr-TR.po b/apps/mobile/locales/tr-TR.po
index db1934b82..c8eba2ab6 100644
--- a/apps/mobile/locales/tr-TR.po
+++ b/apps/mobile/locales/tr-TR.po
@@ -8030,6 +8030,10 @@ msgstr "Tarih bulunamadı."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Belge yok"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/uk-UA.po b/apps/mobile/locales/uk-UA.po
index 6e3d3bfbd..c08fd0f10 100644
--- a/apps/mobile/locales/uk-UA.po
+++ b/apps/mobile/locales/uk-UA.po
@@ -8030,6 +8030,10 @@ msgstr "Дат не знайдено."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Немає документів"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/uz-UZ.po b/apps/mobile/locales/uz-UZ.po
index 23a376742..bb7497bad 100644
--- a/apps/mobile/locales/uz-UZ.po
+++ b/apps/mobile/locales/uz-UZ.po
@@ -8030,6 +8030,10 @@ msgstr "Sanalar topilmadi."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Hujjatlar yo‘q"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/vi-VN.po b/apps/mobile/locales/vi-VN.po
index d01e640fd..7423baf43 100644
--- a/apps/mobile/locales/vi-VN.po
+++ b/apps/mobile/locales/vi-VN.po
@@ -8030,6 +8030,10 @@ msgstr "Không tìm thấy ngày tháng nào."
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "Không có tài liệu"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/zh-CN.po b/apps/mobile/locales/zh-CN.po
index f34def556..1670169f8 100644
--- a/apps/mobile/locales/zh-CN.po
+++ b/apps/mobile/locales/zh-CN.po
@@ -8030,6 +8030,10 @@ msgstr "未找到任何日期。"
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "没有文档"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/zh-TW.po b/apps/mobile/locales/zh-TW.po
index bd39ce907..388e935c3 100644
--- a/apps/mobile/locales/zh-TW.po
+++ b/apps/mobile/locales/zh-TW.po
@@ -8030,6 +8030,10 @@ msgstr "未找到任何日期。"
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr "沒有文件"
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/locales/zu-ZA.po b/apps/mobile/locales/zu-ZA.po
index 489ddc51e..a40830f4b 100644
--- a/apps/mobile/locales/zu-ZA.po
+++ b/apps/mobile/locales/zu-ZA.po
@@ -8024,6 +8024,10 @@ msgstr ""
msgid "no documents"
msgstr ""
+#: src/features/documents/library.tsx
+msgid "No documents"
+msgstr ""
+
#: src/features/workspace/tabs/messages.tsx
msgid "No documents or answers are linked. This records the application as sent, and moves it. You submit on the employer's site yourself."
msgstr ""
diff --git a/apps/mobile/scripts/document-removal-motion.test.mjs b/apps/mobile/scripts/document-removal-motion.test.mjs
new file mode 100644
index 000000000..d23736267
--- /dev/null
+++ b/apps/mobile/scripts/document-removal-motion.test.mjs
@@ -0,0 +1,422 @@
+// Host lifecycle/SDK-boundary proof; native worklet execution and gesture feel need device QA.
+import assert from "node:assert/strict";
+import { readFileSync } from "node:fs";
+import { createRequire } from "node:module";
+import { test } from "node:test";
+
+const server = createRequire(new URL("../../server/package.json", import.meta.url));
+const { transformSync } = createRequire(server.resolve("tsx"))("esbuild");
+let owner;
+const same = (a, b) => a && b && a.length === b.length && a.every((value, i) => Object.is(value, b[i]));
+const react = {
+ createElement: (type, props) => ({ type, props }),
+ useRef(value) {
+ const index = owner.cursor++;
+ return (owner.hooks[index] ??= { current: value });
+ },
+ useState(initial) {
+ const current = owner;
+ const index = current.cursor++;
+ if (!(index in current.hooks)) current.hooks[index] = typeof initial === "function" ? initial() : initial;
+ return [
+ current.hooks[index],
+ (value) => {
+ current.hooks[index] = typeof value === "function" ? value(current.hooks[index]) : value;
+ },
+ ];
+ },
+ useMemo(make, deps) {
+ const index = owner.cursor++;
+ if (!same(owner.hooks[index]?.deps, deps)) owner.hooks[index] = { deps, value: make() };
+ return owner.hooks[index].value;
+ },
+ useCallback(fn, deps) {
+ return react.useMemo(() => fn, deps);
+ },
+ useEffect(effect, deps) {
+ const current = owner;
+ const index = current.cursor++;
+ const previous = current.hooks[index];
+ if (!same(previous?.deps, deps))
+ current.effects.push(() => {
+ previous?.cleanup?.();
+ current.hooks[index] = { deps, cleanup: effect() };
+ });
+ },
+};
+react.useLayoutEffect = react.useEffect;
+function mount(render, props) {
+ const instance = { hooks: [], effects: [], cursor: 0, props };
+ instance.render = (next = instance.props) => {
+ instance.props = next;
+ instance.cursor = 0;
+ owner = instance;
+ instance.value = render(next);
+ for (const effect of instance.effects.splice(0)) effect();
+ return instance.value;
+ };
+ instance.render();
+ return instance;
+}
+function load(path, mocks) {
+ const module = { exports: {} };
+ const code = transformSync(readFileSync(new URL(`../src/${path}`, import.meta.url), "utf8"), {
+ loader: path.endsWith(".tsx") ? "tsx" : "ts",
+ format: "cjs",
+ jsx: "transform",
+ }).code;
+ new Function("React", "require", "module", "exports", code)(
+ react,
+ (name) => {
+ assert.ok(name in mocks, `Missing native boundary: ${name}`);
+ return mocks[name];
+ },
+ module,
+ module.exports,
+ );
+ return module.exports;
+}
+const tick = async () => {
+ for (let i = 0; i < 20; i++) await Promise.resolve();
+};
+
+function fixture(reduced = false, requests = {}) {
+ let blur;
+ const handlers = new Set();
+ const app = {
+ currentState: "active",
+ addEventListener: (_event, handler) => {
+ handlers.add(handler);
+ return { remove: () => handlers.delete(handler) };
+ },
+ };
+ const animations = [];
+ const shared = (initial) => {
+ const ref = react.useRef();
+ return (ref.current ??= {
+ value: initial,
+ get() {
+ return this.value;
+ },
+ set(value) {
+ if (value?.timing) {
+ this.animation = value;
+ animations.push({
+ ...value,
+ finish: () => {
+ this.value = value.value;
+ value.done?.(true);
+ },
+ });
+ } else this.value = value;
+ },
+ });
+ };
+ let accountScope = "account";
+ const session = {
+ useSession: () => ({ status: "signed-in", server: "local" }),
+ getServer: () => "local",
+ getAccountScope: () => accountScope,
+ };
+ const librarySession = load("features/documents/library-session.ts", {
+ react,
+ "zustand/react": { create: () => () => {} },
+ "@/auth/session": session,
+ });
+ const native = load("features/documents/removal-motion.tsx", {
+ react,
+ "./library-session": librarySession,
+ "@/auth/session": session,
+ "expo-router": {
+ useFocusEffect: (callback) =>
+ react.useEffect(() => {
+ blur = callback();
+ return blur;
+ }, [callback]),
+ },
+ "react-native": { AppState: app },
+ "react-native-reanimated": {
+ default: { View: "Animated.View" },
+ ReduceMotion: { Never: "never", System: "system" },
+ useSharedValue: shared,
+ useAnimatedStyle: (read) => ({ read }),
+ withTiming: (value, config, done) => ({ timing: true, value, config, done }),
+ cancelAnimation: (value) => {
+ value.animation?.done?.(false);
+ value.animation = null;
+ },
+ },
+ "react-native-worklets": { scheduleOnRN: (fn) => fn() },
+ "@/ui/motion": { useReducedMotion: () => reduced },
+ "@/ui/tokens": { motion: { d1: 120, d2: 200 } },
+ });
+ const collection = mount(
+ ({ scope, trashed = false, fetching = false, failed = false, data = null }) =>
+ native.useDocumentRemovalMotion(scope, trashed, data, fetching, failed),
+ {
+ scope: "account/library",
+ },
+ );
+ const frame = mount(native.DocumentMotionFrame, { itemKey: "resume:one", register: collection.value.register });
+ const writes = [];
+ const toasts = [];
+ let refreshes = 0;
+ const api = load("features/documents/queries.ts", {
+ react,
+ "@lingui/core/macro": {
+ t: (parts, ...values) => parts.reduce((text, part, index) => text + part + (values[index] ?? ""), ""),
+ plural: (n, options) => options[n === 1 ? "one" : "other"].replace("#", n),
+ },
+ "@orpc/client": { ORPCError: class extends Error {} },
+ "@tanstack/react-query": {
+ useQueryClient: () => ({
+ invalidateQueries: async () => {
+ refreshes++;
+ },
+ }),
+ },
+ "expo-network": { getNetworkStateAsync: async () => ({ isConnected: true, isInternetReachable: true }) },
+ "@reactive-resume/schema/applications/errors": {},
+ "./filter": { documentRef: ({ type, id }) => ({ type, id }) },
+ "@/api/client": {
+ client: {
+ documents: {
+ restoreMany: async ({ documents }) => {
+ writes.push("restore");
+ return { restored: (await requests.restoreMany?.(documents)) ?? documents.length };
+ },
+ purgeMany: async ({ documents }) => {
+ await requests.purgeMany?.();
+ return { deleted: documents.length };
+ },
+ emptyTrash: async () => {
+ await requests.emptyTrash?.();
+ return { deleted: 1 };
+ },
+ trash: async ({ id }) => {
+ await requests.trash?.();
+ if (id === "failed") throw new Error("offline");
+ writes.push(id);
+ },
+ },
+ },
+ orpc: Object.fromEntries(
+ ["documents", "resume", "coverLetters", "applications"].map((key) => [key, { key: () => [key] }]),
+ ),
+ },
+ "@/auth/session": session,
+ "./library-session": librarySession,
+ "@/lib/undone": { confirmUndone: () => toasts.push({ message: "undone" }) },
+ "@/ui": { showToast: (toast) => toasts.push(toast) },
+ });
+ const operations = mount(() => api.useDocumentOperations(true)).value;
+ return {
+ blur: () => blur?.(),
+ collection,
+ frame,
+ operations,
+ animations,
+ writes,
+ toasts,
+ switchAccount: () => {
+ accountScope = "other";
+ },
+ get refreshes() {
+ return refreshes;
+ },
+ background() {
+ app.currentState = "background";
+ for (const handler of handlers) handler("background");
+ },
+ };
+}
+
+for (const cancellation of ["scope", "background", "navigation"])
+ test(`native ${cancellation} cancellation releases accepted removal and refreshes`, async () => {
+ const f = fixture();
+ const pending = f.operations.trash([{ type: "resume", id: "one", isLocked: false }]);
+ await tick();
+ assert.deepEqual(f.writes, ["one"]);
+ assert.equal(f.refreshes, 0, "refetch waits for the visible removal");
+ assert.equal(f.animations.length, 2);
+ if (cancellation === "scope") f.collection.render({ scope: "other-filter" });
+ else if (cancellation === "background") f.background();
+ else f.blur();
+ assert.equal(await pending, true);
+ assert.equal(f.refreshes, 4);
+ assert.equal(f.frame.value.props.style.at(-1).read().opacity, 1);
+ });
+
+test("native reduced removal animates opacity alone; failed writes never animate", async () => {
+ const f = fixture(true);
+ assert.equal(await f.operations.trash([{ type: "resume", id: "failed", isLocked: false }]), false);
+ assert.equal(f.animations.length, 0);
+ const before = f.refreshes;
+ const pending = f.operations.trash([{ type: "resume", id: "one", isLocked: false }]);
+ await tick();
+ assert.equal(f.refreshes, before);
+ assert.equal(f.animations.length, 1);
+ assert.equal(f.animations[0].value, 0);
+ assert.deepEqual(f.animations[0].config, { duration: 120, reduceMotion: "never" });
+ f.animations[0].finish();
+ assert.equal(await pending, true);
+ assert.equal(f.refreshes, before + 4);
+});
+
+test("native animation failure cannot report an accepted write as failed", async () => {
+ const f = fixture();
+ f.collection.value.register("resume:one", {
+ fade: () => {
+ throw new Error("animation unavailable");
+ },
+ reset() {},
+ });
+ assert.equal(await f.operations.trash([{ type: "resume", id: "one", isLocked: false }]), true);
+ assert.deepEqual(f.writes, ["one"]);
+ assert.equal(f.refreshes, 4);
+});
+
+for (const count of [1, 2])
+ test(`native Undo of ${count} documents fades the currently focused Trash collection`, async () => {
+ const f = fixture(true);
+ const documents = Array.from({ length: count }, (_, index) => ({
+ type: "resume",
+ id: index ? "two" : "one",
+ isLocked: false,
+ }));
+ const trash = f.operations.trash(documents);
+ await tick();
+ f.animations.at(-1).finish();
+ assert.equal(await trash, true);
+ const undo = f.toasts.at(-1).action;
+ f.blur();
+ f.collection.render({ scope: "account/trash", trashed: true });
+ f.frame.render({ itemKey: "resume:one", register: f.collection.value.register });
+ const before = f.refreshes;
+ undo.onPress();
+ await tick();
+ assert.equal(f.animations.length, 2, "Restore targets the mounted Trash row");
+ assert.equal(f.refreshes, before, "Restore receipt waits for the current exit");
+ f.animations.at(-1).finish();
+ await tick();
+ assert.equal(f.refreshes, before + 4);
+ });
+
+test("native direct Restore waits for fade and failed refresh holds it until successful retry", async () => {
+ const f = fixture(true);
+ f.collection.render({ scope: "account/trash", trashed: true });
+ f.frame.render({ itemKey: "resume:one", register: f.collection.value.register });
+ const pending = f.operations.restoreSelected([{ type: "resume", id: "one" }]);
+ await tick();
+ assert.equal(f.refreshes, 0);
+ f.animations.at(-1).finish();
+ assert.equal(await pending, true);
+ f.collection.render({ scope: "account/trash", trashed: true, fetching: true });
+ f.collection.render({ scope: "account/trash", trashed: true, failed: true });
+ assert.equal(
+ f.frame.value.props.style.at(-1).read().opacity,
+ 0,
+ "Accepted removal stays faded after refetch failure",
+ );
+ f.collection.render({ scope: "account/trash", trashed: true, data: {} });
+ assert.equal(f.frame.value.props.style.at(-1).read().opacity, 1, "Successful retry releases retained animation");
+});
+
+test("native stale Undo cannot restore into another account", async () => {
+ const f = fixture(true);
+ const pending = f.operations.trash([{ type: "resume", id: "one" }]);
+ await tick();
+ f.animations.at(-1).finish();
+ await pending;
+ f.switchAccount();
+ f.toasts.at(-1).action.onPress();
+ await tick();
+ assert.deepEqual(f.writes, ["one"]);
+});
+
+test("native partial Restore receipt cannot guess which selected row should fade", async () => {
+ const f = fixture(true, { restoreMany: async () => 1 });
+ f.collection.render({ scope: "account/trash", trashed: true });
+ f.frame.render({ itemKey: "resume:one", register: f.collection.value.register });
+ const pending = f.operations.restoreSelected([
+ { type: "resume", id: "one" },
+ { type: "resume", id: "two" },
+ ]);
+ await tick();
+ assert.equal(f.animations.length, 0, "Partial counts contain no changed item IDs");
+ assert.equal(f.frame.value.props.style.at(-1).read().opacity, 1);
+ assert.equal(await pending, false);
+ assert.equal(f.refreshes, 4);
+});
+
+for (const method of ["trash", "restoreSelected", "purgeSelected", "emptyTrash"])
+ test(`native late ${method} receipt cannot notify another account`, async () => {
+ let release;
+ const receipt = new Promise((resolve) => {
+ release = resolve;
+ });
+ const request = method === "restoreSelected" ? "restoreMany" : method === "purgeSelected" ? "purgeMany" : method;
+ const f = fixture(true, {
+ [request]: async () => {
+ await receipt;
+ },
+ });
+ const pending = f.operations[method]([{ type: "resume", id: "one" }]);
+ await tick();
+ f.switchAccount();
+ release();
+ await pending;
+ assert.deepEqual(f.toasts, [], "An old account's result must not enter the new account's toast host");
+ });
+
+for (const batch of [false, true])
+ test(`native late failure stays with its original account (batch=${batch})`, async () => {
+ let release;
+ const receipt = new Promise((resolve) => {
+ release = resolve;
+ });
+ const f = fixture(true);
+ const task = async () => {
+ await receipt;
+ throw new Error("Old account request failed");
+ };
+ const pending = f.operations.run(() =>
+ batch ? f.operations.batch([{ type: "resume", id: "one" }], task) : task(),
+ );
+ await tick();
+ f.switchAccount();
+ release();
+ assert.equal(await pending, false);
+ assert.deepEqual(f.toasts, []);
+ });
+
+test("native current-account batch still reports its successful result", async () => {
+ const f = fixture(true);
+ assert.equal(await f.operations.run(() => f.operations.batch([{ type: "resume", id: "one" }], async () => {})), true);
+ assert.deepEqual(f.toasts, [{ message: "1 document updated" }]);
+ assert.equal(f.refreshes, 4);
+});
+
+test("native Undo completion cannot confirm into a different account", async () => {
+ let release;
+ const receipt = new Promise((resolve) => {
+ release = resolve;
+ });
+ const f = fixture(true, {
+ restoreMany: async () => {
+ await receipt;
+ },
+ });
+ const trash = f.operations.trash([{ type: "resume", id: "one" }]);
+ await tick();
+ f.animations.at(-1).finish();
+ await trash;
+ assert.equal(f.toasts.length, 1);
+ f.toasts[0].action.onPress();
+ await tick();
+ assert.deepEqual(f.writes, ["one", "restore"]);
+ f.switchAccount();
+ release();
+ await tick();
+ assert.equal(f.toasts.length, 1, "Neither success nor error from old Undo enters the current toast host");
+});
diff --git a/apps/mobile/scripts/experience.test.mjs b/apps/mobile/scripts/experience.test.mjs
index e1ee58c6b..ff680ec1f 100644
--- a/apps/mobile/scripts/experience.test.mjs
+++ b/apps/mobile/scripts/experience.test.mjs
@@ -76,6 +76,7 @@ ui.showToast = (value) => calls.push(value);
ui.listItemMotion = () => ({});
ui.listLayout = {};
ui.useFirstAppearance = () => false;
+ui.useReducedMotion = () => false;
const mocks = {
"@/shell/shortcut-help": {
ShortcutHelpButton: "ShortcutHelpButton",
diff --git a/apps/mobile/scripts/layout.test.mjs b/apps/mobile/scripts/layout.test.mjs
index e07b7c180..e60885242 100644
--- a/apps/mobile/scripts/layout.test.mjs
+++ b/apps/mobile/scripts/layout.test.mjs
@@ -526,7 +526,7 @@ const { KnowledgeScreen } = load("features/career/knowledge.tsx", {
"@/ui": { ...ui, Screen: "Screen", Segmented: "Segmented" },
});
native.FlatList = "FlatList";
-const documentQuery = {
+let documentQuery = {
data: { items: [], total: 19500, counts: { resume: 19500, letter: 0 }, tags: [], hasPublic: false },
isError: false,
isPlaceholderData: false,
@@ -537,13 +537,39 @@ let documentPlaceholder;
let pendingDocuments = [];
const documentPage = (input) => ({ queryKey: ["document-page", input] });
let libraryParams = {};
+let libraryAccountScope = "fixture";
+const restoredFromSheet = [];
+const librarySession = load("features/documents/library-session.ts", {
+ "zustand/react": {
+ create: (initialize) => {
+ const store = createRequire(new URL("../package.json", import.meta.url))("zustand/vanilla").createStore(
+ initialize,
+ );
+ return Object.assign((select) => select(store.getState()), store);
+ },
+ },
+ "@/auth/session": { getAccountScope: () => libraryAccountScope },
+});
const { DocumentsLibrary } = load("features/documents/library.tsx", {
+ "./library-session": librarySession,
"@legendapp/list/reanimated": { AnimatedLegendList: "FlatList" },
"./document-sheets": { DocumentSheets: "DocumentSheets" },
+ "./removal-motion": {
+ DocumentMotionFrame: "Animated.View",
+ useDocumentRemovalMotion: () => ({ register: () => () => {}, onEffect: async () => {} }),
+ },
"./filter": load("features/documents/filter.ts"),
"./new-documents": {},
"./pending": { usePendingDocuments: () => pendingDocuments },
- "./queries": { useDocumentOperations: () => ({ busy: false }) },
+ "./queries": {
+ useDocumentOperations: () => ({
+ busy: false,
+ restoreSelected: async (documents) => {
+ restoredFromSheet.push(documents);
+ return true;
+ },
+ }),
+ },
"./thumbnail": { Thumbnail: "Thumbnail" },
"@/api/client": {
client: {},
@@ -556,7 +582,7 @@ const { DocumentsLibrary } = load("features/documents/library.tsx", {
},
"@/auth/session": {
useSession: () => ({ status: "signed-in", server: "fixture" }),
- getAccountScope: () => "fixture",
+ getAccountScope: () => libraryAccountScope,
},
"@/components/collection-header": { CollectionHeader: "CollectionHeader" },
"@tanstack/react-query": {
@@ -591,6 +617,7 @@ const { DocumentsLibrary } = load("features/documents/library.tsx", {
listItemMotion: () => ({}),
listLayout: {},
useFirstAppearance: () => false,
+ useReducedMotion: () => false,
},
});
// A search continuation updates the already-mounted tab, clears its one-shot params, and preserves library paging ownership.
@@ -622,6 +649,81 @@ assert.equal(libraryParams.q, undefined);
assert.equal(libraryParams.type, undefined);
console.log("PASS native repeatable query/type continuation into an already-mounted paginated library");
+// An expired session can keep the tab mounted while a different account signs in.
+const originalDocumentQuery = documentQuery;
+hooks.length = 0;
+libraryAccountScope = "fixture:account-a";
+documentQuery = {
+ ...originalDocumentQuery,
+ data: {
+ items: [{ type: "resume", id: "seen" }],
+ total: 1,
+ counts: { resume: 1, letter: 0 },
+ tags: [],
+ hasPublic: false,
+ },
+};
+render(DocumentsLibrary);
+render(DocumentsLibrary);
+documentQuery = {
+ ...originalDocumentQuery,
+ data: { items: [], total: 0, counts: { resume: 0, letter: 0 }, tags: [], hasPublic: false },
+};
+let emptyLibrary = nodes(render(DocumentsLibrary)).find((node) => node.type === "FlatList");
+assert.equal(
+ emptyLibrary.props.ListEmptyComponent.props.title,
+ "No documents",
+ "The current account keeps its quiet empty state",
+);
+hooks.length = 0;
+emptyLibrary = nodes(render(DocumentsLibrary)).find((node) => node.type === "FlatList");
+assert.equal(
+ emptyLibrary.props.ListEmptyComponent.props.title,
+ "No documents",
+ "History survives collection remount after Trash navigation",
+);
+libraryAccountScope = "fixture:account-b";
+render(DocumentsLibrary);
+emptyLibrary = nodes(render(DocumentsLibrary)).find((node) => node.type === "FlatList");
+assert.equal(
+ emptyLibrary.props.ListEmptyComponent.props.title,
+ "Let's start with what you have",
+ "Another empty account gets its own first-run guidance",
+);
+libraryAccountScope = "fixture:account-a";
+render(DocumentsLibrary);
+emptyLibrary = nodes(render(DocumentsLibrary)).find((node) => node.type === "FlatList");
+assert.equal(
+ emptyLibrary.props.ListEmptyComponent.props.title,
+ "No documents",
+ "Returning to the prior account preserves its own history",
+);
+libraryAccountScope = "fixture";
+documentQuery = originalDocumentQuery;
+hooks.length = 0;
+console.log("PASS native empty-state history belongs to the current account");
+
+// The actual Trash sheet entry point reuses receipt-aware Restore instead of bypassing motion.
+hooks.length = 0;
+const sheetDocument = { type: "resume", id: "restore-sheet", trashedAt: new Date(), name: "Restore fixture" };
+documentQuery = { ...originalDocumentQuery, data: { ...originalDocumentQuery.data, items: [sheetDocument], total: 1 } };
+render(DocumentsLibrary, { trashed: true });
+let trashList = nodes(render(DocumentsLibrary, { trashed: true })).find((node) => node.type === "FlatList");
+const trashItem = trashList.props.renderItem({ item: sheetDocument, index: 0 });
+// Row body is wrapped by the motion frame; its menu opens the sheet owned by DocumentsLibrary.
+nodes(trashItem)
+ .find((node) => typeof node.props.onMenu === "function")
+ .props.onMenu();
+const sheetTree = render(DocumentsLibrary, { trashed: true });
+const restoreSheet = nodes(sheetTree).find((node) => typeof node.props.onRestore === "function");
+assert.ok(restoreSheet);
+restoreSheet.props.onRestore(sheetDocument);
+await new Promise(setImmediate);
+assert.deepEqual(restoredFromSheet, [[sheetDocument]]);
+documentQuery = originalDocumentQuery;
+hooks.length = 0;
+console.log("PASS native single Trash-sheet Restore uses receipt-aware operations");
+
// Changing library columns remounts its header; an active filter must remain visible and clearable.
hooks.length = 0;
let restoredSearch = "Fold QA duplicate";
diff --git a/apps/mobile/scripts/toast.test.mjs b/apps/mobile/scripts/toast.test.mjs
index 8bd7078d1..947754a7a 100644
--- a/apps/mobile/scripts/toast.test.mjs
+++ b/apps/mobile/scripts/toast.test.mjs
@@ -14,7 +14,9 @@ const react = {
useState: (initial) => [initial, () => {}],
useSyncExternalStore: (_subscribe, getSnapshot) => getSnapshot(),
};
-const animation = { duration: () => animation };
+const animation = (name) => ({
+ duration: (duration) => ({ duration, reduceMotion: (policy) => ({ name, duration, policy }) }),
+});
const theme = {
colors: {},
motion: { d1: 120, d2: 200 },
@@ -38,11 +40,13 @@ const mocks = {
View: "View",
},
"react-native-reanimated": {
+ __esModule: true,
default: { View: "Animated.View" },
- FadeIn: animation,
- FadeInDown: animation,
- FadeOut: animation,
- FadeOutDown: animation,
+ ReduceMotion: { Never: "never" },
+ FadeIn: animation("FadeIn"),
+ FadeInDown: animation("FadeInDown"),
+ FadeOut: animation("FadeOut"),
+ FadeOutDown: animation("FadeOutDown"),
},
"react-native-worklets": {},
"@lingui/react/macro": { useLingui: () => ({ t: (parts) => parts.join("") }) },
@@ -85,6 +89,11 @@ const find = (node, type) => {
let undos = 0;
showToast({ message: "Section cleared", undo: () => undos++ });
+const toast = find(Toaster(), "Animated.View");
+assert.equal(toast.props.entering.policy, "never", "reduced-motion opacity entry still runs");
+assert.equal(toast.props.exiting.policy, "never", "reduced-motion opacity exit still runs");
+assert.equal(toast.props.entering.name, "FadeIn", "reduced entry has no spatial movement");
+assert.equal(toast.props.exiting.name, "FadeOut", "reduced exit has no spatial movement");
const action = find(Toaster(), "Pressable");
assert.ok(action, "The toast renders its Undo action");
action.props.onPress();
diff --git a/apps/mobile/src/features/applications-board/board-screen.tsx b/apps/mobile/src/features/applications-board/board-screen.tsx
index f67b6cec9..e7cf841e5 100644
--- a/apps/mobile/src/features/applications-board/board-screen.tsx
+++ b/apps/mobile/src/features/applications-board/board-screen.tsx
@@ -467,6 +467,7 @@ function Column({
const shown = applications.slice(0, visible);
// Columns mount once the board has data, so cards stagger in when the board opens.
const firstAppearance = useFirstAppearance(true);
+ const reduced = useReducedMotion();
const remaining = applications.length - shown.length;
return (
@@ -519,7 +520,11 @@ function Column({
<Text variant="callout" color="ink3">{t`Drop here to close with a reason.`}</Text>
) : null}
{shown.map((application, index) => (
- <Animated.View key={application.id} {...listItemMotion(index, firstAppearance)} layout={listLayout}>
+ <Animated.View
+ key={application.id}
+ {...listItemMotion(index, firstAppearance, { reduced })}
+ layout={listLayout}
+ >
<DraggableCard
application={application}
width={cardWidth}
diff --git a/apps/mobile/src/features/applications/list-screen.tsx b/apps/mobile/src/features/applications/list-screen.tsx
index 3759fc5b6..9260d2389 100644
--- a/apps/mobile/src/features/applications/list-screen.tsx
+++ b/apps/mobile/src/features/applications/list-screen.tsx
@@ -38,6 +38,7 @@ import {
TextField,
listItemMotion,
useFirstAppearance,
+ useReducedMotion,
useTheme,
} from "@/ui";
import { usePullRefresh } from "@/ui/use-pull-refresh";
@@ -80,6 +81,7 @@ function ApplicationsList() {
const lanes = useApplicationLanes();
const pull = usePullRefresh(query.refetch);
const firstAppearance = useFirstAppearance(!query.isPending);
+ const reduced = useReducedMotion();
const { timeZone } = useUserTime();
const { bulkUpdate, bulkDelete, logFollowUp } = useApplicationMutations();
const offerHints = useOfferHints();
@@ -607,7 +609,7 @@ function ApplicationsList() {
.join(" · ");
return (
<Animated.View
- {...listItemMotion(index, firstAppearance)}
+ {...listItemMotion(index, firstAppearance, { reduced })}
style={{
borderWidth: triageActive && focusedRow?.id === item.id ? 2 : 0,
borderColor: colors.accent,
diff --git a/apps/mobile/src/features/career/facts.tsx b/apps/mobile/src/features/career/facts.tsx
index 76f21215a..99f34d373 100644
--- a/apps/mobile/src/features/career/facts.tsx
+++ b/apps/mobile/src/features/career/facts.tsx
@@ -28,6 +28,7 @@ import {
listItemMotion,
listLayout,
useFirstAppearance,
+ useReducedMotion,
useTheme,
} from "@/ui";
import { usePullRefresh } from "@/ui/use-pull-refresh";
@@ -245,11 +246,12 @@ type FactRowProps = { fact: Fact; index: number; first: boolean; pending: boolea
// Memoized: the app has no React Compiler, and typing or one toggle shouldn't re-render every card.
const FactRow = memo(function FactRow({ fact, index, first, pending, actions }: FactRowProps) {
+ const reduced = useReducedMotion();
const { t } = useLingui();
const { size, space } = useTheme();
return (
<Animated.View
- {...listItemMotion(index, first)}
+ {...listItemMotion(index, first, { reduced })}
style={{
paddingBottom: space.s4,
width: "100%",
diff --git a/apps/mobile/src/features/career/stories.tsx b/apps/mobile/src/features/career/stories.tsx
index e405194a2..2d75a941d 100644
--- a/apps/mobile/src/features/career/stories.tsx
+++ b/apps/mobile/src/features/career/stories.tsx
@@ -21,6 +21,7 @@ import {
listItemMotion,
listLayout,
useFirstAppearance,
+ useReducedMotion,
useTheme,
} from "@/ui";
@@ -45,6 +46,7 @@ export function Stories() {
const undo = useUndoRows();
const rows = (stories.data ?? []).filter((row) => !undo.hidden.includes(row.id));
const firstAppearance = useFirstAppearance(!stories.isPending);
+ const reduced = useReducedMotion();
return (
<View style={{ gap: space.s4 }}>
<Text color="ink3">{t`Situation, Task, Action, Result, Reflection. Link each story to facts you can support; leave unknown outcomes blank.`}</Text>
@@ -65,7 +67,7 @@ export function Stories() {
return !fact || fact.status !== "active" || (revision && new Date(revision.at) > new Date(story.updatedAt));
});
return (
- <Animated.View key={story.id} {...listItemMotion(index, firstAppearance)} layout={listLayout}>
+ <Animated.View key={story.id} {...listItemMotion(index, firstAppearance, { reduced })} layout={listLayout}>
<Card style={{ gap: space.s3 }}>
<Text variant="title">{story.data.title}</Text>
{changed ? <Banner tone="warn" message={t`A fact changed. Review this story.`} /> : null}
diff --git a/apps/mobile/src/features/career/today.tsx b/apps/mobile/src/features/career/today.tsx
index c9036c392..4e02a4a66 100644
--- a/apps/mobile/src/features/career/today.tsx
+++ b/apps/mobile/src/features/career/today.tsx
@@ -34,6 +34,7 @@ import {
listLayout,
showToast,
useFirstAppearance,
+ useReducedMotion,
useTheme,
} from "@/ui";
import { usePullRefresh } from "@/ui/use-pull-refresh";
@@ -106,6 +107,7 @@ export function TodayScreen() {
(row) => showRead || (!row.readAt && !undo.hidden.includes(row.id)),
);
const firstAppearance = useFirstAppearance(!queries.notifications.isPending);
+ const reduced = useReducedMotion();
// The same next-step rules as the Applications list: due follow-ups, no reply, interviews this week, offers.
const attention = (applications.data ?? [])
.flatMap((row) => {
@@ -249,7 +251,11 @@ export function TodayScreen() {
)
) : null}
{notes.map((row, index) => (
- <Animated.View key={row.id} {...listItemMotion(index, firstAppearance)} layout={listLayout}>
+ <Animated.View
+ key={row.id}
+ {...listItemMotion(index, firstAppearance, { reduced })}
+ layout={listLayout}
+ >
<Card style={{ gap: space.s3 }}>
<Text variant="title">{row.title}</Text>
<Text>{row.body}</Text>
diff --git a/apps/mobile/src/features/documents/document-sheets.tsx b/apps/mobile/src/features/documents/document-sheets.tsx
index 1f78d37a1..3311e90df 100644
--- a/apps/mobile/src/features/documents/document-sheets.tsx
+++ b/apps/mobile/src/features/documents/document-sheets.tsx
@@ -1,4 +1,5 @@
import type { DocumentSummary } from "./filter";
+import type { useDocumentOperations } from "./queries";
import { useLingui } from "@lingui/react/macro";
import { useQuery } from "@tanstack/react-query";
import { useRouter } from "expo-router";
@@ -6,7 +7,6 @@ import { useRef, useState } from "react";
import { View } from "react-native";
import { changedTags, documentRef, sharedTags } from "./filter";
import { useNewDocuments } from "./new-documents";
-import { useDocumentOperations } from "./queries";
import { client, orpc } from "@/api/client";
import { getAccountScope, useSession } from "@/auth/session";
import { AddApplicationSheet } from "@/features/applications/add-sheet";
@@ -20,18 +20,18 @@ export type DocumentSheet =
| { kind: "tags" | "sharing" | "lock"; documents: DocumentSummary[] };
type DocumentSheetsProps = {
+ operations: ReturnType<typeof useDocumentOperations>;
value: DocumentSheet;
onClose: () => void;
onChange: (value: DocumentSheet) => void;
onSelect: (document: DocumentSummary) => void;
};
-export function DocumentSheets({ value, onClose, onChange, onSelect }: DocumentSheetsProps) {
+export function DocumentSheets({ value, onClose, onChange, onSelect, operations }: DocumentSheetsProps) {
const router = useRouter();
const { t } = useLingui();
const { space } = useTheme();
const session = useSession();
- const operations = useDocumentOperations();
const first = value.documents[0];
const [name, setName] = useState(value.kind === "duplicate" ? value.name : (first?.name ?? ""));
const shared = sharedTags(value.documents);
diff --git a/apps/mobile/src/features/documents/library-session.ts b/apps/mobile/src/features/documents/library-session.ts
new file mode 100644
index 000000000..51d9de48d
--- /dev/null
+++ b/apps/mobile/src/features/documents/library-session.ts
@@ -0,0 +1,37 @@
+import type { DocumentSummary } from "./filter";
+import { useEffect } from "react";
+import { create } from "zustand/react";
+import { getAccountScope } from "@/auth/session";
+
+type DocumentRef = Pick<DocumentSummary, "type" | "id">;
+export type OnDocumentEffect = (
+ effect: "trash" | "restore" | "purge",
+ documents?: readonly DocumentRef[],
+) => void | Promise<void>;
+
+const useHistory = create<{ accounts: Record<string, true> }>(() => ({ accounts: {} }));
+
+/** Nonpersisted account history survives Documents/Trash remounts and account switching. */
+export function useDocumentHistory(scope: string | null, hasDocuments: boolean) {
+ const hadDocuments = useHistory((state) => scope !== null && state.accounts[scope] === true);
+ useEffect(() => {
+ if (!scope || !hasDocuments || getAccountScope() !== scope) return;
+ useHistory.setState((state) => ({ accounts: { ...state.accounts, [scope]: true } }));
+ }, [scope, hasDocuments]);
+ return hasDocuments || hadDocuments;
+}
+
+let collection: { scope: string | null; play: OnDocumentEffect } | undefined;
+
+export function registerDocumentEffect(scope: string | null, play: OnDocumentEffect) {
+ const current = { scope, play };
+ collection = current;
+ return () => {
+ if (collection === current) collection = undefined;
+ };
+}
+
+/** Toasts outlive their originating screen; dispatch only to this account's focused collection. */
+export function playDocumentEffect(scope: string | null, ...args: Parameters<OnDocumentEffect>) {
+ if (scope && getAccountScope() === scope && collection?.scope === scope) return collection.play(...args);
+}
diff --git a/apps/mobile/src/features/documents/library.tsx b/apps/mobile/src/features/documents/library.tsx
index 2d0850013..0fed8d256 100644
--- a/apps/mobile/src/features/documents/library.tsx
+++ b/apps/mobile/src/features/documents/library.tsx
@@ -10,12 +10,13 @@ import { useRouter, Stack, useFocusEffect, useLocalSearchParams } from "expo-rou
import { useCallback, useEffect, useState } from "react";
import { RefreshControl, I18nManager, Platform, Pressable, ScrollView, View, useWindowDimensions } from "react-native";
import ReanimatedSwipeable from "react-native-gesture-handler/ReanimatedSwipeable";
-import Animated from "react-native-reanimated";
import { DocumentSheets } from "./document-sheets";
import { daysLeftInTrash, documentKey, documentRef } from "./filter";
+import { useDocumentHistory } from "./library-session";
import { isNewDocument, useNewDocuments } from "./new-documents";
import { usePendingDocuments } from "./pending";
import { useDocumentOperations } from "./queries";
+import { DocumentMotionFrame, useDocumentRemovalMotion } from "./removal-motion";
import { Thumbnail } from "./thumbnail";
import { client, orpc } from "@/api/client";
import { getAccountScope, useSession } from "@/auth/session";
@@ -40,6 +41,7 @@ import {
listItemMotion,
listLayout,
useFirstAppearance,
+ useReducedMotion,
useTheme,
} from "@/ui";
import { usePullRefresh } from "@/ui/use-pull-refresh";
@@ -237,7 +239,6 @@ export function DocumentsLibrary({ trashed = false }: DocumentsLibraryProps) {
!documents.isPlaceholderData &&
!documents.isError &&
q === query;
- const operations = useDocumentOperations(rowsCurrent);
const changePage = (next: number) => {
setSelection([]);
setSheet(null);
@@ -264,6 +265,14 @@ export function DocumentsLibrary({ trashed = false }: DocumentsLibraryProps) {
);
const grid = !trashed && (view ?? (width >= 768 ? "grid" : "list")) === "grid";
const columns = grid ? (width >= 1000 ? 3 : 2) : 1;
+ const removal = useDocumentRemovalMotion(
+ JSON.stringify([filterKey, displayedOffset, columns]),
+ trashed,
+ documents.data,
+ documents.isFetching,
+ documents.isError,
+ );
+ const operations = useDocumentOperations(rowsCurrent);
if (
page.filterKey !== filterKey ||
(documents.data && !documents.isPlaceholderData && offset > 0 && offset >= documents.data.total)
@@ -291,7 +300,15 @@ export function DocumentsLibrary({ trashed = false }: DocumentsLibraryProps) {
!trashed && type !== "all" && !q && !tags.length && !publicOnly && offset === 0 && displayed?.counts[type] === 0
? type
: null;
+ const quietEmpty = useDocumentHistory(
+ scope,
+ Boolean(
+ (!documents.isPlaceholderData && documents.data?.total) ||
+ (counts.data && counts.data.resume + counts.data.letter + counts.data.trash > 0),
+ ),
+ );
const firstAppearance = useFirstAppearance(filtered.length > 0);
+ const reduced = useReducedMotion();
const selected = rowsCurrent ? filtered.filter((document) => selection.includes(documentKey(document))) : [];
const { refetch: refetchDocuments } = documents;
const { refetch: refetchCounts } = counts;
@@ -589,8 +606,10 @@ export function DocumentsLibrary({ trashed = false }: DocumentsLibraryProps) {
// Reanimated's item layout animation supports one column only.
{...(columns === 1 ? { itemLayoutAnimation: listLayout } : {})}
renderItem={({ item, index }) => (
- <Animated.View
- {...listItemMotion(index, firstAppearance)}
+ <DocumentMotionFrame
+ itemKey={documentKey(item)}
+ register={removal.register}
+ {...listItemMotion(index, firstAppearance, { reduced, exiting: false })}
style={{ flex: 1, maxWidth: Math.max(0, (width - space.s3 * (columns - 1)) / columns) }}
>
<DocumentItem
@@ -613,7 +632,7 @@ export function DocumentsLibrary({ trashed = false }: DocumentsLibraryProps) {
if (rowsCurrent) void duplicate(item);
}}
/>
- </Animated.View>
+ </DocumentMotionFrame>
)}
ListEmptyComponent={
session.status !== "signed-in" ? (
@@ -622,7 +641,9 @@ export function DocumentsLibrary({ trashed = false }: DocumentsLibraryProps) {
title={t`Sign in to see your documents`}
action={{ label: t`Sign in`, onPress: () => router.push(routes.signIn()) }}
/>
- ) : recoverable.length > 0 ? undefined : documents.isPending || (!rowsCurrent && !documents.isError) ? (
+ ) : recoverable.length > 0 ? undefined : documents.isPending ||
+ counts.isPending ||
+ (!rowsCurrent && !documents.isError) ? (
<View style={{ gap: space.s3 }}>
<Skeleton height={size.row * 2} />
<Skeleton height={size.row * 2} />
@@ -650,14 +671,18 @@ export function DocumentsLibrary({ trashed = false }: DocumentsLibraryProps) {
? t`No matches`
: trashed
? t`Trash is empty`
- : t`Let's start with what you have`
+ : quietEmpty
+ ? t`No documents`
+ : t`Let's start with what you have`
}
message={
q || type !== "all" || tags.length || publicOnly || offset > 0
? t`Try another search or clear your filters.`
: trashed
? t`Documents you move here stay for 30 days.`
- : t`Import your current resume, or start fresh with your name.`
+ : quietEmpty
+ ? undefined
+ : t`Import your current resume, or start fresh with your name.`
}
action={
q || type !== "all" || tags.length || publicOnly || offset > 0
@@ -718,11 +743,9 @@ export function DocumentsLibrary({ trashed = false }: DocumentsLibraryProps) {
busy={operations.busy}
onClose={() => setSheet(null)}
onRestore={(document) =>
- void operations
- .run(() => client.documents.restore(documentRef(document)))
- .then((success) => {
- if (success) setSheet(null);
- })
+ void operations.restoreSelected([document]).then((success) => {
+ if (success) setSheet(null);
+ })
}
onDelete={(document) => {
setSheet(null);
@@ -731,6 +754,7 @@ export function DocumentsLibrary({ trashed = false }: DocumentsLibraryProps) {
/>
) : (
<DocumentSheets
+ operations={operations}
key={`${sheet.kind}:${sheet.documents.map(documentKey).join(",")}`}
value={sheet}
onClose={() => setSheet(null)}
diff --git a/apps/mobile/src/features/documents/queries.ts b/apps/mobile/src/features/documents/queries.ts
index 7cf09c56a..d5e6b00a4 100644
--- a/apps/mobile/src/features/documents/queries.ts
+++ b/apps/mobile/src/features/documents/queries.ts
@@ -6,8 +6,9 @@ import { getNetworkStateAsync } from "expo-network";
import { useRef, useState } from "react";
import { SUBMITTED_DOCUMENT_LOCKED } from "@reactive-resume/schema/applications/errors";
import { documentRef } from "./filter";
+import { playDocumentEffect } from "./library-session";
import { client, orpc } from "@/api/client";
-import { getServer, useSession } from "@/auth/session";
+import { getAccountScope, getServer, useSession } from "@/auth/session";
import { confirmUndone } from "@/lib/undone";
import { showToast } from "@/ui";
@@ -67,15 +68,21 @@ export function useDocumentRefresh() {
/** Serialize user actions; report partial batches and undo only successful Trash moves. */
export function useDocumentOperations(enabled = true) {
const refresh = useDocumentRefresh();
+ const accountScope = getAccountScope();
const session = useSession();
const active = useRef(false);
const idle = useRef(Promise.resolve());
const partial = useRef(false);
const [busy, setBusy] = useState(false);
const [error, setError] = useState<string | null>(null);
+ const current = () => getServer() === session.server && getAccountScope() === accountScope;
+ const notifyCurrent = (options: Parameters<typeof showToast>[0]) => {
+ if (current()) showToast(options);
+ };
const fail = (message: string) => {
+ if (!current()) return false;
setError(message);
- showToast({ message });
+ notifyCurrent({ message });
return false;
};
const run = async (task: () => Promise<unknown>) => {
@@ -89,21 +96,21 @@ export function useDocumentOperations(enabled = true) {
setBusy(true);
setError(null);
try {
- if (session.status !== "signed-in" || getServer() !== session.server) {
+ if (session.status !== "signed-in" || !current()) {
return fail(t`Sign in to continue.`);
}
const network = await getNetworkStateAsync();
if (network.isConnected === false || network.isInternetReachable === false) {
return fail(t`You're offline. Try again when you reconnect.`);
}
- if (getServer() !== session.server) return false;
+ if (!current()) return false;
await task();
- return !partial.current;
+ return current() && !partial.current;
} catch (cause) {
return fail(documentError(cause));
} finally {
try {
- await refresh();
+ if (current()) await refresh();
} finally {
active.current = false;
setBusy(false);
@@ -121,7 +128,7 @@ export function useDocumentOperations(enabled = true) {
// Sequential calls avoid overwhelming per-account mutation limits.
for (const document of documents) {
if (alreadyDone(document) || !applies(document)) continue;
- if (getServer() !== session.server) break;
+ if (!current()) break;
try {
await task(document);
done.push(document);
@@ -129,6 +136,7 @@ export function useDocumentOperations(enabled = true) {
/* Remaining documents can still succeed. */
}
}
+ if (!current()) return done;
const completed = done.length + unchanged;
const message =
completed === documents.length
@@ -138,7 +146,7 @@ export function useDocumentOperations(enabled = true) {
partial.current = true;
setError(message);
}
- if (notify) showToast({ message });
+ if (notify) notifyCurrent({ message });
return done;
};
const trash = async (documents: readonly DocumentSummary[]) => {
@@ -150,9 +158,10 @@ export function useDocumentOperations(enabled = true) {
applies: (document) => !document.isLocked,
notify: false,
});
+ if (done.length) await playDocumentEffect(accountScope, "trash", done);
});
if (attempted)
- showToast({
+ notifyCurrent({
message:
done.length === documents.length
? plural(done.length, { one: "# document moved to Trash", other: "# documents moved to Trash" })
@@ -170,10 +179,12 @@ export function useDocumentOperations(enabled = true) {
run(async () => {
started = true;
for (const group of chunks(done)) {
- if (getServer() !== session.server) break;
+ if (!current()) break;
try {
- restored += (await client.documents.restoreMany({ documents: group.map(documentRef) }))
- .restored;
+ const result = await client.documents.restoreMany({ documents: group.map(documentRef) });
+ restored += result.restored;
+ if (result.restored === group.length)
+ await playDocumentEffect(accountScope, "restore", group);
} catch {
/* The remaining groups can still succeed. */
}
@@ -182,9 +193,9 @@ export function useDocumentOperations(enabled = true) {
)
.then(() => {
// A run that couldn't start (offline, signed out) already said why.
- if (!started) return;
+ if (!started || !current()) return;
if (restored === done.length) return confirmUndone();
- showToast({ message: t`Restored ${restored} of ${done.length}.` });
+ notifyCurrent({ message: t`Restored ${restored} of ${done.length}.` });
});
},
}
@@ -199,21 +210,23 @@ export function useDocumentOperations(enabled = true) {
const success = await run(async () => {
attempted = true;
for (const group of chunks(documents)) {
- if (getServer() !== session.server) break;
+ if (!current()) break;
try {
const result = await client.documents.restoreMany({ documents: group.map(documentRef) });
restored += result.restored;
+ // Partial receipts give no item IDs; refresh them without guessing which rows changed.
+ if (result.restored === group.length) await playDocumentEffect(accountScope, "restore", group);
} catch {
/* The remaining groups can still succeed. */
}
}
- if (restored !== documents.length) {
+ if (current() && restored !== documents.length) {
partial.current = true;
setError(t`Restored ${restored} of ${documents.length}. Refresh and retry any that remain in Trash.`);
}
});
if (attempted && restored > 0)
- showToast({
+ notifyCurrent({
message:
restored === documents.length
? plural(restored, { one: "# document restored", other: "# documents restored" })
@@ -228,21 +241,22 @@ export function useDocumentOperations(enabled = true) {
const success = await run(async () => {
attempted = true;
for (const group of chunks(documents)) {
- if (getServer() !== session.server) break;
+ if (!current()) break;
try {
const result = await client.documents.purgeMany({ documents: group.map(documentRef) });
deleted += result.deleted;
+ if (result.deleted === group.length) await playDocumentEffect(accountScope, "purge", group);
} catch {
/* The remaining groups can still succeed. */
}
}
- if (deleted !== documents.length) {
+ if (current() && deleted !== documents.length) {
partial.current = true;
setError(t`Deleted ${deleted} of ${documents.length}. Refresh to see what remains.`);
}
});
if (attempted && deleted > 0)
- showToast({
+ notifyCurrent({
message:
deleted === documents.length
? plural(deleted, { one: "# document deleted forever", other: "# documents deleted forever" })
@@ -255,9 +269,10 @@ export function useDocumentOperations(enabled = true) {
let deleted = 0;
const success = await run(async () => {
deleted = (await client.documents.emptyTrash({})).deleted;
+ if (deleted > 0) await playDocumentEffect(accountScope, "purge");
});
if (success)
- showToast({
+ notifyCurrent({
message:
deleted === 0
? t`Trash was already empty`
diff --git a/apps/mobile/src/features/documents/removal-motion.tsx b/apps/mobile/src/features/documents/removal-motion.tsx
new file mode 100644
index 000000000..7217abadb
--- /dev/null
+++ b/apps/mobile/src/features/documents/removal-motion.tsx
@@ -0,0 +1,139 @@
+import type { OnDocumentEffect } from "./library-session";
+import type { ComponentProps } from "react";
+import { useFocusEffect } from "expo-router";
+import { useCallback, useEffect, useLayoutEffect, useMemo, useRef } from "react";
+import { AppState } from "react-native";
+import Animated, {
+ cancelAnimation,
+ ReduceMotion,
+ useAnimatedStyle,
+ useSharedValue,
+ withTiming,
+} from "react-native-reanimated";
+import { scheduleOnRN } from "react-native-worklets";
+import { registerDocumentEffect } from "./library-session";
+import { getAccountScope } from "@/auth/session";
+import { useReducedMotion } from "@/ui/motion";
+import { motion } from "@/ui/tokens";
+
+type Controls = { fade: () => Promise<void>; reset: () => void };
+type Register = (key: string, controls: Controls) => () => void;
+
+/** Only confirmed actions animate; recycled/unmounted rows never have an automatic exit. */
+export function useDocumentRemovalMotion(
+ scope: string,
+ trashed: boolean,
+ data: unknown,
+ fetching: boolean,
+ failed: boolean,
+) {
+ const currentScope = useRef<string | null>(scope);
+ const focused = useRef(false);
+ const views = useRef(new Map<string, Controls>());
+ const reset = useCallback(() => {
+ for (const controls of views.current.values()) controls.reset();
+ }, []);
+ useLayoutEffect(() => {
+ currentScope.current = scope;
+ return () => {
+ currentScope.current = null;
+ reset();
+ };
+ }, [scope, reset]);
+ useEffect(() => {
+ if (!fetching && !failed) reset();
+ }, [data, fetching, failed, reset]);
+ useEffect(() => {
+ const subscription = AppState.addEventListener("change", (state) => {
+ if (state !== "active") reset();
+ });
+ return () => subscription.remove();
+ }, [reset]);
+ const register = useCallback<Register>(
+ (key, controls) => {
+ const scoped = `${scope}:${key}`;
+ views.current.set(scoped, controls);
+ return () => {
+ if (views.current.get(scoped) === controls) views.current.delete(scoped);
+ controls.reset();
+ };
+ },
+ [scope],
+ );
+ const onEffect = useCallback<OnDocumentEffect>(
+ async (effect, documents) => {
+ if (!focused.current || currentScope.current !== scope) return;
+ if (!(trashed ? effect !== "trash" : effect === "trash")) return;
+ if (AppState.currentState !== "active") return;
+ const ids = documents && new Set(documents.map((item) => `${scope}:${item.type}:${item.id}`));
+ try {
+ await Promise.all(
+ [...views.current]
+ .filter(([key]) => key.startsWith(`${scope}:`) && (!ids || ids.has(key)))
+ .map(([, controls]) => controls.fade()),
+ );
+ } catch {
+ // Presentation failure must not turn an already-saved operation into a failed mutation.
+ reset();
+ }
+ },
+ [scope, trashed, reset],
+ );
+ const accountScope = getAccountScope();
+ useFocusEffect(
+ useCallback(() => {
+ focused.current = true;
+ const unregister = registerDocumentEffect(accountScope, onEffect);
+ return () => {
+ unregister();
+ focused.current = false;
+ reset();
+ };
+ }, [accountScope, onEffect, reset]),
+ );
+ return { register };
+}
+
+type DocumentMotionFrameProps = ComponentProps<typeof Animated.View> & { itemKey: string; register: Register };
+
+export function DocumentMotionFrame({ itemKey, register, style, ...props }: DocumentMotionFrameProps) {
+ const reduced = useReducedMotion();
+ const opacity = useSharedValue(1);
+ const scale = useSharedValue(1);
+ const pending = useRef<(() => void) | null>(null);
+ const finish = useCallback(() => {
+ pending.current?.();
+ pending.current = null;
+ }, []);
+ const reset = useCallback(() => {
+ cancelAnimation(opacity);
+ cancelAnimation(scale);
+ opacity.set(1);
+ scale.set(1);
+ finish();
+ }, [opacity, scale, finish]);
+ const controls = useMemo<Controls>(
+ () => ({
+ reset,
+ fade: () =>
+ new Promise<void>((resolve) => {
+ pending.current = resolve;
+ const duration = reduced ? motion.d1 : motion.d2 * 0.7;
+ if (!reduced) scale.set(withTiming(0.98, { duration, reduceMotion: ReduceMotion.System }));
+ opacity.set(
+ withTiming(0, { duration, reduceMotion: ReduceMotion.Never }, (finished) => {
+ "worklet";
+ if (finished) scheduleOnRN(finish);
+ }),
+ );
+ }),
+ }),
+ [opacity, scale, reduced, reset, finish],
+ );
+ useLayoutEffect(() => register(itemKey, controls), [itemKey, register, controls]);
+ const animated = useAnimatedStyle(() => ({
+ opacity: opacity.get(),
+ transform: [{ scale: reduced ? 1 : scale.get() }],
+ }));
+ return <Animated.View {...props} style={[style, animated]} />;
+}
diff --git a/apps/mobile/src/features/settings/api-keys.tsx b/apps/mobile/src/features/settings/api-keys.tsx
index 72d3a888e..fd2d02d42 100644
--- a/apps/mobile/src/features/settings/api-keys.tsx
+++ b/apps/mobile/src/features/settings/api-keys.tsx
@@ -16,6 +16,7 @@ import {
listLayout,
showToast,
useFirstAppearance,
+ useReducedMotion,
} from "@/ui";
/** Keys without a permission statement predate access choices and can do everything. */
@@ -34,6 +35,7 @@ export function ApiKeys({ userId }: ApiKeysProps) {
orpc.auth.apiKeys.list.queryOptions({ queryKey: [...orpc.auth.apiKeys.list.key(), server, userId], retry: false }),
);
const firstAppearance = useFirstAppearance(!keys.isPending);
+ const reduced = useReducedMotion();
const revoke = useMutation({
mutationKey: ["settings", "revoke-key"],
mutationFn: async (keyId: string) => {
@@ -75,7 +77,7 @@ export function ApiKeys({ userId }: ApiKeysProps) {
) : null}
{keys.data?.apiKeys.length === 0 ? <EmptyState title={t`No keys yet.`} /> : null}
{keys.data?.apiKeys.map((key, index) => (
- <Animated.View key={key.id} {...listItemMotion(index, firstAppearance)} layout={listLayout}>
+ <Animated.View key={key.id} {...listItemMotion(index, firstAppearance, { reduced })} layout={listLayout}>
<ListRow
title={key.name ?? t`Unnamed key`}
subtitle={`${isReadOnly(key.permissions) ? t`Read only` : t`Full access`} · ${t`Created ${date(key.createdAt)} · Last used ${date(key.lastRequest)} · Expires ${date(key.expiresAt)}`}`}
diff --git a/apps/mobile/src/features/settings/connected-apps.tsx b/apps/mobile/src/features/settings/connected-apps.tsx
index 27755a097..99e8d2e0f 100644
--- a/apps/mobile/src/features/settings/connected-apps.tsx
+++ b/apps/mobile/src/features/settings/connected-apps.tsx
@@ -16,6 +16,7 @@ import {
listLayout,
showToast,
useFirstAppearance,
+ useReducedMotion,
} from "@/ui";
/** The same plain-language permission lines the web settings use, without repeating profile and email when the whole account is readable. */
@@ -49,6 +50,7 @@ export function ConnectedApps() {
);
const ownClient = useQuery({ queryKey: ["auth", "own-client", server], queryFn: () => getClientId(server) });
const firstAppearance = useFirstAppearance(!connections.isPending);
+ const reduced = useReducedMotion();
const disconnect = useMutation({
mutationKey: ["settings", "disconnect-app"],
mutationFn: (id: string) => client.auth.connections.delete({ id }),
@@ -93,7 +95,11 @@ export function ConnectedApps() {
? t`Connected ${i18n.date(connection.createdAt, { dateStyle: "medium" })}`
: null;
return (
- <Animated.View key={connection.id} {...listItemMotion(index, firstAppearance)} layout={listLayout}>
+ <Animated.View
+ key={connection.id}
+ {...listItemMotion(index, firstAppearance, { reduced })}
+ layout={listLayout}
+ >
<ListRow
title={own ? t`${name} (this app)` : name}
subtitle={[...scopeLines(connection.scopes), ...(connected ? [connected] : [])].join("\n")}
diff --git a/apps/mobile/src/ui/motion.ts b/apps/mobile/src/ui/motion.ts
index 3b2bb96ba..354dc5d2a 100644
--- a/apps/mobile/src/ui/motion.ts
+++ b/apps/mobile/src/ui/motion.ts
@@ -3,7 +3,7 @@ import * as Haptics from "expo-haptics";
import Storage from "expo-sqlite/kv-store";
import { useEffect, useState, useSyncExternalStore } from "react";
import { AccessibilityInfo, useWindowDimensions } from "react-native";
-import { Easing, FadeInDown, FadeOut, LinearTransition, ReduceMotion } from "react-native-reanimated";
+import { Easing, FadeIn, FadeInDown, FadeOut, LinearTransition, ReduceMotion } from "react-native-reanimated";
import { motion, size } from "./tokens";
let reduceMotion = false;
@@ -17,8 +17,8 @@ void AccessibilityInfo.isReduceMotionEnabled().then(setReduceMotion);
AccessibilityInfo.addEventListener("reduceMotionChanged", setReduceMotion);
/**
- * iOS Reduce Motion or Android "Remove animations". Movement then takes 0 ms and slides become a `d1` cross-fade.
- * Reanimated and the bottom sheet already skip their animations on their own (`ReduceMotion.System`).
+ * iOS Reduce Motion or Android "Remove animations". App-owned content uses short opacity fades, without movement.
+ * Spatial/layout animations and native sheets keep the platform's `ReduceMotion.System` behavior.
*/
export function useReducedMotion(): boolean {
return useSyncExternalStore(
@@ -95,12 +95,19 @@ const listEntering = (index: number) =>
.delay(Math.min(index, listStaggerCap) * listStagger)
.reduceMotion(ReduceMotion.System);
-/** A removed row fades out, faster than it came in. */
-const listExiting = FadeOut.duration(motion.d1).reduceMotion(ReduceMotion.System);
-
-/** Spread on a row's `Animated.View`: staggers in on the screen's first appearance only, always fades out. */
-export const listItemMotion = (index: number, first: boolean) =>
- first ? { entering: listEntering(index), exiting: listExiting } : { exiting: listExiting };
+/** Opacity is safe under reduced motion; the system still controls spatial/layout animations. */
+const reducedEntering = FadeIn.duration(motion.d1).reduceMotion(ReduceMotion.Never);
+const listExiting = FadeOut.duration(motion.d2 * 0.7).reduceMotion(ReduceMotion.Never);
+
+/** First-appearance entry; document lists enable exits only for confirmed remove/restore actions. */
+export const listItemMotion = (
+ index: number,
+ first: boolean,
+ { reduced = false, exiting = true }: { reduced?: boolean; exiting?: boolean } = {},
+) => ({
+ ...(first ? { entering: reduced ? reducedEntering : listEntering(index) } : {}),
+ ...(exiting ? { exiting: listExiting } : {}),
+});
/** Rows sliding into the gap a removed or moved row leaves. */
export const listLayout = LinearTransition.duration(motion.d2)
diff --git a/apps/mobile/src/ui/overlays.tsx b/apps/mobile/src/ui/overlays.tsx
index 06788d225..19ec17b4b 100644
--- a/apps/mobile/src/ui/overlays.tsx
+++ b/apps/mobile/src/ui/overlays.tsx
@@ -21,6 +21,7 @@ import Animated, {
FadeInDown,
FadeOut,
FadeOutDown,
+ ReduceMotion,
useAnimatedStyle,
useSharedValue,
withTiming,
@@ -672,8 +673,12 @@ export function Toaster() {
return (
<Animated.View
key={item.id}
- entering={reduced ? FadeIn.duration(motion.d1) : FadeInDown.duration(motion.d2)}
- exiting={reduced ? FadeOut.duration(motion.d1) : FadeOutDown.duration(motion.d2)}
+ entering={
+ reduced ? FadeIn.duration(motion.d1).reduceMotion(ReduceMotion.Never) : FadeInDown.duration(motion.d2)
+ }
+ exiting={
+ reduced ? FadeOut.duration(motion.d1).reduceMotion(ReduceMotion.Never) : FadeOutDown.duration(motion.d2)
+ }
accessibilityLiveRegion="polite"
style={{
flexDirection: "row",
diff --git a/apps/web/DESIGN.md b/apps/web/DESIGN.md
index 5c760c979..d355ce0c8 100644
--- a/apps/web/DESIGN.md
+++ b/apps/web/DESIGN.md
@@ -190,10 +190,10 @@ Icons inside resumes use Phosphor names stored in resume data, drawn by the Phos
- Entering and changing state use `ease-enter` (`cubic-bezier(0.2, 0.8, 0.2, 1)`). Exits take 70% of the entry duration.
- Sliding indicators, reordering, and settling use `ease-in-out-strong` (`cubic-bezier(0.77, 0, 0.175, 1)`). Swipe-dismissed bottom sheets use `ease-drawer`.
- Keep app motion brief and purposeful. Small entrance fades, status transitions, and the mobile tab indicator's spring are supported. Loading placeholders stay still; document reflow is never animated. Keyboard mode switches are instant.
-- Reduced motion sets duration tokens to 1ms and collapses CSS transitions and animations. Status spinners continue turning.
+- Reduced motion removes spatial movement, stagger and decorative animation. Known layer/content state changes retain a short 120ms opacity fade; page snapshot transitions and explicit instant controls stay instant, and status spinners continue turning. Native custom fades follow the same policy; native system sheets keep their platform accessibility behavior.
- A pathname change fades through: the old page fades out over 140ms, then the new one fades up 6px over 200ms, so the two never show at once. The builder's own pending shell (its bar, panel placeholders and a blank page at the canvas's size) stands in while a resume loads; the logo loader covers only the app's first load.
- Dragging auto-scrolls a list only from its outer 8%, gently (`DRAG_AUTO_SCROLL`).
-- `apps/web/src/libs/motion.ts` mirrors CSS timings. `MotionConfig reducedMotion="user"` and `followReducedMotion()` make Motion animations respect the preference.
+- `apps/web/src/libs/motion.ts` mirrors CSS timings. `MotionConfig reducedMotion="user"` removes transform/layout animations while preserving opacity. CSS keeps unknown effects instant and allows opacity alone on known layer/content transitions.
The homepage has separate motion rules below.
@@ -207,7 +207,7 @@ Generic primitives live in `packages/ui/src/components`, using Base UI and cmdk
- **Segments and tabs:** use `SegmentedControl` for 2–4 options in a radio group. Use `Tabs` to switch panels; set `TabsList variant="line"` for underline tabs.
- **Menus:** 4px radius and 36px items. Size popups for their content and trigger; put destructive items last, after a separator.
- **Layers:** menus and popovers provide lightweight choices; sheets hold tasks beside the document and use the bottom variant on mobile; dialogs hold decisions. Use `AlertDialog` for destructive confirmation and name what cancel keeps.
-- **Creating things:** a short create form (up to about six fields, such as New document or Save a job) is a dialog. A long form, or one that needs the page behind it, is a sheet (New schedule, Add offer on Offers). A form tied to one item already on screen opens in place beside it (Add fact, Add offer in a job's Offer stage).
+- **Creating things:** a short create form (up to about six fields, such as New document or Save a job) is a dialog. New document uses a bottom sheet on phones, matching the native creation form; its presentation stays fixed while open so a resize cannot discard work. A long form, or one that needs the page behind it, is a sheet (New schedule, Add offer on Offers). A form tied to one item already on screen opens in place beside it (Add fact, Add offer in a job's Offer stage).
- **Toasts:** one visible at a time, bottom center, with `bg-ink` and `text-bg`. The default timeout is six seconds; `timeout: 0` keeps a toast visible. Undo is an optional underlined action. Pressing an action closes its toast after the action's handler runs, and a second press while it leaves does nothing.
- **Chats:** the assistant and career coach transcripts use `MessageScroller` (shadcn, behaviour from `@shadcn/react`): it follows a streaming reply only while the reader is at the latest message, settles each question near the top, reopens a saved thread on its last question, and shows a “Latest” button after scrolling away. Agent steps are `Trace` lines: spinner and shimmer while running, check when done, danger when failed, dimmed dash when unfinished. Mobile mirrors both.
- **Alerts:** `info`, `success`, `warn`, and `error`; only the error variant adds `role="alert"` by default.
diff --git a/apps/web/locales/af-ZA.po b/apps/web/locales/af-ZA.po
index fecc26865..469e623bd 100644
--- a/apps/web/locales/af-ZA.po
+++ b/apps/web/locales/af-ZA.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nuwe dokument"
@@ -10181,6 +10182,10 @@ msgstr "Geen datums is gevind nie."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Geen dokumente"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Geen dokumente aangeheg nie"
diff --git a/apps/web/locales/am-ET.po b/apps/web/locales/am-ET.po
index 4cffd44d3..e3dbd7a00 100644
--- a/apps/web/locales/am-ET.po
+++ b/apps/web/locales/am-ET.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "አዲስ ሰነድ"
@@ -10181,6 +10182,10 @@ msgstr "ምንም ቀናት አልተገኙም።"
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "ምንም ሰነዶች የሉም"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "ምንም ሰነዶች አልተያያዙም"
diff --git a/apps/web/locales/ar-SA.po b/apps/web/locales/ar-SA.po
index 08d7e377a..769bb3953 100644
--- a/apps/web/locales/ar-SA.po
+++ b/apps/web/locales/ar-SA.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "وثيقة جديدة"
@@ -10181,6 +10182,10 @@ msgstr "لم يُعثر على أي تواريخ."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "لا توجد مستندات"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "لا توجد مستندات مرفقة"
diff --git a/apps/web/locales/az-AZ.po b/apps/web/locales/az-AZ.po
index 4df233e4f..e0fc42323 100644
--- a/apps/web/locales/az-AZ.po
+++ b/apps/web/locales/az-AZ.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Yeni sənəd"
@@ -10181,6 +10182,10 @@ msgstr "Heç bir tarix tapılmadı."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Sənəd yoxdur"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Sənəd əlavə edilməyib"
diff --git a/apps/web/locales/bg-BG.po b/apps/web/locales/bg-BG.po
index 4660e09df..1398b9851 100644
--- a/apps/web/locales/bg-BG.po
+++ b/apps/web/locales/bg-BG.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Нов документ"
@@ -10181,6 +10182,10 @@ msgstr "Не бяха открити дати."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Няма документи"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Няма прикачени документи"
diff --git a/apps/web/locales/bn-BD.po b/apps/web/locales/bn-BD.po
index f0439121e..be3aed597 100644
--- a/apps/web/locales/bn-BD.po
+++ b/apps/web/locales/bn-BD.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "নতুন নথি"
@@ -10181,6 +10182,10 @@ msgstr "কোনো তারিখ পাওয়া যায়নি।"
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "কোনো নথি নেই"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "কোনো নথি সংযুক্ত নেই"
diff --git a/apps/web/locales/ca-ES.po b/apps/web/locales/ca-ES.po
index d6f451585..b0aa6b4c2 100644
--- a/apps/web/locales/ca-ES.po
+++ b/apps/web/locales/ca-ES.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nou document"
@@ -10181,6 +10182,10 @@ msgstr "No s'ha trobat cap data."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Cap document"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "No hi ha documents adjunts"
diff --git a/apps/web/locales/cs-CZ.po b/apps/web/locales/cs-CZ.po
index 3d6beb1ec..52b406b93 100644
--- a/apps/web/locales/cs-CZ.po
+++ b/apps/web/locales/cs-CZ.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nový dokument"
@@ -10181,6 +10182,10 @@ msgstr "Nebyla nalezena žádná data."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Žádné dokumenty"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Nejsou připojeny žádné dokumenty"
diff --git a/apps/web/locales/da-DK.po b/apps/web/locales/da-DK.po
index 26638f56e..dd98ecfae 100644
--- a/apps/web/locales/da-DK.po
+++ b/apps/web/locales/da-DK.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nyt dokument"
@@ -10181,6 +10182,10 @@ msgstr "Der blev ikke fundet nogen datoer."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Ingen dokumenter"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Ingen dokumenter vedhæftet"
diff --git a/apps/web/locales/de-DE.po b/apps/web/locales/de-DE.po
index 8b9ff6b11..9c385919a 100644
--- a/apps/web/locales/de-DE.po
+++ b/apps/web/locales/de-DE.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Neues Dokument"
@@ -10181,6 +10182,10 @@ msgstr "Es wurden keine Datumsangaben gefunden."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Keine Dokumente"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Keine Dokumente angehängt"
diff --git a/apps/web/locales/el-GR.po b/apps/web/locales/el-GR.po
index 04d550db5..f2ed71e15 100644
--- a/apps/web/locales/el-GR.po
+++ b/apps/web/locales/el-GR.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Νέο έγγραφο"
@@ -10181,6 +10182,10 @@ msgstr "Δεν βρέθηκαν ημερομηνίες."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Δεν υπάρχουν έγγραφα"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Δεν υπάρχουν συνημμένα έγγραφα"
diff --git a/apps/web/locales/en-GB.po b/apps/web/locales/en-GB.po
index f30000643..68920bd2a 100644
--- a/apps/web/locales/en-GB.po
+++ b/apps/web/locales/en-GB.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "New document"
@@ -10181,6 +10182,10 @@ msgstr "No dates were found."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "No documents"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "No documents attached"
diff --git a/apps/web/locales/en-US.po b/apps/web/locales/en-US.po
index d68eb21f1..4935d535d 100644
--- a/apps/web/locales/en-US.po
+++ b/apps/web/locales/en-US.po
@@ -9965,6 +9965,7 @@ msgid "New detail: check it's true"
msgstr "New detail: check it's true"
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "New document"
@@ -10178,6 +10179,10 @@ msgstr "No dates were found."
msgid "no documents"
msgstr "no documents"
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "No documents"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "No documents attached"
diff --git a/apps/web/locales/es-ES.po b/apps/web/locales/es-ES.po
index ceebfa2be..97238d2c1 100644
--- a/apps/web/locales/es-ES.po
+++ b/apps/web/locales/es-ES.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nuevo documento"
@@ -10181,6 +10182,10 @@ msgstr "No se encontraron fechas."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "No hay documentos"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "No hay documentos adjuntos"
diff --git a/apps/web/locales/fa-IR.po b/apps/web/locales/fa-IR.po
index 4b64ccb8f..d9016f8c2 100644
--- a/apps/web/locales/fa-IR.po
+++ b/apps/web/locales/fa-IR.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "سند جدید"
@@ -10181,6 +10182,10 @@ msgstr "هیچ تاریخی پیدا نشد."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "سندی وجود ندارد"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "هیچ سندی پیوست نشده است"
diff --git a/apps/web/locales/fi-FI.po b/apps/web/locales/fi-FI.po
index 79274408d..c1ed397c7 100644
--- a/apps/web/locales/fi-FI.po
+++ b/apps/web/locales/fi-FI.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Uusi asiakirja"
@@ -10181,6 +10182,10 @@ msgstr "Päivämääriä ei löytynyt."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Ei asiakirjoja"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Ei liitettyjä asiakirjoja"
diff --git a/apps/web/locales/fr-FR.po b/apps/web/locales/fr-FR.po
index e08822ec0..79142e144 100644
--- a/apps/web/locales/fr-FR.po
+++ b/apps/web/locales/fr-FR.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nouveau document"
@@ -10181,6 +10182,10 @@ msgstr "Aucune date n'a été trouvée."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Aucun document"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Aucun document joint"
diff --git a/apps/web/locales/he-IL.po b/apps/web/locales/he-IL.po
index 7ff49893f..703745fc6 100644
--- a/apps/web/locales/he-IL.po
+++ b/apps/web/locales/he-IL.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "מסמך חדש"
@@ -10181,6 +10182,10 @@ msgstr "לא נמצאו תאריכים."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "אין מסמכים"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "לא צורפו מסמכים"
diff --git a/apps/web/locales/hi-IN.po b/apps/web/locales/hi-IN.po
index fd5a65a7e..f6fac7890 100644
--- a/apps/web/locales/hi-IN.po
+++ b/apps/web/locales/hi-IN.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "नया दस्तावेज़"
@@ -10181,6 +10182,10 @@ msgstr "कोई तारीख नहीं मिली।"
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "कोई दस्तावेज़ नहीं"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "कोई दस्तावेज़ संलग्न नहीं है"
diff --git a/apps/web/locales/hu-HU.po b/apps/web/locales/hu-HU.po
index 913c4d39b..6c336d902 100644
--- a/apps/web/locales/hu-HU.po
+++ b/apps/web/locales/hu-HU.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Új dokumentum"
@@ -10181,6 +10182,10 @@ msgstr "Nem található dátum."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Nincsenek dokumentumok"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Nincsenek csatolt dokumentumok"
diff --git a/apps/web/locales/id-ID.po b/apps/web/locales/id-ID.po
index a83202f15..b8550c68c 100644
--- a/apps/web/locales/id-ID.po
+++ b/apps/web/locales/id-ID.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Dokumen baru"
@@ -10181,6 +10182,10 @@ msgstr "Tidak ditemukan tanggal."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Tidak ada dokumen"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Tidak ada dokumen terlampir"
diff --git a/apps/web/locales/it-IT.po b/apps/web/locales/it-IT.po
index e3ad9fe05..3007c6f17 100644
--- a/apps/web/locales/it-IT.po
+++ b/apps/web/locales/it-IT.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nuovo documento"
@@ -10181,6 +10182,10 @@ msgstr "Non sono state trovate date."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Nessun documento"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Nessun documento allegato"
diff --git a/apps/web/locales/ja-JP.po b/apps/web/locales/ja-JP.po
index f44ec8c50..12dd532bf 100644
--- a/apps/web/locales/ja-JP.po
+++ b/apps/web/locales/ja-JP.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "新しいドキュメント"
@@ -10181,6 +10182,10 @@ msgstr "日付が見つかりませんでした。"
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "ドキュメントがありません"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "書類が添付されていません"
diff --git a/apps/web/locales/km-KH.po b/apps/web/locales/km-KH.po
index dfcd9e05b..91d8c2c42 100644
--- a/apps/web/locales/km-KH.po
+++ b/apps/web/locales/km-KH.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "ឯកសារថ្មី។"
@@ -10181,6 +10182,10 @@ msgstr "រកមិនឃើញកាលបរិច្ឆេទទេ។"
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "មិនមានឯកសារ"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "មិនមានឯកសារភ្ជាប់"
diff --git a/apps/web/locales/kn-IN.po b/apps/web/locales/kn-IN.po
index accbb618c..46ea6875a 100644
--- a/apps/web/locales/kn-IN.po
+++ b/apps/web/locales/kn-IN.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "ಹೊಸ ಡಾಕ್ಯುಮೆಂಟ್"
@@ -10181,6 +10182,10 @@ msgstr "ಯಾವುದೇ ದಿನಾಂಕಗಳು ಕಂಡುಬಂದಿ
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "ಯಾವುದೇ ದಾಖಲೆಗಳಿಲ್ಲ"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "ಯಾವುದೇ ದಾಖಲೆಗಳನ್ನು ಲಗತ್ತಿಸಿಲ್ಲ"
diff --git a/apps/web/locales/ko-KR.po b/apps/web/locales/ko-KR.po
index 94d609a09..655d9b5c8 100644
--- a/apps/web/locales/ko-KR.po
+++ b/apps/web/locales/ko-KR.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "새 문서"
@@ -10181,6 +10182,10 @@ msgstr "날짜를 찾을 수 없습니다."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "문서가 없습니다"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "첨부된 문서 없음"
diff --git a/apps/web/locales/lt-LT.po b/apps/web/locales/lt-LT.po
index c2f641bcc..b96bd8f27 100644
--- a/apps/web/locales/lt-LT.po
+++ b/apps/web/locales/lt-LT.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Naujas dokumentas"
@@ -10181,6 +10182,10 @@ msgstr "Datų nerasta."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Nėra dokumentų"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Nėra pridėtų dokumentų"
diff --git a/apps/web/locales/lv-LV.po b/apps/web/locales/lv-LV.po
index 8c7119c14..ace32f4c2 100644
--- a/apps/web/locales/lv-LV.po
+++ b/apps/web/locales/lv-LV.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Jauns dokuments"
@@ -10181,6 +10182,10 @@ msgstr "Datumi nav atrasti."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Nav dokumentu"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Nav pievienotu dokumentu"
diff --git a/apps/web/locales/ml-IN.po b/apps/web/locales/ml-IN.po
index bb9edfe57..8272060f8 100644
--- a/apps/web/locales/ml-IN.po
+++ b/apps/web/locales/ml-IN.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "പുതിയ പ്രമാണം"
@@ -10181,6 +10182,10 @@ msgstr "തീയതികളൊന്നും കണ്ടെത്തിയ
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "രേഖകളൊന്നുമില്ല"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "രേഖകളൊന്നും അറ്റാച്ച് ചെയ്തിട്ടില്ല"
diff --git a/apps/web/locales/mr-IN.po b/apps/web/locales/mr-IN.po
index ccf7f121b..e4c699cb3 100644
--- a/apps/web/locales/mr-IN.po
+++ b/apps/web/locales/mr-IN.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "नवीन दस्तऐवज"
@@ -10181,6 +10182,10 @@ msgstr "तारखा सापडल्या नाहीत."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "कोणतीही कागदपत्रे नाहीत"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "कोणतेही दस्तऐवज जोडलेले नाहीत"
diff --git a/apps/web/locales/ms-MY.po b/apps/web/locales/ms-MY.po
index 856e2e205..ebc8ab72d 100644
--- a/apps/web/locales/ms-MY.po
+++ b/apps/web/locales/ms-MY.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Dokumen baharu"
@@ -10181,6 +10182,10 @@ msgstr "Tiada tarikh ditemui."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Tiada dokumen"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Tiada dokumen dilampirkan"
diff --git a/apps/web/locales/ne-NP.po b/apps/web/locales/ne-NP.po
index 6828ff9c3..552e6145d 100644
--- a/apps/web/locales/ne-NP.po
+++ b/apps/web/locales/ne-NP.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "नयाँ कागजात"
@@ -10181,6 +10182,10 @@ msgstr "कुनै मिति फेला परेन।"
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "कुनै कागजात छैन"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "कुनै कागजात संलग्न छैन"
diff --git a/apps/web/locales/nl-NL.po b/apps/web/locales/nl-NL.po
index 8d9e1639d..0a0bae32d 100644
--- a/apps/web/locales/nl-NL.po
+++ b/apps/web/locales/nl-NL.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nieuw document"
@@ -10181,6 +10182,10 @@ msgstr "Er zijn geen data gevonden."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Geen documenten"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Geen documenten bijgevoegd"
diff --git a/apps/web/locales/no-NO.po b/apps/web/locales/no-NO.po
index 85b977dcd..fd14960fa 100644
--- a/apps/web/locales/no-NO.po
+++ b/apps/web/locales/no-NO.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nytt dokument"
@@ -10181,6 +10182,10 @@ msgstr "Ingen datoer ble funnet."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Ingen dokumenter"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Ingen dokumenter vedlagt"
diff --git a/apps/web/locales/or-IN.po b/apps/web/locales/or-IN.po
index baaf2e692..daa9dfcb1 100644
--- a/apps/web/locales/or-IN.po
+++ b/apps/web/locales/or-IN.po
@@ -9969,6 +9969,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "ନୂତନ ଡକ୍ୟୁମେଣ୍ଟ୍ |"
@@ -10182,6 +10183,10 @@ msgstr "କୌଣସି ତାରିଖ ମିଳିଲା ନାହିଁ।"
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "କୌଣସି ଦଲିଲ ନାହିଁ"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "କୌଣସି ଦଲିଲ ସଂଲଗ୍ନ ନାହିଁ"
diff --git a/apps/web/locales/pl-PL.po b/apps/web/locales/pl-PL.po
index efa21e730..34c867da9 100644
--- a/apps/web/locales/pl-PL.po
+++ b/apps/web/locales/pl-PL.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nowy dokument"
@@ -10181,6 +10182,10 @@ msgstr "Nie znaleziono dat."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Brak dokumentów"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Brak załączonych dokumentów"
diff --git a/apps/web/locales/pt-BR.po b/apps/web/locales/pt-BR.po
index cb1166aeb..6949bc6d0 100644
--- a/apps/web/locales/pt-BR.po
+++ b/apps/web/locales/pt-BR.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Novo documento"
@@ -10181,6 +10182,10 @@ msgstr "Nenhuma data foi encontrada."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Nenhum documento"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Nenhum documento anexado"
diff --git a/apps/web/locales/pt-PT.po b/apps/web/locales/pt-PT.po
index 09b497c08..2b826a64e 100644
--- a/apps/web/locales/pt-PT.po
+++ b/apps/web/locales/pt-PT.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Novo documento"
@@ -10181,6 +10182,10 @@ msgstr "Não foi encontrada nenhuma data."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Nenhum documento"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Nenhum documento anexado"
diff --git a/apps/web/locales/ro-RO.po b/apps/web/locales/ro-RO.po
index 3d77ac5b0..0eda3d13c 100644
--- a/apps/web/locales/ro-RO.po
+++ b/apps/web/locales/ro-RO.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Document nou"
@@ -10181,6 +10182,10 @@ msgstr "Nu a fost găsită nicio dată."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Niciun document"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Niciun document atașat"
diff --git a/apps/web/locales/ru-RU.po b/apps/web/locales/ru-RU.po
index b6c71255f..ed3f0b2d8 100644
--- a/apps/web/locales/ru-RU.po
+++ b/apps/web/locales/ru-RU.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Новый документ"
@@ -10181,6 +10182,10 @@ msgstr "Даты не найдены."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Нет документов"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Документы не прикреплены"
diff --git a/apps/web/locales/sk-SK.po b/apps/web/locales/sk-SK.po
index bab4d7250..84710b695 100644
--- a/apps/web/locales/sk-SK.po
+++ b/apps/web/locales/sk-SK.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nový dokument"
@@ -10181,6 +10182,10 @@ msgstr "Neboli nájdené žiadne dátumy."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Žiadne dokumenty"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Nie sú priložené žiadne dokumenty"
diff --git a/apps/web/locales/sl-SI.po b/apps/web/locales/sl-SI.po
index 024087fb5..ace92474e 100644
--- a/apps/web/locales/sl-SI.po
+++ b/apps/web/locales/sl-SI.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nov dokument"
@@ -10181,6 +10182,10 @@ msgstr "Datumov ni bilo mogoče najti."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Ni dokumentov"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Ni priloženih dokumentov"
diff --git a/apps/web/locales/sq-AL.po b/apps/web/locales/sq-AL.po
index c53c17ead..c3ade7437 100644
--- a/apps/web/locales/sq-AL.po
+++ b/apps/web/locales/sq-AL.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Dokument i ri"
@@ -10181,6 +10182,10 @@ msgstr "Nuk u gjetën data."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Nuk ka dokumente"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Nuk ka dokumente të bashkëngjitura"
diff --git a/apps/web/locales/sr-SP.po b/apps/web/locales/sr-SP.po
index 318a557e5..97e0c6234 100644
--- a/apps/web/locales/sr-SP.po
+++ b/apps/web/locales/sr-SP.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Нови документ"
@@ -10181,6 +10182,10 @@ msgstr "Нису пронађени датуми."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Нема докумената"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Нема приложених докумената"
diff --git a/apps/web/locales/sv-SE.po b/apps/web/locales/sv-SE.po
index 2f2aedef7..59cf3c131 100644
--- a/apps/web/locales/sv-SE.po
+++ b/apps/web/locales/sv-SE.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Nytt dokument"
@@ -10181,6 +10182,10 @@ msgstr "Inga datum hittades."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Inga dokument"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Inga dokument bifogade"
diff --git a/apps/web/locales/ta-IN.po b/apps/web/locales/ta-IN.po
index 8abf79f07..134ecdba9 100644
--- a/apps/web/locales/ta-IN.po
+++ b/apps/web/locales/ta-IN.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "புதிய ஆவணம்"
@@ -10181,6 +10182,10 @@ msgstr "தேதிகள் எதுவும் காணப்படவி
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "ஆவணங்கள் இல்லை"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "ஆவணங்கள் எதுவும் இணைக்கப்படவில்லை"
diff --git a/apps/web/locales/te-IN.po b/apps/web/locales/te-IN.po
index 883f2b30b..fa5af66a5 100644
--- a/apps/web/locales/te-IN.po
+++ b/apps/web/locales/te-IN.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "కొత్త పత్రం"
@@ -10181,6 +10182,10 @@ msgstr "తేదీలు కనుగొనబడలేదు."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "పత్రాలు లేవు"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "పత్రాలు ఏవీ జత చేయలేదు"
diff --git a/apps/web/locales/th-TH.po b/apps/web/locales/th-TH.po
index 9620a1e04..790db58a8 100644
--- a/apps/web/locales/th-TH.po
+++ b/apps/web/locales/th-TH.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "เอกสารใหม่"
@@ -10181,6 +10182,10 @@ msgstr "ไม่พบวันที่"
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "ไม่มีเอกสาร"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "ไม่มีเอกสารแนบ"
diff --git a/apps/web/locales/tr-TR.po b/apps/web/locales/tr-TR.po
index c09b85b8f..28708c13a 100644
--- a/apps/web/locales/tr-TR.po
+++ b/apps/web/locales/tr-TR.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Yeni belge"
@@ -10181,6 +10182,10 @@ msgstr "Tarih bulunamadı."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Belge yok"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Ekli belge yok"
diff --git a/apps/web/locales/uk-UA.po b/apps/web/locales/uk-UA.po
index 27bee1f0b..1a26f10e1 100644
--- a/apps/web/locales/uk-UA.po
+++ b/apps/web/locales/uk-UA.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Новий документ"
@@ -10181,6 +10182,10 @@ msgstr "Дат не знайдено."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Немає документів"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Документи не прикріплено"
diff --git a/apps/web/locales/uz-UZ.po b/apps/web/locales/uz-UZ.po
index a2f65bb22..860e00f1b 100644
--- a/apps/web/locales/uz-UZ.po
+++ b/apps/web/locales/uz-UZ.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Yangi hujjat"
@@ -10181,6 +10182,10 @@ msgstr "Sanalar topilmadi."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Hujjatlar yo‘q"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Hujjatlar biriktirilmagan"
diff --git a/apps/web/locales/vi-VN.po b/apps/web/locales/vi-VN.po
index 976a62d48..f4c66bde8 100644
--- a/apps/web/locales/vi-VN.po
+++ b/apps/web/locales/vi-VN.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "Tài liệu mới"
@@ -10181,6 +10182,10 @@ msgstr "Không tìm thấy ngày tháng nào."
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "Không có tài liệu"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "Không có tài liệu đính kèm"
diff --git a/apps/web/locales/zh-CN.po b/apps/web/locales/zh-CN.po
index 3b9ec9ccd..0cdb441d5 100644
--- a/apps/web/locales/zh-CN.po
+++ b/apps/web/locales/zh-CN.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "新文件"
@@ -10181,6 +10182,10 @@ msgstr "未找到任何日期。"
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "没有文档"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "未附加文档"
diff --git a/apps/web/locales/zh-TW.po b/apps/web/locales/zh-TW.po
index 0a784ae53..4a24b58ce 100644
--- a/apps/web/locales/zh-TW.po
+++ b/apps/web/locales/zh-TW.po
@@ -9968,6 +9968,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr "新文件"
@@ -10181,6 +10182,10 @@ msgstr "未找到任何日期。"
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr "沒有文件"
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr "未附加文件"
diff --git a/apps/web/locales/zu-ZA.po b/apps/web/locales/zu-ZA.po
index 56c14828c..7d7da12e8 100644
--- a/apps/web/locales/zu-ZA.po
+++ b/apps/web/locales/zu-ZA.po
@@ -9963,6 +9963,7 @@ msgid "New detail: check it's true"
msgstr ""
#: src/features/command-palette/pages/navigation.tsx
+#: src/features/documents/documents-page.tsx
msgid "New document"
msgstr ""
@@ -10176,6 +10177,10 @@ msgstr ""
msgid "no documents"
msgstr ""
+#: src/features/documents/documents-page.tsx
+msgid "No documents"
+msgstr ""
+
#: src/features/applications/components/list-view.tsx
msgid "No documents attached"
msgstr ""
diff --git a/apps/web/src/components/layout/mobile-tab-indicator.tsx b/apps/web/src/components/layout/mobile-tab-indicator.tsx
index 83a240d96..f53f070f0 100644
--- a/apps/web/src/components/layout/mobile-tab-indicator.tsx
+++ b/apps/web/src/components/layout/mobile-tab-indicator.tsx
@@ -4,7 +4,7 @@ import { TAB_SPRING } from "@/libs/motion";
/**
* The phone tab bar's marker: a short accent bar on the active tab's top edge. Render it inside the active tab
* (which must be `relative`); when another tab becomes active it springs across to it. Reduced motion moves it at
- * once (see `followReducedMotion`).
+ * once through the root MotionConfig.
*/
export function MobileTabIndicator() {
return (
diff --git a/apps/web/src/dialogs/manager.tsx b/apps/web/src/dialogs/manager.tsx
index dcd3e14d0..5c8888e19 100644
--- a/apps/web/src/dialogs/manager.tsx
+++ b/apps/web/src/dialogs/manager.tsx
@@ -1,26 +1,36 @@
import type { DialogSchema } from "./schemas";
-import { Fragment, lazy, Suspense } from "react";
+import { lazy, Suspense, useState } from "react";
import { Dialog } from "@reactive-resume/ui/components/dialog";
+import { Sheet } from "@reactive-resume/ui/components/sheet";
+import { useBreakpoint } from "@reactive-resume/ui/hooks/use-breakpoint";
import { useDialogStore } from "./store";
-// The dialogs pull in forms, importers and editors; load them on first open so they stay out of every page's bundle.
+type RenderDialogProps = { dialog: DialogSchema; mobileSheet: boolean };
+
+// Forms, importers and editors load on first open.
const DialogContent = lazy(async () => {
const { renderDialog } = await import("./renderers");
- return { default: ({ dialog }: { dialog: DialogSchema }) => renderDialog(dialog) };
+ return { default: ({ dialog, mobileSheet }: RenderDialogProps) => renderDialog(dialog, mobileSheet) };
});
-export function DialogManager() {
- const { open, activeDialog, openCount, onOpenChange } = useDialogStore();
+type DialogInstanceProps = { dialog: DialogSchema };
+function DialogInstance({ dialog }: DialogInstanceProps) {
+ const { open, onOpenChange } = useDialogStore();
+ const breakpoint = useBreakpoint();
+ // Rotating/resizing an open form must not replace its provider and discard its draft/import.
+ const [mobileSheet] = useState(() => dialog.type === "document.new" && breakpoint === "mobile");
+ const Layer = mobileSheet ? Sheet : Dialog;
return (
- <Dialog open={open} onOpenChange={onOpenChange}>
- <Fragment key={openCount}>
- {activeDialog && (
- <Suspense>
- <DialogContent dialog={activeDialog} />
- </Suspense>
- )}
- </Fragment>
- </Dialog>
+ <Layer open={open} onOpenChange={onOpenChange}>
+ <Suspense>
+ <DialogContent dialog={dialog} mobileSheet={mobileSheet} />
+ </Suspense>
+ </Layer>
);
}
+
+export function DialogManager() {
+ const { activeDialog, openCount } = useDialogStore();
+ return activeDialog && <DialogInstance key={openCount} dialog={activeDialog} />;
+}
diff --git a/apps/web/src/dialogs/renderers.tsx b/apps/web/src/dialogs/renderers.tsx
index 8932d46c8..fd7649b40 100644
--- a/apps/web/src/dialogs/renderers.tsx
+++ b/apps/web/src/dialogs/renderers.tsx
@@ -6,7 +6,7 @@ import { SetPasswordDialog } from "./auth/set-password";
import { ResumeDialog } from "./resume";
import { NewDocumentDialog } from "@/features/documents/new-document-dialog";
-export const renderDialog = (dialog: DialogSchema) => {
+export const renderDialog = (dialog: DialogSchema, mobileSheet = false) => {
switch (dialog.type) {
case "auth.change-password":
return <ChangePasswordDialog />;
@@ -17,7 +17,7 @@ export const renderDialog = (dialog: DialogSchema) => {
case "auth.two-factor.disable":
return <DisableTwoFactorDialog />;
case "document.new":
- return <NewDocumentDialog data={dialog.data} />;
+ return <NewDocumentDialog data={dialog.data} mobileSheet={mobileSheet} />;
case "resume.update":
return <ResumeDialog mode="update" data={dialog.data} />;
case "resume.duplicate":
diff --git a/apps/web/src/features/documents/document-actions.tsx b/apps/web/src/features/documents/document-actions.tsx
index 36666447c..99b1ad080 100644
--- a/apps/web/src/features/documents/document-actions.tsx
+++ b/apps/web/src/features/documents/document-actions.tsx
@@ -26,6 +26,7 @@ import {
import { Icon } from "@reactive-resume/ui/components/icon";
import { toast } from "@reactive-resume/ui/components/toast";
import { isolate } from "@reactive-resume/utils/string";
+import { useDocumentEffect } from "./library-session";
import { useNewDocumentsStore } from "./new-documents";
import { ChipInput } from "@/components/input/chip-input";
import { useDialogStore } from "@/dialogs/store";
@@ -53,6 +54,7 @@ function useRefreshDocuments() {
}
export function useDocumentActions() {
+ const onEffect = useDocumentEffect();
const confirm = useConfirm();
const prompt = usePrompt();
const navigate = useNavigate();
@@ -66,11 +68,32 @@ export function useDocumentActions() {
}),
);
const setLocked = useMutation(orpc.documents.setLocked.mutationOptions({ onSettled: refresh }));
- const trash = useMutation(orpc.documents.trash.mutationOptions({ onSettled: refresh }));
- const restore = useMutation(orpc.documents.restore.mutationOptions({ onSettled: refresh }));
+ const trash = useMutation(
+ orpc.documents.trash.mutationOptions({
+ onSuccess: (_result, document) => onEffect("trash", [document]),
+ onSettled: refresh,
+ }),
+ );
+ const restore = useMutation(
+ orpc.documents.restore.mutationOptions({
+ onSuccess: (_result, document) => onEffect("restore", [document]),
+ onSettled: refresh,
+ }),
+ );
// Undo counts what it brought back: restoring one that's already back (another tab) or gone changes nothing.
- const restoreMany = useMutation(orpc.documents.restoreMany.mutationOptions({ onSettled: refresh }));
- const purge = useMutation(orpc.documents.purge.mutationOptions({ onSettled: refresh }));
+ const restoreMany = useMutation(
+ orpc.documents.restoreMany.mutationOptions({
+ onSuccess: (result, input) =>
+ result.restored === input.documents.length ? onEffect("restore", input.documents) : undefined,
+ onSettled: refresh,
+ }),
+ );
+ const purge = useMutation(
+ orpc.documents.purge.mutationOptions({
+ onSuccess: (_result, document) => onEffect("purge", [document]),
+ onSettled: refresh,
+ }),
+ );
const duplicateResume = useMutation(orpc.resume.duplicate.mutationOptions({ onSettled: refresh }));
const duplicateLetter = useMutation(orpc.coverLetters.duplicate.mutationOptions({ onSettled: refresh }));
@@ -193,12 +216,29 @@ export function useDocumentActions() {
* says how many changed. Locked documents keep their visibility, tags and place; letters have no public link.
*/
export function useBatchActions() {
+ const onEffect = useDocumentEffect();
const refresh = useRefreshDocuments();
const setLocked = useMutation(orpc.documents.setLocked.mutationOptions());
- const trash = useMutation(orpc.documents.trash.mutationOptions());
- const restoreMany = useMutation(orpc.documents.restoreMany.mutationOptions());
- const purgeMany = useMutation(orpc.documents.purgeMany.mutationOptions());
- const emptyTrash = useMutation(orpc.documents.emptyTrash.mutationOptions());
+ const trash = useMutation(
+ orpc.documents.trash.mutationOptions({ onSuccess: (_result, document) => onEffect("trash", [document]) }),
+ );
+ const restoreMany = useMutation(
+ orpc.documents.restoreMany.mutationOptions({
+ onSuccess: (result, input) =>
+ result.restored === input.documents.length ? onEffect("restore", input.documents) : undefined,
+ }),
+ );
+ const purgeMany = useMutation(
+ orpc.documents.purgeMany.mutationOptions({
+ onSuccess: (result, input) =>
+ result.deleted === input.documents.length ? onEffect("purge", input.documents) : undefined,
+ }),
+ );
+ const emptyTrash = useMutation(
+ orpc.documents.emptyTrash.mutationOptions({
+ onSuccess: (result) => (result.deleted > 0 ? onEffect("purge") : undefined),
+ }),
+ );
const updateResume = useMutation(orpc.resume.update.mutationOptions());
// The server accepts a large selection, but splitting it keeps one request's body bounded on old clients that
diff --git a/apps/web/src/features/documents/document-card.tsx b/apps/web/src/features/documents/document-card.tsx
index e0e12bfe7..defa0f7bf 100644
--- a/apps/web/src/features/documents/document-card.tsx
+++ b/apps/web/src/features/documents/document-card.tsx
@@ -11,7 +11,7 @@ import { Icon } from "@reactive-resume/ui/components/icon";
import { IconButton } from "@reactive-resume/ui/components/icon-button";
import { cn } from "@reactive-resume/utils/style";
import { DocumentMenuContent, useDocumentActions } from "./document-actions";
-import { daysLeftInTrash } from "./filter";
+import { daysLeftInTrash, documentKey } from "./filter";
import { InlineNameInput } from "./inline-name-input";
import { useNewDocumentsStore } from "./new-documents";
import { ResumeThumbnail } from "./resume-thumbnail";
@@ -159,6 +159,7 @@ export function DocumentCard({
<ContextMenuTrigger
render={
<article
+ data-document-key={documentKey(document)}
style={introIndex === undefined ? undefined : stagger(introIndex)}
className={cn(
// content-start: a neighbour's extra application line doesn't push this card's title down.
@@ -305,6 +306,7 @@ export function DocumentRow({
<ContextMenuTrigger
render={
<tr
+ data-document-key={documentKey(document)}
aria-disabled={disabled}
style={introIndex === undefined ? undefined : stagger(introIndex)}
className={cn(
diff --git a/apps/web/src/features/documents/documents-page.test.tsx b/apps/web/src/features/documents/documents-page.test.tsx
index dcdd409a5..233e60775 100644
--- a/apps/web/src/features/documents/documents-page.test.tsx
+++ b/apps/web/src/features/documents/documents-page.test.tsx
@@ -9,6 +9,7 @@ import { I18nProvider } from "@lingui/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { useState } from "react";
import { DocumentsPage } from "./documents-page";
+import { DocumentLibraryProvider } from "./library-session";
import { TrashPage } from "./trash-page";
import { useDialogStore } from "@/dialogs/store";
import { orpc } from "@/libs/orpc/client";
@@ -20,6 +21,7 @@ const requests = vi.hoisted(() => ({
purge: vi.fn(),
navigate: vi.fn(),
newLetter: vi.fn(),
+ counts: vi.fn(async () => ({ resume: 0, letter: 19500, trash: 19500 })),
}));
vi.mock("@/libs/orpc/client", async (importOriginal) => {
const actual = await importOriginal<typeof import("@/libs/orpc/client")>();
@@ -37,7 +39,7 @@ vi.mock("@/libs/orpc/client", async (importOriginal) => {
counts: {
queryOptions: () => ({
queryKey: ["document-counts"],
- queryFn: async () => ({ resume: 0, letter: 19500, trash: 19500 }),
+ queryFn: () => requests.counts(),
}),
},
},
@@ -142,7 +144,9 @@ function setup(trashed = false, view: "grid" | "list" = "list", cacheNext = true
}
render(
<I18nProvider i18n={i18n}>
- <QueryClientProvider client={client}>{trashed ? <TrashPage /> : <Library />}</QueryClientProvider>
+ <QueryClientProvider client={client}>
+ <DocumentLibraryProvider>{trashed ? <TrashPage /> : <Library />}</DocumentLibraryProvider>
+ </QueryClientProvider>
</I18nProvider>,
);
return { client, input };
@@ -400,10 +404,12 @@ it("does not carry queued navigation into a replacement query client", async ()
const tree = (client: QueryClient) => (
<I18nProvider i18n={i18n}>
<QueryClientProvider client={client}>
- <DocumentsPage
- search={{ type: "all", q: "Shared", tags: [], sort: "edited", view: "list" }}
- onSearchChange={vi.fn()}
- />
+ <DocumentLibraryProvider>
+ <DocumentsPage
+ search={{ type: "all", q: "Shared", tags: [], sort: "edited", view: "list" }}
+ onSearchChange={vi.fn()}
+ />
+ </DocumentLibraryProvider>
</QueryClientProvider>
</I18nProvider>
);
@@ -477,7 +483,9 @@ it.each([
render(
<I18nProvider i18n={i18n}>
<QueryClientProvider client={client}>
- <DocumentsPage search={{ type, q: "", tags: [], sort: "edited", view: "grid" }} onSearchChange={vi.fn()} />
+ <DocumentLibraryProvider>
+ <DocumentsPage search={{ type, q: "", tags: [], sort: "edited", view: "grid" }} onSearchChange={vi.fn()} />
+ </DocumentLibraryProvider>
</QueryClientProvider>
</I18nProvider>,
);
@@ -506,14 +514,17 @@ it("first run's Choose a file opens the file picker, then imports the chosen fil
};
const empty = { items: [], total: 0, counts: { resume: 0, letter: 0 }, tags: [], hasPublic: false };
client.setQueryData(orpc.documents.page.queryKey({ input }), empty);
+ client.setQueryData(orpc.documents.counts.queryOptions().queryKey, { resume: 0, letter: 0, trash: 0 });
const pick = vi.spyOn(HTMLInputElement.prototype, "click").mockImplementation(() => undefined);
render(
<I18nProvider i18n={i18n}>
<QueryClientProvider client={client}>
- <DocumentsPage
- search={{ type: "all", q: "", tags: [], sort: "edited", view: "grid" }}
- onSearchChange={vi.fn()}
- />
+ <DocumentLibraryProvider>
+ <DocumentsPage
+ search={{ type: "all", q: "", tags: [], sort: "edited", view: "grid" }}
+ onSearchChange={vi.fn()}
+ />
+ </DocumentLibraryProvider>
</QueryClientProvider>
</I18nProvider>,
);
@@ -528,3 +539,43 @@ it("first run's Choose a file opens the file picker, then imports the chosen fil
pick.mockRestore();
act(() => useDialogStore.getState().closeDialog());
});
+
+it.each([0, 1])("recovers the correct empty state after a failed counts request (trash=%i)", async (trash) => {
+ requests.load.mockReset().mockResolvedValue(page(0, 0));
+ requests.counts
+ .mockRejectedValueOnce(new Error("Counts unavailable"))
+ .mockResolvedValueOnce({ resume: 0, letter: 0, trash });
+ i18n.loadAndActivate({ locale: "en-US", messages: {} });
+ const client = new QueryClient({ defaultOptions: { queries: { staleTime: Infinity, retry: false } } });
+ const input = {
+ trashed: false,
+ type: "all" as const,
+ q: "",
+ tags: [],
+ sort: "edited" as const,
+ public: false,
+ limit: 100,
+ offset: 0,
+ };
+ client.setQueryData(orpc.documents.page.queryKey({ input }), page(0, 0));
+ render(
+ <I18nProvider i18n={i18n}>
+ <QueryClientProvider client={client}>
+ <DocumentLibraryProvider>
+ <DocumentsPage
+ search={{ type: "all", q: "", tags: [], sort: "edited", view: "grid" }}
+ onSearchChange={vi.fn()}
+ />
+ </DocumentLibraryProvider>
+ </QueryClientProvider>
+ </I18nProvider>,
+ );
+ expect(await screen.findByRole("alert")).toBeVisible();
+ fireEvent.click(screen.getByRole("button", { name: "Try again" }));
+ if (trash === 0) expect(await screen.findByRole("button", { name: "Choose a file" })).toBeVisible();
+ else {
+ expect(await screen.findByRole("heading", { name: "No documents" })).toBeVisible();
+ expect(await screen.findByText("Trash has 1 document.")).toBeVisible();
+ expect(screen.queryByRole("button", { name: "Choose a file" })).toBeNull();
+ }
+});
diff --git a/apps/web/src/features/documents/documents-page.tsx b/apps/web/src/features/documents/documents-page.tsx
index c1f97854a..794857093 100644
--- a/apps/web/src/features/documents/documents-page.tsx
+++ b/apps/web/src/features/documents/documents-page.tsx
@@ -30,9 +30,12 @@ import { useFloatingToolbarSpace } from "@reactive-resume/ui/hooks/use-floating-
import { cn } from "@reactive-resume/utils/style";
import { LinkApplicationDialog, TagsDialog, useBatchActions } from "./document-actions";
import { DocumentCard, DocumentRow } from "./document-card";
+import { documentKey } from "./filter";
import { LibraryError } from "./library-error";
+import { useDocumentHistory } from "./library-session";
import { useNewDocumentsStore } from "./new-documents";
import { PageNavigation } from "./page-navigation";
+import { useDocumentRemovalMotion } from "./removal-motion";
import { IMPORT_ACCEPT, useStartDocument } from "./use-start-document";
import { PageHeader } from "@/components/layout/page-header";
import { useDialogStore } from "@/dialogs/store";
@@ -142,6 +145,15 @@ export function DocumentsPage({ search, onSearchChange }: DocumentsPageProps) {
viewSwitched &&
"transition-[opacity,translate] duration-standard ease-enter starting:translate-y-1 starting:opacity-0";
+ useDocumentRemovalMotion({
+ container: resultsRef,
+ scope: JSON.stringify([filterKey, displayedOffset, view]),
+ trashed: false,
+ data: displayed,
+ fetching: isFetching,
+ failed: isError,
+ });
+
const characterShortcuts = useShortcutSettings((state) => state.characterShortcuts);
useHotkey(
"/",
@@ -167,9 +179,18 @@ export function DocumentsPage({ search, onSearchChange }: DocumentsPageProps) {
const shown = displayed?.items ?? [];
const failed = isError && !displayed;
const filtered = search.type !== "all" || search.q.trim() !== "" || search.tags.length > 0 || search.public === true;
- const firstRun = rowsCurrent && !filtered && offset === 0 && pageData?.total === 0;
- const { data: libraryCounts } = useQuery(orpc.documents.counts.queryOptions());
+ const {
+ data: libraryCounts,
+ isPending: countsPending,
+ isError: countsError,
+ isFetching: countsFetching,
+ refetch: refetchCounts,
+ } = useQuery(orpc.documents.counts.queryOptions());
const trashCount = libraryCounts?.trash ?? 0;
+ const hadDocuments = useDocumentHistory(
+ shown.length > 0 || (libraryCounts ? libraryCounts.resume + libraryCounts.letter + libraryCounts.trash > 0 : false),
+ );
+ const firstRun = rowsCurrent && !filtered && offset === 0 && pageData?.total === 0 && !hadDocuments;
const tags = displayed?.tags ?? [];
const counts = {
all: (displayed?.counts.resume ?? 0) + (displayed?.counts.letter ?? 0),
@@ -369,9 +390,15 @@ export function DocumentsPage({ search, onSearchChange }: DocumentsPageProps) {
)}
</PageHeader>
- {isError && (
+ {(isError || countsError) && (
<div className="grid justify-items-start gap-2">
- <LibraryError retrying={isFetching} onRetry={() => void refetch()} />
+ <LibraryError
+ retrying={isFetching || countsFetching}
+ onRetry={() => {
+ void refetch();
+ void refetchCounts();
+ }}
+ />
{filtered && (
<Button variant="secondary" onClick={() => onSearchChange({ q: "", tags: [], type: "all", public: false })}>
<Trans>Clear search and filters</Trans>
@@ -380,7 +407,7 @@ export function DocumentsPage({ search, onSearchChange }: DocumentsPageProps) {
</div>
)}
- {failed ? null : firstRun ? (
+ {failed ? null : firstRun && trashCount === 0 && libraryCounts ? (
<FirstRun trashCount={trashCount} onFile={(file) => openDialog("document.new", { file })} />
) : (
<>
@@ -395,10 +422,24 @@ export function DocumentsPage({ search, onSearchChange }: DocumentsPageProps) {
/>
)}
- {isPending || (!rowsCurrent && !isError && shown.length === 0) ? (
+ {isPending || (firstRun && countsPending) || (!rowsCurrent && !isError && shown.length === 0) ? (
<LibrarySkeleton view={view} />
) : shown.length === 0 ? (
- isError ? null : emptyType ? (
+ isError ? null : !filtered && offset === 0 ? (
+ <EmptyState
+ title={<Trans>No documents</Trans>}
+ description={
+ trashCount > 0 ? (
+ <Plural value={trashCount} one="Trash has # document." other="Trash has # documents." />
+ ) : undefined
+ }
+ action={
+ <Button onClick={() => openDialog("document.new", undefined)}>
+ <Trans>New document</Trans>
+ </Button>
+ }
+ />
+ ) : emptyType ? (
<TypeEmpty type={emptyType} />
) : (
<div className="grid justify-items-center gap-2 py-16 text-center">
@@ -522,8 +563,6 @@ export function DocumentsPage({ search, onSearchChange }: DocumentsPageProps) {
);
}
-const documentKey = (document: DocumentSummary) => `${document.type}:${document.id}`;
-
const VIEW_KEY = "documents-view";
// Longest stagger (150ms) plus the D2 entrance (200ms), with room to spare: then the intro classes come off.
const INTRO_MS = 400;
diff --git a/apps/web/src/features/documents/filter.ts b/apps/web/src/features/documents/filter.ts
index e4703bc41..38cca592f 100644
--- a/apps/web/src/features/documents/filter.ts
+++ b/apps/web/src/features/documents/filter.ts
@@ -22,3 +22,5 @@ export function defaultCopySource<
);
return recent.find((resume) => !resume.application) ?? recent[0];
}
+
+export const documentKey = (document: Pick<DocumentSummary, "type" | "id">) => `${document.type}:${document.id}`;
diff --git a/apps/web/src/features/documents/library-loading.test.tsx b/apps/web/src/features/documents/library-loading.test.tsx
index 4e844fdb5..bf21a0d91 100644
--- a/apps/web/src/features/documents/library-loading.test.tsx
+++ b/apps/web/src/features/documents/library-loading.test.tsx
@@ -1,12 +1,12 @@
-// @vitest-environment happy-dom
-
import type { ReactNode } from "react";
+// @vitest-environment happy-dom
import { fireEvent, render, screen } from "@testing-library/react";
import { expect, it, vi } from "vite-plus/test";
import { i18n } from "@lingui/core";
import { I18nProvider } from "@lingui/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { DocumentsPage } from "./documents-page";
+import { DocumentLibraryProvider } from "./library-session";
import { TrashPage } from "./trash-page";
const { loadDocuments, loadCounts, openDialog } = vi.hoisted(() => ({
@@ -61,11 +61,13 @@ it.each(["documents", "trash"])("keeps %s load failures distinct from empty stat
const view = render(
<I18nProvider i18n={i18n}>
<QueryClientProvider client={queryClient}>
- {page === "documents" ? (
- <DocumentsPage search={{ type: "all", q: "", tags: [], sort: "edited" }} onSearchChange={vi.fn()} />
- ) : (
- <TrashPage />
- )}
+ <DocumentLibraryProvider>
+ {page === "documents" ? (
+ <DocumentsPage search={{ type: "all", q: "", tags: [], sort: "edited" }} onSearchChange={vi.fn()} />
+ ) : (
+ <TrashPage />
+ )}
+ </DocumentLibraryProvider>
</QueryClientProvider>
</I18nProvider>,
);
@@ -90,10 +92,12 @@ it("offers clearing filters after a first-load failure without tag facets", asyn
const view = render(
<I18nProvider i18n={i18n}>
<QueryClientProvider client={queryClient}>
- <DocumentsPage
- search={{ type: "all", q: "", tags: ["design"], sort: "edited" }}
- onSearchChange={onSearchChange}
- />
+ <DocumentLibraryProvider>
+ <DocumentsPage
+ search={{ type: "all", q: "", tags: ["design"], sort: "edited" }}
+ onSearchChange={onSearchChange}
+ />
+ </DocumentLibraryProvider>
</QueryClientProvider>
</I18nProvider>,
);
@@ -115,7 +119,9 @@ it("opens the file picker from first-run Choose a file and imports the picked fi
const view = render(
<I18nProvider i18n={i18n}>
<QueryClientProvider client={queryClient}>
- <DocumentsPage search={{ type: "all", q: "", tags: [], sort: "edited" }} onSearchChange={vi.fn()} />
+ <DocumentLibraryProvider>
+ <DocumentsPage search={{ type: "all", q: "", tags: [], sort: "edited" }} onSearchChange={vi.fn()} />
+ </DocumentLibraryProvider>
</QueryClientProvider>
</I18nProvider>,
);
diff --git a/apps/web/src/features/documents/library-session.tsx b/apps/web/src/features/documents/library-session.tsx
new file mode 100644
index 000000000..4149f8fd2
--- /dev/null
+++ b/apps/web/src/features/documents/library-session.tsx
@@ -0,0 +1,52 @@
+import type { ReactNode } from "react";
+import { createContext, useCallback, useContext, useEffect, useRef, useState } from "react";
+
+type DocumentRef = { type: string; id: string };
+export type OnDocumentEffect = (
+ effect: "trash" | "restore" | "purge",
+ documents?: readonly DocumentRef[],
+) => void | Promise<void>;
+
+type DocumentLibrarySession = {
+ hadDocuments: boolean;
+ setHadDocuments: (value: boolean) => void;
+ registerEffect: (play: OnDocumentEffect) => () => void;
+ playEffect: OnDocumentEffect;
+};
+
+export const DocumentLibraryContext = createContext<DocumentLibrarySession | null>(null);
+type DocumentLibraryProviderProps = { children: ReactNode };
+
+/** Lives with the account-keyed dashboard shell, across Documents/Trash navigation. */
+export function DocumentLibraryProvider({ children }: DocumentLibraryProviderProps) {
+ const [hadDocuments, setHadDocuments] = useState(false);
+ const effect = useRef<OnDocumentEffect | undefined>(undefined);
+ const registerEffect = useCallback((play: OnDocumentEffect) => {
+ effect.current = play;
+ return () => {
+ if (effect.current === play) effect.current = undefined;
+ };
+ }, []);
+ const playEffect = useCallback<OnDocumentEffect>((...args) => effect.current?.(...args), []);
+ return (
+ <DocumentLibraryContext value={{ hadDocuments, setHadDocuments, registerEffect, playEffect }}>
+ {children}
+ </DocumentLibraryContext>
+ );
+}
+
+export function useDocumentHistory(hasDocuments: boolean) {
+ const session = useContext(DocumentLibraryContext);
+ if (!session) throw new Error("Document library provider is missing");
+ const { setHadDocuments } = session;
+ useEffect(() => {
+ if (hasDocuments) setHadDocuments(true);
+ }, [hasDocuments, setHadDocuments]);
+ return hasDocuments || session.hadDocuments;
+}
+
+/** Undo toasts outlive their originating page; animate the currently mounted collection. */
+export function useDocumentEffect() {
+ const play = useContext(DocumentLibraryContext)?.playEffect;
+ return useCallback<OnDocumentEffect>((...args) => play?.(...args), [play]);
+}
diff --git a/apps/web/src/features/documents/new-document-dialog.tsx b/apps/web/src/features/documents/new-document-dialog.tsx
index 787e51542..0fe253ed1 100644
--- a/apps/web/src/features/documents/new-document-dialog.tsx
+++ b/apps/web/src/features/documents/new-document-dialog.tsx
@@ -15,6 +15,7 @@ import { DialogContent, DialogDescription, DialogHeader, DialogTitle } from "@re
import { Icon } from "@reactive-resume/ui/components/icon";
import { Input } from "@reactive-resume/ui/components/input";
import { NativeSelect } from "@reactive-resume/ui/components/native-select";
+import { SheetContent } from "@reactive-resume/ui/components/sheet";
import { Spinner } from "@reactive-resume/ui/components/spinner";
import { Textarea } from "@reactive-resume/ui/components/textarea";
import { toast } from "@reactive-resume/ui/components/toast";
@@ -241,7 +242,11 @@ function useResumeImport(
* New: import a file, copy a resume for a job, or start blank; no name, slug or tags are asked for first.
* Importing shows three labelled steps rather than a spinner, so a slow parse still looks like progress.
*/
-export function NewDocumentDialog({ data }: { data?: NewDocumentDialogData | undefined }) {
+type NewDocumentDialogProps = { data?: NewDocumentDialogData | undefined; mobileSheet?: boolean };
+
+export function NewDocumentDialog({ data, mobileSheet = false }: NewDocumentDialogProps) {
+ const Content = mobileSheet ? SheetContent : DialogContent;
+ const [opener] = useState(() => document.activeElement);
const navigate = useNavigate();
const providerState = useHasUsableAiProvider();
const { hasUsableProvider } = providerState;
@@ -294,7 +299,16 @@ export function NewDocumentDialog({ data }: { data?: NewDocumentDialogData | und
const chooseFile = () => inputRef.current?.click();
return (
- <DialogContent closeLabel={t`Close`} className="sm:max-w-[640px]">
+ <Content
+ closeLabel={t`Close`}
+ finalFocus={() => {
+ if (opener instanceof HTMLElement && opener.isConnected && opener.getClientRects().length) return opener;
+ // Responsive navigation replaces the opener; return to the current New action.
+ return document.querySelector<HTMLElement>("[data-document-new-trigger]") ?? true;
+ }}
+ {...(mobileSheet ? { side: "bottom" as const } : {})}
+ className={mobileSheet ? "overflow-y-auto px-6 pb-[max(1.5rem,env(safe-area-inset-bottom))]" : "sm:max-w-[640px]"}
+ >
{step.name !== "choose" && <AiProviderLoadState state={providerState} />}
<input
ref={inputRef}
@@ -308,7 +322,7 @@ export function NewDocumentDialog({ data }: { data?: NewDocumentDialogData | und
if (file) void importFile(file);
}}
/>
- {/* Each step fades up into place as it replaces the last; the dialog's height changes in the same frame. */}
+ {/* Each step enters as it replaces the last; reduced motion keeps only its opacity fade. */}
{step.name === "copy" ? (
<div key="copy" className={cn(ENTER_CLASS, "grid gap-4")}>
<CopyForJob
@@ -507,7 +521,7 @@ export function NewDocumentDialog({ data }: { data?: NewDocumentDialogData | und
<AiProviderLoadState state={providerState} reserveErrorSpace />
</div>
)}
- </DialogContent>
+ </Content>
);
}
diff --git a/apps/web/src/features/documents/removal-motion.ts b/apps/web/src/features/documents/removal-motion.ts
new file mode 100644
index 000000000..b32796c55
--- /dev/null
+++ b/apps/web/src/features/documents/removal-motion.ts
@@ -0,0 +1,78 @@
+import type { OnDocumentEffect } from "./library-session";
+import type { RefObject } from "react";
+import { useCallback, useContext, useEffect, useLayoutEffect, useRef } from "react";
+import { DocumentLibraryContext } from "./library-session";
+import { D1, D2, EASE, EXIT } from "@/libs/motion";
+
+type RemovalMotionOptions = {
+ container: RefObject<HTMLElement | null>;
+ scope: string;
+ trashed: boolean;
+ data: unknown;
+ fetching: boolean;
+ failed: boolean;
+};
+
+/** Fade confirmed removals before refreshing; unmounting/filtering itself never starts an exit. */
+export function useDocumentRemovalMotion({ container, scope, trashed, data, fetching, failed }: RemovalMotionOptions) {
+ const session = useContext(DocumentLibraryContext);
+ const currentScope = useRef<string | null>(scope);
+ const active = useRef(new Map<Animation, { element: HTMLElement; inert: boolean }>());
+ const reset = useCallback(() => {
+ for (const [animation, previous] of active.current) {
+ animation.cancel();
+ previous.element.inert = previous.inert;
+ }
+ active.current.clear();
+ }, []);
+ useLayoutEffect(() => {
+ currentScope.current = scope;
+ return () => {
+ currentScope.current = null;
+ reset();
+ };
+ }, [scope, reset]);
+ useEffect(() => {
+ if (!fetching && !failed) reset();
+ }, [data, fetching, failed, reset]);
+ useEffect(() => {
+ const onVisibility = () => {
+ if (document.hidden) reset();
+ };
+ document.addEventListener("visibilitychange", onVisibility);
+ return () => document.removeEventListener("visibilitychange", onVisibility);
+ }, [reset]);
+
+ const onEffect = useCallback<OnDocumentEffect>(
+ async (effect, documents) => {
+ if (currentScope.current !== scope) return;
+ const removes = trashed ? effect !== "trash" : effect === "trash";
+ if (!removes) return;
+ if (document.hidden || !container.current) return;
+ const ids = documents && new Set(documents.map((item) => `${item.type}:${item.id}`));
+ const reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
+ const elements = [...container.current.querySelectorAll<HTMLElement>("[data-document-key]")].filter(
+ (element) => !ids || ids.has(element.dataset.documentKey ?? ""),
+ );
+ await Promise.all(
+ elements.map(async (element) => {
+ const animation = element.animate(
+ { opacity: [Number(getComputedStyle(element).opacity), 0], ...(reduced ? {} : { scale: [1, 0.98] }) },
+ {
+ duration: (reduced ? D1 : D2 * EXIT) * 1000,
+ easing: `cubic-bezier(${EASE.join(",")})`,
+ fill: "forwards",
+ },
+ );
+ active.current.set(animation, { element, inert: element.inert });
+ element.inert = true;
+ // Keep it faded until the refreshed data arrives; cancellation releases background/navigation waits.
+ await animation.finished.catch(() => undefined);
+ }),
+ ).catch(reset);
+ },
+ [container, scope, trashed, reset],
+ );
+ const registerEffect = session?.registerEffect;
+ useLayoutEffect(() => registerEffect?.(onEffect), [registerEffect, onEffect]);
+}
diff --git a/apps/web/src/features/documents/trash-page.tsx b/apps/web/src/features/documents/trash-page.tsx
index e75242c3a..6d54889ff 100644
--- a/apps/web/src/features/documents/trash-page.tsx
+++ b/apps/web/src/features/documents/trash-page.tsx
@@ -3,7 +3,7 @@ import { Trans, useLingui } from "@lingui/react/macro";
import { useHotkey } from "@tanstack/react-hotkeys";
import { useQuery } from "@tanstack/react-query";
import { Link } from "@tanstack/react-router";
-import { useState } from "react";
+import { useRef, useState } from "react";
import { Button, buttonVariants } from "@reactive-resume/ui/components/button";
import { Checkbox } from "@reactive-resume/ui/components/checkbox";
import { Icon } from "@reactive-resume/ui/components/icon";
@@ -12,14 +12,16 @@ import { cn } from "@reactive-resume/utils/style";
import { useBatchActions } from "./document-actions";
import { DocumentRow } from "./document-card";
import { LibrarySkeleton } from "./documents-page";
+import { documentKey } from "./filter";
import { LibraryError } from "./library-error";
+import { useDocumentHistory } from "./library-session";
import { PageNavigation } from "./page-navigation";
+import { useDocumentRemovalMotion } from "./removal-motion";
import { PageHeader } from "@/components/layout/page-header";
import { useConfirm } from "@/hooks/use-confirm";
import { orpc } from "@/libs/orpc/client";
const noop = () => undefined;
-const documentKey = (document: { type: string; id: string }) => `${document.type}:${document.id}`;
/**
* Trash: documents stay 30 days, then go for good. Rows can be selected for Restore or Delete permanently; Empty
@@ -31,7 +33,7 @@ export function TrashPage() {
const [selected, setSelected] = useState<ReadonlySet<string>>(() => new Set());
const [busy, setBusy] = useState(false);
const confirm = useConfirm();
- const batch = useBatchActions();
+ const resultsRef = useRef<HTMLTableElement>(null);
const {
data: page,
isPending,
@@ -54,6 +56,16 @@ export function TrashPage() {
setOffset(Math.max(0, Math.floor((page.total - 1) / 100) * 100));
setSelected(new Set());
}
+ useDocumentRemovalMotion({
+ container: resultsRef,
+ scope: String(displayedOffset),
+ trashed: true,
+ data: displayed,
+ fetching: isFetching,
+ failed: isError,
+ });
+ const batch = useBatchActions();
+ useDocumentHistory(Boolean(page && page.total > 0));
const documents = displayed?.items;
const all = documents ?? [];
const selection = rowsCurrent ? all.filter((document) => selected.has(documentKey(document))) : [];
@@ -184,7 +196,7 @@ export function TrashPage() {
</p>
</div>
) : (
- <table className="w-full table-fixed border-collapse">
+ <table ref={resultsRef} className="w-full table-fixed border-collapse">
<caption className="sr-only">
<Trans>Trash</Trans>
</caption>
diff --git a/apps/web/src/features/documents/trash-selection.test.tsx b/apps/web/src/features/documents/trash-selection.test.tsx
index 0d4f31d72..1d078a549 100644
--- a/apps/web/src/features/documents/trash-selection.test.tsx
+++ b/apps/web/src/features/documents/trash-selection.test.tsx
@@ -1,6 +1,5 @@
-// @vitest-environment happy-dom
-
import type { DocumentSummary } from "./filter";
+// @vitest-environment happy-dom
import type { ReactNode } from "react";
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
@@ -8,6 +7,7 @@ import { expect, it, vi } from "vite-plus/test";
import { i18n } from "@lingui/core";
import { I18nProvider } from "@lingui/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import { DocumentLibraryProvider } from "./library-session";
import { TrashPage } from "./trash-page";
const { documents, confirm, batch, server } = vi.hoisted(() => ({
@@ -113,7 +113,9 @@ function renderPage() {
return render(
<I18nProvider i18n={i18n}>
<QueryClientProvider client={queryClient}>
- <TrashPage />
+ <DocumentLibraryProvider>
+ <TrashPage />
+ </DocumentLibraryProvider>
</QueryClientProvider>
</I18nProvider>,
);
diff --git a/apps/web/src/index.css b/apps/web/src/index.css
index bd860b20b..88499d2c6 100644
--- a/apps/web/src/index.css
+++ b/apps/web/src/index.css
@@ -129,3 +129,13 @@ html[dir="rtl"] {
animation: var(--d2) var(--ease) calc(var(--d2) * 0.7) both vt-pop-in;
}
}
+
+@media (prefers-reduced-motion: reduce) {
+ /* Page snapshots stay instant; app-owned layers keep their short opacity fades. */
+ html::view-transition-group(*),
+ html::view-transition-old(*),
+ html::view-transition-new(*) {
+ animation-duration: 0.01ms !important;
+ animation-delay: 0ms !important;
+ }
+}
diff --git a/apps/web/src/libs/motion.ts b/apps/web/src/libs/motion.ts
index 9520a8d52..73da2ef5d 100644
--- a/apps/web/src/libs/motion.ts
+++ b/apps/web/src/libs/motion.ts
@@ -1,5 +1,4 @@
import type { CSSProperties } from "react";
-import { MotionGlobalConfig } from "motion/react";
// Motion (JS) mirrors of the CSS motion tokens in packages/ui/src/styles/globals.css (--d1/--d2/--d3, --ease,
// --ease-in-out-strong). Durations are in seconds, Motion's unit; multiply by 1000 for APIs that take ms (dnd-kit).
@@ -45,23 +44,11 @@ export function switchModeInstantly(change: () => void) {
* `stagger(index)` on the same element; without it the delay is 0.
*/
export const ENTER_CLASS =
- "starting:translate-y-1 starting:opacity-0 transition-[opacity,translate] delay-(--stagger) duration-standard ease-enter motion-reduce:delay-0";
+ "motion-fade starting:translate-y-1 starting:opacity-0 transition-[opacity,translate] delay-(--stagger) duration-standard ease-enter motion-reduce:delay-0";
/** The index-th item of a list's first appearance: 30ms apart, capped at 150ms (the first six are staggered). */
export const stagger = (index: number) => ({ "--stagger": `${Math.min(index, 5) * 30}ms` }) as CSSProperties;
/** A status icon arriving in place (a success check, a spinner taking its slot): fades and scales up from 90% over D1. */
-export const POP_CLASS = "starting:scale-90 starting:opacity-0 transition-[opacity,scale] duration-quick ease-enter";
-
-/**
- * Reduced motion makes every duration instant (DESIGN.md, Motion). The CSS tokens drop to 1ms; Motion's own
- * `reducedMotion="user"` only drops transforms and still fades, so its animations are made instant here as well.
- */
-export function followReducedMotion() {
- const query = window.matchMedia("(prefers-reduced-motion: reduce)");
- const apply = () => {
- MotionGlobalConfig.instantAnimations = query.matches;
- };
- apply();
- query.addEventListener("change", apply);
-}
+export const POP_CLASS =
+ "motion-fade starting:scale-90 starting:opacity-0 transition-[opacity,scale] duration-quick ease-enter";
diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx
index 4f34a3983..2a7a00cec 100644
--- a/apps/web/src/main.tsx
+++ b/apps/web/src/main.tsx
@@ -1,15 +1,12 @@
import { RouterProvider } from "@tanstack/react-router";
import ReactDOM from "react-dom/client";
import { receivePostingCapture } from "./features/applications/capture";
-import { followReducedMotion } from "./libs/motion";
import { getRouter } from "./router";
import "./index.css";
const rootElement = document.getElementById("app");
if (!rootElement) throw new Error("Root element not found");
-followReducedMotion();
-
receivePostingCapture();
const router = await getRouter();
diff --git a/apps/web/src/routes/dashboard/-components/app-shell.tsx b/apps/web/src/routes/dashboard/-components/app-shell.tsx
index 9dad78882..3ff5aa8e3 100644
--- a/apps/web/src/routes/dashboard/-components/app-shell.tsx
+++ b/apps/web/src/routes/dashboard/-components/app-shell.tsx
@@ -20,6 +20,7 @@ import { MobileTabIndicator } from "@/components/layout/mobile-tab-indicator";
import { useDialogStore } from "@/dialogs/store";
import { GuestBanner } from "@/features/auth/components/guest-banner";
import { useCommandPaletteStore } from "@/features/command-palette/store";
+import { DocumentLibraryProvider } from "@/features/documents/library-session";
import { shortcutOverlayOpen } from "@/features/keyboard-shortcuts/blocking";
import { useShortcutSettings } from "@/features/keyboard-shortcuts/settings";
import { isEditableElementFocused } from "@/features/resume/builder/draft";
@@ -167,7 +168,7 @@ export function AppShell({ children }: AppShellProps) {
{breakpoint !== "mobile" && (breakpoint === "tablet" ? <Rail /> : <Sidebar />)}
<main id="main-content" className="min-w-0">
<GuestBanner />
- {children}
+ <DocumentLibraryProvider>{children}</DocumentLibraryProvider>
</main>
{tabs && <MobileTabs />}
</div>
@@ -218,6 +219,7 @@ function Sidebar() {
{trash && <NavLink item={trash} current={isCurrent(trash.to)} />}
{/* Secondary, so each view's own primary action is the one accent button on screen. */}
<Button
+ data-document-new-trigger=""
variant="secondary"
aria-label={t`New`}
aria-keyshortcuts={characterShortcuts ? "N" : undefined}
@@ -320,7 +322,7 @@ function Rail() {
</RailTip>
)}
<RailTip label={t`New`} icon="plus">
- <Button size="icon" aria-label={t`New`} onClick={openNew} />
+ <Button data-document-new-trigger="" size="icon" aria-label={t`New`} onClick={openNew} />
</RailTip>
<UserDropdownMenu>
{({ session }) => (
@@ -396,6 +398,7 @@ function MobileTabs() {
{tabs.slice(0, 2).map(link)}
<button
type="button"
+ data-document-new-trigger=""
onClick={openNew}
className="flex min-h-[52px] flex-col items-center justify-center gap-0.5 transition-[scale] duration-quick ease-enter active:scale-[0.97]"
>
diff --git a/docs/guides/changing-appearance-and-language.mdx b/docs/guides/changing-appearance-and-language.mdx
index 0bbafadad..1c10a6439 100644
--- a/docs/guides/changing-appearance-and-language.mdx
+++ b/docs/guides/changing-appearance-and-language.mdx
@@ -83,7 +83,7 @@ In the Android and iPhone apps, many taps, such as choosing a design option, giv
## Reduce motion
-Reactive Resume has no motion switch of its own. It follows your operating system's reduced-motion setting: turn that on, and the app replaces movement with simple fades. Nothing in the app animates on its own without you doing something first.
+Reactive Resume has no motion switch of its own. It follows your operating system's reduced-motion setting: turn that on, and app content uses short opacity fades instead of slides or scaling. Spatial and layout movement stops; native sheets follow the platform's reduced-motion behavior. Loading spinners remain visible while work runs. Keyboard mode switches and controls intended to open instantly still do so.
## Related guides
diff --git a/docs/guides/creating-your-first-resume.mdx b/docs/guides/creating-your-first-resume.mdx
index 386a9d0a9..07b5f90e1 100644
--- a/docs/guides/creating-your-first-resume.mdx
+++ b/docs/guides/creating-your-first-resume.mdx
@@ -33,6 +33,16 @@ You need a Reactive Resume account. If you don't have one yet, see [Creating an
</Step>
</Steps>
+On the phone website, **New** opens a bottom sheet. Close it with **Close**, <kbd>Esc</kbd> on a connected keyboard,
+or a downward swipe from its top edge. Rotating or resizing while it is open keeps your current choices.
+
+<Frame caption="Phone New keeps the creation choices together in a bottom sheet. This example is fictional.">
+ <img
+ src="/images/guides/creating-your-first-resume/phone-new.png"
+ alt="Phone website New bottom sheet with Import a resume, Copy a resume for a job and Start blank, above the document library"
+ />
+</Frame>
+
<Tip>
Want to look around before typing anything? Choose **Try a sample** (or **Try with a sample resume** in the dialog) to
get a filled-in resume you can explore and delete later.
diff --git a/docs/guides/managing-documents.mdx b/docs/guides/managing-documents.mdx
index e23005a5a..81a9eae61 100644
--- a/docs/guides/managing-documents.mdx
+++ b/docs/guides/managing-documents.mdx
@@ -199,12 +199,23 @@ You can still open, duplicate and download it. Choose **Unlock** in the same men
## Remove a document
-Choose **Move to Trash**. The document leaves Documents right away and a message appears with **Undo**. Documents stay in Trash for 30 days before they're deleted for good. See [Using the Trash](/guides/using-the-trash).
+Choose **Move to Trash**. After the move succeeds, the document briefly fades out and a message appears with **Undo**. Restoring from Trash uses the same brief fade there. Search, filter, page and navigation changes do not play removal fades. Documents stay in Trash for 30 days before they're deleted for good. See [Using the Trash](/guides/using-the-trash).
+
+After you remove the last document, the library shows **No documents** and **New document**, with a Trash count when documents can be restored. It does not repeat the first-visit introduction.
+
+<Frame caption="An empty library after moving its last document to Trash. This example is fictional.">
+ <img
+ src="/images/guides/managing-documents/quiet-library.png"
+ alt="Documents shows No documents, Trash has 1 document, New document and an Undo message after moving a fictional document to Trash"
+ />
+</Frame>
## Create a new document
Select **New** in the sidebar, or press <kbd>N</kbd> anywhere outside a text field, to open the **New** dialog. On Applications, New opens **Save job** instead; on the Letters tab, it leads with a new letter.
+On the phone website, **New** opens from the bottom. Its **Close** button, <kbd>Esc</kbd> and a downward swipe from the top edge dismiss it. Resizing an open form preserves its current choices; closing and reopening starts a new form.
+
<Frame caption="One New dialog for resumes, letters and saved jobs">
<img
src="/images/guides/managing-documents/new-document-dialog.webp"
diff --git a/docs/images/guides/creating-your-first-resume/phone-new.png b/docs/images/guides/creating-your-first-resume/phone-new.png
new file mode 100644
index 000000000..9c10c5671
Binary files /dev/null and b/docs/images/guides/creating-your-first-resume/phone-new.png differ
diff --git a/docs/images/guides/managing-documents/quiet-library.png b/docs/images/guides/managing-documents/quiet-library.png
new file mode 100644
index 000000000..855b3e95e
Binary files /dev/null and b/docs/images/guides/managing-documents/quiet-library.png differ
diff --git a/packages/ui/src/styles/globals.css b/packages/ui/src/styles/globals.css
index 22692099c..5e60f0644 100644
--- a/packages/ui/src/styles/globals.css
+++ b/packages/ui/src/styles/globals.css
@@ -116,14 +116,6 @@
--shadow-page: 0 1px 2px oklch(0 0 0 / 0.4), 0 12px 36px -12px oklch(0 0 0 / 0.6);
}
-@media (prefers-reduced-motion: reduce) {
- :root {
- --d1: 1ms;
- --d2: 1ms;
- --d3: 1ms;
- }
-}
-
@theme {
/* Instrument Serif has one weight (400 and italic): never set it semibold or bold. */
--font-display: "Instrument Serif", Georgia, serif;
@@ -277,8 +269,55 @@
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
+ transition-delay: 0ms !important;
+ animation-delay: 0ms !important;
scroll-behavior: auto !important;
}
+
+ /* Known state changes may fade; unknown/spatial effects still finish instantly. */
+ :is(
+ [data-slot="dialog-overlay"],
+ [data-slot="dialog-content"],
+ [data-slot="alert-dialog-overlay"],
+ [data-slot="alert-dialog-content"],
+ [data-slot="sheet-overlay"],
+ [data-slot="sheet-content"],
+ [data-slot="toast"],
+ [data-slot="popover-content"],
+ [data-slot="tooltip-content"],
+ [data-slot="dropdown-menu-content"],
+ [data-slot="dropdown-menu-sub-content"],
+ [data-slot="context-menu-content"],
+ [data-slot="combobox-content"],
+ .motion-fade
+ ):not([data-instant]):not(.transition-none) {
+ transition-property: opacity !important;
+ transition-duration: var(--d1) !important;
+ }
+
+ :is([data-slot="dialog-content"], [data-slot="alert-dialog-content"]) {
+ scale: 1 !important;
+ }
+
+ /* Dialog centering is layout; only edge layers and small entrances lose their offsets. */
+ :is(
+ [data-slot="sheet-content"],
+ [data-slot="toast"],
+ [data-slot="popover-content"],
+ [data-slot="tooltip-content"],
+ [data-slot="dropdown-menu-content"],
+ [data-slot="dropdown-menu-sub-content"],
+ [data-slot="context-menu-content"],
+ [data-slot="combobox-content"],
+ .motion-fade
+ ) {
+ translate: 0 0 !important;
+ scale: 1 !important;
+ }
+
+ [data-slot="sheet-content"]:is([data-starting-style], [data-ending-style]) {
+ opacity: 0;
+ }
}
/* An undo toast's fuse: it burns down over the toast's timeout (see ToastFuse). */
diff --git a/tests/e2e/specs/document-motion.spec.ts b/tests/e2e/specs/document-motion.spec.ts
new file mode 100644
index 000000000..80a6ad402
--- /dev/null
+++ b/tests/e2e/specs/document-motion.spec.ts
@@ -0,0 +1,326 @@
+import type { Page } from "@playwright/test";
+import { failRpcProcedure } from "../fixtures/rpc-failure";
+import { expect, test } from "../fixtures/test";
+
+type ExitProof = { opacity: unknown; scale: unknown; duration: unknown };
+declare global {
+ interface Window {
+ documentExits: ExitProof[];
+ documentExitCanceled: boolean;
+ pageFades: { duration: string; delay: string }[];
+ }
+}
+
+async function recordDocumentExits(page: Page) {
+ await page.addInitScript(() => {
+ const original = Element.prototype.animate;
+ window.documentExits = [];
+ Element.prototype.animate = function (...args) {
+ const animation = original.apply(this, args);
+ if (this.matches("[data-document-key]")) {
+ const final = (animation.effect as KeyframeEffect).getKeyframes().at(-1);
+ if (String(final?.opacity) === "0")
+ window.documentExits.push({
+ opacity: final?.opacity,
+ scale: final?.scale,
+ duration: animation.effect?.getTiming().duration,
+ });
+ }
+ return animation;
+ };
+ });
+}
+
+test("phone New opens from the bottom, keeps its draft on resize and restores focus after every dismissal", async ({
+ authPage: page,
+}, info) => {
+ const created = await page.request.post("/api/openapi/resumes", { data: { name: "Phone draft", tags: [] } });
+ await expect(created).toBeOK();
+ const id: string = await created.json();
+ await page.setViewportSize({ width: 390, height: 844 });
+ await page.goto("/dashboard");
+ const trigger = page.getByRole("button", { name: "New", exact: true });
+ await trigger.click();
+ const sheet = page.locator('[data-slot="sheet-content"][data-side="bottom"]');
+ await expect(sheet).toBeVisible();
+ await expect(sheet.getByRole("heading", { name: "New", exact: true })).toBeVisible();
+ await page.screenshot({ path: info.outputPath("phone-new.png") });
+ const choice = sheet.getByRole("combobox", { name: "Resume for a new letter", exact: true });
+ await choice.selectOption(id);
+ await page.setViewportSize({ width: 1280, height: 900 });
+ await expect(choice).toHaveValue(id);
+ await expect(sheet).toBeVisible();
+ await page.setViewportSize({ width: 390, height: 844 });
+ const bounds = await sheet.boundingBox();
+ if (!bounds) throw new Error("New sheet has no bounds");
+ expect(bounds.y + bounds.height).toBeCloseTo(844, 0);
+ await page.keyboard.press("Tab");
+ expect(await sheet.evaluate((element) => element.contains(document.activeElement))).toBe(true);
+ await page.keyboard.press("Escape");
+ await expect(sheet).toBeHidden();
+ await expect(trigger).toBeFocused();
+ await trigger.click();
+ await expect(choice).toHaveValue("");
+ await sheet.getByRole("button", { name: "Close", exact: true }).click();
+ await expect(sheet).toBeHidden();
+ await expect(trigger).toBeFocused();
+ await trigger.click();
+ await expect(sheet).toBeVisible();
+ const swipe = await sheet.boundingBox();
+ if (!swipe) throw new Error("New sheet has no swipe bounds");
+ await page.mouse.move(swipe.x + swipe.width / 2, swipe.y + 8);
+ await page.mouse.down();
+ await page.mouse.move(swipe.x + swipe.width / 2, swipe.y + swipe.height * 0.8, { steps: 12 });
+ await page.mouse.up();
+ await expect(sheet).toBeHidden();
+ await expect(trigger).toBeFocused();
+});
+
+test("reduced motion keeps a short dialog opacity fade with no scale transition", async ({ authPage: page }, info) => {
+ await page.addInitScript(() => {
+ const original = document.startViewTransition.bind(document);
+ window.pageFades = [];
+ document.startViewTransition = (options) => {
+ const transition = original(options);
+ void transition.ready
+ .then(() => {
+ const style = getComputedStyle(document.documentElement, "::view-transition-new(root)");
+ window.pageFades.push({ duration: style.animationDuration, delay: style.animationDelay });
+ })
+ .catch(() => undefined);
+ return transition;
+ };
+ });
+ await page.setViewportSize({ width: 1280, height: 900 });
+ await page.emulateMedia({ reducedMotion: "reduce" });
+ await page.goto("/dashboard");
+ await page.getByRole("button", { name: "New", exact: true }).click();
+ const dialog = page.locator('[data-slot="dialog-content"]');
+ await expect(dialog).toBeVisible();
+ const style = await dialog.evaluate((element) => {
+ const value = getComputedStyle(element);
+ return { property: value.transitionProperty, duration: value.transitionDuration, scale: value.scale };
+ });
+ await info.attach("reduced-motion-dialog", { body: JSON.stringify(style), contentType: "application/json" });
+ expect(style.property).toBe("opacity");
+ expect(Number.parseFloat(style.duration)).toBeGreaterThanOrEqual(0.08);
+ expect(Number.parseFloat(style.duration)).toBeLessThanOrEqual(0.2);
+ expect(["1", "none"]).toContain(style.scale);
+ await page.emulateMedia({ reducedMotion: "no-preference" });
+ await expect
+ .poll(() => dialog.evaluate((element) => getComputedStyle(element).transitionProperty))
+ .toContain("scale");
+ await page.emulateMedia({ reducedMotion: "reduce" });
+ await expect.poll(() => dialog.evaluate((element) => getComputedStyle(element).transitionProperty)).toBe("opacity");
+ await page.keyboard.press("Escape");
+ await expect(dialog).toBeHidden();
+ await page
+ .getByRole("complementary", { name: "App navigation" })
+ .getByRole("link", { name: "Applications", exact: true })
+ .click();
+ await expect.poll(() => page.evaluate(() => window.pageFades.length)).toBeGreaterThan(0);
+ const pageFade = await page.evaluate(() => window.pageFades.at(-1));
+ expect(Number.parseFloat(pageFade?.duration ?? "1")).toBeLessThanOrEqual(0.001);
+ expect(Number.parseFloat(pageFade?.delay ?? "1")).toBeLessThanOrEqual(0.001);
+});
+
+test("emptying Trash keeps the library quiet across navigation", async ({ authPage: page }) => {
+ const created = await page.request.post("/api/openapi/resumes", { data: { name: "History fixture", tags: [] } });
+ await expect(created).toBeOK();
+ const id: string = await created.json();
+ await expect(await page.request.delete(`/api/openapi/resumes/${id}`)).toBeOK();
+ await page.goto("/dashboard/trash");
+ await page.getByRole("button", { name: "Empty Trash…", exact: true }).click();
+ const dialog = page.getByRole("alertdialog");
+ await dialog.getByRole("button", { name: "Hold to delete", exact: true }).focus();
+ await page.keyboard.down("Space");
+ await expect(dialog).toBeHidden();
+ await page.keyboard.up("Space");
+ await expect(page.getByText("Trash is empty", { exact: true })).toBeVisible();
+ await page.getByRole("link", { name: "Back to documents", exact: true }).click();
+ await expect(page.getByRole("heading", { name: "No documents", exact: true })).toBeVisible();
+ await expect(page.getByText("Let's start with what you have", { exact: true })).toHaveCount(0);
+ const counts = await page.request.get("/api/openapi/documents/counts");
+ await expect(counts).toBeOK();
+ expect(await counts.json()).toEqual({ resume: 0, letter: 0, trash: 0 });
+});
+
+for (const batch of [false, true])
+ test(`Undo fades the restored Trash row after navigation (batch=${batch})`, async ({ authPage: page }) => {
+ const created = await page.request.post("/api/openapi/resumes", {
+ data: { name: "Motion Undo document", tags: [] },
+ });
+ await expect(created).toBeOK();
+ const id: string = await created.json();
+ await recordDocumentExits(page);
+ await page.goto("/dashboard");
+ if (batch) {
+ await page.getByRole("checkbox", { name: "Select Motion Undo document", exact: true }).check();
+ await page
+ .getByRole("toolbar", { name: "Selected documents" })
+ .getByRole("button", { name: "Move to Trash", exact: true })
+ .click();
+ } else {
+ await page.getByRole("button", { name: "Options for Motion Undo document", exact: true }).click();
+ await page.getByRole("menuitem", { name: "Move to Trash", exact: true }).click();
+ }
+ await expect(page.locator('[data-slot="toast"]').filter({ hasText: "moved to Trash" })).toBeVisible();
+ await page.getByRole("complementary", { name: "App navigation" }).locator('a[href="/dashboard/trash"]').click();
+ const row = page.locator(`[data-document-key="resume:${id}"]`);
+ await expect(row).toBeVisible();
+ await page.getByRole("button", { name: "Undo", exact: true }).click();
+ await expect.poll(() => page.evaluate(() => window.documentExits.length)).toBe(2);
+ await expect(row).toHaveCount(0);
+ const read = await page.request.get("/api/openapi/documents?trashed=false");
+ await expect(read).toBeOK();
+ expect(await read.json()).toEqual(expect.arrayContaining([expect.objectContaining({ id })]));
+ });
+
+test("an accepted removal stays faded and inert when refresh fails, then recovers on retry", async ({
+ authPage: page,
+}) => {
+ const created = await page.request.post("/api/openapi/resumes", {
+ data: { name: "Refresh failure fixture", tags: [] },
+ });
+ await expect(created).toBeOK();
+ const id: string = await created.json();
+ await page.goto("/dashboard");
+ await expect(page.getByRole("button", { name: "Options for Refresh failure fixture", exact: true })).toBeVisible();
+ let failing = true;
+ await page.route("**/api/rpc/**", async (route) => {
+ if (failing) await failRpcProcedure(route, "/api/rpc/documents/page", "Fixture: page refresh unavailable");
+ else await route.continue();
+ });
+ await page.getByRole("button", { name: "Options for Refresh failure fixture", exact: true }).click();
+ await page.getByRole("menuitem", { name: "Move to Trash", exact: true }).click();
+ await expect(page.getByRole("alert")).toBeVisible({ timeout: 15_000 });
+ const row = page.locator(`[data-document-key="resume:${id}"]`);
+ await expect(row).toHaveCSS("opacity", "0");
+ await expect(row).toHaveJSProperty("inert", true);
+ const read = await page.request.get("/api/openapi/documents?trashed=true");
+ await expect(read).toBeOK();
+ expect(await read.json()).toEqual(expect.arrayContaining([expect.objectContaining({ id })]));
+ failing = false;
+ await page.getByRole("button", { name: "Try again", exact: true }).click();
+ await expect(row).toHaveCount(0);
+ await expect(page.getByRole("alert")).toHaveCount(0);
+});
+
+for (const interruption of ["filter", "navigation", "animation failure"] as const)
+ test(`accepted Trash survives ${interruption}`, async ({ authPage: page }) => {
+ const created = await page.request.post("/api/openapi/resumes", {
+ data: { name: "Motion interrupted document", tags: [] },
+ });
+ await expect(created).toBeOK();
+ const id: string = await created.json();
+ await page.addInitScript((failure) => {
+ const original = Element.prototype.animate;
+ window.documentExits = [];
+ window.documentExitCanceled = false;
+ Element.prototype.animate = function (...args) {
+ if (!this.matches("[data-document-key]")) return original.apply(this, args);
+ window.documentExits.push({ opacity: 0, scale: undefined, duration: 10_000 });
+ if (failure) throw new Error("Animation platform unavailable");
+ const animation = original.apply(this, args);
+ animation.effect?.updateTiming({ duration: 10_000 });
+ animation.addEventListener("cancel", () => {
+ window.documentExitCanceled = true;
+ });
+ return animation;
+ };
+ }, interruption === "animation failure");
+ await page.goto("/dashboard");
+ await page.getByRole("button", { name: "Options for Motion interrupted document", exact: true }).click();
+ await page.getByRole("menuitem", { name: "Move to Trash", exact: true }).click();
+ await expect.poll(() => page.evaluate(() => window.documentExits.length)).toBe(1);
+ if (interruption === "filter") {
+ await page.getByRole("searchbox", { name: "Search documents", exact: true }).fill("no match");
+ } else if (interruption === "navigation") {
+ const started = Date.now();
+ await page
+ .getByRole("complementary", { name: "App navigation" })
+ .getByRole("link", { name: "Applications", exact: true })
+ .click();
+ expect(Date.now() - started).toBeLessThan(3000);
+ }
+ if (interruption !== "animation failure")
+ await expect.poll(() => page.evaluate(() => window.documentExitCanceled), { timeout: 3000 }).toBe(true);
+ // Cancellation or platform failure releases presentation without losing the accepted server result.
+ await expect(page.locator('[data-slot="toast"]').filter({ hasText: "moved to Trash" })).toBeVisible({
+ timeout: 3000,
+ });
+ await page.goto("/dashboard/trash");
+ await expect(
+ page.getByRole("button", { name: "Options for Motion interrupted document", exact: true }),
+ ).toBeVisible();
+ const read = await page.request.get("/api/openapi/documents?trashed=true");
+ await expect(read).toBeOK();
+ expect(await read.json()).toEqual(expect.arrayContaining([expect.objectContaining({ id })]));
+ });
+
+for (const { view, reduced } of [
+ { view: "grid", reduced: false },
+ { view: "list", reduced: false },
+ { view: "list", reduced: true },
+])
+ test(`only confirmed ${view} trash/restore actions fade; filters stay instant (reduced=${reduced})`, async ({
+ authPage: page,
+ }, info) => {
+ const created = await page.request.post("/api/openapi/resumes", {
+ data: { name: "Motion retained document", tags: [] },
+ });
+ await expect(created).toBeOK();
+ const id: string = await created.json();
+ await page.emulateMedia({ reducedMotion: reduced ? "reduce" : "no-preference" });
+ await recordDocumentExits(page);
+ await page.goto(`/dashboard?view=${view}`);
+ const search = page.getByRole("searchbox", { name: "Search documents", exact: true });
+ await search.fill("no matching document");
+ await expect(page.getByRole("link", { name: "Motion retained document", exact: true })).toHaveCount(0);
+ expect(await page.evaluate(() => window.documentExits)).toEqual([]);
+ await search.fill("");
+ const options = page.getByRole("button", { name: "Options for Motion retained document", exact: true });
+ await options.click();
+ // A real concurrent lock refuses Trash: no successful receipt, no outgoing animation.
+ const locked = await page.request.post("/api/rpc/documents/setLocked", {
+ data: { json: { type: "resume", id, isLocked: true } },
+ });
+ await expect(locked).toBeOK();
+ await page.getByRole("menuitem", { name: "Move to Trash", exact: true }).click();
+ await expect(page.locator('[data-slot="toast"]')).toBeVisible();
+ await expect(options).toBeVisible();
+ expect(await page.evaluate(() => window.documentExits)).toEqual([]);
+ const unlocked = await page.request.post("/api/rpc/documents/setLocked", {
+ data: { json: { type: "resume", id, isLocked: false } },
+ });
+ await expect(unlocked).toBeOK();
+ await page.reload();
+ await options.click();
+ await page.getByRole("menuitem", { name: "Move to Trash", exact: true }).click();
+ await expect.poll(() => page.evaluate(() => window.documentExits.length)).toBe(1);
+ const exit = await page.evaluate(() => window.documentExits[0]);
+ expect(exit?.opacity).toBe("0");
+ expect(Number(exit?.duration)).toBeCloseTo(reduced ? 120 : 140, 3);
+ expect(exit?.scale).toBe(reduced ? undefined : "0.98");
+ await expect(page.getByRole("heading", { name: "No documents", exact: true })).toBeVisible();
+ if (view === "grid") await page.screenshot({ path: info.outputPath("quiet-library.png") });
+ await expect(page.getByText("Let's start with what you have", { exact: true })).toHaveCount(0);
+ await page.getByRole("button", { name: "Undo", exact: true }).click();
+ await expect(options).toBeVisible();
+ expect(await page.evaluate(() => window.documentExits.length)).toBe(1);
+ await options.click();
+ await page.getByRole("menuitem", { name: "Move to Trash", exact: true }).click();
+ await expect(page.getByRole("heading", { name: "No documents", exact: true })).toBeVisible();
+ if (view === "grid") {
+ await page.reload();
+ await expect(page.getByRole("heading", { name: "No documents", exact: true })).toBeVisible();
+ await expect(page.getByText("Let's start with what you have", { exact: true })).toHaveCount(0);
+ }
+ await page.goto("/dashboard/trash");
+ await options.click();
+ await page.getByRole("menuitem", { name: "Restore", exact: true }).click();
+ await expect.poll(() => page.evaluate(() => window.documentExits.length)).toBe(1);
+ await expect(options).toHaveCount(0);
+ const read = await page.request.get(`/api/openapi/resumes/${id}`);
+ await expect(read).toBeOK();
+ });
diff --git a/tests/e2e/specs/library-pagination.spec.ts b/tests/e2e/specs/library-pagination.spec.ts
index 3217c17cd..69e215cfd 100644
--- a/tests/e2e/specs/library-pagination.spec.ts
+++ b/tests/e2e/specs/library-pagination.spec.ts
@@ -1,5 +1,6 @@
import type { Page } from "@playwright/test";
import { Pool } from "pg";
+import { failRpcProcedure } from "../fixtures/rpc-failure";
import { expect, test } from "../fixtures/test";
async function seedLetters(page: Page, pool: Pool) {
@@ -232,13 +233,17 @@ test("bounds tag filters from chips and URLs and clears a first-load filter fail
expect(badResponses).toEqual([]);
await page.getByRole("button", { name: "Clear search and filters", exact: true }).click();
await expect(page.locator("article")).toHaveCount(100);
+ let failedPages = 0;
await page.route("**/api/rpc/**", async (route) => {
const body = route.request().postData() ?? "";
- if (body.includes("unavailable-tag")) await route.fulfill({ status: 503, body: "Unavailable" });
- else await route.continue();
+ // Counts can share this physical batch; only the filtered page should fail.
+ if (body.includes("unavailable-tag")) {
+ if (await failRpcProcedure(route, "/api/rpc/documents/page", "Fixture: tag filter unavailable")) failedPages++;
+ } else await route.continue();
});
await page.goto(`/dashboard?tags=${encodeURIComponent(JSON.stringify(["unavailable-tag"]))}`);
await expect(page.getByRole("alert")).toBeVisible({ timeout: 20_000 });
+ expect(failedPages).toBeGreaterThan(0);
await page.getByRole("button", { name: "Clear search and filters", exact: true }).click();
await expect(page.getByRole("alert")).toBeHidden();
await expect(page.locator("article")).toHaveCount(100);
diff --git a/tests/e2e/specs/senior-tailoring.spec.ts b/tests/e2e/specs/senior-tailoring.spec.ts
index 6a20511b3..373f2ba64 100644
--- a/tests/e2e/specs/senior-tailoring.spec.ts
+++ b/tests/e2e/specs/senior-tailoring.spec.ts
@@ -83,6 +83,9 @@ test("first-run Choose a file opens the picker and imports the picked file (J2-1
const resumeId = await createResume(page, "Fixture source");
const source = await api<Resume>(page, "get", `/resumes/${resumeId}`);
await expect(await page.request.delete(`/api/openapi/resumes/${resumeId}`)).toBeOK();
+ // Discard the disposable fixture from Trash too, so this is an empty-account first visit.
+ await api(page, "post", "/documents/purge", { type: "resume", id: resumeId });
+ expect(await api(page, "get", "/documents/counts")).toEqual({ resume: 0, letter: 0, trash: 0 });
const file = testInfo.outputPath("morgan.json");
await import("node:fs/promises").then((fs) => fs.writeFile(file, JSON.stringify(source.data)));