diff --git a/frontend/AGENTS.md b/frontend/AGENTS.md index 1a93532..bd9e5a6 100644 --- a/frontend/AGENTS.md +++ b/frontend/AGENTS.md @@ -153,6 +153,9 @@ pass or the remaining failure is clearly blocked. - When new user-facing wording appears necessary, ask the user for the exact wording and placement before implementing it. - Do not invent replacement copy when removing unrequested wording. +- Do not use `タグなし` as user-facing copy for an empty tag state. When the + tag state is empty, show no copy. If actual data contains the tag name + `タグなし`, treat it as ordinary data and display it normally. - When adding dynamic tag colour classes, update `tailwind.config.js` safelist if the class cannot be statically detected. - Do not introduce new UI libraries or production dependencies without approval. diff --git a/frontend/src/components/posts/import/PostImportRowSummary.tsx b/frontend/src/components/posts/import/PostImportRowSummary.tsx index 3523f88..2b3cfab 100644 --- a/frontend/src/components/posts/import/PostImportRowSummary.tsx +++ b/frontend/src/components/posts/import/PostImportRowSummary.tsx @@ -86,9 +86,10 @@ const PostImportRowSummary: FC = (
{row.url}
-
- {String (row.attributes.tags ?? '') || 'タグなし'} -
+ {String (row.attributes.tags ?? '') && ( +
+ {String (row.attributes.tags ?? '')} +
)}
{summaryDate (row)}
@@ -143,9 +144,10 @@ const PostImportRowSummary: FC = (
{displayStatus != null && }
-
- {String (row.attributes.tags ?? '') || 'タグなし'} -
+ {String (row.attributes.tags ?? '') && ( +
+ {String (row.attributes.tags ?? '')} +
)}
{summaryDate (row)}
diff --git a/frontend/src/pages/materials/MaterialListPage.tsx b/frontend/src/pages/materials/MaterialListPage.tsx index 9629733..ea7dbb7 100644 --- a/frontend/src/pages/materials/MaterialListPage.tsx +++ b/frontend/src/pages/materials/MaterialListPage.tsx @@ -482,7 +482,7 @@ const MaterialListPage: FC = () => { className={inputClass (invalid)}> - + )} diff --git a/frontend/src/pages/posts/PostImportReviewPage.tsx b/frontend/src/pages/posts/PostImportReviewPage.tsx index 81f1b8b..3bfb736 100644 --- a/frontend/src/pages/posts/PostImportReviewPage.tsx +++ b/frontend/src/pages/posts/PostImportReviewPage.tsx @@ -814,7 +814,8 @@ const PostImportReviewPage: FC = ({ user }) => { importErrors: undefined }) }) const persisted = await persistSession (buildSession (nextRows)) - if (persisted != null && processableImportRows (persisted.rows).length === 0) + if (persisted != null + && persisted.rows.every (row => isCompletedReviewRow (row))) finishImport () } catch @@ -845,10 +846,7 @@ const PostImportReviewPage: FC = ({ user }) => { { const processingRows = processableImportRows (currentSession.rows) if (processingRows.length === 0) - { - finishImport () - return - } + return const result = await apiPost<{ results: BulkApiRow[] }>( '/posts/bulk', @@ -879,7 +877,8 @@ const PostImportReviewPage: FC = ({ user }) => { importErrors: undefined }) }) const persisted = await persistSession (buildSession (nextRows)) - if (persisted != null && processableImportRows (persisted.rows).length === 0) + if (persisted != null + && persisted.rows.every (row => isCompletedReviewRow (row))) finishImport () } catch @@ -1013,7 +1012,7 @@ const PostImportFooter = (