[object Object]

← back to Rentv Sheet Enrich Refine

Live console: row-number gutter down the left; drag-to-fill — drop a value onto any field to replace it in the sheet (Notes appends instead of replacing)

fe7b566dac3e0c1e685a922fe2df09ccdab3054b · 2026-08-13 16:59:24 -0700 · Steve Abrams

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

Files touched

Diff

commit fe7b566dac3e0c1e685a922fe2df09ccdab3054b
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Aug 13 16:59:24 2026 -0700

    Live console: row-number gutter down the left; drag-to-fill — drop a value onto any field to replace it in the sheet (Notes appends instead of replacing)
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 __pycache__/snapshot.cpython-314.pyc | Bin 8411 -> 11564 bytes
 public_live/index.html               |  20 ++++++++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/__pycache__/snapshot.cpython-314.pyc b/__pycache__/snapshot.cpython-314.pyc
index 8a27397..6ce7148 100644
Binary files a/__pycache__/snapshot.cpython-314.pyc and b/__pycache__/snapshot.cpython-314.pyc differ
diff --git a/public_live/index.html b/public_live/index.html
index 9d73f7d..9ecf60b 100644
--- a/public_live/index.html
+++ b/public_live/index.html
@@ -104,6 +104,8 @@
   td.callcell .cicon{color:#16a34a}
   td.mailcell .cicon,td.mailcell .linkval{color:var(--accent)}
   td.linkcell:hover,td.callcell:hover,td.mailcell:hover{background:var(--linkhover)}
+  /* drag-to-fill: highlight the cell a dragged value will drop into */
+  #grid td.drophi{outline:2px dashed var(--accent);outline-offset:-2px;background:var(--cellfocus)}
   /* color-coded Status field + click-to-set picker */
   td.statuscell{cursor:pointer} td.statuscell:hover{background:var(--rowhover)}
   .statuschip{display:inline-block;max-width:100%;padding:2px 10px;border-radius:12px;font-size:.92em;font-weight:600;line-height:1.55;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@@ -594,6 +596,24 @@ function wireGrid(){
       const mc=e.target.closest('td.mailcell');                            // email -> mail client
       if(mc){ location.href='mailto:'+mc.dataset.mail; return; }
     });
+    // DRAG-TO-FILL: drag a value (from another cell or from outside the app) and drop it onto ANY field to
+    // REPLACE that field's value in the sheet — EXCEPT the Notes column, where the dropped text is APPENDED.
+    document.querySelectorAll('#grid td.linkcell,#grid td.callcell,#grid td.mailcell,#grid td.statuscell').forEach(td=>td.setAttribute('draggable','true'));
+    gridEl.addEventListener('dragstart',e=>{ const td=e.target.closest('td[data-c]'); if(!td||td.getAttribute('draggable')!=='true')return;
+      const r=+td.dataset.r,c=+td.dataset.c, v=(DATA.rows[r]&&DATA.rows[r][c])||td.textContent.trim();
+      e.dataTransfer.setData('text/plain',String(v)); e.dataTransfer.effectAllowed='copyMove'; });
+    gridEl.addEventListener('dragover',e=>{ const td=e.target.closest('td[data-c]'); if(!td)return; e.preventDefault(); e.dataTransfer.dropEffect='copy'; td.classList.add('drophi'); });
+    gridEl.addEventListener('dragleave',e=>{ const td=e.target.closest('td[data-c]'); if(td)td.classList.remove('drophi'); });
+    gridEl.addEventListener('drop',async e=>{ const td=e.target.closest('td[data-c]'); if(!td)return; e.preventDefault(); td.classList.remove('drophi');
+      const txt=(e.dataTransfer.getData('text/plain')||'').trim(); if(!txt)return;
+      const r=+td.dataset.r, c=+td.dataset.c; if(isNaN(r)||isNaN(c))return;
+      const isNotes=/notes/i.test(DATA.headers[c]||'');
+      const cur=(DATA.rows[r]&&DATA.rows[r][c])||'';
+      if(isNotes && String(cur).includes(txt))return;                       // don't append a duplicate note
+      const newVal=isNotes ? (String(cur).trim() ? String(cur).replace(/\s+$/,'')+'\n'+txt : txt) : txt;   // Notes appends, everything else replaces
+      try{ const res=await postWrite(r,c,newVal); if(!res.ok)throw new Error(res.error||'write failed');
+        DATA.rows[r][c]=newVal; GREENSET.add(r+','+c); render(); setSync('ok'); }
+      catch(err){ setSync('err'); alert('Drop write failed: '+err.message); } });
   }
   $$('.card').forEach(c=>c.onclick=()=>openDraft(+c.dataset.r));
   // header: click = sort, drag = MOVE column (manual drag, 5px threshold; order persists per tab)

← 1098075 rentv :9797 draft composer: richer Follow-up (thank-you + qu  ·  back to Rentv Sheet Enrich Refine  ·  Live console: show Last Modified date+time directly under th 95c5ba3 →