feat(architect): Complete auth pages phase decomposition
Decomposed "Authentication Pages - Login, Password Reset, Kratos Flows" phase into 7 executable tasks with clear dependencies and verification checkpoints. Task breakdown: 1. Research shadcn/radix/tailwind infrastructure and form components 2. Migrate Kratos flow components (14 files) from MUI to shadcn/radix 3. Migrate login page 4. Migrate password reset pages (forgot-password, reset-password) 5. Update error page with Tailwind styling 6. End-to-end auth flow testing (human verification checkpoint) 7. Migrate medical-portal auth flow components All tasks emphasize preserving Kratos integration logic during UI-only migration. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -245,6 +245,36 @@ export function architectProcedures(publicProcedure: ProcedureBuilder) {
|
||||
});
|
||||
}
|
||||
|
||||
// Auto-dismiss stale decompose agents for this phase
|
||||
const allAgents = await agentManager.list();
|
||||
const decomposeAgents = allAgents.filter(
|
||||
(a) => a.mode === 'decompose' && !a.userDismissedAt,
|
||||
);
|
||||
|
||||
// Look up tasks to find which phase each decompose agent targets
|
||||
const activeForPhase: typeof decomposeAgents = [];
|
||||
const staleForPhase: typeof decomposeAgents = [];
|
||||
for (const agent of decomposeAgents) {
|
||||
if (!agent.taskId) continue;
|
||||
const agentTask = await taskRepo.findById(agent.taskId);
|
||||
if (agentTask?.phaseId !== input.phaseId) continue;
|
||||
|
||||
if (['crashed', 'idle'].includes(agent.status)) {
|
||||
staleForPhase.push(agent);
|
||||
} else if (['running', 'waiting_for_input'].includes(agent.status)) {
|
||||
activeForPhase.push(agent);
|
||||
}
|
||||
}
|
||||
for (const stale of staleForPhase) {
|
||||
await agentManager.dismiss(stale.id);
|
||||
}
|
||||
if (activeForPhase.length > 0) {
|
||||
throw new TRPCError({
|
||||
code: 'CONFLICT',
|
||||
message: `A decompose agent is already running for phase "${phase.name}"`,
|
||||
});
|
||||
}
|
||||
|
||||
const decomposeTaskName = input.taskName ?? `Decompose: ${phase.name}`;
|
||||
const task = await taskRepo.create({
|
||||
phaseId: phase.id,
|
||||
|
||||
Reference in New Issue
Block a user