Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.

feat(api): provide self-hosted guidance message for WorkspaceMemberLimitExceeded error - #1642

Open
tonicofonico wants to merge 2 commits into
AppFlowy-IO:mainfrom
tonicofonico:fix/workspace-member-limit-guidance
Open

feat(api): provide self-hosted guidance message for WorkspaceMemberLimitExceeded error#1642
tonicofonico wants to merge 2 commits into
AppFlowy-IO:mainfrom
tonicofonico:fix/workspace-member-limit-guidance

Conversation

@tonicofonico

@tonicofonico tonicofonico commented Aug 1, 2026

Copy link
Copy Markdown

πŸ“ Description of Changes

Fixes #1641.

This PR updates the error message string for AppError::WorkspaceMemberLimitExceeded (ErrorCode::WorkspaceMemberLimitExceeded / 1027) to simplify backend error reporting.

πŸ”— Related Pull Requests & Issues


πŸ” Problem & Motivation

On Community Self-Hosted deployments, member seats per workspace are limited to 1, but user onboarding is managed via Signup Settings / Whitelist (/console/users-management?tab=settings).

Previously, when member limits were hit during workspace invitation, users received a generic billing error without actionable guidance on how to enable self-hosted team access.

πŸ› οΈ Changes Included:

  • libs/app-error/src/lib.rs: Added explicit AppError::WorkspaceMemberLimitExceeded variant mapping cleanly to ErrorCode::WorkspaceMemberLimitExceeded (1027).

πŸ§ͺ Verification:

  • Verified AppError::WorkspaceMemberLimitExceeded maps cleanly to ErrorCode::WorkspaceMemberLimitExceeded (1027).
  • Verified JSON response formatting.

Summary by Sourcery

Bug Fixes:

  • Provide a clearer, workspace-specific member limit error message to improve guidance for self-hosted deployments.

@sourcery-ai

sourcery-ai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a dedicated WorkspaceMemberLimitExceeded app error variant and ensures it maps to the corresponding error code to support clearer self-hosted guidance messaging when workspace member limits are reached.

File-Level Changes

Change Details Files
Introduce a WorkspaceMemberLimitExceeded app error and wire it into the central error-code mapping.
  • Add WorkspaceMemberLimitExceeded variant to the AppError enum with a specific user-facing error message.
  • Update AppError::to_error_code (or equivalent mapping method) to return ErrorCode::WorkspaceMemberLimitExceeded for the new variant.
libs/app-error/src/lib.rs

Assessment against linked issues

Issue Objective Addressed Explanation
#1641 Detect when the server is operating under a Community Self-Hosted license so that specific guidance can be shown when the workspace member seat limit is reached. ❌ The PR only adds a new AppError variant (WorkspaceMemberLimitExceeded) and maps it to an existing error code. There is no logic for detecting Community Self-Hosted licenses or any conditional behavior based on license type.
#1641 Update the invite popover error message in the Admin Console to append guidance that points administrators to Signup Settings (Whitelist) for enabling user self-signup on Community Self-Hosted instances. ❌ The changes are limited to backend error definition and mapping. The PR does not modify the Admin Console UI, the invite popover, or any frontend text to include a link or guidance to Signup Settings/Whitelist.
#1641 Clarify UX messaging around workspace seat limit on Community Self-Hosted deployments so that administrators understand how to add team members without seeing billing-focused copy (e.g., 'Upgrade your license'). ❌ While the backend error string is changed to a neutral 'Workspace member limit exceeded.' message, the issue’s requested UX improvement specifically concerns self-hosted guidance and navigation in the console. The PR does not implement that guidance or adjust the console error UX; it only changes a backend error message and mapping.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai 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.

Hey - I've left some high level feedback:

  • Consider keeping the error message more generic and deriving deployment-specific guidance (e.g., Community Self-Hosted vs cloud) from configuration or a help link, so that this variant doesn’t hard-code environment-specific UI and product naming into a shared error type.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider keeping the error message more generic and deriving deployment-specific guidance (e.g., Community Self-Hosted vs cloud) from configuration or a help link, so that this variant doesn’t hard-code environment-specific UI and product naming into a shared error type.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click πŸ‘ or πŸ‘Ž on each comment and I'll use the feedback to improve your reviews.

@tonicofonico

Copy link
Copy Markdown
Author

@sourcery-ai review

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click πŸ‘ or πŸ‘Ž on each comment and I'll use the feedback to improve your reviews.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(console): improve Community edition UX guidance when workspace seat limit is reached

1 participant