Skip to content

Fix workspace file previews#956

Closed
bkudiess wants to merge 1 commit into
openclaw:mainfrom
bkudiess:fix-workspace-previews
Closed

Fix workspace file previews#956
bkudiess wants to merge 1 commit into
openclaw:mainfrom
bkudiess:fix-workspace-previews

Conversation

@bkudiess

@bkudiess bkudiess commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Route the Workspace page through the read-only agents.workspace.list / agents.workspace.get APIs when the gateway supports full workspace browsing.
  • Preserve stable-gateway behavior by falling back to sessions.files.list / sessions.files.get, then the narrow legacy agents.files.* managed-file fallback for older gateways.
  • Update stale preview copy and add model tests for all-workspace entries, root parent navigation, pagination truncation, and legacy managed-file fallback request names.

Validation

  • .�uild.ps1 — passed
  • dotnet test . ests dOpenClaw.Shared.Tests dOpenClaw.Shared.Tests.csproj --no-restore — passed: 2722 passed, 31 skipped
  • dotnet test . ests dOpenClaw.Tray.Tests dOpenClaw.Tray.Tests.csproj --no-restore — passed: 1651 passed

Real behavior proof

  • Projection proof: WorkspaceFilesModelTests.FromAgentWorkspaceList_MapsAllWorkspaceFilesAsPreviewable verifies agents.workspace.list file rows are previewable even when they are not session-referenced/read/edited.
  • Projection proof: WorkspaceFilesModelTests.FromAgentWorkspaceList_MapsAllWorkspaceFilesAsPreviewable verifies empty parentPath remains a root parent path so first-level folders can navigate back up.
  • Stable-gateway proof: local gateway 2026.6.11 does not advertise agents.workspace.*; the page now falls back to sessions.files.* first and only then to agents.files.*.
  • Not verified / blocked: live full-workspace preview requires a gateway build/channel that supports agents.workspace.list/get; the current stable gateway does not.

Rubber-duck review

Dual rubber-duck review completed before PR creation. Fixed the first five findings: root parent navigation, split list/get capability fallback, missing-file semantics, capability reset on client change, and local search filtering. Also corrected the stable fallback chain to prefer sessions.files.* before agents.files.*.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: Fix workspace file previews This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

Use the agent workspace browser APIs for the Workspace page so regular workspace files can be listed and previewed instead of limiting preview to session-referenced files. Keep legacy agents.files fallback for older gateways and cover the projection behavior in tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bkudiess bkudiess force-pushed the fix-workspace-previews branch from 1686a2c to def36aa Compare July 10, 2026 07:13
@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 1686a2ceb1319b2401fd105fcf4d2b5cc6ad5b40, but the PR head is now def36aa995d73b316da61e40d9484ffb5ab87c49. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: Fix workspace file previews This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@bkudiess bkudiess closed this Jul 10, 2026
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.

1 participant