Skip to content

fix(ui): switch Workshop previews when the selected file type changes - #205872

Merged
vincentkoc merged 1 commit into
mainfrom
fix/workshop-live-file-preview-mode
Nov 26, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/workshop-live-file-preview-mode

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

What changed

In Skill Workshop’s live Files tab, switching from a text file to Markdown could show a literal # Heading even after the selected Markdown file had loaded. Switching from Markdown to text could instead turn a literal heading marker into a heading. The selected filename and returned bytes were correct in both cases.

The file preview now reevaluates its choice of renderer when the selected path changes. The loading state still waits for the selected file’s response. Draft support-file content follows its existing rendering path. Related draft preview change

Evidence

  • The shortest cold reproduction opened a text file containing # C, then a Markdown file containing # B. The new text appeared inside the old raw preview. A held response showed Loading before that same preview node returned with the new bytes. Reversing the file types reproduced the other direction.
  • The original observation covered 45 Chromium cases and 130 selections, using registered Workshop reads and synthetic local files. Same-type switches worked, and the draft sibling rendered raw text, then Markdown, then raw text.
  • Both new Chromium tests failed on the parent after checking the selected path and returned content. Both passed on the candidate, as did the separate draft control. The candidate used the mounted Skill Workshop page and a controlled Gateway request handler. Configured type-aware lint and formatting passed.

Chromium before and after

Each comparison shows the settled Files tab after the selected file’s read returned. Both files contained the same 18 UTF-8 bytes, including the heading marker and blank line. The mounted page used production styles and an in-process Workshop read handler.

Markdown to plain text

Markdown to plain text before and after

Clean comparison

Plain text to Markdown

Plain text to Markdown before and after

Clean comparison

@vincentkoc vincentkoc self-assigned this Nov 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review November 26, 2026 08:56
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes Skill Workshop reevaluate the file preview renderer when the selected file type changes.

Example: Switch from first.txt to last.md containing '# Fig\n\nRipe fruit.'.

  • Before: The Markdown appears literally in the previous plain-text preview.
  • After: Fig renders as a heading followed by the paragraph Ripe fruit.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful minimal repair with distinct browser regressions and inspected visual evidence, limited by its mounted-page proof boundary.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Selecting a different file type can display the correct bytes with the previous file's renderer.
Reason: This maintainer-authored repair restores the existing file-preview contract with a minimal presentation change.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

This PR makes a focused repair for a preview-switching bug still present on current main; no introduced correctness or security defect was identified.

Reviewed head: 6c19575c53567d5a76caad05db76ab1e24c3020f

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Capture both file-type switches through the running Control UI's Workshop Files tab; redact IPs, API keys, phone numbers, and non-public endpoints.
Agent review details

How this fits together

The Workshop page owns file selection and Gateway read receipts; FileContent presents the resolved file through either the existing sanitized Markdown component or a plain-text element.

flowchart TD
  A[File selection] --> B[Workshop page owner]
  B --> C[Gateway file read]
  C --> D[Resolved viewer]
  D --> E[Reactive renderer choice]
  E --> F[Markdown preview]
  E --> G[Plain text preview]
Loading

Technical review

Best possible solution:

Keep the existing file-read owner and make its renderer conditional reactive inside the retained preview subtree.

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

Current-main source retains the stale renderer selection, and supplied Chromium comparisons demonstrate both incorrect switching directions; this read-only review executed no target code.

Is this the best way to solve the issue?

The fragment restores reactive branch selection at the existing presentation owner without new state, helpers, requests, or competing renderers.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b6a0808d1235.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 31ce94f adds ui/src/pages/skill-workshop/detail.tsx:102 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 31ce94f0ad89; files: ui/src/pages/skill-workshop/detail.tsx)

PR surface

Source +2, Tests +87. Total +89 across 2 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 1 13 11 +2
Tests 1 87 0 +87
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 100 11 +89

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 26, 2026, 4:15 AM ET / 09:15 UTC.

@vincentkoc
vincentkoc merged commit 238c5b6 into main Nov 26, 2026
167 checks passed
@vincentkoc
vincentkoc deleted the fix/workshop-live-file-preview-mode branch November 26, 2026 11:01
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 26, 2026
* commit '399057400013dcfa1923db08be96c6bf46cf7079':
  fix: keep known speakers on meeting notes with missing labels (#205923)
  fix(codex): let saved conversations recover after a remote failure (#201621)
  fix: distinguish namesakes in Google Meet transcript exports (#205915)
  refactor: share Discord meeting transcript publication (#205921)
  test: trim workflow and runtime performance coverage (#205782)
  fix(android): settle startup before checking archive refresh (#205891)
  fix: Gateway retains completed reply runtimes after catalog reloads (#195479)
  fix: clear unused-export failures in dependency checks (#205905)
  refactor: share browser routing for meeting captions and cleanup (#205916)
  fix(ui): update Workshop file preview mode (#205872)
  refactor(android): decouple shared JSON values from node handlers (#202840)
  fix(ci): remove bot credit from release notes (#205914)
  fix: pause interrupted shell turns when their result is unknown (#205859)
  fix(ui): skip publication options for removed workspaces (#205909)
  fix: preserve indentation in document previews (#205834)
  improve(ci): avoid full fixture builds for volume checks (#205903)
  refactor(android): derive connection readiness from its owner (#202898)
vincentkoc added a commit that referenced this pull request Nov 26, 2026
…oid-chat-preview-grapheme-boundary

* commit '0bea7ecb3029583dd49d83f760d4f40c9e1f543c': (129 commits)
  fix(android): settle startup before checking archive refresh (#205891)
  fix: Gateway retains completed reply runtimes after catalog reloads (#195479)
  fix: clear unused-export failures in dependency checks (#205905)
  refactor: share browser routing for meeting captions and cleanup (#205916)
  fix(ui): update Workshop file preview mode (#205872)
  refactor(android): decouple shared JSON values from node handlers (#202840)
  fix(ci): remove bot credit from release notes (#205914)
  fix: pause interrupted shell turns when their result is unknown (#205859)
  fix(ui): skip publication options for removed workspaces (#205909)
  fix: preserve indentation in document previews (#205834)
  improve(ci): avoid full fixture builds for volume checks (#205903)
  refactor(android): derive connection readiness from its owner (#202898)
  fix: preserve side chat text when dictating at the limit (#205710)
  improve(telegram): polling workers start faster and use half the memory (#190890)
  fix: keep speaker identities distinct in meeting notes (#205860)
  fix: wait for cancellation before releasing ACP test preparation (#205893)
  fix: bound workers retained after deleting sessions across agents (#197409)
  fix(memory): keep a child's memory audience after its parent resets (#205887)
  refactor(android): give installed skills one data owner (#202892)
  fix(cli): share process failure listeners across invocations (#205732)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 27, 2026
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 impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant