fix(brand): 更新后「在跑的任务列表」不再静默变空——桥迟到自动重试、拉取失败不删本地态
现场(用户 2026-10-22):点「立即更新」→ 闸门确认并等待 → 进程被 update.exe 替换、 WebView 整页重载。重载那一刻 pywebview 桥还没注入,getPywebviewApi() 返回的降级桥里 vc_ 方法数为 0,而变体采集页把「桥不在」画成「暂无变体采集任务」:loadTasks 四条出口 全是静默 return(无桥/并发中/无 uid/!success),空 catch 也一样;首拉只发一次, 60 秒轮询又被「列表里有活跃任务」反锁 ⇒ 撞空一次就永久空,除手点刷新没有出路。 另外两页是另一种"没掉":跟价 loadHistory 一次 catch 把列表清空,紧接的 syncPollingIdsWithHistory 把「history 没有 + 无快照」的 id 连 localStorage 快照一起删 (不可恢复);商品风险同型且更狠,连快照豁免都没有。更新的几十秒里进程已退、 新进程未起,任何一次 /history 失败或 401 都踩得到。 改法:新增 shared/bridges/bridge-list-state.ts(失败分类/可见文案/首拉重试驱动, 退避复用 getTaskPollBackoffMs,8 轮约 35 秒);变体采集页桥未就绪→重试到成功或次数 用尽,失败态写进空列表文案并给一次 ElMessage;跟价/商品风险加 historyLoadOk 守卫, 拉取失败不清列表、不结算、不删本地 id。静默 catch 棘轮 83→81(实测;本轮减 1, 另 1 处是此前台账未缩,已一并拉平并逐文件改小)。 门禁:npx vue-tsc --noEmit rc=0;npm test 905/905 全绿(含新增 7 例 tests/bridge-list-first-load-retry.test.ts,改前对旧代码真红)。
This commit is contained in:
@@ -776,16 +776,24 @@ async function loadDashboard() {
|
||||
}
|
||||
}
|
||||
|
||||
/** 上一轮 /history 是真拉到的还是失败的:失败轮没有任何资格判定任务「已不存在」 */
|
||||
let historyLoadOk = false
|
||||
|
||||
async function loadHistory() {
|
||||
try {
|
||||
const vo = await getPriceTrackHistory()
|
||||
historyItems.value = vo.items || []
|
||||
historyLoadOk = true
|
||||
} catch {
|
||||
historyItems.value = []
|
||||
// 失败保留上一轮列表:清成空会让紧接着的结算把在跑的任务判成「已不存在」,
|
||||
// 连带删掉 localStorage 里的轮询 id 与快照——一次抖动(或客户端更新的那几十秒)
|
||||
// 就能把「当前任务」整个抹没,用户看到的就是任务凭空消失。
|
||||
historyLoadOk = false
|
||||
}
|
||||
}
|
||||
|
||||
function syncPollingIdsWithHistory() {
|
||||
if (!historyLoadOk) return
|
||||
for (const taskId of [...pollingTaskIds.value]) {
|
||||
const any = historyItems.value.some((r) => r.taskId === taskId)
|
||||
if (!any && !taskSnapshots.value[taskId]) {
|
||||
|
||||
@@ -522,8 +522,13 @@ async function removeMatchedRow(row: ProductRiskShopQueueItem) {
|
||||
}
|
||||
}
|
||||
|
||||
/** 上一轮 /history 是真拉到的还是失败的:失败轮没有任何资格判定任务「已不存在」 */
|
||||
let historyLoadOk = false
|
||||
|
||||
/** 历史列表中已无该 taskId 时,停止轮询并清本地快照 */
|
||||
function syncPollingIdsWithHistory() {
|
||||
// 本轮 /history 没真拉到就不结算:否则一次拉取失败等于把每个在跑的任务判成「已不存在」
|
||||
if (!historyLoadOk) return
|
||||
for (const taskId of [...pollingTaskIds.value]) {
|
||||
const rows = historyItems.value.filter((r) => r.taskId === taskId)
|
||||
if (!rows.length || rows.some((row) => isHistoryItemTerminal(row))) {
|
||||
@@ -630,8 +635,11 @@ async function loadCandidates() {
|
||||
async function loadHistory() {
|
||||
try {
|
||||
historyItems.value = (await getProductRiskHistory()).items || []
|
||||
historyLoadOk = true
|
||||
} catch {
|
||||
historyItems.value = []
|
||||
// 失败保留上一轮列表:清成空会让下面的结算把每一个在跑的任务都判成「已不存在」,
|
||||
// 连带删光本地轮询 id——客户端更新/网络抖动那几十秒就足以把「当前任务」整个抹没。
|
||||
historyLoadOk = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<button type="button" class="btn-refresh" @click="refreshList">刷新任务状态</button>
|
||||
</div>
|
||||
<div class="queue-body">
|
||||
<div v-if="!currentTasks.length" class="empty-tasks">暂无变体采集任务</div>
|
||||
<div v-if="!currentTasks.length" class="empty-tasks" :class="{ 'empty-warn': Boolean(listNotice) }">{{ listNotice || '暂无变体采集任务' }}</div>
|
||||
<div v-else class="queue-grid">
|
||||
<div v-for="item in currentTasks" :key="`vc-${item.task_id}`" class="task-card">
|
||||
<div class="task-card-head">
|
||||
@@ -171,6 +171,11 @@ import { saveUrlWithProgress } from '@/shared/utils/download-progress'
|
||||
import { isHttpUrl, safeHttpUrl } from '@/shared/utils/safe-url'
|
||||
import { createCategorizedTimers } from '@/shared/utils/categorized-timers'
|
||||
import { useHistoryPolling } from '@/shared/composables/useHistoryPolling'
|
||||
import {
|
||||
bridgeListHint,
|
||||
runBridgeListFirstLoad,
|
||||
type BridgeListAttempt,
|
||||
} from '@/shared/bridges/bridge-list-state'
|
||||
import { taskStatusClass, taskStatusText, type TaskStatusOptions } from '@/shared/utils/task-status-text'
|
||||
|
||||
/** 本地任务记录:桥接返回的列表项 + 前端维护字段 */
|
||||
@@ -206,6 +211,8 @@ const currentPage = ref(1)
|
||||
const totalPages = ref(1)
|
||||
const totalCount = ref(0)
|
||||
const isLoading = ref(false)
|
||||
/** 最近一次列表取回的结局:桥未就绪/登录态未恢复/请求失败都不得再伪装成「暂无任务」 */
|
||||
const listState = ref<BridgeListAttempt>('bridge')
|
||||
|
||||
const detailVisible = ref(false)
|
||||
const detailItem = ref<VariantEntry | null>(null)
|
||||
@@ -215,6 +222,8 @@ const asinLines = computed(() => asinText.value.split(/\r?\n/).map((s) => s.trim
|
||||
const currentTasks = computed(() =>
|
||||
currentTaskIds.value.map((id) => tasks[id]).filter((item): item is VariantEntry => Boolean(item)),
|
||||
)
|
||||
/** 列表为空时才给失败文案;有任务时不抢话 */
|
||||
const listNotice = computed(() => (currentTasks.value.length ? '' : bridgeListHint(listState.value)))
|
||||
const canSubmit = computed(() =>
|
||||
inputMode.value === 'asin' ? asinLines.value.length > 0 : selectedFiles.value.length > 0,
|
||||
)
|
||||
@@ -474,16 +483,25 @@ async function refreshTask(item: VariantTaskListItem) {
|
||||
}
|
||||
}
|
||||
|
||||
async function loadTasks(page?: number) {
|
||||
async function loadTasks(page?: number): Promise<BridgeListAttempt> {
|
||||
if (isLoading.value) return listState.value
|
||||
const bridge = getPywebviewApi()
|
||||
if (!bridge?.vc_list_tasks) return
|
||||
if (isLoading.value) return
|
||||
if (!uid()) return
|
||||
if (!bridge?.vc_list_tasks) {
|
||||
listState.value = 'bridge'
|
||||
return 'bridge'
|
||||
}
|
||||
if (!uid()) {
|
||||
listState.value = 'uid'
|
||||
return 'uid'
|
||||
}
|
||||
isLoading.value = true
|
||||
try {
|
||||
const targetPage = page || currentPage.value || 1
|
||||
const res = await bridge.vc_list_tasks({ uid: uid(), page: targetPage, page_size: PAGE_SIZE })
|
||||
if (!res?.success) return
|
||||
if (!res?.success) {
|
||||
listState.value = 'failed'
|
||||
return 'failed'
|
||||
}
|
||||
currentPage.value = res.page || targetPage || 1
|
||||
totalPages.value = Math.max(1, res.total_page || 1)
|
||||
totalCount.value = res.total || (res.tasks || []).length
|
||||
@@ -510,8 +528,12 @@ async function loadTasks(page?: number) {
|
||||
ids.push(item.task_id)
|
||||
})
|
||||
currentTaskIds.value = ids
|
||||
listState.value = 'ok'
|
||||
return 'ok'
|
||||
} catch {
|
||||
/* 静默:列表加载失败时保留现状 */
|
||||
// 失败不清列表(保留上一轮读数),但必须让用户看见「这次没取到」而不是「没有任务」
|
||||
listState.value = 'failed'
|
||||
return 'failed'
|
||||
} finally {
|
||||
isLoading.value = false
|
||||
}
|
||||
@@ -738,9 +760,23 @@ function cleanup() {
|
||||
timers.clearScope()
|
||||
}
|
||||
|
||||
/**
|
||||
* 首拉引导:客户端更新或启动的头几秒桥还没注入(getPywebviewApi() 退化成不含 vc_ 方法的
|
||||
* 降级桥),此前「onMounted 只发一次 + 轮询要等有活跃任务」两件事咬死——撞空一次就永久
|
||||
* 停在「暂无变体采集任务」,用户看到在跑的任务凭空没了。这里重试到成功或次数用尽。
|
||||
*/
|
||||
async function bootstrapListLoad() {
|
||||
const result = await runBridgeListFirstLoad(() => loadTasks(1), {
|
||||
sleep: (ms) => timers.sleep('list-bootstrap', ms),
|
||||
isCancelled: () => disposed,
|
||||
})
|
||||
if (result.cancelled || disposed || result.attempt === 'ok') return
|
||||
ElMessage.warning(`${bridgeListHint(result.attempt)},可点「刷新任务状态」再试`)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 首发只发一次:此前 startPolling() 的立即 loadTasks(1) 与 scheduleAutoRefresh() 各打一遍同一页
|
||||
void loadTasks(1)
|
||||
// 只起这一条链:此前立即 loadTasks(1) 与 scheduleAutoRefresh() 各打一遍同一页
|
||||
void bootstrapListLoad()
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
@@ -809,6 +845,7 @@ onBeforeUnmount(() => {
|
||||
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
||||
.page-now { min-width: 22px; text-align: center; color: #c8d2e2; font-size: 12px; }
|
||||
.empty-tasks { color: #5e6878; font-size: 13px; padding: 12px 0; text-align: center; }
|
||||
.empty-warn { color: #e0b341; }
|
||||
.detail-body { max-height: 60vh; overflow: auto; }
|
||||
.kv-row { display: flex; gap: 12px; padding: 6px 0; font-size: 13px; }
|
||||
.kv-key { flex-shrink: 0; width: 110px; color: #5e6878; }
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* 桌面桥任务列表的取回判据(客户端更新后「在跑的任务列表没掉」修复)。
|
||||
*
|
||||
* 客户端更新=进程被 update.exe 替换 + WebView 整页重载。这一瞬 `window.pywebview` 还没注入,
|
||||
* `getPywebviewApi()` 退化成不含任何 `vc_` 方法的降级桥,于是页面里那句
|
||||
* `if (!bridge?.vc_list_tasks) return` 把「桥还没起来」渲染成「暂无任务」;而列表轮询又被
|
||||
* 「列表里有活跃任务才启动」反锁——首拉撞上这个窗口 ⇒ 列表空 ⇒ 活跃任务恒 false ⇒
|
||||
* 轮询永不启动 ⇒ 这一页被钉死在空列表,除了手点刷新没有出路。
|
||||
*
|
||||
* 这里只收敛**无副作用的判据与首拉重试驱动**:败在哪一环、有没有可见文案、要不要接着试。
|
||||
* 计时器与页面状态由调用方注入,本模块不碰 window。
|
||||
*/
|
||||
|
||||
import { getTaskPollBackoffMs } from '../task-progress-config.ts'
|
||||
|
||||
/** 一次列表取回的结局:成功 / 桥未就绪 / 登录态未恢复 / 请求或后端失败 */
|
||||
export type BridgeListAttempt = 'ok' | 'bridge' | 'uid' | 'failed'
|
||||
|
||||
/** 首拉最多试几轮(含首次)。退避曲线复用任务轮询那一套:0.5s→1s→2s→4s→8s→10s 封顶,
|
||||
* 8 轮累计约 35 秒,覆盖客户端进程替换到页面可打桥的实测窗口。 */
|
||||
export const BRIDGE_LIST_FIRST_LOAD_MAX_ATTEMPTS = 8
|
||||
|
||||
/** 每种结局的用户可见文案;非 ok 一律不许空白呈现(静默 catch 棘轮同源口径)。 */
|
||||
const BRIDGE_LIST_HINTS: Record<Exclude<BridgeListAttempt, 'ok'>, string> = {
|
||||
bridge: '客户端正在启动或更新,任务列表暂时连不上,会自动重试…',
|
||||
uid: '登录态还没恢复,任务列表暂时取不到,请重新登录后再看',
|
||||
failed: '任务列表拉取失败,会自动重试',
|
||||
}
|
||||
|
||||
export function bridgeListHint(attempt: BridgeListAttempt): string {
|
||||
return attempt === 'ok' ? '' : BRIDGE_LIST_HINTS[attempt]
|
||||
}
|
||||
|
||||
/** 只有成功不必再试;其余三种都值得再试(桥会起来、登录态会补上、网络会恢复)。 */
|
||||
export function isRetryableBridgeListAttempt(attempt: BridgeListAttempt): boolean {
|
||||
return attempt !== 'ok'
|
||||
}
|
||||
|
||||
/** 第 attempts 次尝试(从 1 计)之后该等多久。 */
|
||||
export function bridgeListRetryDelayMs(attempts: number): number {
|
||||
return getTaskPollBackoffMs(Math.max(0, attempts - 1))
|
||||
}
|
||||
|
||||
export interface BridgeListFirstLoadOptions {
|
||||
/** 已尝试次数(含首次)的上限 */
|
||||
maxAttempts?: number
|
||||
/** 注入退避曲线(测试用) */
|
||||
delayMs?: (attempts: number) => number
|
||||
/** 注入等待:页面用 categorized-timers 的 sleep,卸载时随 scope 一起清掉 */
|
||||
sleep: (ms: number) => Promise<void>
|
||||
/** 组件已卸载/用户已切换:立即停止,不再续链 */
|
||||
isCancelled?: () => boolean
|
||||
/** 每轮结局回调(页面据此更新可见提示) */
|
||||
onAttempt?: (result: { attempt: BridgeListAttempt; attempts: number }) => void
|
||||
}
|
||||
|
||||
export interface BridgeListFirstLoadResult {
|
||||
attempt: BridgeListAttempt
|
||||
attempts: number
|
||||
/** 被调用方取消(组件卸载)时为 true:此时不代表列表真的取不到 */
|
||||
cancelled: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* 首拉驱动:把「只发一次就放弃」换成「重试到成功或次数用尽」。
|
||||
*
|
||||
* load() 必须自己把失败归成 'bridge' | 'uid' | 'failed' 并返回,不得抛(抛了这里不兜,
|
||||
* 免得把真 bug 吞成一次重试)。成功即停;失败按退避重试;取消即停且不算失败。
|
||||
*/
|
||||
export async function runBridgeListFirstLoad(
|
||||
load: () => Promise<BridgeListAttempt>,
|
||||
options: BridgeListFirstLoadOptions,
|
||||
): Promise<BridgeListFirstLoadResult> {
|
||||
const maxAttempts = options.maxAttempts ?? BRIDGE_LIST_FIRST_LOAD_MAX_ATTEMPTS
|
||||
const delayMs = options.delayMs ?? bridgeListRetryDelayMs
|
||||
let attempts = 0
|
||||
let attempt: BridgeListAttempt = 'bridge'
|
||||
while (attempts < maxAttempts) {
|
||||
if (options.isCancelled?.()) {
|
||||
return { attempt, attempts, cancelled: true }
|
||||
}
|
||||
attempt = await load()
|
||||
attempts += 1
|
||||
options.onAttempt?.({ attempt, attempts })
|
||||
if (!isRetryableBridgeListAttempt(attempt)) break
|
||||
if (attempts >= maxAttempts) break
|
||||
await options.sleep(delayMs(attempts))
|
||||
}
|
||||
return { attempt, attempts, cancelled: false }
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
import { test } from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { dirname, join } from 'node:path'
|
||||
|
||||
import {
|
||||
BRIDGE_LIST_FIRST_LOAD_MAX_ATTEMPTS,
|
||||
bridgeListHint,
|
||||
bridgeListRetryDelayMs,
|
||||
isRetryableBridgeListAttempt,
|
||||
runBridgeListFirstLoad,
|
||||
} from '../src/shared/bridges/bridge-list-state.ts'
|
||||
|
||||
/**
|
||||
* 「更新客户端 → 在跑的任务列表没掉」回归钉。
|
||||
*
|
||||
* 现场:点「立即更新」→ 闸门放行 → 进程被 update.exe 替换 → WebView 整页重载。
|
||||
* 重载那一下 pywebview 桥还没注入,`getPywebviewApi()` 返回的降级桥里 vc_ 方法数为 0,
|
||||
* 而变体采集页把「桥不在」和「没有任务」画成同一句「暂无变体采集任务」,
|
||||
* 首拉又只发一次、轮询还被「列表里有活跃任务」反锁 ⇒ 用户看到在跑的任务凭空没了。
|
||||
* 这里钉三件事:①首拉必须重试到桥起来;②每种失败都要有可见文案;
|
||||
* ③跟价页一次拉取失败不得反过来把本地轮询 id 连快照一起删掉。
|
||||
*/
|
||||
|
||||
const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
|
||||
|
||||
function sourceOf(rel: string) {
|
||||
return readFileSync(join(ROOT, rel), 'utf8')
|
||||
}
|
||||
|
||||
const VARIANT = 'src/pages/brand/components/BrandVariantTab.vue'
|
||||
const PRICE_TRACK = 'src/pages/brand/components/BrandPriceTrackTab.vue'
|
||||
const PRODUCT_RISK = 'src/pages/brand/components/BrandProductRiskTab.vue'
|
||||
|
||||
async function noWait(ms: number) {
|
||||
void ms
|
||||
}
|
||||
|
||||
test('桥未就绪的那几次必须重试回来,不能一次撞空就放弃', async () => {
|
||||
const seen: string[] = []
|
||||
const result = await runBridgeListFirstLoad(async () => {
|
||||
// 前两轮正撞进程替换窗口(降级桥),第三轮桥就绪
|
||||
seen.push(seen.length < 2 ? 'bridge' : 'ok')
|
||||
return seen.length <= 2 ? 'bridge' : 'ok'
|
||||
}, { sleep: noWait })
|
||||
assert.equal(result.attempts, 3, `桥起来后应在第 3 轮恢复,实际跑了 ${result.attempts} 轮`)
|
||||
assert.equal(result.attempt, 'ok')
|
||||
assert.equal(result.cancelled, false)
|
||||
})
|
||||
|
||||
test('一直失败就到上限为止,不许无限重试打爆桥', async () => {
|
||||
let calls = 0
|
||||
const result = await runBridgeListFirstLoad(async () => {
|
||||
calls += 1
|
||||
return 'failed'
|
||||
}, { sleep: noWait })
|
||||
assert.equal(calls, BRIDGE_LIST_FIRST_LOAD_MAX_ATTEMPTS)
|
||||
assert.equal(result.attempts, BRIDGE_LIST_FIRST_LOAD_MAX_ATTEMPTS)
|
||||
assert.equal(result.attempt, 'failed')
|
||||
})
|
||||
|
||||
test('组件卸载即停链,且不把「已取消」说成「取不到」', async () => {
|
||||
let calls = 0
|
||||
const result = await runBridgeListFirstLoad(async () => {
|
||||
calls += 1
|
||||
return 'bridge'
|
||||
}, { sleep: noWait, isCancelled: () => calls > 0 })
|
||||
assert.equal(calls, 1, '卸载后不得再发起下一轮取回')
|
||||
assert.equal(result.cancelled, true)
|
||||
})
|
||||
|
||||
test('每一种失败都有用户可见文案,成功不许带文案', () => {
|
||||
for (const attempt of ['bridge', 'uid', 'failed'] as const) {
|
||||
assert.ok(bridgeListHint(attempt).trim(), `${attempt} 没有可见文案,会退化成「暂无任务」`)
|
||||
assert.equal(isRetryableBridgeListAttempt(attempt), true, `${attempt} 必须可重试`)
|
||||
}
|
||||
assert.equal(bridgeListHint('ok'), '')
|
||||
assert.equal(isRetryableBridgeListAttempt('ok'), false)
|
||||
})
|
||||
|
||||
test('退避曲线复用任务轮询那一套,单调且封顶不失控', () => {
|
||||
const delays = [1, 2, 3, 4, 5, 6, 7, 8].map(bridgeListRetryDelayMs)
|
||||
for (let i = 1; i < delays.length; i += 1) {
|
||||
assert.ok(delays[i] >= delays[i - 1], `第 ${i + 1} 轮退避比上一轮短:${delays}`)
|
||||
assert.ok(delays[i] <= 10_000, `退避超过 10s:${delays}`)
|
||||
}
|
||||
})
|
||||
|
||||
test('变体采集页不再把「桥没起来」画成「暂无任务」', () => {
|
||||
const source = sourceOf(VARIANT)
|
||||
assert.ok(source.includes('runBridgeListFirstLoad'), `${VARIANT} 没接首拉重试驱动`)
|
||||
assert.ok(source.includes('bridgeListHint'), `${VARIANT} 没把失败文案呈现给用户`)
|
||||
// 三条无出口 return:撞上了既不重试也不告诉用户,就是这个 bug 的本体
|
||||
assert.ok(!/if \(!bridge\?\.vc_list_tasks\) return/.test(source),
|
||||
'桥未就绪仍被静默 return,重载后列表会永久空')
|
||||
assert.ok(!/if \(!uid\(\)\) return/.test(source),
|
||||
'登录态缺失仍被静默 return')
|
||||
assert.match(source, /async function bootstrapListLoad\(\)[\s\S]*?runBridgeListFirstLoad\(\(\) => loadTasks\(1\)/,
|
||||
'首拉必须走重试驱动,而不是裸发一次')
|
||||
assert.match(source, /onMounted\(\(\) => \{[\s\S]*?void bootstrapListLoad\(\)/,
|
||||
'onMounted 必须起这条重试链')
|
||||
})
|
||||
|
||||
test('history 拉取失败不得清空列表、更不得据此删本地轮询 id', () => {
|
||||
for (const [rel, name] of [[PRICE_TRACK, '跟价'], [PRODUCT_RISK, '商品风险']] as const) {
|
||||
const source = sourceOf(rel)
|
||||
const loadHistory = source.match(/async function loadHistory\(\)[\s\S]*?\n\}/)
|
||||
assert.ok(loadHistory, `${name}:找不到 loadHistory,接线断言失去对象`)
|
||||
assert.ok(!/historyItems\.value = \[\]/.test(loadHistory[0]),
|
||||
`${name}:拉取失败把列表清空,随后的结算会把在跑的任务判成「已不存在」并删掉本地 id`)
|
||||
const sync = source.match(/function syncPollingIdsWithHistory\(\)[\s\S]*?\n\}/)
|
||||
assert.ok(sync, `${name}:找不到 syncPollingIdsWithHistory,接线断言失去对象`)
|
||||
assert.match(sync[0], /historyLoad(Ok|Failed)/,
|
||||
`${name}:结算必须先确认本轮 history 真拉成功,否则一次抖动就会删光本地轮询 id 与快照`)
|
||||
}
|
||||
})
|
||||
@@ -39,7 +39,13 @@ const BASELINE = {
|
||||
// 拆分是为了 SFC 顶到可读棘轮的 800 行上限(1439 行 > 台账点名的 1318),不是冲静默来的:
|
||||
// 铃铛那两处"有意静默降级"(轮询失败不亮红点、列表失败在面板内给文案)整块搬进了新文件,
|
||||
// 逐文件台账跟着实况走——组件 3→0、新记 useNotificationBellPanel.ts=2,总数还比基线少 1。
|
||||
silent: 83,
|
||||
// 81 = 本轮(更新客户端把在跑的任务列表抹空)修变体采集页时实扫的总数。
|
||||
// 两处各减 1 的来源不同,分开记:
|
||||
// ① BrandVariantTab.vue 的 loadTasks 把「桥未注入/无 uid/请求失败」四条无出口 return 与
|
||||
// 那句空 catch 换成可见状态 + 首拉重试,静默 2→1(台账跟着改);
|
||||
// ② 基线此前停在 83,而改动前实扫是 82——上一轮减下去没缩台账,本轮一并拉平到实扫值。
|
||||
// blocks 一格没动:本轮没有新增 try/catch,只是给既有 catch 补了出口。
|
||||
silent: 81,
|
||||
/** 逐文件台账:只钉总数与文件数两个标量的棘轮,会被「A 加一条 + B 减一条」整段绕过。 */
|
||||
perFile: {
|
||||
'src/pages/brand/components/BrandCollectDataTab.vue': 4,
|
||||
@@ -53,7 +59,7 @@ const BASELINE = {
|
||||
'src/pages/brand/components/BrandShopMatchTab.vue': 1,
|
||||
'src/pages/brand/components/BrandSimilarAsinTab.vue': 1,
|
||||
'src/pages/brand/components/BrandSplitTab.vue': 1,
|
||||
'src/pages/brand/components/BrandVariantTab.vue': 2,
|
||||
'src/pages/brand/components/BrandVariantTab.vue': 1,
|
||||
'src/pages/home/DesktopHomePage.vue': 1,
|
||||
'src/pages/image-video/components/DeliveryVideoWorkspace.vue': 1,
|
||||
'src/pages/login/DesktopLoginPage.vue': 12,
|
||||
|
||||
Reference in New Issue
Block a user