← back to Rentv 2026
server: /api/deals-manage now gap-fills feed rows from the corpus, mirroring /api/closings (TK-10254). The closings admin surface got corpus gap-fill (buyer/seller/broker/summary/property_type/etc. — the deals-pull feed lacks the LLM-extracted fields) but its sibling deals-manage never did, so the same feed deal showed enriched in closings but blank parties/summary in deals-manage. Added the same fill-blanks-only enrich. Verified live: 23/30 feed rows now carry parties, 30/30 carry summary
d1a588146bafa5dc5336e8377dd08375879cfd7f · 2026-08-06 03:52:51 -0700 · Steve
Files touched
Diff
commit d1a588146bafa5dc5336e8377dd08375879cfd7f
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Aug 6 03:52:51 2026 -0700
server: /api/deals-manage now gap-fills feed rows from the corpus, mirroring /api/closings (TK-10254). The closings admin surface got corpus gap-fill (buyer/seller/broker/summary/property_type/etc. — the deals-pull feed lacks the LLM-extracted fields) but its sibling deals-manage never did, so the same feed deal showed enriched in closings but blank parties/summary in deals-manage. Added the same fill-blanks-only enrich. Verified live: 23/30 feed rows now carry parties, 30/30 carry summary
---
server.js | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/server.js b/server.js
index 380da1e5..8efd1bc8 100644
--- a/server.js
+++ b/server.js
@@ -542,11 +542,20 @@ app.get('/api/deals-manage', adminOnly, (req, r) => {
const includeHidden = req.query.include_hidden === '1' || req.query.include_hidden === 'true';
const feedDeals = (feed.deals || []);
const feedIds = new Set(feedDeals.map((d) => String(d.id)));
- const corpusExtra = corpusDeals().filter((a) => !feedIds.has(String(a.id)));
+ const allCorpus = corpusDeals();
+ const corpusById = new Map(allCorpus.map((a) => [String(a.id), a]));
+ const corpusExtra = allCorpus.filter((a) => !feedIds.has(String(a.id)));
const base = [...feedDeals, ...corpusExtra];
+ // GAP-FILL each feed row from its matching corpus article (never overwrite a field the feed already
+ // has) so buyer/seller/broker/summary surface here too — mirrors /api/closings (TK-10254). The
+ // deals-pull feed carries image/price but NOT the LLM-extracted party/summary fields (corpus-only).
+ const ENRICH_D = ['buyer', 'seller', 'broker', 'summary', 'size_label', 'year_built', 'property_type'];
const feedRows = base.map((d) => {
+ const c = feedIds.has(String(d.id)) ? corpusById.get(String(d.id)) : null;
+ let d2 = d;
+ if (c) { d2 = { ...d }; for (const k of ENRICH_D) if (!d2[k] && c[k]) d2[k] = c[k]; }
const e = edits[String(d.id)];
- const row = e ? { ...d, ...e, _edited: true } : { ...d };
+ const row = e ? { ...d2, ...e, _edited: true } : { ...d2 };
row._hidden = hides.has(String(d.id));
row._corpus = feedIds.has(String(d.id)) ? undefined : true;
return row;
← b901cbaf auto-save: 2026-08-06T03:48:10 (7 files) — data/deals-regist
·
back to Rentv 2026
·
server: Cody gate — add buyer/seller/broker to DEALS_FIELDS. 5bb00f14 →