-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Bluesky - Create Post - parse links in posts #15300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
WalkthroughThe pull request introduces enhancements to the Bluesky create-post component by adding URL parsing and facet generation functionality. The changes focus on improving how URLs are processed and embedded in Bluesky posts. The version numbers for both the component and package have been incrementally updated to reflect these modifications. Changes
Sequence DiagramsequenceDiagram
participant User
participant CreatePostAction
participant ParseUrls
participant ParseFacets
User->>CreatePostAction: Provide post text
CreatePostAction->>ParseUrls: Extract URL spans
ParseUrls-->>CreatePostAction: Return URL spans
CreatePostAction->>ParseFacets: Generate facets
ParseFacets-->>CreatePostAction: Return URL facets
CreatePostAction->>Bluesky: Create post with text and facets
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
components/bluesky/actions/create-post/create-post.mjs
(3 hunks)components/bluesky/package.json
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- components/bluesky/package.json
🧰 Additional context used
🪛 Biome (1.9.4)
components/bluesky/actions/create-post/create-post.mjs
[error] 24-24: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.
(lint/suspicious/noAssignInExpressions)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
- GitHub Check: Verify TypeScript components
🔇 Additional comments (2)
components/bluesky/actions/create-post/create-post.mjs (2)
8-8
: LGTM! Version bump is appropriate.The version increment reflects the addition of URL parsing functionality.
65-65
: Verify facets format against Bluesky API requirements.The integration looks correct, but let's verify the facets format matches the API requirements.
Run this script to check the facets format against Bluesky's documentation:
✅ Verification successful
✓ Facets format verified and matches Bluesky API requirements
The implementation correctly structures facets with proper byte indexing and link features using the official "app.bsky.richtext.facet#link" type.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if facets format matches Bluesky's API schema # Search for facets schema in documentation or test files rg -A 10 'facet#link|richtext.facet' --type ts --type jsLength of output: 58
Script:
#!/bin/bash # Find parseFacets implementation and related code echo "=== Searching for parseFacets implementation ===" ast-grep --pattern 'parseFacets($_) { $$$ }' echo -e "\n=== Searching for facets-related code ===" rg -l "facets.*=" --type ts --type js echo -e "\n=== Searching for Bluesky API types ===" rg -l "type.*Facet|interface.*Facet" --type tsLength of output: 436
Script:
#!/bin/bash # Search for the class containing parseFacets echo "=== Searching for class with parseFacets ===" rg -A 5 "class.*{" components/bluesky/actions/create-post/ echo -e "\n=== Searching for any facets mentions ===" rg -n "facets?" components/bluesky/actions/create-post/ -A 5 echo -e "\n=== Looking for test files ===" fd "test|spec" components/bluesky/actions/create-post/Length of output: 2603
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @michelle0927 lgtm! Ready for QA!
/approve |
Resolves #15270
Summary by CodeRabbit
New Features
Improvements