Skip to content

feat(ui): add Markdown table interactions - #125245

Merged
clawsweeper merged 5 commits into
mainfrom
tmp/transcript-table-interactions
Aug 18, 2026
Merged

clawsweeper merged 5 commits into
mainfrom
tmp/transcript-table-interactions

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

Closes #125220

What Problem This Solves

Resolves a problem where wide Markdown tables in the Control UI transcript could not clearly communicate hidden columns, and tables of any size could not be copied as tabular data or isolated for focused inspection. Width handling also needed to remain local so a table could never create page-level horizontal scrolling or shift neighboring turns.

Why This Change Was Made

This adds a shared Markdown table interaction owner that wraps rendered tables, measures only their local viewport, and uses contained horizontal overflow rather than changing transcript width. Conditional masks show only the directions that still contain hidden content. Persistent borderless Lucide copy and fullscreen actions sit above the table, while a native table-only dialog provides Escape dismissal, focus containment, and focus restoration without modal header, footer, or frame chrome.

The copy action serializes cells as tab-separated rows. Compact tables retain their content width, wide tables scroll only within their wrapper, and the dialog clones only the table. Table colors, fills, borders, and row separators remain unchanged because that styling belongs to #125218.

User Impact

Users can discover and scroll hidden columns without affecting the rest of the transcript, copy table data into spreadsheets or text tools, and inspect compact or wide tables in a focused fullscreen overlay. Keyboard users retain visible focus, native Escape behavior, and return focus to the fullscreen trigger after closing.

Evidence

  • Duplicate check found no existing interaction issue or PR; Control UI: simplify Markdown table styling #125218 and improve(ui): polish Markdown table presentation #121390 cover adjacent visual styling only and explicitly exclude this behavior.
  • Source inspection covered the Markdown parser, sanitizer contract, transcript delegated event owner, existing Lucide registry, clipboard helper, native dialog behavior, and table CSS.
  • The dirty lane-transcript prototype was inspected read-only and ported by surface; no commit was cherry-picked and no lab files were modified.
  • The safe contained-overflow fallback was selected instead of a transcript breakout because it guarantees no page-level horizontal scroll or sibling-turn shift.
  • git diff --check passed before commit.
  • Production LOC: +303/-3. Tests: +0/-0.
  • Per request, no tests, build, checks, lint, formatting, install, screenshots, autoreview, or CI monitoring were run.
  • The full written table PR section, Adjustment 6, and table-interactions block were used as the canonical contract.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 17, 2026
@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 17, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 18, 2026, 12:22 AM ET / 04:22 UTC.

ClawSweeper review

What this changes

The PR adds contained scrolling, directional overflow indicators, TSV copy, and fullscreen inspection controls to Markdown tables in Control UI chat transcripts.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open: the exact head still disconnects the active table observer after a transcript is re-mounted, and stale clipboard completions can overwrite newer feedback. Likely related people: steipete (medium confidence; recent merged Markdown-table stylesheet owner).

Priority: P3
Reviewed head: 7101ed10b4c3c24f3a949dc1b678ed054c27a2ff
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The feature has meaningful focused tests and claimed live validation, but two concrete lifecycle and async correctness defects remain.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER PR is exempt from the external-contributor proof gate; the supplied Chromium/Crabbox run claims are useful supplemental evidence, while the prepared images show the earlier styling PR rather than these interactions.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER PR is exempt from the external-contributor proof gate; the supplied Chromium/Crabbox run claims are useful supplemental evidence, while the prepared images show the earlier styling PR rather than these interactions.
Evidence reviewed 5 items Active observer is released by stale transcript cleanup: The callback is shared per transcript session and stores one mutable owner. After a second host becomes owner, cleanup from the old host passes undefined and releases the newer host's observers.
Existing test establishes the remount order: The transcript controller suite deliberately stamps one transcript into a second container while the original tree remains tracked, which is the lifecycle order the shared callback mishandles.
Sibling clipboard behavior uses an attempt token: The established code-block copy handler increments a per-button attempt and ignores older async completions; the new table handler has no equivalent guard.
Findings 2 actionable findings [P1] Scope table cleanup to the disconnected transcript element
[P2] Ignore stale table-copy completions
Security None None.

How this fits together

Control UI renders chat Markdown into transcript DOM nodes. The new table wrapper is produced by the Markdown renderer, then the transcript shell owns local scrolling, copy, and fullscreen behavior.

flowchart LR
  A[Chat Markdown] --> B[Markdown renderer]
  B --> C[Interactive table wrapper]
  C --> D[Transcript lifecycle owner]
  D --> E[Scroll and overflow indicators]
  D --> F[Copy and fullscreen actions]
Loading

Decision needed

Question Recommendation
Should Control UI add persistent contained-scroll, copy, and fullscreen controls to every rendered transcript Markdown table after the lifecycle repairs? Sponsor and repair: Keep the feature, fix the two concrete lifecycle/async defects, and review the rebased exact head.

Why: This is a new user-facing interaction surface, and the linked canonical request is explicitly awaiting product-direction review.

Before merge

  • Scope table cleanup to the disconnected transcript element (P1) - This callback is shared by every mount of a session. The controller suite already re-stamps a session into a second container while the old tree remains tracked; once the new shell becomes owner, cleanup from the old shell releases the new shell's observers. Newly inserted tables then lose observer-driven enhancement and overflow updates. Keep state and cleanup bound to each mounted element and cover that remount order.
  • Ignore stale table-copy completions (P2) - Two clipboard writes can settle out of order: a newer successful copy can be replaced by an older failed completion, including its reset timer. The existing code-block copy path guards this with a per-button attempt token; apply the same rule here and add a deferred-resolution regression.
  • Resolve merge risk (P1) - The partial checkout cannot resolve the supplied current-main commit, so the branch needs a current-main rebase and exact-head CI refresh before landing.

Findings

  • [P1] Scope table cleanup to the disconnected transcript element — ui/src/pages/chat/components/chat-thread.ts:49-50
  • [P2] Ignore stale table-copy completions — ui/src/components/markdown-tables.ts:186-196
Agent review details

Security

None.

PR surface

Source +365, Tests +286. Total +651 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 8 371 6 +365
Tests 3 286 0 +286
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 657 6 +651

Review metrics

Metric Value Why it matters
Production versus test LOC production +371/-6, tests +286/-0 The feature adds a substantial new UI interaction owner; the remaining production defects should be absorbed before merge.

Stored data model

Persistent data-model change detected: persistent cache schema: ui/src/components/markdown.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #125220
Summary: This PR is the implementation candidate for the open Control UI Markdown table-interactions request.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    If the Control UI feature is sponsored, scope observer ownership to each mounted transcript element, ignore stale copy completions, add both regressions, then rebase and validate the exact head.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

If the Control UI feature is sponsored, scope observer ownership to each mounted transcript element, ignore stale copy completions, add both regressions, then rebase and validate the exact head.

Do we have a high-confidence way to reproduce the issue?

Yes, by source: mount one transcript into a second host, then unmount the old host; also resolve two table-copy promises in reverse order. The review was read-only, so these paths were not executed locally.

Is this the best way to solve the issue?

No: the current shared-session ref and unguarded async completion are not the best implementation; ownership must stay with the individual mounted element and copy feedback must follow the latest attempt.

Full review comments:

  • [P1] Scope table cleanup to the disconnected transcript element — ui/src/pages/chat/components/chat-thread.ts:49-50
    This callback is shared by every mount of a session. The controller suite already re-stamps a session into a second container while the old tree remains tracked; once the new shell becomes owner, cleanup from the old shell releases the new shell's observers. Newly inserted tables then lose observer-driven enhancement and overflow updates. Keep state and cleanup bound to each mounted element and cover that remount order.
    Confidence: 0.98
  • [P2] Ignore stale table-copy completions — ui/src/components/markdown-tables.ts:186-196
    Two clipboard writes can settle out of order: a newer successful copy can be replaced by an older failed completion, including its reset timer. The existing code-block copy path guards this with a per-button attempt token; apply the same rule here and add a deferred-resolution regression.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 01eec285d986.

Labels

Label justifications:

  • P3: This is a Control UI usability feature, not an urgent reliability or security incident.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This MEMBER PR is exempt from the external-contributor proof gate; the supplied Chromium/Crabbox run claims are useful supplemental evidence, while the prepared images show the earlier styling PR rather than these interactions.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs ui/src/components/markdown-tables.test.ts ui/src/pages/chat/components/chat-transcript-controller.test.ts.
  • [P1] node scripts/run-vitest.mjs ui/src/e2e/chat-markdown-table-interactions.e2e.test.ts.
  • [P1] node scripts/check-changed.mjs -- ui/src/components/markdown-tables.ts ui/src/pages/chat/components/chat-thread.ts ui/src/components/markdown-tables.test.ts ui/src/pages/chat/components/chat-transcript-controller.test.ts.

What I checked:

  • Active observer is released by stale transcript cleanup: The callback is shared per transcript session and stores one mutable owner. After a second host becomes owner, cleanup from the old host passes undefined and releases the newer host's observers. (ui/src/pages/chat/components/chat-thread.ts:49, 7101ed10b4c3)
  • Existing test establishes the remount order: The transcript controller suite deliberately stamps one transcript into a second container while the original tree remains tracked, which is the lifecycle order the shared callback mishandles. (ui/src/pages/chat/components/chat-transcript-controller.test.ts:17, 7101ed10b4c3)
  • Sibling clipboard behavior uses an attempt token: The established code-block copy handler increments a per-button attempt and ignores older async completions; the new table handler has no equivalent guard. (ui/src/components/markdown-code-blocks.ts:81, 7101ed10b4c3)
  • Related table styling provenance: The merged table-presentation change introduced the current table stylesheet, making its author a relevant adjacent owner for this interaction layer. (ui/src/styles/chat/text.css:122, 22e6f5b5e0dc)
  • Current-main object unavailable in this review tree: The partial checkout could not resolve the supplied current-main object because its promisor fetch failed on DNS resolution; no obsolete-on-main conclusion was drawn. (01eec285d986)

Likely related people:

  • steipete: Authored merged PR 121390, which established the current Control UI Markdown-table stylesheet this interaction layer extends. (role: adjacent feature owner; confidence: medium; commits: 22e6f5b5e0dc; files: ui/src/styles/chat/text.css)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Bind observer cleanup to the actual disconnected transcript element and add the re-stamp regression.
  • Add an attempt token plus reverse-settlement coverage for table-copy feedback.
  • Rebase onto current main and rerun exact-head CI.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-08-17T11:27:31.441Z sha ab74876 :: found issues before merge. :: [P1] Scope table chrome to transcript renders
  • reviewed 2026-08-17T19:27:22.449Z sha d9e6275 :: found issues before merge. :: [P1] Preserve current Markdown capability options
  • reviewed 2026-08-18T03:06:09.283Z sha d9e6275 :: found issues before merge. :: [P1] Preserve current Markdown capability options
  • reviewed 2026-08-18T04:08:11.248Z sha 3e612ff :: found issues before merge. :: [P1] Keep the active table owner on stale ref disconnect | [P2] Ignore stale table-copy completions

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. and removed P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Aug 17, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 18, 2026 03:00
@clawsweeper

Copy link
Copy Markdown
Contributor

Rebased and repaired on head 7049c8f6048.

Addressed the current ClawSweeper finding and merge risks:

  • composed tableInteractions with the existing sessionLinks and progressBars options, parser hooks, sanitizer attrs/cache key, transcript click/keyboard handlers, and current Markdown spacing;
  • added focused option/interaction coverage without removing existing session/progress coverage;
  • added observer teardown through a stable transcript ref so detached panes do not retain table owners;
  • fixed fullscreen sizing after visual proof exposed min-content column collapse (max-content, viewport-capped, scrollable);
  • added a real Chromium flow for contained overflow, both directional masks, TSV clipboard output, native fullscreen Escape, and focus restoration.

Proof:

  • Markdown option/unit suite: 94/94 passed.
  • Local focused Chromium with screenshot capture: 1/1 passed; fullscreen capture visually inspected after the sizing repair.
  • AWS Crabbox run_a91e2f2e8d41 / cbx_09ad3b574bbd: final Chromium E2E 1/1 passed; lease stopped cleanly.
  • Focused oxlint and formatting: clean.
  • Mandatory autoreview: clean for both the repair delta and the full rebased branch.

LOC: production +363/-6 (net +357), tests +283/-0. Production growth is the new contained table interaction/dialog capability; the compatibility repair preserves the existing renderer paths rather than adding a parallel parser.

@clawsweeper
clawsweeper force-pushed the tmp/transcript-table-interactions branch from d9e6275 to 7049c8f Compare August 18, 2026 03:59
@clawsweeper

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 18, 2026
@clawsweeper
clawsweeper merged commit cbe3116 into main Aug 18, 2026
260 of 262 checks passed
@clawsweeper

Copy link
Copy Markdown
Contributor

Merged via squash.

@clawsweeper
clawsweeper deleted the tmp/transcript-table-interactions branch August 18, 2026 05:20
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
* feat(ui): add Markdown table interactions

* fix(ui): scope table interactions to transcripts

* fix(ui): complete table interaction contracts

* chore: refresh PR head

* fix(ui): satisfy table interaction gates

---------

Co-authored-by: RoboClaw <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI: add Markdown table interactions

3 participants