Skip to content

fix(content-sharing): vanity name permission#4530

Merged
mergify[bot] merged 3 commits intomasterfrom
fix-content-sharing-vanity-name
May 5, 2026
Merged

fix(content-sharing): vanity name permission#4530
mergify[bot] merged 3 commits intomasterfrom
fix-content-sharing-vanity-name

Conversation

@reneshen0328
Copy link
Copy Markdown
Contributor

@reneshen0328 reneshen0328 commented May 1, 2026

Summary by CodeRabbit

  • New Features
    • Shared links now surface vanity-name availability so the UI can indicate whether a shared link’s vanity name can be customized.
  • Behavior Change
    • Shared-link password availability may now be omitted when the API doesn't provide it, so the UI should handle an unknown/password-availability-empty state.

@reneshen0328 reneshen0328 requested review from a team as code owners May 1, 2026 05:55
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5250ae4c-da73-4a5f-99e9-26017a4a1716

📥 Commits

Reviewing files that changed from the base of the PR and between e06fccb and b44b68c.

📒 Files selected for processing (3)
  • src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js
  • src/elements/content-sharing/utils/__tests__/convertItemResponse.test.ts
  • src/elements/content-sharing/utils/convertItemResponse.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/elements/content-sharing/utils/convertItemResponse.ts
  • src/elements/content-sharing/utils/tests/convertItemResponse.test.ts

Walkthrough

Mock API and conversion logic were updated to surface shared-link vanity-name availability: the mock added vanity_name, tests assert sharedLink.settings.isVanityNameAvailable, and convertItemResponse maps shared_link_features.vanity_name to sharedLink.settings.isVanityNameAvailable (password fallback behavior adjusted).

Changes

Vanity Name Shared Link Support

Layer / File(s) Summary
Data Shape / Mocks
src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js
DEFAULT_ITEM_API_RESPONSE.shared_link_features now includes vanity_name: true.
Core Conversion
src/elements/content-sharing/utils/convertItemResponse.ts
Destructures vanity_name from shared_link_features and assigns it to sharedLink.settings.isVanityNameAvailable; isPasswordAvailable no longer coerced with ?? false.
Tests
src/elements/content-sharing/utils/__tests__/convertItemResponse.test.ts
Assertions updated to expect sharedLink.settings.isVanityNameAvailable (true/false per mock); mocks adjusted in relevant tests to include vanity_name.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • jfox-box
  • tjuanitas
  • jpan-box

Poem

🐰 I hopped through mocks and tests so neat,
Vanity names now make links complete,
I nibble flags and map them right,
Shared links shimmer in the moonlight,
The rabbit twitches whiskers—delight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description contains only generic repository guidance about the merge process and lacks any implementation details, motivation, or context about the vanity name permission changes. Add a meaningful description explaining what the vanity name permission feature does, why it was added, and how it affects the shared-link functionality.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: adding vanity name permission support to the content-sharing module's shared-link features.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-content-sharing-vanity-name

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

jpan-box
jpan-box previously approved these changes May 1, 2026
tjuanitas
tjuanitas previously approved these changes May 1, 2026
Comment thread src/elements/content-sharing/utils/convertItemResponse.ts Outdated
@reneshen0328 reneshen0328 force-pushed the fix-content-sharing-vanity-name branch from e06fccb to b44b68c Compare May 4, 2026 23:00
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 5, 2026

Merge Queue Status

  • Entered queue2026-05-05 23:37 UTC · Rule: Automatic strict merge
  • Checks passed · in-place
  • Merged2026-05-05 23:46 UTC · at 86df660f99f8a8b5891ae757bf364f09a45a3b93 · squash

This pull request spent 8 minutes 36 seconds in the queue, including 8 minutes 22 seconds running CI.

Required conditions to merge

@mergify mergify Bot merged commit 17f8107 into master May 5, 2026
11 checks passed
@mergify mergify Bot deleted the fix-content-sharing-vanity-name branch May 5, 2026 23:46
@mergify mergify Bot removed the queued label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants