Skip to content

Commit aef9876

Browse files
red1oonclaude
andcommitted
docs(hba): close out §2026-07-04 A/B/C — Construction window + Person forward link + Leave-as-Resource
Design pass (AskUserQuestion) + build happened in bim-ootb this session (PR #645, awaiting merge). Updates RESUME_HR_BIM_ASSET.md with the full closeout, PROGRESS.md's one-liner, and HRBIMAssetGuide.md's "Jump straight to the ERP record" table + the three affected sections. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 06854d9 commit aef9876

3 files changed

Lines changed: 106 additions & 8 deletions

File tree

PROGRESS.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@
2323
- §PCLOSE-RACE (T7-RACE's TOCTOU shape found again in `erp_period_close.js`, fixed) — PR #640 MERGED.
2424
- W-HBA-CLICKTHRU: first REAL click-through witness for HBA's 6 deep-links (found 3/6 dead — PR #641 MERGED);
2525
fixed 2 of them (missing AD_Window seed rows, PR #643 open); Tenancy/316 left to the Construction-window spec.
26-
- Spec'd 3 HBA next-steps, NOT started: Construction AD_Window, Person bidirectional link, Leave-as-Resource.
27-
Full spec `prompts/RESUME_HR_BIM_ASSET.md` §2026-07-04; memory `project_hba_construction_window_person_linkthrough.md`.
26+
- HBA §2026-07-04 A/B/C ✅ DONE (design pass + build, same session): "Construction" AD_Window minted over
27+
M_Warehouse (proto-cloned from window 139) + Find-panel Room-lens "iDempiere ↗" link · Presence forward
28+
link into AD_User(108) · Leave TAKE now also compiles a real `S_ResourceUnAvailable` row ("Resource ↗" into
29+
window 236). Witnessed (10/10 new + 4 extended, full 41-file suite zero regression) + 2 live Playwright
30+
smokes (8/8 real HHS building, 9/9 fm_panel.html), bim-ootb PR #645 (`lane/hba-construction-clickthru`,
31+
awaiting merge). Doc updated: `docs/HRBIMAssetGuide.md`. Full detail: `prompts/RESUME_HR_BIM_ASSET.md`
32+
§2026-07-04 (closeout appended).
2833

2934
## Kernel op-log timebomb lane — T1/T2/T3/T6/T7 ✅ SHIPPED; T4+T5 remain
3035
- Findings: `prompts/KERNEL_TIMEBOMB_AUDIT_2026-07-03.md`. Shipped: T3+T6 (#623 v10) · T2+T1 roster (#630 v11)
@@ -49,12 +54,21 @@
4954
`mo_ifc_<name>` key fork before `_openBuffer`; diag-proven before/after, no regression on the two pre-existing
5055
witnesses (W-E2E-WALK 8/8, W-E2E-WALK-ALL 10/10). Pushed `lane/modeller-ifc-open` (`e6acb56`, synced with
5156
origin/main), user approved → **PR #642 opened 2026-07-04** (bim-ootb, awaiting CI/merge).
52-
- NEXT (once #642 merges): continue `prompts/ARC_GEO_FETCH_SPEC.md §NEXT` item 2 — onboard
53-
Hospital/Clinic/LTU/HHS_Office as Modeller residents + migrate SH/DX/SC into the canonical `IFC/` folder.
54-
3DGrid (Move Grid / stretch-recompose) has its own coverage in `witness_e2e_move.js` (per
55-
`feedback_test_real_user_path_not_seams.md`'s templates) — NOT re-verified this session (out of scope: this
56-
session's walking tests targeted STR/MEP disc-walk only, not grid-move). If grid-move needs a fresh
57-
cross-resident pass too, that's a separate follow-up, not covered by W-E2E-WALK-IFCOPEN.
57+
- 3D-Grid cross-resident pass DONE (2026-07-04, user follow-up question): `Bonsai.grid` is a DECOUPLED
58+
authoring grid — no production code wires an opened building's own STR-walked grid into it (grepped clean),
59+
so "test grid-stretch on building X's real structural grid" isn't meaningful; what generalizes IS the
60+
author-a-grid→drag→recompose mechanism after a real (not just Duplex) open. New
61+
`modeller/tests/witness_e2e_gridstretch_multi.js` — 20/21, **1 known RED**: on SampleCastle (`.db`-open),
62+
`#b-clear` resets the scene+op-log but not `str_walker_outliner.js`'s own STR-walker module state, so a
63+
later grid-drag on an unrelated synthetic wall still fires SampleCastle's real STR re-walk, whose ops
64+
collide on `kernel_ops.id` and roll back (SAFE — all-or-none, no corruption, just a loud rejected toast +
65+
console errors). Root cause traced (step-tagged diagnostic), confirmed reproducible 2×, NOT an async-timing
66+
artifact. **NOT fixed** — the fix is a `#b-clear` state-reset-contract design call (reset every walker
67+
module, not just THREE+oplog?), left open, pushed as-is (`834fbc4`) so the PR carries an honest red witness
68+
rather than a silently-passing green one.
69+
- NEXT (once #642 merges): (1) decide + fix the `#b-clear`/STR-walker state-leak above; (2) continue
70+
`prompts/ARC_GEO_FETCH_SPEC.md §NEXT` item 2 — onboard Hospital/Clinic/LTU/HHS_Office as Modeller residents
71+
+ migrate SH/DX/SC into the canonical `IFC/` folder.
5872

5973
## Codebase quality audit (2026-07-02) — TRIAGED 2026-07-03; §2/§5 DONE (bc #20, bim-ootb #618) → archived
6074
- ⛔ BLOCKED (user call): are `migration/DV_*_rules.sql` mined-rule files EXEMPT from append-only, or enforce?

docs/HRBIMAssetGuide.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ is variations on it.
9090
automatic level-of-detail ladder (dot → mini → full) so a full floor never turns to soup. The screenshot above
9191
catches the ladder mid-transition: a full-figure cluster close to camera, mini-dome clusters further back.
9292
4. Headcount comes from **signed check-ins** — a room with no check-in has no avatar (never a faked person).
93+
5. The **Presence roster** (the drawer's own list of every check-in for the period) carries an **open ↗** link
94+
per person straight to their `AD_User` record — the first bidirectional click-through for a Person in this
95+
module (every other pane already had one). No reverse direction (an ERP record flying you back into the 3D
96+
model) exists yet — that's a genuinely new capability, tracked separately, not built here.
9397

9498
### Spot equipment that needs service
9599
1. Open the drawer → tap **Assets / IoT**.
@@ -139,8 +143,10 @@ from the real AD dictionary, never guessed:
139143
| Dashboard → Resources | Resource | `S_Resource` |
140144
| Payslip → concept line | Payroll Movement | `HR_Movement` |
141145
| Leave → unpaid entry | Payroll Concept Catalog | `HR_Concept` (the "Leave without pay" concept it feeds — Leave has no native table of its own) |
146+
| Leave → "Resource ↗" | Resource | `S_Resource` (a leave TAKE also compiles a real `S_ResourceUnAvailable` blackout on the employee's own resource — see [Leave — balance & statement](#leave--balance--statement)) |
142147
| Tenancy → subscription | Subscription | `C_Subscription` |
143148
| IoT → billing line | Sales Order | `C_Order` |
149+
| Presence → roster row | User | `AD_User` (the employee's own identity record — see [See who is physically here right now](#see-who-is-physically-here-right-now--with-people-you-can-walk-up-to)) |
144150

145151
No link appears on a row that doesn't (yet) resolve to a real record — the same non-invent discipline as
146152
everywhere else in this module: an absent link is honest, never a dead one.
@@ -191,6 +197,11 @@ everywhere else in this module: an absent link is honest, never a dead one.
191197
genuine addition, not a reinvention of something that already existed. So an unpaid row's **open ↗** doesn't
192198
point at a fabricated "leave record" window; it points at the real **"Leave without pay" payroll concept**
193199
the unpaid days feed into once payroll runs — the honest, real thing an unpaid entry actually compiles onto.
200+
3. Leave is *also* a resource-availability fact, not just a payroll deduction — a taken leave marks the employee
201+
unavailable the same way a room's maintenance blackout does, via the real native `S_ResourceUnAvailable` table
202+
(the child "Unavailability" tab of the Resource window). A **Resource ↗** link at the top of the pane opens
203+
the employee's own Resource record, where that blackout shows up in the standard iDempiere Resource Schedule
204+
— no separate leave-record UI to maintain, the same window Dashboard's Resources already deep-link into.
194205

195206
### Tenancy — AD compile
196207
1. Open the drawer → tap **Tenancy / AD**. Every lease and strata charge in the building compiled onto real
@@ -202,6 +213,14 @@ everywhere else in this module: an absent link is honest, never a dead one.
202213
2. Row click flies the camera to that unit (the same shared fly-to used by the Presence roster above); the
203214
**open ↗** link is separate and deep-links straight to the `C_Subscription` record. A record whose unit
204215
doesn't resolve to a real room in this building is **skipped**, never fabricated — the footer says so.
216+
3. The building itself compiles onto `M_Warehouse` — but the only *stock* iDempiere window over that table is
217+
139 "Warehouse and Locators", warehouse-industry language for what's conceptually a building. A second,
218+
purpose-named window — **"Construction"** — now sits alongside it over the *identical* `M_Warehouse` row
219+
(the same convention iDempiere itself already uses for `C_BPartner`, which has 10 distinct windows over one
220+
table). Window 139 is untouched; "Construction" is just a role-appropriate second door onto the same record.
221+
In the Viewer, tapping a room or storey in the **Find** panel's Room lens surfaces an **iDempiere ↗** link to
222+
this building's Construction record (building-grain — every room in one building shares the same warehouse
223+
record, there's no per-room window).
205224

206225
### BIM BOM — assembly & recipe
207226
1. Open the drawer → tap **BOM**. Every room in the building is an **assembly**: the room itself plus

prompts/RESUME_HR_BIM_ASSET.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,3 +1693,68 @@ resource-availability record, the same way a room's blackout does.
16931693

16941694
Neither A, B, nor C is started. Log here, not in `MEMORY.md`'s per-session churn, so the next session that
16951695
touches HBA finds this without re-deriving it.
1696+
1697+
## ▶ 2026-07-04b — A/B/C ✅ ALL DONE (the fresh Sonnet-with-user design pass + build this section asked for)
1698+
1699+
The design pass happened first (AskUserQuestion, 4 questions covering the real forks left open above), THEN
1700+
implementation, in `/tmp/wt-hba-a2c` off fresh `origin/main`, branch `lane/hba-construction-clickthru`, bim-ootb
1701+
PR **#645** (pushed, not yet merged — this repo's normal PR flow, `main` has required-status-checks).
1702+
1703+
**Design answers that shaped the build (supersede the open questions above):**
1704+
- A coexists with the floating panes (doesn't replace them). "Further BIM model tabs" was a misreading —
1705+
Construction is purely an **iDempiere-side** AD_Window; the Viewer-side click-through is the actual ask,
1706+
answered as "in Find, at a storey/room, zoom to iDempiere."
1707+
- C: don't invent a new Viewer panel — the blackout must show up in the **standard iDempiere Resource
1708+
Schedule** (native tab 416 under window 236). This session's Leave-side scope = click-through only.
1709+
- B: forward link only (Presence → AD_User). Reverse (ERP record flying back into the 3D model) explicitly
1710+
deferred — genuinely new mechanism, no precedent anywhere in the codebase, needs its own spec.
1711+
1712+
**A — "Construction" AD_Window.** `scripts/seed_hba_construction.js` (NEW): proto-clones window 139's
1713+
AD_Window + all 5 AD_Tab rows + all 60 AD_Field rows under a new id band (`CONSTR_BASE=7,800,000`), Name→
1714+
'Construction', window 139 byte-identical/untouched. Idempotent (2nd run = 0 additions), self-witnessed (10
1715+
checks: tab/field/column parity, `ad_parser.js getWindow()`'s own query resolves it — no manifest edit needed
1716+
since it's a brand-new id). `hba_lens.js AD_WINDOWS.CONSTRUCTION=7800000`. `navigate_find.js` gained a second
1717+
shared link element (`#find-construction-open`, mirrors the existing `#find-erp-open` Project-link pattern)
1718+
+ `_surfaceConstructionLink(guid,label)`, wired into both `_roomSelect`/`_roomGroupSelect` — building-grain
1719+
honestly (every room/storey in one building shares the same warehouse record; HBA absent → honest no-op,
1720+
never fabricates a warehouse id). Live smoke `viewer/tests/poc_construction_link_live.js` (NEW, Playwright,
1721+
real HHS_Office_Federated + Find's Room-lens axis toggle + a real tree-row click): 8/8, confirms
1722+
`window=7800000&record=990000` (the real seeded warehouse id), 0 pageerrors.
1723+
1724+
**B — Presence forward link.** `viewer/hba_lens.js openPresenceDrawer`: each roster row (was a `<button>`,
1725+
now a `<div>` so a nested `<a>` is valid) gains an "open ↗" to `AD_WINDOWS.USER=108` (AD_User), record=
1726+
`official.ad_user_id` (always populated on every real `MODELS.Official` row, unlike the nullable
1727+
`c_bpartner_id`) — `stopPropagation()` so the link doesn't also trigger the row's `flyToZone`. Witnessed:
1728+
`witness_erp_govern_wire.js` WIRE6 (+1, 9/9 total). Live smoke (below, shared file with C): 9/9.
1729+
1730+
**C — Leave-as-Resource.** NEW `hr_bim_asset/ad_leave.js`: `toUnavailableRow(takeOp, s_resource_id, seedId)`
1731+
projects a signed `TAKE` op onto the real `S_ResourceUnAvailable` columns (datefrom=the TAKE's own date,
1732+
dateto=datefrom+(days-1), pure arithmetic on the supplied ts — never `Date.now()`); `compileLeaveUnavailability`
1733+
+ `readUnavailability` (lens read, mirrors `ad_attendance.readPresence`'s JOIN shape). `scripts/seed_hba_erp.js`
1734+
extended (§8, before the self-witness block): seeds 6 real rows (EMP001/EMP002 × 3 demoLog TAKE ops each),
1735+
proto-cloned from the stock row (id=100 "Training class") for exact column parity; self-witness confirms the
1736+
JOIN through Resource↔AD_User is lossless (6/6). `viewer/hba_leave.js renderStatement` gained a "Resource ↗"
1737+
link to `AD_WINDOWS.RESOURCE=236`, record=`A._hbaEmpResourceMap[empId]` — a NEW standalone export off
1738+
`hba_lens.js _regovern` (the same real-row-sourced map `_hbaAttendanceSpec` already builds internally, now
1739+
also exposed for reuse); honest no-link when ungoverned (no ERP db loaded → no map → no fabricated id).
1740+
Witnessed: `witness_ad_leave.js` (NEW, 10/10 — non-invent gate, date-range math, honest-skip, determinism) +
1741+
`witness_leave_pane.js` LP5b-d (+3, 13/13 total — absent-when-ungoverned, present-with-correct-href-when-
1742+
governed). Live smoke `viewer/tests/poc_presence_leave_link_live.js` (NEW, Playwright, `fm_panel.html`): 9/9 —
1743+
Presence roster's 3 rows all link to `window=108`, Leave pane's "Resource ↗" links to `window=236&record=
1744+
990109` (EMP001), 0 pageerrors.
1745+
1746+
**Regression:** full 41-file HBA node witness suite (was 40 baseline + `witness_ad_leave.js`) — zero failures
1747+
throughout the build, checked after every file edit.
1748+
1749+
**Docs:** `docs/HRBIMAssetGuide.md` updated — the "Jump straight to the ERP record" table gained Leave→Resource
1750+
and Presence→AD_User rows; new paragraphs in the Presence, Leave, and Tenancy sections explaining the
1751+
Construction window / Resource-Unavailable / forward-link additions. **Not done:** no new screenshots this
1752+
session (the 3 additions are click-through mechanics, not new visual panes — flagged rather than silently
1753+
skipped, matching this doc's own established convention for partial doc passes).
1754+
1755+
**Genuinely still open (not started, not this session's scope):**
1756+
1. **B's reverse direction** (ERP record → fly back into the 3D model) — zero precedent anywhere in the
1757+
codebase; needs its own spec (what triggers it, cross-tab/window messaging or same-tab-only) before any code.
1758+
2. Recapture `hba_fm_drawer.png`-style screenshots for the 3 new affordances (Construction link, Presence
1759+
open↗, Leave Resource↗) if this guide gets a fresh screenshot pass.
1760+
3. bim-ootb PR #645 needs a human merge decision (branch protection + required status checks on `main`).

0 commit comments

Comments
 (0)