feat: Implement digital signatures for participant consent and introduce study forms management.

This commit is contained in:
2026-03-02 10:51:20 -05:00
parent 61af467cc8
commit 0051946bde
172 changed files with 12612 additions and 9461 deletions

View File

@@ -1,19 +1,21 @@
import * as React from "react"
import * as React from "react";
const MOBILE_BREAKPOINT = 768
const MOBILE_BREAKPOINT = 768;
export function useIsMobile() {
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(
undefined,
);
React.useEffect(() => {
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
const onChange = () => {
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
}
mql.addEventListener("change", onChange)
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
return () => mql.removeEventListener("change", onChange)
}, [])
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
};
mql.addEventListener("change", onChange);
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
return () => mql.removeEventListener("change", onChange);
}, []);
return !!isMobile
return !!isMobile;
}

View File

@@ -39,11 +39,13 @@ export interface UseWizardRosReturn {
};
},
) => Promise<RobotActionExecution>;
callService: (service: string, args?: Record<string, unknown>) => Promise<any>;
callService: (
service: string,
args?: Record<string, unknown>,
) => Promise<any>;
setAutonomousLife: (enabled: boolean) => Promise<boolean>;
}
export function useWizardRos(
options: UseWizardRosOptions = {},
): UseWizardRosReturn {
@@ -110,7 +112,10 @@ export function useWizardRos(
if (!service) return;
const handleConnected = () => {
console.log("[useWizardRos] handleConnected called, mountedRef:", mountedRef.current);
console.log(
"[useWizardRos] handleConnected called, mountedRef:",
mountedRef.current,
);
// Set state immediately, before checking mounted status
setIsConnected(true);
setIsConnecting(false);
@@ -237,7 +242,10 @@ export function useWizardRos(
) {
const timeoutId = setTimeout(() => {
connect().catch((error) => {
console.warn("[useWizardRos] Auto-connect failed (retrying manually):", error instanceof Error ? error.message : error);
console.warn(
"[useWizardRos] Auto-connect failed (retrying manually):",
error instanceof Error ? error.message : error,
);
// Don't retry automatically - let user manually connect
});
}, 100); // Small delay to prevent immediate connection attempts