================================================================================ TECHNICAL INFORMATION CARD (TIC) — REFERENCE /_devt/__darmaster/08/DARH_TECH_TIC_REFERENCE_20260605.txt Daralbeida document library (/08) Written: 2026-06-05 ================================================================================ -------------------------------------------------------------------------------- 1. WHAT THE TIC IS -------------------------------------------------------------------------------- The "Technical Information Card" (TIC) is the panel that unfolds UNDER a document row when you expand it in the /08 document library (list view). - Collapsed, a document is a one-line ROW ( ): its title, registry id + version, a status LED, and the type/info/arrow icons. - Expanded, the TIC appears: the block
inside that same . It shows the document's full registry record plus a few editable fields. It is rendered ONCE per document by the library renderer: /_devt/__darmaster/08/index.php ...and it is the SAME panel everywhere a document is listed — in the entity's own library (e.g. /__darx/08/) AND in the master / DARMAIN aggregate (/__darmaster/08/). The panel never changes per page; only the file's own data fills it. -------------------------------------------------------------------------------- 2. ON-SCREEN LAYOUT -------------------------------------------------------------------------------- The TIC has two columns. IMPORTANT quirk: in the MARKUP the columns are named .dcb-meta (commented "left") .dcb-sel (commented "right") ...but the CSS visually SWAPS them. So WHAT YOU SEE is: LEFT column = .dcb-sel -> the editable SELECTORS STATUS, ENTITY, SECTION, DEPT, and a "Last updated:" line. RIGHT column = .dcb-meta -> the read-only METADATA + text fields id + version, Lines | Chars, Created | Revised, Title, Filename, and Page Presentation. -------------------------------------------------------------------------------- 3. EVERY FIELD AND WHERE ITS VALUE COMES FROM -------------------------------------------------------------------------------- Each value comes from ONE of three sources (described in section 4): [REG] the registry CSV (doc_status.csv) [SCAN] the live file scan (module_section_scanner.php) [EDIT] the /12 edit store (12/page_intros.csv) LEFT column (.dcb-sel — selectors) .................................................................... STATUS [REG] column `status` (default "unpublished" if no row). One of: live | review | unpublished | archived. Editable dropdown (radiogroup). The collapsed row's coloured LED tracks the same value. ENTITY [REG] column `entities` (multi-value) -> falls back to [SCAN] `entity`. Editable "tick all that apply" chip. SECTION [REG] column `sections` (multi-value) -> falls back to [SCAN] `section`. Labels resolved from darx_section_map.php -> section_names. DEPT [REG] column `depts` (multi-value) -> falls back to [SCAN] `category` (dept). Labels from category_names. Last updated [REG] column `updated` (registry write timestamp). RIGHT column (.dcb-meta — metadata + editable text) .................................................................... Document ID [REG] column `doc_uid` e.g. "DARX-DOC-0194". Version badge [REG] column `version` -> falls back to [SCAN] `version`. Rendered as "vX.Y". Lines [SCAN] `lines` — counted live from the file. (Also mirrored in CSV column `lines`.) Chars [SCAN] `chars` — counted live from the file. (Also mirrored in CSV column `chars`.) Created [SCAN] `created_fmt` -> falls back to `date_fmt`. Revised [SCAN] `date_fmt` — the file's own date (from the filename's YYYYMMDD stamp; a BPGP v2.2 name with a YYYYMMDDHHMM stamp also yields the HH:MM). Title [EDIT] snapshot `title` -> falls back to [SCAN] `title`. EDITABLE text input. Filename [SCAN] `filename` — the REAL scanned file name. READ-ONLY, with a copy-to-clipboard button. Page [EDIT] snapshot `pageIntro` -> falls back to [SCAN] the Presentation document's "Purpose & Scope" section text. EDITABLE textarea (blank shows the italic "Enter Page Presentation" placeholder). -------------------------------------------------------------------------------- 4. THE THREE DATA SOURCES -------------------------------------------------------------------------------- A. THE REGISTRY CSV -- "the single source of truth" File: /_devt/__darmaster/api/doc_status.csv (constant DARX_STATUS_CSV) Loaded in index.php as: $doc_registry = darx_status_sync($reg_docs); // keyed by FILENAME The TIC looks up its row with $doc_registry[$c['filename']]. Supplies: doc_uid, status, version, updated, entities, sections, depts (and mirrors many scan values: entity, section, dept, title, date, size, lines, chars, has_purpose, ...). This is THE .csv you asked about. B. THE LIVE FILE SCAN Code: __darmaster/api/modules/module_section_scanner.php Called in index.php as: $cards = darx_get_all_cards($legacy_fs); // -> each $c Walks the actual document files on disk and computes/extracts per file: title, filename, ext, lines, chars, created/date, the Purpose & Scope preview, version, and the viewer url. The TIC takes Lines, Chars, Created, Revised, Filename, and the Title/Page-Presentation DEFAULTS from here, so those reflect the file AS IT IS RIGHT NOW (not a stale CSV copy). C. THE /12 EDIT STORE (SUPERSEDED 2026-06-05 — see section 6) File: 12/page_intros.csv (append-only history) FORMERLY held operator edits to Title + Page Presentation. As of the read/edit rebuild those now save to the REGISTRY (doc_status.csv: the `title` and the new `page_intro` columns) via darx_status_set_fields(); this /12 store is no longer written (old snapshots may still load as a fallback). PRECEDENCE (per field): REGISTRY > SCAN (a value saved in the registry wins; else the freshly scanned value — though Lines/Chars/Created/Filename are always taken live from SCAN, and "Last updated" is the registry's server-stamped `updated`). -------------------------------------------------------------------------------- 5. REGISTRY CSV COLUMN REFERENCE (doc_status.csv header) -------------------------------------------------------------------------------- doc_uid, filename, ext, entity, entity_name, dept, dept_name, section, title, date, size, lines, chars, has_purpose, status, updated, first_seen, version, classification, owner, control_id, review_date, notes, entities, sections, depts Notes: - entity/section/dept = the PRIMARY (single) classification. - entities/sections/depts = the MULTI-VALUE sets (";"-joined CODE lists) the TIC chips round-trip; they fall back to the singular columns. - first_seen = when the registry first recorded the doc; `updated` = the last registry write (this is the "Last updated:" line). -------------------------------------------------------------------------------- 6. READ / EDIT MODE + HOW SAVES WORK (rebuilt 2026-06-05) -------------------------------------------------------------------------------- The card now opens READ-ONLY: the editable fields render as plain text and the selectors can't be opened. An "Edit" button (class .tic-edit-btn) adds .tic-edit to the card → the fields + selectors go live. "Save" (.tic-save-btn) writes to the registry and flips back to read mode, refreshing the timestamp. Editable (in edit mode) : STATUS, ENTITY, SECTION, DEPT (selectors) TITLE, PAGE PRESENTATION (text fields) System / read-only : Lines, Chars, Created (derived from the file by the scan), Last updated (server-stamped), Filename. Document ID shows in the row HEADER, not the panel. WHERE EACH EDIT SAVES — ALL into the ONE central registry doc_status.csv, whose value SUPERSEDES the file-scanned default everywhere it is read: · STATUS -> darx_status_set() (saved on change) · ENTITY/SECTION/DEPT -> darx_status_set_facets() (saved on change) · TITLE + PAGE PRESENT. -> darx_status_set_fields() (saved on the Save btn) Endpoint: api/doc_status.php — the master shim binds DARX_STATUS_CSV to the MASTER csv, then delegates to /_devt/api/doc_status.php; lib = /_devt/api/modules/doc_status_lib.php. Every write takes an EXCLUSIVE flock, rewrites the table in place, and first drops a timestamped backup to api/_backups/ (keeps the last 20). The real document FILES on disk are NEVER touched — renaming/retitling them would break the doc_uid<->filename mapping the whole ecosystem depends on. page_intro is now a COLUMN in doc_status.csv (appended). The old /12 store (12/page_intros.csv) is SUPERSEDED for title/page_intro. -------------------------------------------------------------------------------- 7. STYLING (where the look lives) -------------------------------------------------------------------------------- Shared library skin: /_devt/__darmaster/08/skin.css - The expanded panel is .dc-band ; its two columns are .dcb-meta and .dcb-sel . - The DETAIL panel (.dc-band) is a NEUTRAL panel (not tinted with the entity colour) — it is "the display of the file information". - The selector controls (STATUS dropdown .dss-* , facet chips .facet-* , caret) share one mono/ink type + colour treatment (skin.css "selector consistency" block) so every selector reads identically. - The "Last updated" line (.dc-updated) shows ONLY in the expanded TIC, never on the collapsed row. - The collapsed ROW'S indicator icons (file-type, purpose, info, status LED, arrow) are skinned to MATCH the toolbar control chips: the page's dark nav background + a gold (--nav-gold) hairline + an ivory glyph (skin.css "FILE-ROW ICON CHIPS" block). The status LED dot keeps its semantic colour. Master-library light variant: /_devt/__darmaster/08/skin-light.css (body.lib-light) — used only by the DARMAIN aggregate. -------------------------------------------------------------------------------- 8. QUICK MAP — field -> code line (index.php, approx.) -------------------------------------------------------------------------------- status / LED ............. $status (~471), .dss-* menu (~605-616) doc id / version ......... $doc_uid/$doc_ver (~473-474), .dc-uidrow (~553) Lines | Chars ............ .dcm-size (~556-560) Created | Revised ........ .dcm-prov (~562-566) Title (editable) ......... $title_default (~486), .m-title (~585) Filename (read-only) ..... $fname_default (~487), .m-fname (~590) Page Presentation ........ $intro_default (~489), .m-intro (~596) Entity/Section/Dept chips $ent/$sec/$dep_codes (~477-479), .facet-chip (~622-624) Last updated ............. $reg['updated'] (~628) ================================================================================ END — DARH_TECH_TIC_REFERENCE_20260605.txt ================================================================================