SwiftArkTSProduct DesignGoodCRM

Salespeople Are Not Form-Filling Bots: My Move vs. Waiting On, GBK CSV Imports, and Cold-Restart Checks on Mate X5

Once GoodCRM's core engine was stable, walking through real B2B sales onboarding exposed a different class of friction: actions didn't separate 'My Move' from 'Waiting On', logging a note after finishing a task took two modals, mainland Excel CSVs arrived in GBK, and HUAWEI Mate X5 crashed on the second cold launch.

GoodCRM (1.0) is live on the US App Store (id6837223780) for iPhone, iPad, and Mac, while the native HarmonyOS app is in preparation. After locking down storage, encrypted backups, and sync boundaries, the mid-November CUST and UX waves (8921d70, 49a9d9a, and CHG-20261116-NEWCOMER-UX) focused on actual B2B sales workflows — and ran our first physical-device cold-restart checks on iPhone 14 Plus and HUAWEI Mate X5.

Unit tests never tell you when a workflow makes a salesperson close the app after five minutes.

Splitting “My Move” vs. “Waiting On” — and Logging a Note Right After

A salesperson’s follow-up list has two completely different kinds of mental load: tasks you owe (self / “我来做”, driven by due_schedule) and commitments you’re waiting on from a client (waiting / “等对方”, carrying a waiting_condition, counterparty contact, and review_schedule).

GoodCRM splits actions into those two tracks across both platforms, and enforces domain sanity at the boundary (e.g., field visits are strictly self and cannot be set to waiting, returning VISIT_CANNOT_WAIT).

Completion flow had even more friction:

  • Previously, completing an action forced the user to type an actual_result even when they had simply sent a quote. Now, on the manual path in Action4Forms.ts and ActionForm4, an empty actual_result defaults cleanly to "已完成".
  • If the user just wrapped up a call or WeChat message, switching the result form to the inline path lets them pick the channel and write the communication body right there. GoodCRM saves the linked interaction record and derives actual_result automatically from inline_body (locked down in model4-ux-flow-polish.test.ts), eliminating the second modal.
  • Opening and closing any of the 9 create forms without typing (isBlankCustomerDraft4, isBlankRecordDraft4, etc.) discards the empty draft silently instead of nagging a new user with an “unsaved draft” prompt.

Handling GBK-Encoded Chinese Excel CSVs and Custom Column Mapping

Real B2B customer spreadsheets exported from Windows Excel in mainland China rarely arrive as clean UTF-8 with standardized headers. They arrive in GBK / GB18030 or UTF-16 with BOMs, and columns named 姓名, 单位, or 手机 instead of a rigid template.

Both clients now normalize encodings losslessly before feeding bytes into the UTF-8 domain pipeline (capped at 5,000,000 bytes and 1,000 rows):

  • Apple (decodeCSVDataToUTF8 in ImportViews.swift): Strips UTF-8 BOM (EF BB BF) so the first header column matches cleanly; checks UTF-16 LE/BE BOM (FF FE / FE FF) before GB18030 fallback to avoid turning UTF-16 into mojibake; tries strict UTF-8 and BOM-less UTF-16; and finally falls back to CFStringEncodings.GB_18030_2000. Files above 100,000 bytes stay in memory without dumping raw CSV text into TextEditor.
  • HarmonyOS (normalizeImportCsvBytes4 in Import4Forms.ts): Attempts decodeUTF8 first, then new TextDecoder('gb18030', {fatal: true, ignoreBOM: true}), rejecting any \uFFFD or \u0000 with IMPORT_INVALID_UTF8 rather than importing corrupted characters.

For headers, parseCsvHeaderOptions4 and ImportViews.swift auto-match common aliases and expose per-field dropdowns (联系人姓名, 公司名称, 职位, 工作邮箱, 工作电话, 备注), keeping optional source_namespace / external_id deduplication mapping tucked into a collapsible section alongside per-batch safe rollback.

Two Real-Device Bugs Caught Only on HUAWEI Mate X5

CHG-20261116-NEWCOMER-UX.json records physical installation and testing on 马荟’s iPhone14+ (iPhone 14 Plus) and HUAWEI Mate X5 (HarmonyOS API 24). Running on Mate X5 caught two bugs that host tests and clean directories completely missed:

  1. 12 fileIo.mkdirSync calls broke the second cold launch: Host tests spin up fresh temp directories or in-memory ports. On Mate X5, the first launch created the storage directories and saved records fine; killing the app and cold-relaunching caused 12 unguarded fileIo.mkdirSync calls in HarmonyOS storage to throw File exists, blocking RelationalStore open. Guarding directory creation fixed second-launch reopening, verified by reading back 6 persisted records across a cold restart with zero hilog errors.
  2. 234 ButtonType.Normal buttons missing explicit backgrounds: In ArkUI, ButtonType.Normal with dark blue, gray, or danger text colors but no explicit backgroundColor rendered on Mate X5 with HarmonyOS’s default blue button fill, destroying text contrast. All 234 buttons were given explicit background tokens, alongside disabling save on empty customer names.

Reporting the exact verification scope: this milestone passed 466 passed / 1 skipped / 0 failed Apple host tests, 556/0 HarmonyOS host tests, 13/13 iPhone simulator UI tests, 4/4 iPad 3-column simulator UI tests, GoodCRMMac Debug build + 3s liveness smoke, 122/0 Python tool tests, and physical iPhone 14 Plus + HUAWEI Mate X5 cold-restart checks. Physical iPad, physical HarmonyOS tablet, and macOS notarization remain not_run.

✦

Comments

  • Loading…

Comments are reviewed before publishing; email is visible only to me.