Conversation
refactor(v2): split legacy and v2 UI surfaces
Reduce virtualized row allocations and redundant scroll updates, coalesce layout measurements, and prioritize responsive thumbnails for fast image display. Persist element scroll positions and notify active thumbnail sources when HTTP retries are ready.
Register grid elements with ResizeObserver when refs are assigned after mount, and unobserve replaced elements so pending-state rendering keeps virtual layout metrics current.
perf(ui): v2メディア一覧の表示・スクロールを高速化
feat(ui): expose migration-backed job workflows
|
Important Review skippedToo many files! This PR contains 325 files, which is 225 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (325)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| if (value === null || value === undefined) { | ||
| return null; | ||
| } | ||
| return requireNumber(value, fieldName); |
There was a problem hiding this comment.
[P1] PostgreSQL の raw claim では artifact_size が string になります。この値は jobs.artifact_size の bigint を db().execute() で直接取得したものですが、Node PostgreSQL の int8 は raw result では文字列です。ここで nullableNumber が例外を投げると、claim SQL 自体は status を in_progress に更新済みのため、worker はジョブを受け取れず stale recovery 後も同じ状態を繰り返します。artifactSize を安全に Number 化するか、raw SQL ではなく Drizzle の型変換を通す実装にして、非 null artifactSize の PostgreSQL ケースをテストしてください。
| await this.markCancelled(job); | ||
| return; | ||
| } else { | ||
| await this.jobRepo.markAsCompleted(job.id, safeResult); |
There was a problem hiding this comment.
[P2] stale recovery 後の元 worker を fencing してください。requeueStaleInProgress は in_progress を pending に戻しますが、実行中 worker を無効化する lease/attempt token がありません。さらに markAsCompleted/markAsFailed は更新件数を返さないため、更新が 0 行でもこの箇所から completed イベントを発行します。元の source_restore が継続している間に stale recovery と別 worker が同じジョブを実行すると、restore の二重実行や誤った完了イベントが起こり得ます。attempt/lease を条件にした遷移と、遷移成功時だけのイベント発行が必要です。
| targetMediaId: readTargetMediaId(job.payload), | ||
| progress: readProgress(job.payload), | ||
| artifact: | ||
| job.artifactPath && job.artifactFileName && job.artifactContentType |
There was a problem hiding this comment.
[P2] artifact は completed job にだけ公開してください。source export は成果物メタデータを保存した後に worker のキャンセル判定を通るため、ストリーム中にキャンセルされると status=cancelled のまま artifact fields が残ります。ここではその状態でも downloadUrl を返しますが、artifact route は completed 以外を 404 にするため、Jobs UI に壊れたダウンロードリンクが表示されます。DTO の条件に job.status === completed を加え、キャンセル時にはファイルとメタデータも整理してください。
No description provided.