[object Object]

← back to Commercialrealestate

CRCP mls chat: example chips + unwarrantable/non-QM/condo terms (TK-10698)

5d89be80bdb49ec4f5d19cff6d7016145d779e2f · 2026-08-18 14:56:43 -0700 · Steve Abrams

Steve: 'examples. unwarrantable condos'. Added a row of clickable example chips
(4 units in LA · unwarrantable condos · multifamily under $2M · retail 6% cap · …)
that fill+run on click, and taught the parser CRCP condo terms: 'unwarrantable'
-> F.unwarrantable, 'non-QM' -> F.nonqm, 'condos' -> Condo type. Verified live:
'unwarrantable condos' -> 2,486 condos, 'retail 6% cap' chip -> 156, 0 errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 5d89be80bdb49ec4f5d19cff6d7016145d779e2f
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Aug 18 14:56:43 2026 -0700

    CRCP mls chat: example chips + unwarrantable/non-QM/condo terms (TK-10698)
    
    Steve: 'examples. unwarrantable condos'. Added a row of clickable example chips
    (4 units in LA · unwarrantable condos · multifamily under $2M · retail 6% cap · …)
    that fill+run on click, and taught the parser CRCP condo terms: 'unwarrantable'
    -> F.unwarrantable, 'non-QM' -> F.nonqm, 'condos' -> Condo type. Verified live:
    'unwarrantable condos' -> 2,486 condos, 'retail 6% cap' chip -> 156, 0 errors.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 public/mls.html | 38 +++++++++++++++++++++++++++++---------
 1 file changed, 29 insertions(+), 9 deletions(-)

diff --git a/public/mls.html b/public/mls.html
index b48d20d..0f95899 100644
--- a/public/mls.html
+++ b/public/mls.html
@@ -171,15 +171,29 @@
   <span class="count" id="count">…</span>
 </header>
 <!-- TK-10698: natural-language chat bar — "4 units in los angeles" → sets filters + re-renders -->
-<div id="chatbar" style="display:flex;align-items:center;gap:9px;padding:9px 18px;border-bottom:1px solid var(--line);background:var(--headbg,var(--card));position:sticky;top:0;z-index:39;">
-  <span style="font-size:16px" title="Ask for listings in plain English">💬</span>
-  <input id="chatq" type="text" autocomplete="off" spellcheck="false"
-    placeholder="Ask for what you want — e.g.  “4 units in Los Angeles”  ·  “multifamily under $2M in Long Beach”  ·  “retail over 6% cap”  ·  “built after 2000”  (Enter)"
-    style="flex:1;min-width:0;background:var(--card);border:1px solid var(--line);color:var(--ink);border-radius:9px;padding:9px 13px;font-size:14px;">
-  <button id="chatgo" class="gobtn" title="Apply this request">Ask ▸</button>
-  <button id="chatclear" class="minibtn" title="Clear the chat filters">Clear</button>
-  <span id="chatmsg" style="font-size:12px;color:var(--mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:34%"></span>
+<div id="chatbar" style="padding:9px 18px 10px;border-bottom:1px solid var(--line);background:var(--headbg,var(--card));position:sticky;top:0;z-index:39;">
+  <div style="display:flex;align-items:center;gap:9px;">
+    <span style="font-size:16px" title="Ask for listings in plain English">💬</span>
+    <input id="chatq" type="text" autocomplete="off" spellcheck="false"
+      placeholder="Ask for what you want — e.g.  “4 units in Los Angeles”  ·  “unwarrantable condos”  ·  “multifamily under $2M in Long Beach”  ·  “retail 6% cap”  (Enter)"
+      style="flex:1;min-width:0;background:var(--card);border:1px solid var(--line);color:var(--ink);border-radius:9px;padding:9px 13px;font-size:14px;">
+    <button id="chatgo" class="gobtn" title="Apply this request">Ask ▸</button>
+    <button id="chatclear" class="minibtn" title="Clear the chat filters">Clear</button>
+    <span id="chatmsg" style="font-size:12px;color:var(--mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:26%"></span>
+  </div>
+  <div id="chatex" style="display:flex;flex-wrap:wrap;gap:6px;margin-top:7px;padding-left:26px;font-size:11px;color:var(--mut);align-items:center;">
+    <span style="opacity:.7">Try:</span>
+    <button class="chatchip" data-q="4 units in Los Angeles">4 units in Los Angeles</button>
+    <button class="chatchip" data-q="unwarrantable condos">unwarrantable condos</button>
+    <button class="chatchip" data-q="multifamily under $2M in Long Beach">multifamily under $2M in Long Beach</button>
+    <button class="chatchip" data-q="retail 6% cap">retail 6% cap</button>
+    <button class="chatchip" data-q="office in Pasadena">office in Pasadena</button>
+    <button class="chatchip" data-q="non-QM condos">non-QM condos</button>
+    <button class="chatchip" data-q="built after 2000">built after 2000</button>
+    <button class="chatchip" data-q="5-10 units in Las Vegas">5-10 units in Las Vegas</button>
+  </div>
 </div>
+<style>.chatchip{background:var(--card);border:1px solid var(--line);color:var(--ink);border-radius:20px;padding:3px 11px;font-size:11px;cursor:pointer;transition:all .12s;} .chatchip:hover{border-color:var(--acc,#3b82f6);color:var(--acc,#3b82f6);}</style>
 <div class="shell">
 <aside class="rail">
   <div class="rsec" id="fieldsSec"><h4>Fields / columns — show / hide · reorder</h4>
@@ -836,8 +850,12 @@ function applyChat(raw){
   // whole-query reset
   if(/^\s*(clear|reset|all|everything|start over|show all)\s*$/.test(s)){ chatClearFilters(); if(msg)msg.textContent='Cleared filters'; return; }
   // Each chat query REPLACES the fields chat controls (fresh search); leave shortlist/quick chips alone.
-  F.types.clear(); F.cities.clear(); F.umin=F.umax=F.pmin=F.pmax=F.ymin=F.ymax=F.capmin=null;
+  F.types.clear(); F.cities.clear(); F.umin=F.umax=F.pmin=F.pmax=F.ymin=F.ymax=F.capmin=null; F.unwarrantable=F.nonqm=false;
   const got=[]; let m;
+  // CRCP condo warrantability terms
+  if(/unwarrantable|non-?warrantable|not warrantable/.test(s)){ F.unwarrantable=true; got.push('unwarrantable condos'); }
+  if(/non-?qm\b|non qm/.test(s)){ F.nonqm=true; got.push('non-QM'); }
+  if(/\bcondos?\b/.test(s) && !F.unwarrantable){ F.types.add('Condo'); got.push('Condo'); }
   // UNITS — "2-4 units", "under 5 units", "over 3 units", "4 units", "4 unit", "fourplex/duplex/triplex"
   const WORDU={duplex:2,triplex:3,fourplex:4,fiveplex:5};
   for(const w in WORDU){ if(s.includes(' '+w)){ F.umin=F.umax=WORDU[w]; got.push(WORDU[w]+' units'); } }
@@ -874,6 +892,8 @@ function chatClearFilters(){
   if(q){ q.addEventListener('keydown',e=>{ if(e.key==='Enter'){ e.preventDefault(); applyChat(q.value); } }); }
   if(go) go.addEventListener('click',()=>applyChat(q.value));
   if(cl) cl.addEventListener('click',()=>{ q.value=''; chatClearFilters(); const m=document.getElementById('chatmsg'); if(m)m.textContent='Cleared filters'; });
+  const ex=document.getElementById('chatex');
+  if(ex) ex.addEventListener('click',e=>{ const c=e.target.closest('.chatchip'); if(!c)return; q.value=c.dataset.q; applyChat(c.dataset.q); });
 })();
 NUMFIELDS.forEach(([id,k])=>{ const el=$('#'+id); if(!el) return;
   el.addEventListener('input',()=>{ STAGE[k]=el.value?+el.value:null; markStaged(); });

← 938bfff CRCP mls: natural-language chat bar across the top (TK-10698  ·  back to Commercialrealestate  ·  boom-records: durable record of 699 contact additions to Boo 568a6e1 →