Skip to content

fix: enable whole-conversation forks for guest owners - #186641

Merged
shakkernerd merged 2 commits into
mainfrom
guest-whole-conversation-fork
Oct 28, 2026
Merged

shakkernerd merged 2 commits into
mainfrom
guest-whole-conversation-fork

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #186634.

What Problem This Solves

Guests who can write their own conversations cannot choose Advanced → Fork conversation. The menu requires broad operator.write before the request reaches the Gateway, even though ordinary owned forks already accept operator.sessions.write. This blocks an independent continuation that includes the latest completed reply.

User Impact

Eligible guest owners can use the whole-conversation action from the chat header, sidebar, and Sessions page. Reader and foreign-source refusals remain, and the Gateway still enforces current ownership, runtime, active-run and sandbox requirements. Ordinary parentless creation and broader operator grants keep their existing behavior.

This changes UI admission only. It does not add a fork capability, clone managed worktrees, change workspace inheritance, or relax the Current checkout isolation restriction.

Why This Change Was Made

The shared menu and its two dispatch paths now opt into the existing session grant and supply the selected source row. The common access owner distinguishes parentless creation from creation targeting an existing parent: a parent key is not evidence of ownership. Both UI entry paths therefore make the same scope and source-ownership decision before dispatch, while the backend remains authoritative.

The existing active-source request still selects the last completed reply. Canonical scope documentation describes that behavior alongside the separate user-message fork action.

Evidence

A fresh guest conversation with two completed model exchanges reproduced the disabled menu and its This action requires operator.write access. tooltip. The live baseline was 2c29a1ef52df17d76de3d3e4f6848768ab0d15f8; all 18 inspected fork/menu/authorization owners matched the repair base 01d66c79ae4c518b355469797752e09e75a35ec6.

The original regression failed in four expected places on the baseline, with 82 other cases passing. Focused validation now covers 344 tests across 18 files, including four real-browser operator-scope cases. Formatting, lint, affected types, file-size limits and the native test-line gate pass. The existing permission matrices carry the controls without adding net test lines.

A real UI fork on the candidate source copied all four saved messages, including the latest assistant reply. The child then completed a natural request for a downloadable invitation containing the latest decisions, and the source history stayed unchanged. A different guest and privileged fork parameters were refused. This first scenario used an ordinary workspace, whose existing shared-root semantics remain unchanged.

On clean UI head 18887e24ac7d, a real guest forked an active managed-worktree conversation through the Sessions page. The request selected last-completed, copied all ten completed messages, retained required sandboxing and detached from the source worktree. The child completed a natural invitation request and downloaded a 111-word file whose bytes matched native readback. The source checklist, original history prefix and worktree remained unchanged; the source briefing settled naturally. The child did not inherit the source file, and no workspace-cloning claim is made.

The live Gateway was 4a5ec828b19c; fourteen relevant backend owner blobs matched the candidate. This is qualified development-serving evidence. Current checkout stayed disabled, and the existing ordinary-workspace sharing policy is unchanged.

The existing creation authority suite passed all 12 cases on this exact head. Its fork case captures real sharing authority, blocks the native transcript writer, removes parent participation after the first guard, then resumes. It verifies rejection, no child row and an unchanged transcript-event count. This is controlled production-owner revocation proof, alongside the native foreign-guest denial and browser reader-denial controls; it is not a live guest-role revocation claim.

Independent engineering review is clean. Exact-head hosted CI and canonical autoreview passed. Current-target browser reproduction confirms the unfixed action remains disabled; inspected target changes preserve this repair. The required hosted review is tracked before landing.

Visual evidence

Open preview

Before After
Guest owner sees disabled Fork conversation action Same guest and conversation with Fork conversation enabled

Active source fork and downloaded invitation

[email protected]

Visual verification

  • Baseline: 2c29a1e
  • Exact head: 18887e24ac7ddb1361e3579913913c1153365361
  • Scenario: An own-session guest forks a completed conversation, then forks an active managed-worktree conversation from its last completed reply and downloads a useful continuation.
  • Runtime/build: UI 18887e2 (clean); Gateway 4a5ec82, with identical fork, sharing and creation owner blobs.
  • Source state at fork: Active before and after creation; last-completed selected
  • Copied history: 10 completed messages; normalized content digest matches saved prefix
  • Useful continuation: 111-word invitation; downloaded bytes match native file readback
  • Preservation: Source checklist, original history prefix and managed worktree unchanged
  • 1440 × 1000, light theme; matched source conversation and menu framing. Unrelated sidebar counts and response footer differ across the Gateway update.
  • Browser runtime identifies clean UI head 18887e2; native scope is operator.sessions.read/write.
  • Fork remains sandbox-required and detaches from the source managed worktree; no workspace cloning is claimed.
  • The source checklist was absent from the fork and the invitation absent before creation; native readback verified separate roots and downloaded content.

@clawsweeper

clawsweeper Bot commented Oct 28, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: S labels Oct 28, 2026
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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 Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Enables guest owners to fork whole conversations through existing Control UI actions using their session-write grant.

Example: A guest with operator.sessions.write opens Advanced → Fork conversation on their owned Cedar Table planning conversation.

  • Before: The action is disabled because the UI requires operator.write.
  • After: The action is enabled, with the existing Gateway ownership, runtime, and sandbox checks retained.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct repair supported by visible admission proof, qualified live continuation evidence, and final-write revocation coverage.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected screenshots prove the changed menu admission; the supplied runtime account records guest-owned creation, continuation, foreign denial, and source preservation on qualified development-serving builds. The source-verified production-owner revocation case checks rejection before transcript or child persistence. Recording playback was unavailable because of review-host tooling and filesystem failures, which require no contributor action.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Eligible guest owners cannot branch an entire saved conversation through the ordinary UI.
Reason: Restores the documented own-work contract with maintainer-authored direction and no new capability, configuration, or persistence model.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current UI permission mismatch with a focused change; no actionable correctness finding remains, and the earlier ratchet finding is resolved.

Priority: P2
Reviewed head: 18887e24ac7ddb1361e3579913913c1153365361

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI menus and dispatchers combine advertised scopes with the selected session row before sending sessions.create; the Gateway authorizes and persists the fork.

flowchart LR
  A[Guest opens conversation menu] --> B[Shared UI access policy]
  B --> C[Existing fork dispatcher]
  C --> D[Gateway current authority checks]
  D --> E[Transcript and child persistence]
  E --> F[Child conversation continuation]
Loading

Technical review

Best possible solution:

Use the existing session-write policy consistently across whole-conversation menus and dispatchers while retaining Gateway authority at persistence.

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

Current-main source deterministically requires broad write at the menu and dispatch boundaries; the supplied baseline screenshot independently shows the disabled action.

Is this the best way to solve the issue?

This is the smallest complete repair: reuse the shared access owner, pass the source ownership facts through both dispatchers, and preserve parentless creation and privileged-parameter checks.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Shakker: Raw commit 282fc78 adds ui/src/lib/session-method-access.ts:68 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 282fc78eaf64; files: ui/src/lib/session-method-access.ts)

PR surface

Source +21, Tests 0, Docs +4. Total +25 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 25 4 +21
Tests 4 89 89 0
Docs 1 5 1 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 119 94 +25

Review metrics

Metric Value Why it matters
Production versus test growth Production +21 lines net; tests +0 lines net Growth supplies the existing grant and source row at three admission points and distinguishes parentless creation from parent-targeting creation.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 security-boundary: Current PR review selected no merge-risk labels.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Repairs a limited guest conversation-branching workflow without changing the backend permission contract.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • 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-10-28T08:42:28.559Z sha d147ce1 :: needs real behavior proof before merge. :: [P2] Resolve the added test lines that fail the required ratchet

Reviewed October 28, 2026, 5:55 AM ET / 09:55 UTC (Revision 2).

@shakkernerd

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 28, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. clawsweeper:intake:bug Preliminary submission classification; full source review pending. and removed clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 28, 2026
@shakkernerd
shakkernerd merged commit 2b9dd45 into main Oct 28, 2026
130 of 131 checks passed
@clawsweeper clawsweeper Bot added the clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. label Oct 28, 2026
@shakkernerd
shakkernerd deleted the guest-whole-conversation-fork branch October 28, 2026 09:57
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: guest owners can fork their whole conversation through Advanced while preserving existing ownership and isolation checks.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 29, 2026
Enable eligible guest owners to fork their whole conversation through the shared menu and both dispatch paths, preserving source ownership and existing Gateway safeguards.

Fixes openclaw#186634.
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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

[Bug]: Guests cannot fork their own whole conversations from the Advanced menu

1 participant