Skip to content

fix(org): delegation follow-ups — operate-as button, real role, no personal actions while delegated - #120

Merged
holkexyz merged 3 commits into
feat/positioning-redesignfrom
fix/org-delegation-followups
Jun 2, 2026
Merged

fix(org): delegation follow-ups — operate-as button, real role, no personal actions while delegated#120
holkexyz merged 3 commits into
feat/positioning-redesignfrom
fix/org-delegation-followups

Conversation

@hb-agent

@hb-agent hb-agent commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Three follow-ups to the merged org-delegation feature (#119).

1. "Operate as" action on the profile Groups tab

On your own profile's Groups tab, each group row gains an "Operate as" button that delegates into the group (switchOrg/home). It's deliberately separate from the row link, which still goes to the group's profile. The currently-active group shows a disabled "Operating" state.

2. Operator's real role, not a hard-coded "admin"

The endorse delegation modal said "acting as an admin" regardless of the operator's actual role. operatorRole is now threaded from activeOrg.role (owner / admin / member); copy reads "acting as its <role>". The ActingAsBar already used the variable role — the modal was the only hard-coded instance (audited).

3. No personal endorsement actions while acting as a group

While delegated you could still give / revoke / accept / reject endorsements on your personal account, writing to your personal repo while the chrome says you're the org. That cross-identity action is now blocked everywhere it existed:

  • Profile Endorsements tab: canManage = (owner && !activeOrg) || acting-as-this-group; personal endorsement lists hidden while delegated.
  • /notifications: accept/reject controls hidden while delegated.
  • /endorsements page: redirects to /home while delegated (it was already nav-hidden; this closes the direct-URL hole).

Test plan

  • tsc --noEmit clean
  • eslint — 0 new warnings (changed files clean)
  • vitest 519/519 pass (added an org-context mock to the endorsements-page test)
  • next build compiles
  • Manual: from your profile Groups tab, "Operate as" a group → bar shows it, lands on /home; endorse modal names your real role; while delegated, your personal profile/notifications/endorsements show no personal accept/reject/give

🤖 Generated with Claude Code

holkexyz and others added 3 commits June 2, 2026 13:03
On your own profile's Groups tab, each group row gains an "Operate as"
button (delegate into the group), deliberately separate from the row link
which goes to the group's profile. The active group shows a disabled
"Operating" state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The endorse delegation modal said "acting as an admin" regardless of the
operator's actual role. operatorRole is now threaded from activeOrg.role
(owner/admin/member). The ActingAsBar already used the variable role; the
modal was the only hard-coded instance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
While delegated you could still give/revoke/accept/reject endorsements on
your PERSONAL account, which writes to your personal repo while the chrome
says you're the org — confusing and wrong. Personal management now requires
!activeOrg; group management requires acting AS that group. Audited and
fixed every instance of the pattern:
- profile Endorsements tab: canManage = (owner && !activeOrg) || acting-as-this-group; personal endorsement lists hidden while delegated
- /notifications: accept/reject controls hidden while delegated
- /endorsements page: redirects to /home while delegated

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
certified-app Ready Ready Preview, Comment Jun 2, 2026 1:04pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 87ecc874-472e-4685-a0c1-c9d40ddc0e7e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/org-delegation-followups

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@holkexyz
holkexyz marked this pull request as ready for review June 2, 2026 13:19

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@holkexyz
holkexyz merged commit 0839f3c into feat/positioning-redesign Jun 2, 2026
3 checks passed
@holkexyz
holkexyz deleted the fix/org-delegation-followups branch June 2, 2026 13:19
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.

2 participants