Commit 2b1e9fa
committed
Add defensive createdAt insertion on frontend
Add ensureCreatedAt() helper that defaults to 2025-01-01 if backend
violates the createdAt guarantee. Applied to all metadata loading paths:
- workspace.list()
- workspace.onMetadata() updates
- workspace.getInfo() after rename
- workspace fork switch event
This prevents crashes if backend contract is violated.1 parent 1368b69 commit 2b1e9fa
2 files changed
+25
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
642 | 650 | | |
643 | 651 | | |
644 | 652 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
13 | 27 | | |
14 | 28 | | |
15 | 29 | | |
| |||
28 | 42 | | |
29 | 43 | | |
30 | 44 | | |
| 45 | + | |
31 | 46 | | |
32 | 47 | | |
33 | 48 | | |
| |||
62 | 77 | | |
63 | 78 | | |
64 | 79 | | |
| 80 | + | |
65 | 81 | | |
66 | 82 | | |
67 | 83 | | |
| |||
169 | 185 | | |
170 | 186 | | |
171 | 187 | | |
| 188 | + | |
172 | 189 | | |
173 | 190 | | |
174 | 191 | | |
| |||
0 commit comments