Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Commit 1c23798

Browse files
committed
feat(admin): delete /ai/slug-backfill and redesign /ai/translation-entries
- Delete /ai/slug-backfill route, its surface (SlugBackfillSurface), the WriterGeneratePanel helper, the slug-backfill API functions, and all related i18n keys. The `AITaskType.SlugBackfill` enum value and the task type label are kept so historical tasks still render in /ai/tasks. - Drop the slug tab from `aiSurfaceTabs`, the slug branch from `getInitialAiSurface`, and the 'slug' variant from `AiSurface`. - Migrate /ai/translation-entries off the legacy AiRouteViewContent tab wrapper into a self-contained AiTranslationEntriesRouteView modelled on the /posts list shell: FocusScope + ContentListHeader + a custom toolbar strip (keyPath select / lang input / refresh) + Scroll table + pagination. URL-syncs page/keyPath/lang. The old TranslationEntriesSurface and its AiRouteViewContent branch are removed.
1 parent eebfd69 commit 1c23798

12 files changed

Lines changed: 135 additions & 344 deletions

File tree

apps/admin/src/api/ai.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -507,19 +507,6 @@ export function deleteTranslationEntry(id: string) {
507507
return deleteJson<void>(`/ai/translations/entries/${id}`)
508508
}
509509

510-
export function getSlugBackfillStatus() {
511-
return getJson<{
512-
count: number
513-
notes: Array<{ id: string; nid: number; title: string }>
514-
}>('/ai/writer/backfill-slugs/status')
515-
}
516-
517-
export function createSlugBackfillTask() {
518-
return requestJson<CreateTaskResponse>('/ai/writer/backfill-slugs', {
519-
method: 'POST',
520-
})
521-
}
522-
523510
function normalizeTasksResponse(
524511
response: AITasksResponse | AITask[],
525512
): AITasksResponse {

apps/admin/src/features/ai/components/AiRouteViewContent.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import {
1414
TranslationsSurface,
1515
} from './AiResourceSurfaces'
1616
import { AiTasksSurface } from './AiTasksSurface'
17-
import { SlugBackfillSurface } from './SlugBackfillSurface'
18-
import { TranslationEntriesSurface } from './TranslationEntriesSurface'
1917

2018
export function AiRouteViewContent() {
2119
const { t } = useI18n()
@@ -68,8 +66,6 @@ export function AiRouteViewContent() {
6866
{surface === 'summaries' ? <SummariesSurface /> : null}
6967
{surface === 'translations' ? <TranslationsSurface /> : null}
7068
{surface === 'insights' ? <InsightsSurface /> : null}
71-
{surface === 'entries' ? <TranslationEntriesSurface /> : null}
72-
{surface === 'slug' ? <SlugBackfillSurface /> : null}
7369
</div>
7470
</AppPage>
7571
)

apps/admin/src/features/ai/components/SlugBackfillSurface.tsx

Lines changed: 0 additions & 112 deletions
This file was deleted.

apps/admin/src/features/ai/components/WriterGeneratePanel.tsx

Lines changed: 0 additions & 93 deletions
This file was deleted.

apps/admin/src/features/ai/constants.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
ListTodo,
1010
Loader2,
1111
Sparkles,
12-
WandSparkles,
1312
XCircle,
1413
} from 'lucide-react'
1514
import type { TranslationKey } from '~/i18n/types'
@@ -138,12 +137,6 @@ export const aiSurfaceTabs: Array<{
138137
path: '/ai/translation-entries',
139138
value: 'entries',
140139
},
141-
{
142-
icon: WandSparkles,
143-
labelKey: 'ai.tab.slug',
144-
path: '/ai/slug-backfill',
145-
value: 'slug',
146-
},
147140
]
148141

149142
export const translationEntryKeyPathOptions = [

0 commit comments

Comments
 (0)