← back to Rentv
5x sweep 4: don't restore search-only registry (brokers/firms) as CRM home on reload — fall back to All so a returning user lands on their contacts, not an empty grid
dd01430533f3ed4912d7f9c159e8e2f4bfa7ca2c · 2026-08-12 19:13:38 -0700 · steve
Files touched
Diff
commit dd01430533f3ed4912d7f9c159e8e2f4bfa7ca2c
Author: steve <steve@designerwallcoverings.com>
Date: Wed Aug 12 19:13:38 2026 -0700
5x sweep 4: don't restore search-only registry (brokers/firms) as CRM home on reload — fall back to All so a returning user lands on their contacts, not an empty grid
---
public/crm.html | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/public/crm.html b/public/crm.html
index ec9a4c91..ba680a28 100644
--- a/public/crm.html
+++ b/public/crm.html
@@ -245,6 +245,10 @@ function applyDensity(){
async function load(){
try{ const r=await fetch('/api/crm',{credentials:'same-origin'}); DATA=await r.json(); }
catch{ DATA={contacts:[],counts:{all:0},types:[],registries:[],segments:[],error:'load failed'}; }
+ // A search-only registry (brokers/firms, 382k+ rows) is a transient "look something up" mode,
+ // not a home view. If a prior session persisted it with no active query, reloading would strand
+ // the user on an empty grid + "type 2 chars" hint instead of their contacts — so fall back to All.
+ if(isRegistry(S.type) && !S.q.trim()){ S.type='all'; setLS('type','all'); }
try{ buildXref(); }catch(e){ console.warn('xref build failed', e); }
renderRail(); render();
}
← 0204ec82 auto-data-snapshot: 2026-08-12T19:06:56 (8 data files) — 5x/
·
back to Rentv
·
5x: corrected report — sticky search-registry restore was th 26d46a6e →