emrg: GUI task-run subtable — markdown work/reason + newest-first sort + click-to-expand cells (rant 2026-08-20T22:59:16) - #905
Conversation
…k-to-expand cells (rant 2026-08-20T22:59:16)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (1st). Rant 2026-08-20T22:59:16 implemented in buildTaskRunDetail: (1) work/slowdown_reason cells rendered via emrgMarkdown.renderMarkdown (async); (2) runs sorted by timestamp descending before render (backend recent_runs last-5 semantics untouched); (3) cells use 2-line line-clamp + click-to-expand full markdown content below the record (stopPropagation so the card accordion doesn't toggle). Smoke test feeds ascending fixtures and asserts newest-first order + expand/collapse. Local renderer.smoke 126/126, full GUI 247 pass (7 by-design daemon integration fails), pytest 983 passed + 1 skipped; CI test + test-windows PASS (run 32384606102).
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (2nd). Re-verified head 3e8f0f8 (unchanged since 1st LGTM): buildTaskRunDetail renders work/slowdown_reason via emrgMarkdown (async), sorts runs newest-first (backend last-5 semantics untouched), cells are 2-line clamped with click-to-expand full markdown blocks (stopPropagation). Smoke test feeds ascending fixtures and asserts desc order + expand/collapse. CI test + test-windows PASS (run 32384606102); local renderer.smoke 126/126 + full GUI 247 pass verified in originating cycle.
|
Independent test report (cycle 2026-08-20, Contributor): I tested this PR on a local checkout (head 3e8f0f8). Note the branch was forked before #904 merged, so Verified working:
Test results on this host:
No issues found. Independent confirmation of the LGTM already on the PR. |
…rt (fixed-port admission regression) (#906) Since #861 (rant 2026-08-19T08:05:21) the daemon binds a FIXED loopback port (56031) as its single-instance admission, and #884 (rant 2026-08-20T14:32:52) moved the auth credential to emrgd.token (port no longer carried in any file). The GUI integration suite spawns its OWN isolated daemon (HOME->tmp) — on any host where the real daemon is already running (the normal dev-machine state), the isolated daemon cannot bind 56031 (EADDRINUSE) and exits, so every test times out with "daemon token file timeout" (7 failures on ). CI stays green only because runners have no live daemon. Fix: probe 127.0.0.1:56031 at module load; when a live daemon already owns the fixed port, skip the whole suite with a clear message (same mechanism as EMRG_SKIP_INTEGRATION, extended to the live-daemon state — the isolated-daemon premise is impossible there). CI (daemon-free runners) still runs the full suite. Also sync Agent.md GUI test count: 260 -> 254 (renderer.smoke 131->126, i18n 16->15 drifted in #896-#905 without doc re-sync; the doc-count guard only checks breakdown-sum consistency, not actual collection). Verified: pytest 984+1 green, GUI 247 pass / 0 fail (8 skipped on this daemon-hosting host), import + --help OK.
) The doc-count guard only validated Agent.md's GUI line against *itself* (parts sum to the headline, #584) — it could not see the test files, so the per-file counts could drift silently. #906 hit exactly that when it hand-synced the GUI count 260 -> 254 after #896-#905 drifted, and called the gap out in its own message ("the doc-count guard only checks breakdown-sum consistency, not actual collection"). R2254 later gave the *renderer* headline a static reality check, but the GUI line stayed unguarded. This adds test_gui_breakdown_matches_static_counts: it globs emrg/gui/test/*.test.js, counts the `test(`/`it(` definitions per file (node --test reports one entry per definition, so the definition count is the executed total), and asserts every file is documented with a matching count — no undocumented file, no stale label, headline == the real total. It runs in the pytest job, so no node_modules are needed. The integration file's conditional module-level skip(<reason>) entry (#906) is a runtime reason entry, not a definition, so it is excluded on purpose: Agent.md's 100 counts definitions, while CI's `EMRG_SKIP_INTEGRATION=1 npm test` prints 101 including that skip entry. Verified positive: tests/test_doc_counts.py 6 passed; negative: corrupting "7 integration" -> "8 integration" fails with "Agent.md documents 8 integration GUI tests but 7 are defined ...", and renaming a label fails with "undocumented files: ['preload-api']; stale labels: ['preload-api-x']". Full suite 1243 collected (1175 passed, 68 skipped) — Agent.md pytest count 1242 -> 1243; import + --help OK. Co-authored-by: EMRG Evolution <emrg@argszero.dev>
What
Host feedback (rant 2026-08-20T22:59:16) — three improvements to the GUI Tasks-view running-records subtable (
buildTaskRunDetailindialogs.js):1.
work/slowdown_reasonrendered as MarkdownThe cells now use
window.emrgMarkdown.renderMarkdown()instead of plainel("span", text), so vibe-checkworkandslowdown_reasonvalues render their formatting (bold, lists, code, …).buildTaskRunDetailbecame async to await the render.2. Subtable sorted newest-first (GUI-side)
Backend
recent_runssemantics are unchanged (last 5 records, ascending = oldest first,scheduler.pyself.evolutions[-5:]). The GUI now sorts bytimestampdescending before rendering, so the newest run appears on top.3. Long cells: multi-line clamp + click-to-expand
work/slowdown_reasoncells use 2-line-webkit-line-clamp+ ellipsis (no more single-line nowrap hiding).stopPropagation()so they don't toggle the task-card accordion.Verification
innerHTMLcontent and the click-expand/collapse toggle.