Sync CourtListener verification and document safety updates

- Refine CourtListener citation verification, bulk lookup logging, and API fallback behavior
- Persist cancelled chat stream output and render cancellation as the final assistant message
- Add document/version deletion safety fixes and shared warning/modal UI updates
- Sync document panel, case law panel, and response UI styling refinements
- Harden OSS sync script to preserve local env, dependency, and generated files
This commit is contained in:
willchen96 2026-06-09 01:46:58 +08:00
parent 44e868eb42
commit f32a194b33
24 changed files with 2494 additions and 1222 deletions

View file

@ -34,6 +34,7 @@ export function ShareWorkflowModal({
const [existingShares, setExistingShares] = useState<Share[]>([]);
const [loading, setLoading] = useState(true);
const [saving, setSaving] = useState(false);
const [error, setError] = useState<string | null>(null);
const { user } = useAuth();
const ownEmail = user?.email?.trim().toLowerCase() ?? null;
@ -55,13 +56,18 @@ export function ShareWorkflowModal({
: pendingEmails;
if (emails.length === 0) return;
setSaving(true);
setError(null);
try {
await shareWorkflow(workflowId, { emails, allow_edit: allowEdit });
const updated = await listWorkflowShares(workflowId);
setExistingShares(updated);
setPendingEmails([]);
} catch {
// ignore
} catch (err) {
setError(
err instanceof Error && err.message
? err.message
: "Unable to share this workflow. Please try again.",
);
} finally {
setSaving(false);
}
@ -90,6 +96,12 @@ export function ShareWorkflowModal({
autoFocus
/>
{error ? (
<div className="rounded-lg bg-red-50 px-3 py-2 text-xs font-medium text-red-700">
{error}
</div>
) : null}
{/* Permission toggle */}
<div className="flex flex-col gap-2">
<span className="text-xs font-medium text-gray-700">Allow editing by share recipients</span>