Files
live-hub-py/web/frontend
yml da85373884 修复(账号自动化): 租约 CK 续期不再冒充「首次登录」,补齐等待预算
排查「首次登录都关掉了为什么还在一直登录」时发现:

- 真正在跑登录的是 lease_ck_refresh(租约 CK 续期,每 600 秒一轮),
  account_onboarding 确实已关;两者都显示成「自动化·首次登录」,所以很难分辨
- 根因是分类逻辑:trigger_source=automation 一律落 onboarding。但租约续期的
  账号本来就有 CK,只是租约到期前提前续一次,不是首次登录
- 这批租约账号全部「等待验证码超时」失败,因为生产跑的还是旧镜像(60 秒
  等待窗口),而且 lease_ck_refresh 的单账号总时长硬编码 240 秒,连新的
  900 秒等待窗口都会被掐断

改动:

- 新增 lease_refresh 分类:页面显示「自动化·租约CK续期」,日预算归到普通
  重登(不再占用「首次登录」的 150/天额度)
- lease_ck_refresh 单账号总时长 240 → 1800 秒,覆盖实测 8~13 分钟的投递延迟
- 登录预算建议的成功率样本纳入 lease_refresh

验证:1728 passed / 6 skipped,前端 tsc -b 通过,pyright 生产代码 0 错误
2026-11-25 20:04:59 +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
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...
    },
  },
])