fix(dashboard): isNew compares timestamps numerically, not by ISO string
ISO strings differing only in millisecond precision or timezone formatting represent the same instant but failed string equality, so freshly created documents could miss the "Neu" badge depending on whatever shape the backend serializer emitted. Browser specs cannot run in the worktree (birpc WebSocket closure crash documented in the PR description); the new vitest-browser test must be verified from a normal checkout. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ interface Props {
|
||||
const { documents }: Props = $props();
|
||||
|
||||
function isNew(doc: Document): boolean {
|
||||
return doc.createdAt === doc.updatedAt;
|
||||
return new Date(doc.createdAt).getTime() === new Date(doc.updatedAt).getTime();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user