Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qjclaw-dmg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AI-甘富林
qjclaw-dmg
Commits
7ffa84fe
Commit
7ffa84fe
authored
Apr 28, 2026
by
AI-甘富林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(desktop): improve project readiness and expert switching
parent
f492464b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
project-store.ts
apps/desktop/src/main/services/project-store.ts
+20
-2
App.tsx
apps/ui/src/App.tsx
+2
-2
No files found.
apps/desktop/src/main/services/project-store.ts
View file @
7ffa84fe
...
@@ -428,6 +428,22 @@ function normalizeProjectPackageConfig(record: StoredProjectRecord | null): Proj
...
@@ -428,6 +428,22 @@ function normalizeProjectPackageConfig(record: StoredProjectRecord | null): Proj
};
};
}
}
function
hasDirectWorkspaceEntry
(
record
:
StoredProjectRecord
|
null
):
boolean
{
if
(
!
record
)
{
return
false
;
}
const
packageConfig
=
normalizeProjectPackageConfig
(
record
);
return
Boolean
(
packageConfig
?.
defaultEntry
?.
type
===
"workspace-entry"
||
packageConfig
?.
entries
.
some
((
entry
)
=>
entry
.
type
===
"workspace-entry"
)
||
record
.
workspaceEntryEnabled
===
true
||
record
.
executionEntryEnabled
===
true
||
typeof
record
.
workspaceEntry
===
"string"
||
typeof
record
.
executionEntry
===
"string"
);
}
export
class
ProjectStoreService
{
export
class
ProjectStoreService
{
private
readonly
configService
:
AppConfigService
;
private
readonly
configService
:
AppConfigService
;
private
readonly
qSkillsRoot
?:
string
;
private
readonly
qSkillsRoot
?:
string
;
...
@@ -795,6 +811,7 @@ export class ProjectStoreService {
...
@@ -795,6 +811,7 @@ export class ProjectStoreService {
}):
Promise
<
ProjectSummary
>
{
}):
Promise
<
ProjectSummary
>
{
const
projectId
=
input
.
projectId
?.
trim
()
||
slugify
(
input
.
projectName
);
const
projectId
=
input
.
projectId
?.
trim
()
||
slugify
(
input
.
projectName
);
const
bundleProjectRecord
=
await
this
.
readProjectRecord
(
projectId
);
const
bundleProjectRecord
=
await
this
.
readProjectRecord
(
projectId
);
const
directWorkspaceEntry
=
hasDirectWorkspaceEntry
(
bundleProjectRecord
);
const
availableWorkspaceSkillIds
=
await
this
.
readWorkspaceSkillIds
();
const
availableWorkspaceSkillIds
=
await
this
.
readWorkspaceSkillIds
();
const
materializedBoundSkillIds
=
uniqueSkillIds
(
input
.
boundSkillIds
??
[]);
const
materializedBoundSkillIds
=
uniqueSkillIds
(
input
.
boundSkillIds
??
[]);
const
declaredBoundSkillIds
=
uniqueSkillIds
(
input
.
declaredBoundSkillIds
??
bundleProjectRecord
?.
boundSkillIds
??
[]);
const
declaredBoundSkillIds
=
uniqueSkillIds
(
input
.
declaredBoundSkillIds
??
bundleProjectRecord
?.
boundSkillIds
??
[]);
...
@@ -819,11 +836,12 @@ export class ProjectStoreService {
...
@@ -819,11 +836,12 @@ export class ProjectStoreService {
});
});
}
}
const
lastError
=
missingBoundSkillIds
.
length
>
0
const
missingBoundSkillsBlockProject
=
missingBoundSkillIds
.
length
>
0
&&
!
directWorkspaceEntry
;
const
lastError
=
missingBoundSkillsBlockProject
?
`Missing bound skills:
${
missingBoundSkillIds
.
join
(
", "
)}
`
?
`Missing bound skills:
${
missingBoundSkillIds
.
join
(
", "
)}
`
:
undefined
;
:
undefined
;
const
nextReady
=
(
input
.
ready
??
bundleProjectRecord
?.
ready
??
true
)
const
nextReady
=
(
input
.
ready
??
bundleProjectRecord
?.
ready
??
true
)
&&
(
requestedBoundSkillIds
.
length
===
0
||
validBoundSkillIds
.
length
>
0
);
&&
(
directWorkspaceEntry
||
requestedBoundSkillIds
.
length
===
0
||
validBoundSkillIds
.
length
>
0
);
const
project
=
await
this
.
upsertProject
({
const
project
=
await
this
.
upsertProject
({
...(
bundleProjectRecord
??
{}),
...(
bundleProjectRecord
??
{}),
id
:
projectId
,
id
:
projectId
,
...
...
apps/ui/src/App.tsx
View file @
7ffa84fe
...
@@ -2215,7 +2215,7 @@ export default function App() {
...
@@ -2215,7 +2215,7 @@ export default function App() {
const isBound = !bindingRequired;
const isBound = !bindingRequired;
const hasConversationProject = viewMode === "chat"
const hasConversationProject = viewMode === "chat"
? visibleProjects.length > 0
? visibleProjects.length > 0
: Boolean(workspace?.projectReady && activeProject?.id);
: Boolean(workspace?.projectReady && activeProject?.id
&& workspace?.currentProjectId === activeProject.id
);
const startupStateActive = viewMode !== "settings" && ((refreshing && !workspace) || !shellReady || (isBound && chatLaunchState !== "ready"));
const startupStateActive = viewMode !== "settings" && ((refreshing && !workspace) || !shellReady || (isBound && chatLaunchState !== "ready"));
const hasVisibleConversation = messages.length > 0 || sendPhase !== "idle";
const hasVisibleConversation = messages.length > 0 || sendPhase !== "idle";
const showStartupOverlay = startupStateActive && !hasVisibleConversation;
const showStartupOverlay = startupStateActive && !hasVisibleConversation;
...
@@ -4222,7 +4222,7 @@ export default function App() {
...
@@ -4222,7 +4222,7 @@ export default function App() {
async function switchExpert(projectId: string) {
async function switchExpert(projectId: string) {
setViewMode("experts");
setViewMode("experts");
if (
projectId === activeProject?.i
d && viewMode === "experts") {
if (
workspace?.currentProjectId === projectI
d && viewMode === "experts") {
return;
return;
}
}
await switchProject(projectId);
await switchProject(projectId);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment