Fix case repo sync + auto-create Gitea repos + add sync indicator
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m30s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m30s
- auto-sync-cases.sh: fix broken directory scan (was looking for
status subdirs that don't exist), fix env var word-splitting bug,
add safe.directory handling and error logging
- cases.py: auto-create Gitea repo on case_create, fix
documents/original → documents/originals naming mismatch
- app.py: add GET /api/cases/{case_number}/git-status endpoint
- web-ui: add SyncIndicator component in case header showing
sync status (synced/pending/no remote) with last commit time
- pyproject.toml: add httpx dependency
- CLAUDE.md: update Paperclip wakeup API docs
- settings page: switch tag input from Select to free-text with datalist
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -145,6 +145,28 @@ export function useUpdateCase(caseNumber: string | undefined) {
|
||||
});
|
||||
}
|
||||
|
||||
export type GitSyncStatus = {
|
||||
synced: boolean;
|
||||
has_remote: boolean;
|
||||
remote_url?: string | null;
|
||||
dirty_files: number;
|
||||
commits_ahead: number;
|
||||
last_commit_time?: string | null;
|
||||
last_commit_msg?: string | null;
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export function useGitStatus(caseNumber: string | undefined) {
|
||||
return useQuery({
|
||||
queryKey: [...casesKeys.all, "git-status", caseNumber ?? ""] as const,
|
||||
queryFn: ({ signal }) =>
|
||||
apiRequest<GitSyncStatus>(`/api/cases/${caseNumber}/git-status`, { signal }),
|
||||
enabled: Boolean(caseNumber),
|
||||
staleTime: 30_000,
|
||||
refetchInterval: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
export function useWorkflowStatus(caseNumber: string | undefined) {
|
||||
return useQuery({
|
||||
queryKey: [...casesKeys.all, "workflow", caseNumber ?? ""] as const,
|
||||
|
||||
Reference in New Issue
Block a user