From 36e360353e3d390cafe117015685b01f080bf965 Mon Sep 17 00:00:00 2001 From: mroops0111 Date: Tue, 4 Aug 2026 15:50:32 +0800 Subject: [PATCH] fix(studio): let a sole workspace owner reveal non-personal pending items The Show-All toggle on the pending proposals and clarifications lists was gated on the workspace having more than one member, on the false premise that a solo workspace's items are all owned by the sole member. Automated and agent submissions are owned by `system`, and other principals can own items too, so a sole owner had no way to reveal them and saw an empty list. Drop the multiMember gate, the server still gates the show-all bypass to the workspace owner, so the toggle stays owner-only. Closes #83 Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/studio/src/pages/Clarification.tsx | 9 ++++----- packages/studio/src/pages/Proposals.tsx | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/studio/src/pages/Clarification.tsx b/packages/studio/src/pages/Clarification.tsx index f919788..ed823fc 100644 --- a/packages/studio/src/pages/Clarification.tsx +++ b/packages/studio/src/pages/Clarification.tsx @@ -13,7 +13,7 @@ import { Button } from '@/components/ui/button' import { FILTER_TAB_TRIGGER, FILTER_TABS_LIST } from '@/components/ui/filterTabs' import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs' import { api } from '@/lib/api' -import { queryKeys, useClarificationByStatus, useClarificationDetail, usePendingClarification, useWorkspaceMembers } from '@/lib/queries' +import { queryKeys, useClarificationByStatus, useClarificationDetail, usePendingClarification } from '@/lib/queries' import { useGraphNavigation } from '@/lib/useGraphNavigation' import { useTabNavigation } from '@/lib/useTabNavigation' import { useWorkspacePolicy } from '@/policy' @@ -285,10 +285,9 @@ function ClarificationShowAllToggle({ onToggle: (next: boolean) => void }) { const { effectiveRole } = useWorkspacePolicy(workspaceId) - const { data: members } = useWorkspaceMembers(workspaceId) - // Nothing to disambiguate on a solo workspace, every question is yours. - const multiMember = (members?.items.length ?? 0) > 1 - if (effectiveRole !== 'owner' || status !== 'pending' || !multiMember) + // A solo workspace still holds questions owned by no member, automation and + // agents submit as `system`, so the owner needs the toggle whatever the size. + if (effectiveRole !== 'owner' || status !== 'pending') return null return (