Skip to content

fix(ui): keep the applied Workshop skill open after Retry - #205902

Merged
vincentkoc merged 2 commits into
mainfrom
fix/workshop-apply-navigation-after-retry
Nov 26, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/workshop-apply-navigation-after-retry

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Applying a draft in Skill Workshop opens the saved skill. If an earlier Retry finishes afterward, the page could switch to a different draft or return to the draft that Apply just removed. A fresh Retry could then leave the operator on the wrong item.

Why This Change Was Made

Retry now remembers which item was selected when it started. It can still update the sidebar with the inventory it received. If the selection changed while it was waiting, it leaves the current document and URL alone.

User Impact

The saved skill stays open after Apply. A stale sidebar entry also cannot offer Restore on an open live document. Restore is available on a successfully loaded saved version when there is no live copy. The operator can still select another draft, discard it, or refresh the sidebar.

Evidence

Restore after a delayed Retry

With an earlier archive under the same name, clicking the stale Restore action on the parent and on the initial navigation fix replaced the newly applied text with the old version. An independent reader found the new text in a restore backup. With a brand-new name, the initial navigation fix exposed a Restore action that the handler rejected because there were no saved versions.

The corrected header uses the open document and its listed version to decide whether to offer Restore. The mounted Chromium test failed on the exposed action and passed with the guard. Four registered-handler scenarios produced these cold-store results.

Selected document Header and durable result
Newly applied skill, older archive, Retry completes late No Restore. The applied text stayed live and the earlier archive remained its only saved version.
Newly applied name, zero saved versions No Restore. The applied text stayed live with zero versions.
Retry completes before Apply Archive remained available on the live text.
Genuine archived copy Restore succeeded and the archived bytes became live.

The browser used a simulated WebSocket to invoke real Workshop handlers. A separate process reopened each store. The last edit renamed a local binding, produced byte-identical normalized JSX, and passed type-aware lint on both changed files.

Apply navigation

  • In the mounted Chromium regression, Apply opened the saved skill, then a late Retry switched the parent to ?draft=berry-draft. The fix kept ?skill=plum-notes and the saved text through both the late reply and a fresh Retry.
  • All 12 registered-handler scenarios passed. They exercised both draft creation orders, both reply orders, explicit selection, rejected Retry, and Discard from a stale sidebar. A separate cold reader verified the saved skill and the surviving draft on disk.
  • Chromium used a simulated WebSocket with real Workshop handlers and a private store. The focused type-aware lint and formatting checks passed. An additional jsdom suite timed out while starting its worker and executed zero tests.

Apply followed by a delayed Retry

These 1320 × 920 Chromium frames show the same point after Apply and Retry have both settled. The frozen fixture used registered Workshop handlers, first on the original source and then with the reviewed page change. The configuration error in both frames made Retry available.

Before. The delayed reply reopened the removed draft. Its pager says “1 of 2”, and the selected draft could no longer be loaded.

Removed plum-notes draft with the missing-draft message and pager

After. The saved instructions still read “Water the plum trees.” The stale inventory can still display an “Archived” notice until a fresh Retry. The recorded route stayed on ?skill=plum-notes.

Saved plum-notes instructions still visible after the delayed reply

@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 10:27
@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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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: passed.

What this changes

This PR preserves newer Workshop selections when Retry finishes late and withholds the header Restore action from an open live document.

Example: Apply plum-draft while an earlier Retry is waiting.

  • Before: The delayed reply can reopen a removed draft or expose Restore against the newly saved plum-notes skill.
  • After: The saved instructions remain open at ?skill=plum-notes without the misleading Restore action.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, worthwhile repair with no identified code defects; confidence is supported by browser and handler evidence rather than shipped-entry-point proof.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the contributor proof gate; inspected screenshots and reported Chromium handler/cold-store scenarios support the changed behavior, but remain in-process evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Applying a draft can leave the operator viewing another or removed draft, or offer a misleading Restore action against the saved skill.
Reason: The maintainer-authored direction restores foreground-selection behavior and prevents a stale inventory from presenting the wrong header mutation.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR repairs a current-main Workshop selection race, and the revised Restore guard has no identified actionable defect.

Reviewed head: c06ab0b99efb8b766a4ba242223a06bed7cfe18e

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The previously suggested shipped Control UI scenario against an isolated real Gateway—Apply, delayed Retry, fresh Retry, and genuine archived Restore—remains unshown; the supplied evidence uses a simulated WebSocket with real registered handlers.
Agent review details

How this fits together

The Control UI Workshop page owner receives Gateway inventory and document replies, maintains selection, and supplies the document header and router query.

flowchart LR
  A[Operator] --> B[Workshop page owner]
  B --> C[Gateway Workshop methods]
  C --> D[Inventory and document replies]
  D --> B
  B --> E[Document and header]
  B --> F[Router query]
Loading

Technical review

Best possible solution:

Keep selection reconciliation in the existing page owner and derive Restore availability from the loaded archived document.

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

Current-main reconciliation exposes the delayed-Retry ordering directly, corroborated by the inspected screenshots and reported red-before/green-after Chromium regression; this review ran no target code.

Is this the best way to solve the issue?

The patch repairs the existing selection and presentation owners without introducing parallel state, a public contract, or persistence changes.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: The introduced diff captures target identity before loading, publishes the returned inventory, and skips Retry navigation reconciliation if the target changed; Restore additionally requires a successfully loaded, listed saved version without a loaded live comparison. (ui/src/pages/skill-workshop/skill-workshop-page.tsx:175, c06ab0b99efb)
  • Current-main failure path: Fetched main still reconciles the current selection against every returned inventory, including a Retry captured before Apply; it lacks both introduced guards. (ui/src/pages/skill-workshop/skill-workshop-page.tsx:181, b9a5c171709c)
  • Navigation intent: fix(ui): Back and reload keep the open skill workshop page #202545 established URL-backed selection and Apply following the resulting saved skill; this repair preserves that intent and the UI policy protecting foreground selection. (ui/src/pages/skill-workshop/skill-workshop-page.tsx:168, 7af6a10fd328)
  • Regression and supplied visual evidence: The browser regression checks route and document preservation, absence of Restore after the stale reply, and recovery of Archive after fresh Retry. Both downloaded screenshots were inspected: the original shows a missing draft, and the corrected view shows Water the plum trees. The body reports registered-handler Restore clicks and independent cold-store reads. (ui/src/pages/skill-workshop/apply-navigation.browser.test.tsx:78, c06ab0b99efb)
  • Exact-head CI remains unsettled: The baseline-ratchets check failed with database-worker and database-dialect annotations, while other checks remain unfinished. Detailed logs redirect to a blocked Azure host, and no matching base failure was established, so attribution remains undetermined rather than assigned to this PR. (c06ab0b99efb)
  • Feature-history ownership and inspection limits: History across the TS and TSX names identifies Vyctor's navigation work, Ayaan's Workshop and Retry work, Peter's ownership and Solid refactors, and Vincent's merged document-rendering repairs. Older-content searches encountered unavailable local objects; the installed Solid cheatsheet is also absent. These limits do not obscure the reviewed hunks or their immediate contracts. (ui/src/pages/skill-workshop/skill-workshop-page.ts, b9a5c171709c)

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 7af6a10 adds ui/src/pages/skill-workshop/skill-workshop-page.tsx:164 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7af6a10fd328; files: ui/src/pages/skill-workshop/skill-workshop-page.tsx)
  • Ayaan Zaidi: Raw commit 02d8fa7 adds ui/src/pages/skill-workshop/skill-workshop-page.tsx:143 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 02d8fa704a0c; files: ui/src/pages/skill-workshop/skill-workshop-page.tsx)

PR surface

Source +18, Tests +102. Total +120 across 3 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 2 29 11 +18
Tests 1 102 0 +102
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 131 11 +120

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 proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

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.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-26T10:43:26.795Z sha ca2c936 :: needs maintainer review before merge. :: none

Reviewed November 26, 2026, 6:51 AM ET / 11:51 UTC (Revision 2).

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review signed head c06ab0b99efb8b766a4ba242223a06bed7cfe18e. The saved-document header now withholds Restore when a delayed inventory reply omits the open live skill. The PR body includes the real Restore click and independent cold-store read for the old and corrected behavior.

@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Nov 26, 2026
@vincentkoc
vincentkoc merged commit ea27b21 into main Nov 26, 2026
149 of 152 checks passed
@vincentkoc
vincentkoc deleted the fix/workshop-apply-navigation-after-retry branch November 26, 2026 12:22
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 27, 2026
…05902)

* fix(ui): keep applied Workshop skill open after retry

* fix(ui): bind Workshop restore to archived viewer
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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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