Skip to content

πŸ› fix: add the user github oauth in community home page profiles#13222

Merged
ONLY-yours merged 5 commits intocanaryfrom
refactor/userProfiles
Mar 27, 2026
Merged

πŸ› fix: add the user github oauth in community home page profiles#13222
ONLY-yours merged 5 commits intocanaryfrom
refactor/userProfiles

Conversation

@ONLY-yours
Copy link
Copy Markdown
Member

πŸ’» Change Type

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ‘· build
  • ⚑️ perf
  • βœ… test
  • πŸ“ docs
  • πŸ”¨ chore

πŸ”— Related Issue

πŸ”€ Description of Change

πŸ§ͺ How to Test

  • Tested locally
  • Added/updated tests
  • No tests needed

πŸ“Έ Screenshots / Videos

Before After
... ...

πŸ“ Additional Information

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

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

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Mar 26, 2026 10:40am

Request Review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @ONLY-yours, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@lobehubbot
Copy link
Copy Markdown
Member

@tjx666 @nekomeowww - This PR adds GitHub OAuth social connect in the community home page profiles, touching auth/OAuth callback and market backend TRPC router. Please take a look.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 44.19643% with 375 lines in your changes missing coverage. Please review.
βœ… Project coverage is 66.84%. Comparing base (2c65767) to head (f8871a8).
⚠️ Report is 5 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #13222      +/-   ##
==========================================
- Coverage   66.93%   66.84%   -0.10%     
==========================================
  Files        1870     1873       +3     
  Lines      148122   148772     +650     
  Branches    14897    14935      +38     
==========================================
+ Hits        99150    99442     +292     
- Misses      48861    49219     +358     
  Partials      111      111              
Flag Coverage Ξ”
app 58.13% <44.19%> (-0.09%) ⬇️
database 97.84% <ΓΈ> (ΓΈ)
packages/agent-runtime 89.61% <ΓΈ> (ΓΈ)
packages/context-engine 83.59% <ΓΈ> (ΓΈ)
packages/conversation-flow 92.36% <ΓΈ> (ΓΈ)
packages/file-loaders 87.02% <ΓΈ> (ΓΈ)
packages/memory-user-memory 66.68% <ΓΈ> (ΓΈ)
packages/model-bank 99.85% <ΓΈ> (ΓΈ)
packages/model-runtime 84.53% <ΓΈ> (ΓΈ)
packages/prompts 74.60% <ΓΈ> (ΓΈ)
packages/python-interpreter 92.90% <ΓΈ> (ΓΈ)
packages/ssrf-safe-fetch 0.00% <ΓΈ> (ΓΈ)
packages/utils 90.41% <ΓΈ> (ΓΈ)
packages/web-crawler 88.82% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Ξ”
Store 66.07% <ΓΈ> (ΓΈ)
Services 49.56% <ΓΈ> (ΓΈ)
Server 68.05% <0.00%> (-0.11%) ⬇️
Libs 45.46% <ΓΈ> (ΓΈ)
Utils 91.01% <ΓΈ> (ΓΈ)
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e6781ffff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 226 to 229
const socialLinks: { github?: string; twitter?: string; website?: string } = {};
if (values.github) socialLinks.github = values.github;
if (values.twitter) socialLinks.twitter = values.twitter;
if (githubConnect.profile?.username) socialLinks.github = githubConnect.profile.username;
if (twitterConnect.profile?.username) socialLinks.twitter = twitterConnect.profile.username;
if (values.website) socialLinks.website = values.website;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve existing social links when OAuth data is missing

doSubmit now rebuilds socialLinks only from OAuth connection state (githubConnect.profile / twitterConnect.profile) and no longer falls back to the existing profile values, so users who already have GitHub/Twitter links but are not currently OAuth-connected (or whose profile fetch failed) will lose those links when saving unrelated edits. This is a data-loss regression from the previous form-based behavior and also propagates immediately to UI cache via the returned userProfile object.

Useful? React with πŸ‘Β / πŸ‘Ž.

Comment on lines +26 to +30
const [selectedMcps, setSelectedMcps] = useState<Set<string>>(() => {
return new Set(resources.mcps.map((r) => r.id));
});
const [selectedSkills, setSelectedSkills] = useState<Set<string>>(() => {
return new Set(resources.skills.map((r) => r.id));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reinitialize claim selection when resources change

The selected ID sets are initialized from resources only once with useState, but this modal can be reopened with a different resources payload while still mounted, causing stale selections to persist across sessions. In that case, users can end up claiming hidden old IDs or seeing new resources unselected by default, which makes claim behavior inconsistent with the list currently shown.

Useful? React with πŸ‘Β / πŸ‘Ž.

@ONLY-yours ONLY-yours changed the title γ€ŒWIPγ€πŸ› fix: add the user github oauth in community home page profiles πŸ› fix: add the user github oauth in community home page profiles Mar 26, 2026
@ONLY-yours ONLY-yours merged commit 6b4046e into canary Mar 27, 2026
31 checks passed
@ONLY-yours ONLY-yours deleted the refactor/userProfiles branch March 27, 2026 10:04
@lobehubbot
Copy link
Copy Markdown
Member

❀️ Great PR @ONLY-yours ❀️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.

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