Skip to content

Fix workspace file previews#956

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

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 so regular agent workspace files can be browsed and previewed.
  • Keep the legacy agents.files.* fallback for older gateways, with separate list/get capability flags.
  • Update stale preview copy and add model tests for workspace entries, root parent navigation, and truncation detection.

Validation

  • .�uild.ps1 — passed
  • dotnet test . ests dOpenClaw.Shared.Tests dOpenClaw.Shared.Tests.csproj --no-restore — first run in fresh worktree required restore; rerun passed: 2722 passed, 31 skipped
  • dotnet test . ests dOpenClaw.Tray.Tests dOpenClaw.Tray.Tests.csproj --no-restore — first run in fresh worktree required restore; rerun 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.
  • Not verified / blocked: live isolated tray UI proof has not been captured yet for this draft PR.

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. Deferred pagination for the 500-entry gateway cap as a larger UI follow-up.

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>
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