Files
CatoandClaude 5a76f1e643 feat: keep your health file in your account, if you choose (#24)
Off by default; one switch in Account. When on, the file is kept on our
server sealed (AES-256-GCM) and follows the person to any device they sign
in on. A second device never overwrites a newer copy: a refused save is
merged, not forced. The account page says plainly that until keys only the
owner holds exist, we could technically read it.


Claude-Session: https://claude.ai/code/session_01UzP8kyUAz5uhKE3mt87Yi7

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-14 11:00:14 -07:00

17 lines
409 B
TypeScript

"use client";
import { useEffect } from "react";
import { startFileSync } from "@/lib/file-sync";
/**
* Mounted only for a signed-in person. If they turned the server copy of their
* file on (in Account), this keeps it and the browser's copy together; if not,
* it finds that out and does nothing else.
*/
export function FileSync() {
useEffect(() => {
startFileSync();
}, []);
return null;
}