[WIP] feat: support workspace lobehub (rebased)#15596
Closed
Innei wants to merge 1 commit into
Closed
Conversation
Squashed 6 commits (workspace full feature + market-sdk 0.34.0 repin) for clean rebase onto canary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
12 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## canary #15596 +/- ##
==========================================
- Coverage 77.48% 77.47% -0.01%
==========================================
Files 913 913
Lines 104863 104868 +5
Branches 7838 7838
==========================================
Hits 81250 81250
- Misses 23422 23427 +5
Partials 191 191
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💻 Change Type
🔗 Related Issue
Rebased version of #13977 on top of latest canary.
🔀 Description of Change
This is a rebased + single-squashed commit replacing #13977 after
canaryabsorbed theworkspace backend service slice(ccb33fa) and theextract server into apps/serverrefactor (1a4005c). 32 conflicts resolved:apps/server/new paths → stalesrc/server/paths droppedPageEditor.tsx(canary'soverrideStyles+ branch'scanEditcursor) andTopic/List/Item/index.tsx(canary'sshowWorkingDirectory+ branch's workspace-aware href)Notes:
AiProviderModel/AiInfraReposstay personal-scoped per the canary NOTE deferring workspace-scoped ai_infra to LOBE-10056openPublishConfirmModalabstraction inHeader/index.tsxis dropped in favor of canary'sconfirmModal({ onOk })991 files changed total. The list below isolates files where rebase decisions were made by hand — these are the most likely places for regressions and warrant focused review.
🔴 High risk — content conflicts resolved by hand (UU, 9 files)
Each had divergent edits on both sides; the chosen side may have dropped a branch-specific behavior.
apps/server/src/modules/ModelRuntime/index.ts— kept canary (AiProviderModel stays personal-scoped per LOBE-10056 NOTE; branch'sworkspaceIdarg dropped)apps/server/src/routers/lambda/usage.ts— kept canary (ctx.workspaceId ?? undefined, more null-safe than branch's rawctx.workspaceId)apps/server/src/services/toolExecution/serverRuntimes/agentBuilder.ts— kept canary (AiInfraRepos NOT workspace-scoped, AgentModel/PluginModel are)packages/database/src/models/agent.ts— kept canary's deterministic ID-then-sluggetAgentConfig(usesthis.ownership())packages/database/src/models/agentEval/benchmark.ts— kept canary'sthis.ownership()(dropped branch'sthis.mutableOwnership()— verify whether viewer-role write gating is needed here)packages/database/src/models/file.ts— kept canary'sSandboxInitFileIteminterface (superset of branch's workspace import only)src/features/PageEditor/PageEditor.tsx— merged both: canary'soverrideStylestable-bleed + branch'scanEditcursor/focus gatingsrc/routes/(main)/agent/_layout/Sidebar/Topic/List/Item/index.tsx— merged both: canary'sshowWorkingDirectoryprop + branch'sbuildWorkspaceAwarePathworkspace-aware hrefsrc/routes/(main)/agent/profile/features/Header/index.tsx— kept canary'sconfirmModal({ onOk })+signIn('publish'); dropped branch'sopenPublishConfirmModalabstraction (see orphan below)🟠 Medium risk — branch edits to a path canary deleted (DU, 5 files)
Branch's edits to
src/server/...andsrc/locales/default/...were discarded on the assumption that canary's new paths already carry the same workspace scoping. Verify each new path actually includes the branch's intent.src/server/routers/lambda/image/index.tsapps/server/src/routers/lambda/image/index.tssrc/server/routers/lambda/knowledgeBase.tsapps/server/src/routers/lambda/knowledgeBase.tssrc/server/routers/lambda/video/index.tsapps/server/src/routers/lambda/video/index.tssrc/server/services/toolExecution/serverRuntimes/brief.tsapps/server/src/services/toolExecution/serverRuntimes/brief.tssrc/locales/default/notification.tspackages/locales/src/default/notification.ts🟡 Low risk — identical-content double-add (AA, 17 files)
Both sides added the same file with the same SHA; no decision was needed. Listed for completeness — if any later edit on canary diverges from the branch's intent these would be the seams.
Workspace stubs:
packages/business-server/src/lambda-routers/workspace.tspackages/business-server/src/lambda-routers/workspaceAuditLog.tspackages/business-server/src/lambda-routers/workspaceCredits.tspackages/business-server/src/lambda-routers/workspaceData.tspackages/business-server/src/lambda-routers/workspaceMember.tspackages/business-server/src/lambda-routers/workspaceUsage.tspackages/business-server/src/trpc-middlewares/rbacPermission.tspackages/business-server/src/trpc-middlewares/workspaceAuth.tspackages/business-server/src/trpc-middlewares/workspaceContext.tsTests / utils:
apps/server/src/routers/async/__tests__/ragEval.test.tsapps/server/src/routers/lambda/__tests__/knowledgeBase.test.tsapps/server/src/routers/lambda/market/agent.test.tsapps/server/src/routers/lambda/market/agentGroup.test.tsapps/server/src/routers/lambda/market/socialProfile.test.tsapps/server/src/services/toolExecution/serverRuntimes/__tests__/agentSignalSkillManagement.test.tsapps/server/src/services/toolExecution/serverRuntimes/__tests__/lobeAgentPlan.test.tsapps/server/src/workflows/agentEvalRun/utils.tsBranch-only test (UA, 1 file):
apps/server/src/modules/ModelRuntime/initFromDB.test.ts🧹 Orphan to clean up
src/routes/(main)/agent/profile/features/Header/PublishConfirmModal.tsx— added by the branch; its sole importer was removed in theHeader/index.tsxresolution. Now has zero references. Safe to delete in a follow-up commit.🧪 How to Test
bun run type-checkfrom repo root (not yet run)not-allowed, click should not focus editorapps/server/pathsconfirmModalopens,signIn('publish')is the auth pathbunx vitest run --silent='passed-only' apps/server/src/modules/ModelRuntime apps/server/src/routers/lambda/usage packages/database/src/models/agentCloses #13977 once merged.