mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
Update subproject commit and refactor OAuth connection handling in SkillSetupWizard
- Updated the subproject commit reference in the skills directory. - Refactored the SkillSetupWizard component to use `connection_status: "connected"` instead of `connected: true` for improved clarity in state management during OAuth completion.
This commit is contained in:
+1
-1
Submodule skills updated: 1d26ee8947...2275afb466
@@ -43,21 +43,22 @@ export default function SkillSetupWizard({
|
||||
}: SkillSetupWizardProps) {
|
||||
const [state, setState] = useState<WizardState>({ phase: "loading" });
|
||||
|
||||
// Watch skill state for OAuth completion (skill pushes connected: true)
|
||||
// Watch skill state for OAuth completion (skill pushes connection_status: "connected")
|
||||
const skillState = useAppSelector(
|
||||
(s) => s.skills.skillStates[skillId],
|
||||
);
|
||||
const isConnected = skillState?.connection_status === "connected";
|
||||
|
||||
// When skill state changes to connected during OAuth waiting, mark complete
|
||||
useEffect(() => {
|
||||
if (
|
||||
(state.phase === "oauth" || state.phase === "oauth_waiting") &&
|
||||
skillState?.connected === true
|
||||
isConnected
|
||||
) {
|
||||
store.dispatch(setSkillSetupComplete({ skillId, complete: true }));
|
||||
setState({ phase: "complete", message: "Successfully connected!" });
|
||||
}
|
||||
}, [skillState?.connected, state.phase, skillId]);
|
||||
}, [isConnected, state.phase, skillId]);
|
||||
|
||||
// Start the skill (if not running) then start the setup flow on mount
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user