Commit 2e269df
committed
Resolves #7362 ([FR-2869](https://lablup.atlassian.net/browse/FR-2869))
## Summary
- Drop `...ModelCardDrawerFragment` from `ModelStoreListPageV2Query` so the list no longer loads `readme`, `vfolder`, or `availablePresets` (with per-preset `DeploymentPresetDetailContentFragment`) for every card edge — these were paid per card but consumed only when a single drawer opens.
- Convert `ModelCardDrawer` to self-fetch via two `modelCardV2(id: $id)` root queries (`RoleDetailDrawer` pattern):
- `ModelCardDrawerHeaderQuery` — tiny query for `name` + `metadata.title`, drives the Drawer chrome's `title` slot so the header appears quickly with a `Skeleton.Input` fallback.
- `ModelCardDrawerContentQuery` — heavy fields (`readme`, `vfolder`, `availablePresets` + fragment) inside the body's Suspense.
- `Deploy` button lives in the Drawer chrome's `extra` slot and toggles state lifted to the outer component so it stays clickable while content streams in.
- Deep-linking to `?modelCard=<id>` now opens the drawer regardless of which list page the card belongs to — the drawer no longer depends on finding a matching list fragment.
- Remove declared-but-unused fields/types previously carried by the drawer fragment: `availablePresets.count`, preset `rank` (+ `AvailablePreset.rank` interface member), `runtimeVariant`, `execution`, `cluster`, `deploymentDefaults` — all redundant with `DeploymentPresetDetailContentFragment` or had no reader.
## Test plan
- [ ] Open `/model-store`; verify list loads noticeably faster on projects with many model cards.
- [ ] Click a card → drawer opens with the brand icon + title visible immediately (skeleton briefly) and body fills in after the heavy query resolves.
- [ ] Click `Deploy` while content is still loading → modal opens once data arrives; verify presets list populates.
- [ ] Refresh the page with `?modelCard=<id>` in the URL → drawer opens directly even if the card is on a later page.
- [ ] Close + reopen the drawer for a different card → header/body update with the new model's data.
- [ ] `bash scripts/verify.sh` passes (Relay/Lint/Format). Pre-existing TS errors in unrelated files unchanged.
[FR-2869]: https://lablup.atlassian.net/browse/FR-2869?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent ccb8d84 commit 2e269df
4 files changed
Lines changed: 77 additions & 71 deletions
File tree
- react/src
- components
- pages
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
392 | 391 | | |
393 | 392 | | |
394 | 393 | | |
395 | | - | |
| 394 | + | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | | - | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
47 | 83 | | |
48 | 84 | | |
49 | 85 | | |
| |||
77 | 113 | | |
78 | 114 | | |
79 | 115 | | |
80 | | - | |
81 | 116 | | |
82 | 117 | | |
83 | 118 | | |
84 | 119 | | |
85 | 120 | | |
86 | | - | |
87 | 121 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | 122 | | |
104 | 123 | | |
105 | 124 | | |
| |||
109 | 128 | | |
110 | 129 | | |
111 | 130 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 131 | | |
120 | 132 | | |
121 | 133 | | |
| |||
125 | 137 | | |
126 | 138 | | |
127 | 139 | | |
128 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
129 | 146 | | |
130 | 147 | | |
131 | 148 | | |
132 | 149 | | |
133 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
134 | 156 | | |
135 | 157 | | |
136 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| |||
453 | 454 | | |
454 | 455 | | |
455 | 456 | | |
456 | | - | |
457 | | - | |
| 457 | + | |
| 458 | + | |
458 | 459 | | |
459 | 460 | | |
460 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
209 | | - | |
| 207 | + | |
210 | 208 | | |
211 | 209 | | |
212 | 210 | | |
| |||
218 | 216 | | |
219 | 217 | | |
220 | 218 | | |
221 | | - | |
222 | | - | |
223 | 219 | | |
224 | 220 | | |
225 | 221 | | |
| |||
246 | 242 | | |
247 | 243 | | |
248 | 244 | | |
249 | | - | |
250 | 245 | | |
251 | 246 | | |
252 | 247 | | |
| |||
276 | 271 | | |
277 | 272 | | |
278 | 273 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | 274 | | |
297 | 275 | | |
298 | 276 | | |
| |||
312 | 290 | | |
313 | 291 | | |
314 | 292 | | |
315 | | - | |
| 293 | + | |
316 | 294 | | |
317 | 295 | | |
318 | 296 | | |
| |||
343 | 321 | | |
344 | 322 | | |
345 | 323 | | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | 324 | | |
350 | 325 | | |
351 | 326 | | |
| |||
364 | 339 | | |
365 | 340 | | |
366 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
367 | 354 | | |
368 | 355 | | |
369 | 356 | | |
| |||
481 | 468 | | |
482 | 469 | | |
483 | 470 | | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
| 471 | + | |
488 | 472 | | |
489 | 473 | | |
490 | 474 | | |
| |||
525 | 509 | | |
526 | 510 | | |
527 | 511 | | |
528 | | - | |
529 | | - | |
| 512 | + | |
| 513 | + | |
530 | 514 | | |
531 | | - | |
532 | 515 | | |
533 | 516 | | |
534 | 517 | | |
| |||
0 commit comments