Files
live-hub-py/web/frontend
yml2213 8310a9115e fix(login): 删除任务不再丢 CK —— 只删不持有 CK 的记录【数据安全】
事故:斗鱼账号的 CK **只存在 `login_tasks.cookie`**(`accounts` 表没有
cookie 列),删掉记录即永久丢失登录态。而列表显示的「状态」是最近一次尝试
(`attempt_status`),于是一条**显示「失败」但实际仍持有有效 CK** 的记录
(status=success + cookie + 上次尝试失败)会被「清空失败」当成垃圾删掉。

修复:
- 批量删除只删空 cookie 的记录,持有 CK 的一律跳过,并在响应里报告跳过数;
- 单条删除遇到持有 CK 的记录直接 409,提示先处理该账号的 CK;
- 前端确认弹窗写明「持有 CK 的记录会跳过」。

顺带修统计口径:分页后 success/failed 只统计当前页,却和「共 N 个任务」
并排显示(曾出现「共 8508,成功 48」)。改走 /tasks/summary 的全局统计。

回归测试补 5 条,专门盯「显示失败但持有 CK」这个事故场景。
2026-10-03 10:50:23 +08:00
..
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-07-05 12:25:18 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])