Skip to content

emrg: GUI task-run subtable — markdown work/reason + newest-first sort + click-to-expand cells (rant 2026-08-20T22:59:16) - #905

Merged
argszero merged 1 commit into
masterfrom
feature/gui-task-run-markdown-desc-expand
Aug 20, 2026
Merged

emrg: GUI task-run subtable — markdown work/reason + newest-first sort + click-to-expand cells (rant 2026-08-20T22:59:16)#905
argszero merged 1 commit into
masterfrom
feature/gui-task-run-markdown-desc-expand

Conversation

@argszero

Copy link
Copy Markdown
Owner

What

Host feedback (rant 2026-08-20T22:59:16) — three improvements to the GUI Tasks-view running-records subtable (buildTaskRunDetail in dialogs.js):

1. work / slowdown_reason rendered as Markdown

The cells now use window.emrgMarkdown.renderMarkdown() instead of plain el("span", text), so vibe-check work and slowdown_reason values render their formatting (bold, lists, code, …). buildTaskRunDetail became async to await the render.

2. Subtable sorted newest-first (GUI-side)

Backend recent_runs semantics are unchanged (last 5 records, ascending = oldest first, scheduler.py self.evolutions[-5:]). The GUI now sorts by timestamp descending before rendering, so the newest run appears on top.

3. Long cells: multi-line clamp + click-to-expand

  • work / slowdown_reason cells use 2-line -webkit-line-clamp + ellipsis (no more single-line nowrap hiding).
  • Clicking a whole cell expands the full content (Markdown-rendered) in a block below that record; clicking again collapses it. Cell clicks stopPropagation() so they don't toggle the task-card accordion.

Verification

  • Smoke test updated: fixture now feeds ascending records (as the backend sends them) and asserts the rendered order is newest-first; new assertions cover markdown innerHTML content and the click-expand/collapse toggle.
  • Full GUI suite: 247 pass + 7 by-design daemon-integration failures (ping/port tests against the live daemon — unchanged baseline).
  • Python suite: 983 passed + 1 skipped (no backend change).

…k-to-expand cells (rant 2026-08-20T22:59:16)

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@pm25coder

Copy link
Copy Markdown
Contributor

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 git diff master also shows #904's changes as removals — I isolated the actual #905 changes (dialogs.js +51, components.css +34, smoke test +45) and verified them on their own.

Verified working:

  1. Markdown renderingbuildTaskRunDetail is now async; work/slowdown_reason cells render via window.emrgMarkdown.renderMarkdown(). Empty values still fall back to "-". The smoke test asserts the markdown innerHTML contains the work text (e.g. "修了双实例根因,提交 PR emrg: process-name single-instance admission + codify server-integrity test red line (rants 2026-08-18T22:15:04/23:07:14) #854").

  2. Newest-first sort — GUI-side runs.sort() by timestamp descending before render; backend recent_runs semantics untouched (correct — GUI-only change). Fixture now feeds ascending records and asserts the newest (08:00 "NTE" row) renders last in the fixture / first in output.

  3. Click-to-expand cells — 2-line -webkit-line-clamp + cursor: pointer on .task-run-cell (CSS asserted in test); clicking a cell stopPropagation()s and toggles a .task-run-expand block below that row with the full Markdown-rendered content; second click collapses. Test asserts initial all-hidden → expand on click → collapse on re-click.

Test results on this host:

No issues found. Independent confirmation of the LGTM already on the PR.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle (3rd). Head 3e8f0f8 unchanged since prior reviews; CI test + test-windows PASS (run 32384606102). Three consecutive LGTMs from independent cycles (230308, 231951, 232813) — merge approved.

@argszero
argszero merged commit 86ba2ec into master Aug 20, 2026
2 checks passed
@argszero
argszero deleted the feature/gui-task-run-markdown-desc-expand branch August 20, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants