-
Notifications
You must be signed in to change notification settings - Fork 124
fix(wework): use task model for friendly titles #2489
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
Changes from all commits
05cff0e
b827d80
14597c9
cb923b5
4e3f719
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -469,17 +469,18 @@ export function useWorkbenchPaneSession({ currentRuntimeTask }: WorkbenchPaneSes | |
| .then(response => { | ||
| if (!cancelled) { | ||
| const loadedGoal = response.accepted ? response.goal : null | ||
| const resolvedGoal = loadedGoal ?? seededGoal?.goal ?? null | ||
| if (import.meta.env.VITE_WEWORK_RUNTIME_DEBUG === '1') { | ||
| console.info('[Wework] Runtime goal hydration resolved', { | ||
| address: runtimeAddressDebug(runtimeTaskLoadTarget.address), | ||
| accepted: response.accepted, | ||
| goalStatus: loadedGoal?.status ?? null, | ||
| }) | ||
| } | ||
| setRuntimeConversationGoal(runtimeTaskLoadTarget.address, loadedGoal) | ||
| setRuntimeConversationGoal(runtimeTaskLoadTarget.address, resolvedGoal) | ||
|
Comment on lines
+472
to
+480
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 6 \
'getRuntimeGoal|setRuntimeConversationGoal|clearRuntimeGoal|clearCurrentGoal|updateCurrentGoalStatus|clearRuntimePaneGoalSeed' \
wework/src/components/layout/useWorkbenchPaneSession.tsRepository: wecode-ai/Wegent Length of output: 9206 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== outline around hook state/mutations =="
ast-grep outline wework/src/components/layout/useWorkbenchPaneSession.ts \
--match useWorkbenchPaneSession \
--view expanded || true
echo "== goal/state declarations and imports =="
sed -n '1,145p' wework/src/components/layout/useWorkbenchPaneSession.ts
sed -n '340,512p' wework/src/components/layout/useWorkbenchPaneSession.ts
sed -n '2035,2160p' wework/src/components/layout/useWorkbenchPaneSession.ts
sed -n '2330,2365p' wework/src/components/layout/useWorkbenchPaneSession.tsRepository: wecode-ai/Wegent Length of output: 15799 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== runtimeConversationCache definitions for cache/lifecycle APIs =="
rg -n -C 8 'export .*setRuntimeConversationGoal|export .*updateRuntimeConversation|goalStatusReceived|clearRuntimeGoal|setRuntimeGoal|getRuntimeGoal|setRuntimeGoal|RuntimeConversationGoal|GoalStatus' wework/src/features/workbench wework/src \
-g '*runtimeConversationCache*' -g '*.ts' -g '*.tsx'
echo "== candidate cache file list =="
fd -i 'runtimeConversation|conversationCache|goal' wework/src | sed -n '1,80p'Repository: wecode-ai/Wegent Length of output: 50373 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== runtimeConversationCache main exports =="
fd -i 'runtimeConversationCache' wework/src
CACHE="$(fd -i 'runtimeConversationCache' wework/src | head -n 1)"
wc -l "$CACHE"
sed -n '1,240p' "$CACHE"Repository: wecode-ai/Wegent Length of output: 7405 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== local cache/store usages for currentRuntimeTask =="
rg -n -C 4 'setRuntimeConversationGoal|lifecycleStore\.goalStatusReceived|clearRuntimePaneGoalSeed|pendingRuntimeGoalState|getRuntimeConversationMetadata|setRuntimeConversationTaskPlan' wework/src/features/workbench/useWorkbenchRuntimeTasks.ts wework/src/features/workbench/runtimeTaskLifecycle wework/src/features/workbench/runtimeConversationCache* -g '*ts'Repository: wecode-ai/Wegent Length of output: 8087 Prevent stale hydrated goals from overriding later mutations.
🤖 Prompt for AI Agents |
||
| lifecycleStore.goalStatusReceived( | ||
| runtimeTaskLoadTarget.address, | ||
| loadedGoal?.status ?? seededGoal?.goal.status ?? null | ||
| resolvedGoal?.status ?? null | ||
| ) | ||
| if (loadedGoal?.status === 'active') { | ||
| void refreshWorkListsRef.current().catch(() => undefined) | ||
|
|
||
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.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Log the resolved goal status.
When the API returns no goal and the seed supplies the fallback, Line 477 logs
nulleven though Lines 480-483 store and report the seeded status. ChangeloadedGoal?.statustoresolvedGoal?.status.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents