RELEASE
planning/2.8.5/mockups/FO3/audit-u9-carry.mjs
sha256 169e3946a4117070 · 2998 bytes ·
original held in the private archive
import { chromium } from 'playwright';
import { fileURLToPath } from 'url';
import path from 'path';
const ROOT = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', '..', '..');
const INDEX = 'file://' + path.join(ROOT, 'index.html').split(path.sep).join('/');
const OUT = path.join(ROOT, 'planning', 'mockups', 'fo3');
const save = { activeContext:'FO3', campaigns:{FO3:{lvl:12,hpCur:18,hpMax:100,rads:850,caps:350,la:'CRIPPLED',ra:'OK',ll:'OK',rl:'OK',hd:'OK',s_s:6,s_p:7,s_e:5,s_c:4,s_i:8,s_a:6,s_l:5,inventory:Array.from({length:24},(_,i)=>({name:'Test Item '+i,qty:15,wgt:1,val:10,type:i%2?'weapon':'aid'})),collectibles:[],perks:[],status:[{name:'Well Rested',ticks:4,type:'BUFF'}]}}};
const b=await chromium.launch();
const ctx=await b.newContext({viewport:{width:780,height:360},hasTouch:true,isMobile:true});
await ctx.addInitScript(s=>localStorage.setItem('robco_v8',JSON.stringify(s)),save);
const page=await ctx.newPage(); await page.goto(INDEX); await page.waitForTimeout(2200);
await page.evaluate(()=>window.selectSubsystem&&window.selectSubsystem('operator')); await page.waitForTimeout(200);
await page.evaluate(()=>{const x=[...document.querySelectorAll('#fo3SubtabRail button')].find(z=>z.textContent.trim()==='STATUS');if(x)x.click();}); await page.waitForTimeout(300);
// vitals: is #stat_rads visible without scrolling? compare its rect to panel visible box
const vit=await page.evaluate(()=>{
const p=document.getElementById('opVitalPanel');
const rads=document.getElementById('stat_rads');
if(!p||!rads) return {err:'missing'};
const pr=p.getBoundingClientRect(), rr=rads.getBoundingClientRect();
return {panelScroll:p.scrollHeight,panelClient:p.clientHeight,panelTop:Math.round(pr.top),panelBottom:Math.round(pr.bottom),radsTop:Math.round(rr.top),radsBottom:Math.round(rr.bottom),radsWithinPanelFold: rr.bottom<=pr.bottom+1, radsColor:getComputedStyle(rads).color, radsText:rads.value||rads.textContent};
});
console.log('VITALS RAD:',JSON.stringify(vit));
// MANIFEST density
await page.evaluate(()=>{const x=[...document.querySelectorAll('#fo3SubtabRail button')];});
await page.evaluate(()=>window.selectSubsystem&&window.selectSubsystem('operations')); await page.waitForTimeout(300);
const man=await page.evaluate(()=>{
const rows=[...document.querySelectorAll('#opsManifestPanel .mrow')];
const panel=document.querySelector('#opsManifestPanel');
if(!rows.length) return {err:'no rows',panel:!!panel};
const pr=panel.getBoundingClientRect();
let fully=0,partial=0;
rows.forEach(r=>{const rr=r.getBoundingClientRect(); if(rr.bottom<=pr.bottom+1&&rr.top>=pr.top-1)fully++; else if(rr.top<pr.bottom&&rr.bottom>pr.top)partial++;});
const rowH=rows[0].getBoundingClientRect().height;
return {totalRows:rows.length,fullyVisible:fully,partial,rowHeightPx:Math.round(rowH*10)/10,tapTargetOK:rowH>=28};
});
console.log('MANIFEST:',JSON.stringify(man));
await page.screenshot({path:path.join(OUT,'audit-u9-manifest.png')});
await b.close();
STAMP · generated for RELEASE v2.8.5 commit 06e5180 (06e51801b38a) · archive input-tree hash c07fbfbdd2e1ddeb · 754 files · no wall-clock timestamp (regenerates identically when nothing changed).