Skip to content

Rebuild My Workspace in V2 and add per-item REST - #1398

Merged
Paul Lizer (paullizer) merged 3 commits into
paullizer-react-v2-uifrom
paullizer-my-workspace-redesign
Sep 3, 2026
Merged

Rebuild My Workspace in V2 and add per-item REST#1398
Paul Lizer (paullizer) merged 3 commits into
paullizer-react-v2-uifrom
paullizer-my-workspace-redesign

Conversation

@paullizer

Copy link
Copy Markdown
Contributor

What this does

Rebuilds My Workspace in the V2 interface, and gives personal agents, actions and model endpoints proper per-item REST.

The V2 workspace listed documents and nothing else. It now covers all eight areas the classic workspace does — but grouped by purpose rather than presented as eight equal tabs.

The reorganisation

The eight tabs were never peers. There is a dependency chain nothing surfaced: identities feed file sources and actions, file sources feed documents, documents/actions/endpoints feed agents, and agents feed workflows. Identities and endpoints are plumbing other sections consume, yet sat alongside Documents as though they were the same kind of thing.

Group Meaning Sections
Knowledge What your assistant can draw on Documents, File sources, Prompts
Automation What your assistant can do Agents, Actions, Workflows
Connections Shared setup the other two reuse Identities, Endpoints

An overview page shows each group with live counts and states the relationships outright.

Sections an administrator has not enabled are named on the overview with the reason, greyed out, and hidden from the rail. A section that silently disappears is indistinguishable from one that is broken — that was the core complaint driving this.

Two renames: Sync becomes File sources (what people actually go there to do), and identities are described as saved sign-ins for other systems, since the word otherwise reads as the user's own account.

Anti-drift

Section availability combines settings, app roles and governance, which the classic interface resolved in Jinja where the SPA cannot see it. Both now read functions_workspace_sections.py.

This was necessary, not tidiness: _build_feature_flags forwards only enable_* booleans, so per_user_semantic_kernel, allow_user_agents, allow_user_plugins and allow_user_custom_endpoints never reached the SPA, and the file-sync and governance checks are not settings keys at all.

Per-item REST

Changing one agent, action or endpoint meant POSTing the whole collection — lossy in two ways that never surface as an error: an omitted row is deleted, and a stale copy reverts another tab's edit.

All three now support GET/PATCH/DELETE on /<id>, and POST creates a single record for an object body. The whole-collection form still works for the classic interface but is deprecated; the V2 client never uses it.

PATCH on an endpoint merges server-side, so the browser's secret-stripped copy cannot blank stored credentials.

Bugs fixed

DELETE /api/user/agents/<name> returned 400 after succeeding. The post-delete check compared remaining agents against global_selected_agent, which is None when unset — so it matched nothing and reported failure for work already committed, on every delete that left an agent behind. This is why workspace_agents.js bypassed the route with read-modify-write. The guard now runs first.

That route had no governance check, unlike its POST counterpart, so a user governance had denied could still delete agents.

Also repaired two tests my changes surfaced: one pinned an exact VERSION and had been failing since 0.242.051 (the repo's own instructions mandate assert_app_version_at_least), and one read a file this PR moved.

Scope

Connector configuration (27 action types), the workflow designer, endpoint connection forms and identity creation are not rebuilt here. Each section links to the classic workspace rather than showing controls that do nothing.

Section Available now
Documents Upload, search, tag filter, delete
File sources List, sync now, run history, delete
Prompts Full create, edit, delete
Agents List, create, edit, delete
Actions List, delete
Workflows List, run, cancel, history, delete
Identities List, delete
Endpoints List, enable/disable, delete

Validation

  • test_v2_workspace_sections.py — 8/8 (collection key contracts, route registration, bootstrap block, V1/V2 gating parity, registry completeness)
  • test_personal_resource_per_item_rest.py — 8/8 (both agent-delete defects proven structurally; fails against the previous implementation)
  • test_v2_workspace_sections_logic.mjs — 12/12 (resolution, rail vs overview, grouping, default selection)
  • All route-policy, V2 API, settings-tab, docs-coverage and docs-quality tests pass
  • V2 typecheck and production build clean

Docs: features/V2_MY_WORKSPACE.md, fixes/PERSONAL_AGENT_DELETE_FIX.md, release notes. Version 0.261.041.

Base branch: targets paullizer-react-v2-ui, not Development.

The V2 personal workspace listed documents and nothing else. It now covers
all eight areas the classic workspace does, grouped by purpose rather than
presented as eight equal tabs.

Knowledge is what the assistant can draw on, Automation is what it can do,
and Connections is the shared setup the other two reuse. Identities and
endpoints are plumbing other sections consume, so they no longer sit
alongside documents as peers. An overview page states the relationships
outright, and names the sections an administrator has switched off along
with the reason -- a section that silently disappears is indistinguishable
from one that is broken.

Section availability combines settings, app roles and governance, which the
classic interface resolved in Jinja where the SPA cannot see it. Both now
read functions_workspace_sections, so they cannot drift. The features map
could not carry this: it forwards only enable_* keys, which excludes
per_user_semantic_kernel, allow_user_agents, allow_user_plugins and
allow_user_custom_endpoints.

Agents, actions and model endpoints had no per-item write path, so changing
one row meant POSTing the whole collection -- lossy in two silent ways: an
omitted row is deleted, and a stale copy reverts another tab's edit. All
three now support per-item GET, PATCH and DELETE. The whole-collection POST
still works for the classic interface but is deprecated.

Fixes two defects in the personal agent delete route:

- It deleted the agent and then returned 400. The post-delete check compared
  the remaining agents against global_selected_agent, which is None when no
  global agent is configured, so it matched nothing and reported failure for
  work already committed. The guard now runs first. This is why
  workspace_agents.js bypassed the route with read-modify-write.
- It performed no governance check, unlike its POST counterpart, so a user
  governance had denied could still delete agents.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The base branch reached 0.261.040 while this work was in progress, and had
itself already used 0.261.039, so this renumbers above both.

Also repoints test_v2_api_payload_shapes at the documents section: the tag
normalisation it guards moved with the documents list when the workspace
page became a grouped set of sections.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The base branch took 0.261.041 for the V2 stats page work while this branch
was open, so this renumbers above it. Only the release notes conflicted;
both sides had added a section under the same version heading.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@paullizer
Paul Lizer (paullizer) merged commit d07529d into paullizer-react-v2-ui Sep 3, 2026
2 checks passed
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