Skip to content

refactor(web): 将风险审计拆为前置、Jev 和状态三页 - #1171

Merged
dofastted merged 1 commit into
mainfrom
refactor/risk-audit-three-pages
Nov 17, 2026
Merged

dofastted merged 1 commit into
mainfrom
refactor/risk-audit-three-pages

Conversation

@dofastted

@dofastted dofastted commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

变更

  • 前置:集中配置账号范围、蒸馏、硬正则、拒答缓存、封禁和禁用工具。
  • Jev:集中配置决策模型、评分和降级策略;复用现有分组、渠道和模型选项。
  • 状态:默认展示今日统计、拦截流水、封禁与原日志入口、独立上游 HTTP 400 和降级统计。
  • 兼容旧链接;切页保护未保存草稿。不改后端审核、封禁、路由和 API 契约。

验证

  • 前端核心测试和风险审计定向测试:8 个文件,71 项通过。
  • 本次 TS/TSX 文件 Prettier、定向 ESLint、TypeScript 和 Vite 构建通过。
  • 本地 Chromium(模拟 API)验证了状态筛选、日志与规则定位、旧链接、草稿确认、分组保存、键盘操作和 375/390px 窄屏。

Note

Low Risk
Frontend-only panel reorganization and documentation; behavior and API contracts are unchanged, with navigation compatibility and draft-leave guards added.

Overview
Replaces the old gate rail (per-stage tabs plus inline stats/settings) with three top-level tabs: 前置 (account scope, distill, hard regex, refusal/ban tooling), Jev (model config, usage, downgrade routing), and 状态 (default landing — today’s metrics, filtered hits/feeds, ban/fingerprint records, upstream 400, downgrade and pass breakdowns).

Refusal / policy UI is split by context: instant toggles and ban/tool/phrase policy on 前置; downgrade targets and margins on Jev via a section prop on RefusalSettings and RiskPolicyForm. Ban records move to 状态 as RefusalRecords. Navigation uses new riskSearch (with vitest coverage) so legacy view=distill|hard-regex|refusal links open 前置; unknown views default to 状态. Unsaved drafts are tracked per area and guarded with useBlocker when switching tabs or rules.

docs/RISK.md is updated to describe the three panel areas. gate-rail.tsx is removed; small layout/copy tweaks elsewhere (e.g. toggle grid, Jev label in feeds).

Reviewed by Cursor Bugbot for commit 4b5e961. Configure here.

@cursor

cursor Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: b6911bac-6aa3-479b-82cd-43c660aab378)

@dofastted
dofastted merged commit 488c030 into main Nov 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant