Skip to content

Commit 3f68448

Browse files
committed
reduce first-minute intake friction
1 parent 2b1f507 commit 3f68448

5 files changed

Lines changed: 25 additions & 23 deletions

File tree

components/intake/IntakeWizard.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ const FREEZE_OPTIONS: {
5757
];
5858

5959
const TOTAL_STEPS = 6;
60-
const MIN_STORY_LENGTH = 10;
6160
const MAX_STORY_LENGTH = 4000;
6261
const MAX_AMOUNT_INR = 1_000_000_000; // ₹100 crore — blocks absurd/exponent values.
6362

@@ -100,7 +99,7 @@ export function IntakeWizard({ onComplete, submitting, onExit }: IntakeWizardPro
10099
const ncrpInvalid = ncrpId.trim().length > 0 && !isValidNcrp(ncrpId);
101100

102101
const canAdvance =
103-
(step === 0 && storyLen >= MIN_STORY_LENGTH) ||
102+
step === 0 ||
104103
(step === 1 && bankChoice !== null) ||
105104
(step === 2 && role !== null) ||
106105
(step === 3 && freezeChoice !== null) ||
@@ -151,9 +150,7 @@ export function IntakeWizard({ onComplete, submitting, onExit }: IntakeWizardPro
151150

152151
function goNext() {
153152
if (!canAdvance) {
154-
const message =
155-
step === 0 ? (storyLen === 0 ? stepErrors[0] : t('errorStoryMore')) : stepErrors[step];
156-
setStepError(message || null);
153+
setStepError(stepErrors[step] || null);
157154
return;
158155
}
159156
setStepError(null);

components/legal/ConsentScreen.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,16 @@ export function ConsentScreen({ onContinue, onBack }: ConsentScreenProps) {
3737
<h1 className="type-display text-[1.375rem]">{t('title')}</h1>
3838
</div>
3939

40-
<p className="mt-4 text-[0.84375rem] leading-relaxed text-[var(--ink-muted)]">{t('intakeDisclaimer')}</p>
40+
<p className="mt-4 text-[0.84375rem] leading-relaxed text-[var(--ink-muted)]">{t('whatToExpect')}</p>
41+
<details className="mt-3 rounded-[var(--radius-md)] border border-[var(--border)] bg-[var(--surface-raised)] px-3 py-2">
42+
<summary className="cursor-pointer text-xs font-semibold text-[var(--color-sky-deep)]">
43+
{t('readDataDetails')}
44+
</summary>
45+
<div className="mt-2 space-y-3 text-[0.8125rem] leading-relaxed text-[var(--ink-muted)]">
46+
<p>{t('intakeDisclaimer')}</p>
47+
<p>{t('aiProcessingDisclaimer')}</p>
48+
</div>
49+
</details>
4150
<ConsentRow
4251
id="consent-required"
4352
checked={accepted}
@@ -47,7 +56,6 @@ export function ConsentScreen({ onContinue, onBack }: ConsentScreenProps) {
4756
{t('agreeRequired')}
4857
</ConsentRow>
4958

50-
<p className="mt-5 text-[0.84375rem] leading-relaxed text-[var(--ink-muted)]">{t('aiProcessingDisclaimer')}</p>
5159
<ConsentRow
5260
id="consent-ai"
5361
checked={aiConsent}

messages/en.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"progress": "Question {current} of {total}",
6464
"progressLabel": "Intake progress: question {current} of {total}",
6565
"steps": [
66-
{ "title": "What happened?", "hint": "Tell us in your own words. Say when it happened and how you found out." },
66+
{ "title": "What happened?", "hint": "Optional — add a few words now, or continue and add your notice first." },
6767
{ "title": "Which bank froze your account?", "hint": "Pick \"Other\" if your bank is not here — everything still works." },
6868
{ "title": "Did you send the money, or did it come to you?", "hint": "There is no wrong answer. This helps us write the right letter." },
6969
{ "title": "How is your money blocked?", "hint": "Check the SMS from your bank. \"Not sure\" is fine." },
@@ -90,7 +90,7 @@
9090
"kyc": { "label": "The bank itself — KYC / documents pending", "help": "" },
9191
"unsure": { "label": "I am not sure", "help": "That is fine — your letter asks the bank to confirm who ordered it." }
9292
},
93-
"storyPlaceholder": "e.g. My SBI account got frozen after someone sent me a UPI payment I did not know about",
93+
"storyPlaceholder": "Optional — e.g. my SBI account was frozen after an unknown UPI payment…",
9494
"storyCounter": "{count} letters typed",
9595
"amountPlaceholder": "e.g. 25000",
9696
"microUpiChip": "Tiny unknown UPI (e.g. ₹2)",
@@ -101,14 +101,13 @@
101101
"ncrpInvalid": "NCRP numbers are 14 digits — we’ll skip this for now if it doesn’t match.",
102102
"ncrpSkip": "Skip this if you don’t have it. You can add it later.",
103103
"errors": [
104-
"Please tell us what happened first.",
104+
"You can add this later. Pick your bank to continue.",
105105
"Please pick your bank, or \"Other / not sure\".",
106106
"Please pick the one that fits you best.",
107107
"Please pick one — \"Not sure\" is fine.",
108108
"",
109109
"Please pick one — \"Not sure\" is fine."
110110
],
111-
"errorStoryMore": "Add a little more detail — a few more words.",
112111
"next": "Next →",
113112
"startCase": "Start my case",
114113
"starting": "Starting…",
@@ -155,6 +154,8 @@
155154
"ConsentScreen": {
156155
"back": "← Back",
157156
"title": "Before you continue",
157+
"whatToExpect": "We ask a few questions, help organise your documents, and prepare drafts for you to review. Nothing is sent to your bank automatically.",
158+
"readDataDetails": "Read data and AI details",
158159
"intakeDisclaimer": "I understand Unhold does not guarantee unfreezing of my account or release of funds. I am solely responsible for reviewing all drafts before sending them. I will not upload banking passwords, UPI PINs, or full Aadhaar numbers.",
159160
"aiProcessingDisclaimer": "Unhold can use AI to classify cases, check document readability, extract details for your review, and draft letters. With your optional consent, case data — including document images — may be processed by AI providers outside India. If you do not consent, you can still use the non-AI workflow.",
160161
"agreeRequired": "I have read and agree to the above. I understand Unhold is not a law firm and does not guarantee outcomes.",

messages/hi.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"progress": "सवाल {current} / {total}",
6464
"progressLabel": "इनटेक प्रगति: सवाल {current} / {total}",
6565
"steps": [
66-
{ "title": "क्या हुआ?", "hint": "अपने शब्दों में बताएं। कब हुआ और आपको कैसे पता चला, यह ज़रूर लिखें" },
66+
{ "title": "क्या हुआ?", "hint": "वैकल्पिक — अभी कुछ शब्द लिखें या आगे बढ़कर पहले अपना नोटिस जोड़ें" },
6767
{ "title": "किस बैंक ने आपका खाता फ्रीज़ किया?", "hint": "अगर आपका बैंक यहां नहीं है तो \"अन्य\" चुनें — सब कुछ फिर भी काम करता है।" },
6868
{ "title": "आपने पैसे भेजे, या पैसे आपके पास आए?", "hint": "कोई गलत जवाब नहीं है। इससे हमें सही पत्र लिखने में मदद मिलती है।" },
6969
{ "title": "आपका पैसा कैसे रुका है?", "hint": "अपने बैंक का SMS देखें। \"पता नहीं\" चुनना भी ठीक है।" },
@@ -90,7 +90,7 @@
9090
"kyc": { "label": "बैंक ने खुद — KYC / दस्तावेज़ बाकी", "help": "" },
9191
"unsure": { "label": "मुझे पता नहीं", "help": "यह ठीक है — आपका पत्र बैंक से पूछता है कि आदेश किसने दिया।" }
9292
},
93-
"storyPlaceholder": "उदा. किसी ने मुझे एक UPI पेमेंट भेजा जिसका मुझे पता नहीं था, उसके बाद मेरा SBI खाता फ्रीज़ हो गया",
93+
"storyPlaceholder": "वैकल्पिक — जैसे: अनजान UPI पेमेंट के बाद मेरा SBI खाता फ्रीज़ हुआ",
9494
"storyCounter": "{count} अक्षर टाइप किए",
9595
"amountPlaceholder": "उदा. 25000",
9696
"microUpiChip": "छोटा अज्ञात UPI (जैसे ₹2)",
@@ -101,14 +101,13 @@
101101
"ncrpInvalid": "NCRP नंबर 14 अंकों के होते हैं — मेल न खाने पर हम इसे अभी छोड़ देंगे।",
102102
"ncrpSkip": "अगर आपके पास नहीं है तो इसे छोड़ दें। आप इसे बाद में जोड़ सकते हैं।",
103103
"errors": [
104-
"पहले हमें बताएं कि क्या हुआ",
104+
"इसे बाद में जोड़ सकते हैं। आगे बढ़ने के लिए अपना बैंक चुनें",
105105
"कृपया अपना बैंक चुनें, या \"अन्य / पता नहीं\"",
106106
"कृपया वह चुनें जो आप पर सबसे सही बैठता है।",
107107
"कृपया एक चुनें — \"पता नहीं\" ठीक है।",
108108
"",
109109
"कृपया एक चुनें — \"पता नहीं\" ठीक है।"
110110
],
111-
"errorStoryMore": "थोड़ा और विवरण जोड़ें — कुछ और शब्द।",
112111
"next": "आगे →",
113112
"startCase": "मेरा केस शुरू करें",
114113
"starting": "शुरू हो रहा है…",
@@ -155,6 +154,8 @@
155154
"ConsentScreen": {
156155
"back": "← पीछे",
157156
"title": "आगे बढ़ने से पहले",
157+
"whatToExpect": "हम कुछ सवाल पूछेंगे, आपके दस्तावेज़ व्यवस्थित करने में मदद करेंगे और आपकी समीक्षा के लिए ड्राफ्ट बनाएँगे। आपके बैंक को कुछ भी अपने-आप नहीं भेजा जाता।",
158+
"readDataDetails": "डेटा और AI की जानकारी पढ़ें",
158159
"intakeDisclaimer": "मैं समझता/समझती हूँ कि Unhold मेरे खाते के अनफ्रीज़ होने या पैसे जारी होने की गारंटी नहीं देता। भेजने से पहले हर ड्राफ्ट की जाँच की पूरी ज़िम्मेदारी मेरी है। मैं बैंकिंग पासवर्ड, UPI PIN, या पूरा Aadhaar नंबर अपलोड नहीं करूँगा/करूँगी।",
159160
"aiProcessingDisclaimer": "Unhold AI का उपयोग केस वर्गीकृत करने, दस्तावेज़ पढ़ने लायक हैं या नहीं जाँचने, आपकी समीक्षा के लिए विवरण निकालने और पत्र ड्राफ्ट करने में कर सकता है। आपकी वैकल्पिक सहमति से केस डेटा — दस्तावेज़ चित्र सहित — भारत से बाहर के AI प्रदाताओं द्वारा प्रोसेस हो सकता है। सहमति न देने पर भी गैर-AI वर्कफ्लो इस्तेमाल कर सकते हैं।",
160161
"agreeRequired": "मैं समझ गया/गई और ऊपर लिखी बातों से सहमत हूँ। मैं जानता/जानती हूँ कि Unhold कोई लॉ फर्म नहीं है और किसी नतीजे की गारंटी नहीं देता।",

tests/unit/components/IntakeWizard.test.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,21 +152,16 @@ describe('IntakeWizard', () => {
152152
});
153153
});
154154

155-
it('shows a per-step validation error instead of advancing', () => {
155+
it('lets a user skip the story and validates the first structured choice', () => {
156156
act(() => {
157157
root.render(withIntl(<IntakeWizard onComplete={() => {}} submitting={false} onExit={() => {}} />));
158158
});
159159

160160
clickNext();
161-
expect(container.textContent).toContain('Please tell us what happened first.');
162-
expect(container.textContent).toContain('Question 1 of 6');
161+
expect(container.textContent).toContain('Question 2 of 6');
163162

164-
const textarea = container.querySelector('textarea') as HTMLTextAreaElement;
165-
act(() => {
166-
setInputValue(textarea, 'too short');
167-
});
168163
clickNext();
169-
expect(container.textContent).toContain('Add a little more detail — a few more words.');
164+
expect(container.textContent).toContain('Please pick your bank, or "Other / not sure".');
170165
});
171166
});
172167

0 commit comments

Comments
 (0)