このコミットが含まれているのは:
2026-07-18 14:55:11 +09:00
コミット a5ae7c6f2d
14個のファイルの変更513行の追加39行の削除
+46 -3
ファイルの表示
@@ -74,6 +74,7 @@ type PostMetadataResponse = {
duration?: string
videoMs?: number
tags?: string
displayTags?: PostImportRow['displayTags']
fieldWarnings?: Record<string, string[]>
baseWarnings?: string[]
validationErrors?: Record<string, string[]>
@@ -82,7 +83,8 @@ type PostMetadataResponse = {
id: number
title: string
url: string
thumbnailUrl?: string } | null }
thumbnail?: string | null
thumbnailBase?: string | null } | null }
type BulkApiRow = {
status: 'created' | 'skipped' | 'failed'
@@ -92,7 +94,8 @@ type BulkApiRow = {
id: number
title: string
url: string
thumbnailUrl?: string } | null
thumbnail?: string | null
thumbnailBase?: string | null } | null
fieldWarnings?: Record<string, string[]>
baseWarnings?: string[]
errors?: Record<string, string[]>
@@ -238,6 +241,14 @@ const mergeDryRunRow = (
videoMs: result.videoMs ?? '',
tags: result.tags ?? '',
parentPostIds: String (result.parentPostIds ?? currentRow.attributes.parentPostIds ?? '') },
displayTags:
result.displayTags?.map (tag => ({
name: tag.name,
category: tag.category,
sectionLiterals:
tag.sectionLiterals == null
? undefined
: [...tag.sectionLiterals] })) ?? [],
fieldWarnings,
baseWarnings: result.baseWarnings ?? [],
validationErrors: { },
@@ -273,6 +284,14 @@ const buildPreviewResetSnapshot = (
videoMs: preview.videoMs ?? '',
tags: preview.tags ?? '',
parentPostIds: String (preview.parentPostIds ?? '') },
displayTags:
preview.displayTags?.map (tag => ({
name: tag.name,
category: tag.category,
sectionLiterals:
tag.sectionLiterals == null
? undefined
: [...tag.sectionLiterals] })) ?? [],
provenance: {
url: 'manual',
title: 'automatic',
@@ -368,6 +387,14 @@ const mergePreviewRow = (
...currentRow,
attributes: { ...currentRow.attributes },
provenance: { ...currentRow.provenance },
displayTags:
currentRow.displayTags?.map (tag => ({
name: tag.name,
category: tag.category,
sectionLiterals:
tag.sectionLiterals == null
? undefined
: [...tag.sectionLiterals] })) ?? [],
tagSources: {
automatic: currentRow.tagSources?.automatic ?? '',
manual: currentRow.tagSources?.manual ?? '' },
@@ -406,6 +433,14 @@ const mergePreviewRow = (
if (currentRow.provenance.tags !== 'manual')
{
nextRow.attributes.tags = preview.tags ?? ''
nextRow.displayTags =
preview.displayTags?.map (tag => ({
name: tag.name,
category: tag.category,
sectionLiterals:
tag.sectionLiterals == null
? undefined
: [...tag.sectionLiterals] })) ?? []
}
nextRow.tagSources.automatic = preview.tags ?? ''
if (currentRow.provenance.parentPostIds !== 'manual')
@@ -459,7 +494,7 @@ const ExistingSkippedRows: FC<ExistingSkippedRowsProps> = ({ id, rows }) => {
rel="noopener noreferrer"
className="flex items-center gap-3 p-3">
<PostThumbnailPreview
url={post.thumbnailUrl ?? ''}
url={post.thumbnail || post.thumbnailBase || ''}
className="h-10 w-10 shrink-0"/>
<div className="min-w-0 flex-1">
<div className="truncate text-sm font-medium">
@@ -809,6 +844,14 @@ const PostImportReviewPage: FC<Props> = ({ user }) => {
? { ...currentRow,
url: currentRow.resetSnapshot.url,
attributes: { ...currentRow.resetSnapshot.attributes },
displayTags:
currentRow.resetSnapshot.displayTags.map (tag => ({
name: tag.name,
category: tag.category,
sectionLiterals:
tag.sectionLiterals == null
? undefined
: [...tag.sectionLiterals] })),
provenance: { ...currentRow.resetSnapshot.provenance },
tagSources: { ...currentRow.resetSnapshot.tagSources },
fieldWarnings: Object.fromEntries (
+2
ファイルの表示
@@ -76,6 +76,7 @@ const buildInitialRows = (source: string): PostImportRow[] =>
automatic: '',
manual: '' },
status: 'pending' as const,
displayTags: [],
resetSnapshot: {
url: row.url,
attributes: {
@@ -100,6 +101,7 @@ const buildInitialRows = (source: string): PostImportRow[] =>
tagSources: {
automatic: '',
manual: '' },
displayTags: [],
fieldWarnings: { },
baseWarnings: [] } }))