fix(studio): sole workspace owner can reveal non-personal pending proposals and clarifications - #85
Closed
mroops0111 wants to merge 1 commit into
Closed
fix(studio): sole workspace owner can reveal non-personal pending proposals and clarifications#85mroops0111 wants to merge 1 commit into
mroops0111 wants to merge 1 commit into
Conversation
…tems 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) <noreply@anthropic.com>
Owner
Author
|
Wrong approach. system-owned pending proposals are already always-visible via the repository filter (owner === 'system' bypasses the personal filter), so the multiMember gate was actually correct. The real fix is making the reactor submit as the system principal, tracked separately. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #83. A sole workspace owner had no way to see pending proposals (or clarifications) not owned by themselves, so the list showed empty with no affordance to reveal them.
Cause
The Show-All toggle on both the pending Proposals list and the pending Clarifications list was gated on
multiMember(the workspace having more than one member), on the premise "a solo workspace's items are all yours". That premise is false: automated and agent submissions are owned bysystem(HITLServicesetsowner: submitterId ?? 'system'), and other principals can own items too. So on a single-member workspace the toggle never rendered and the owner was locked to the personal-pending filter.Change
Drop the
multiMembercondition fromShowAllToggle(Proposals) andClarificationShowAllToggle(Clarifications). The toggle is still owner-only, and the server still gates the show-all bypass to the workspace owner (proposals.ts/clarifications.tssetviewerId = (showAll && effectiveRole === 'owner') ? undefined : caller), so no new access is granted, only a UI affordance that was wrongly hidden.The now-unused
useWorkspaceMembersimport is removed from both pages.Not included
The underlying ownership model (automated/reactor proposals owned by
system) is unchanged, this only restores the owner's ability to review them. Whether automated submissions should be attributed differently is a separate question.Verification
pnpm --filter @braidhq/studio typecheckgreenpnpm --filter @braidhq/studio testgreen (14 files, 100 tests)pnpm lintclean🤖 Generated with Claude Code