/* ============================================ DOCUMENT INSPECTOR — 3-panel debug view Text chunks · Markdown tables · AI image summaries ============================================ */ const INSPECTOR_CHUNKS = [ { id: "chk_8f3a92ce", section: "§4.2 Spindle Bearing Replacement", page: 142, tokens: 412, similarity: 0.913, text: "For radial runout exceeding 10 µm at the spindle nose under 1,500 RPM no-load condition, perform bearing replacement per §4.3. Verification must occur after spindle has equalized to ambient temperature (within 2°C) for a minimum of 4 hours following last operation. Use calibrated dial indicator with 0.5 µm resolution mounted to magnetic base on the tool turret. Record three readings 120° apart and report the maximum value." }, { id: "chk_4d1a07b2", section: "§4.3 Tolerance specifications", page: 145, tokens: 286, similarity: 0.871, text: "Front bearing pair: NSK 7014CTYNDULP4 (back-to-back DB configuration). Apply preload of 280 ± 15 N via lock nut torqued to 42 N·m. Use calibrated dial gauge to confirm bearing seat before final torque application. Rear bearing: 7012CTYNDULP4 (tandem DT) with 200 ± 10 N preload at 38 N·m." }, { id: "chk_e92c1844", section: "§4.3.1 Torque specifications", page: 146, tokens: 198, similarity: 0.802, text: "Lock nut torque: 42 N·m ± 2 N·m. Always apply torque in three increments: 50%, 75%, 100% of final value with 30 second hold at each step. Final value to be confirmed by witness signature in the work order." }, { id: "chk_771b03fa", section: "§4.4 Run-in procedure", page: 148, tokens: 524, similarity: 0.764, text: "Post-installation run-in: 1,000 RPM for 20 minutes, then 3,000 RPM for 20 minutes, then 6,000 RPM for 20 minutes. Monitor temperature at front and rear bearing housings — must not exceed 55°C above ambient. Vibration RMS must stabilize below 1.4 mm/s within first 10 minutes at each step." }, ]; const INSPECTOR_TABLES = [ { id: "tbl_a4f1", title: "Table 4-3 · Bearing Preload Specifications", page: 145, cols: ["Position", "Part Number", "Configuration", "Preload (N)", "Torque (N·m)"], rows: [ ["Front", "NSK 7014CTYNDULP4", "DF (back-to-back)", "280 ± 15", "42"], ["Rear", "NSK 7012CTYNDULP4", "DT (tandem)", "200 ± 10", "38"], ["Thrust", "NSK 51112-P4", "Single", "150 ± 8", "28"], ], }, { id: "tbl_b1e2", title: "Table 4-4 · Run-in Schedule", page: 148, cols: ["Stage", "RPM", "Duration (min)", "Max Temp (°C)", "Max Vib (mm/s)"], rows: [ ["1", "1,000", "20", "55", "1.4"], ["2", "3,000", "20", "55", "1.4"], ["3", "6,000", "20", "55", "1.4"], ], }, ]; const INSPECTOR_IMAGES = [ { id: "img_p142_01", page: 142, caption: "Spindle assembly exploded view", summary: "Exploded technical illustration of the INTEGREX i400 spindle assembly. Shows the main shaft (center), front bearing pair in DF back-to-back configuration (labeled A), rear bearing in DT tandem configuration (labeled B), and the lock nut on the right end (labeled C). Three callout labels reference the torque specification of 42 N·m on the lock nut. Scale bar indicates 50 mm reference.", tokens: 82, confidence: 0.94, }, { id: "img_p145_02", page: 145, caption: "Bearing preload measurement setup", summary: "Photograph of a dial indicator mounted to a magnetic base on the tool turret, with the probe contacting the spindle nose. The indicator shows a reading near zero on a 0.5 µm resolution scale. Background shows the spindle housing and the front bearing cover with M6 socket head cap screws visible.", tokens: 64, confidence: 0.88, }, { id: "img_p148_03", page: 148, caption: "Vibration & temperature monitoring during run-in", summary: "Chart from the maintenance manual showing expected vibration RMS (mm/s) and bearing housing temperature (°C above ambient) trajectories during the 60-minute run-in procedure. Three step changes correspond to the 1,000 / 3,000 / 6,000 RPM stages. Acceptance bands shaded.", tokens: 71, confidence: 0.91, }, ]; function InspectorScreen({ onNavigate }) { const [tab, setTab] = useState("chunks"); const [activeChunk, setActiveChunk] = useState(0); const [activeImg, setActiveImg] = useState(0); return ( <>

Document Inspector

DOC-CNC-204 · CNC-Mazak-INTEGREX-i400 — Maintenance v7.2 · indexed 2026-03-04

{/* Document summary strip */}
{/* Tabs */}
{[ { k: "chunks", label: "Text Chunks", icon: , count: INSPECTOR_CHUNKS.length }, { k: "tables", label: "Markdown Tables", icon: , count: INSPECTOR_TABLES.length }, { k: "images", label: "AI Image Summaries", icon: , count: INSPECTOR_IMAGES.length }, ].map(t => ( ))}
{/* CHUNKS */} {tab === "chunks" && (
{/* Nested list */}
{INSPECTOR_CHUNKS.map((c, i) => ( ))}
{(() => { const c = INSPECTOR_CHUNKS[activeChunk]; return ( <>
{c.id}

{c.section}

page {c.page} {c.tokens} tokens
{c.text}
RAW EMBEDDING (first 12 of 1536)
[-0.0142, 0.0331, -0.0218, 0.0094, 0.0561, -0.0073, 0.0244, -0.0156, 0.0382, 0.0119, -0.0497, 0.0204, …]
); })()}
)} {/* TABLES */} {tab === "tables" && (
{INSPECTOR_TABLES.map(t => (
{t.id}

{t.title}

page {t.page}
{t.cols.map(c => )} {t.rows.map((r, i) => ( {r.map((cell, j) => ( ))} ))}
{c}
0 ? "mono" : ""} style={j === 0 ? { fontWeight: 600 } : null}>{cell}
))}
)} {/* IMAGES */} {tab === "images" && (
{INSPECTOR_IMAGES.map((img, i) => (
setActiveImg(i)} style={{ border: "1px solid", borderColor: activeImg === i ? "var(--orange-500)" : "var(--ink-200)", borderRadius: 6, overflow: "hidden", cursor: "pointer", background: "white", }} > {/* thumbnail placeholder */}
FIG · p.{img.page}
{(img.confidence * 100).toFixed(0)}% conf
{img.id}
{img.caption}
AI summary: {img.summary}
{img.tokens} tokens · vision-1.0
))}
)}
); } function MetaTile({ label, value, mono }) { return (
{label}
{value}
); } window.InspectorScreen = InspectorScreen;