feat(rvw): harden json parsing and finalize 0316 rollout

Stabilize RVW editorial and methodology JSON parsing in production with layered repair and fallback handling, then publish the paired frontend task-level language selector updates. Also reset deployment checklist, record the 0316 deployment summary, and refresh the SAE runtime status with latest backend/frontend IPs.

Made-with: Cursor
This commit is contained in:
2026-03-16 00:24:33 +08:00
parent 707f783229
commit c3554fd61d
17 changed files with 704 additions and 239 deletions

View File

@@ -1,20 +1,35 @@
/**
* 智能体选择弹窗
*/
import { useState } from 'react';
import { useEffect, useState } from 'react';
import { PlayCircle, X } from 'lucide-react';
import type { AgentType } from '../types';
import type { AgentType, EditorialBaseStandard } from '../types';
interface AgentModalProps {
visible: boolean;
taskCount: number;
onClose: () => void;
onConfirm: (agents: AgentType[]) => void;
onConfirm: (agents: AgentType[], editorialBaseStandard?: EditorialBaseStandard) => void;
defaultEditorialBaseStandard?: EditorialBaseStandard;
isSubmitting?: boolean; // 🔒 防止重复提交
}
export default function AgentModal({ visible, taskCount, onClose, onConfirm, isSubmitting = false }: AgentModalProps) {
export default function AgentModal({
visible,
taskCount,
onClose,
onConfirm,
defaultEditorialBaseStandard = 'zh',
isSubmitting = false,
}: AgentModalProps) {
const [selectedAgents, setSelectedAgents] = useState<AgentType[]>(['editorial']);
const [editorialBaseStandard, setEditorialBaseStandard] = useState<EditorialBaseStandard>(defaultEditorialBaseStandard);
useEffect(() => {
if (!visible) return;
setSelectedAgents(['editorial']);
setEditorialBaseStandard(defaultEditorialBaseStandard);
}, [visible, defaultEditorialBaseStandard]);
const toggleAgent = (agent: AgentType) => {
if (selectedAgents.includes(agent)) {
@@ -29,14 +44,17 @@ export default function AgentModal({ visible, taskCount, onClose, onConfirm, isS
const handleConfirm = () => {
// 只调用onConfirm让调用方控制关闭时机
onConfirm(selectedAgents);
onConfirm(
selectedAgents,
selectedAgents.includes('editorial') ? editorialBaseStandard : undefined
);
};
if (!visible) return null;
return (
<div className="fixed inset-0 bg-slate-900/50 z-50 flex items-center justify-center backdrop-blur-sm">
<div className="bg-white rounded-2xl shadow-2xl w-[400px] overflow-hidden transform transition-all scale-100 fade-in">
<div className="bg-white rounded-2xl shadow-2xl w-[560px] max-w-[92vw] overflow-hidden transform transition-all scale-100 fade-in">
{/* 头部 */}
<div className="bg-slate-900 p-5 text-white flex items-center justify-between">
<h3 className="font-bold text-lg flex items-center gap-2">
@@ -76,6 +94,34 @@ export default function AgentModal({ visible, taskCount, onClose, onConfirm, isS
</div>
<span className="tag tag-blue"></span>
</label>
{selectedAgents.includes('editorial') && (
<div className="rounded-xl border border-sky-200 bg-sky-50 p-4 mt-2">
<div className="text-sm font-bold text-slate-800 mb-2">稿线</div>
<div className="flex items-center gap-8">
<label className="flex items-center gap-2 text-sm text-slate-700 cursor-pointer">
<input
type="radio"
name="editorialBaseStandard"
checked={editorialBaseStandard === 'zh'}
onChange={() => setEditorialBaseStandard('zh')}
className="w-4 h-4 text-indigo-600 border-gray-300 focus:ring-indigo-500"
/>
</label>
<label className="flex items-center gap-2 text-sm text-slate-700 cursor-pointer">
<input
type="radio"
name="editorialBaseStandard"
checked={editorialBaseStandard === 'en'}
onChange={() => setEditorialBaseStandard('en')}
className="w-4 h-4 text-indigo-600 border-gray-300 focus:ring-indigo-500"
/>
</label>
</div>
</div>
)}
{/* 方法学智能体 */}
<label
@@ -122,6 +168,7 @@ export default function AgentModal({ visible, taskCount, onClose, onConfirm, isS
</div>
<span className="tag tag-pink"></span>
</label>
</div>
{/* 底部按钮 */}