test: add E2E tests for threads, auth, and error handling

Also fix CandidateListItem to not use Reorder.Item when isActive=false,
which caused a framer-motion crash on resolved thread detail pages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-03 16:23:26 +02:00
parent 60db8bd9de
commit c4ce96ce4f
4 changed files with 241 additions and 8 deletions

View File

@@ -59,13 +59,11 @@ export function CandidateListItem({
const openResolveDialog = useUIStore((s) => s.openResolveDialog);
const openExternalLink = useUIStore((s) => s.openExternalLink);
return (
<Reorder.Item
value={candidate}
dragControls={controls}
dragListener={false}
className="flex items-center gap-3 bg-white rounded-xl border border-gray-100 p-3 hover:border-gray-200 hover:shadow-sm transition-all group cursor-default"
>
const sharedClassName =
"flex items-center gap-3 bg-white rounded-xl border border-gray-100 p-3 hover:border-gray-200 hover:shadow-sm transition-all group cursor-default";
const innerContent = (
<>
{/* Drag handle */}
{isActive && (
<button
@@ -203,6 +201,22 @@ export function CandidateListItem({
</svg>
</button>
</div>
</Reorder.Item>
</>
);
// Reorder.Item requires a Reorder.Group parent — only use it in active threads
if (isActive) {
return (
<Reorder.Item
value={candidate}
dragControls={controls}
dragListener={false}
className={sharedClassName}
>
{innerContent}
</Reorder.Item>
);
}
return <div className={sharedClassName}>{innerContent}</div>;
}