Merge pull request 'refactor(web-ui): פירוק התנגשות-שם של Paperclip agent DTO + גבול-פלטפורמה מוצהר (R3, G12, #112)' (#176) from worktree-web-ui-platform-types into main
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 44s

This commit was merged in pull request #176.
This commit is contained in:
2026-06-10 09:34:11 +00:00
2 changed files with 13 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
"use client"; "use client";
import { useAgentActivity } from "@/lib/api/agents"; import { useAgentActivity } from "@/lib/api/agents";
import type { PaperclipAgent } from "@/lib/api/agents"; import type { PaperclipAgentStatus } from "@/lib/api/agents";
import { Bot } from "lucide-react"; import { Bot } from "lucide-react";
/* ── Status dot colors ───────────────────────────────────────── */ /* ── Status dot colors ───────────────────────────────────────── */
@@ -26,7 +26,7 @@ function statusDot(status: string) {
/* ── Agent row ───────────────────────────────────────────────── */ /* ── Agent row ───────────────────────────────────────────────── */
function AgentRow({ agent }: { agent: PaperclipAgent }) { function AgentRow({ agent }: { agent: PaperclipAgentStatus }) {
return ( return (
<div className="flex items-center gap-2 py-1"> <div className="flex items-center gap-2 py-1">
<span <span

View File

@@ -1,5 +1,13 @@
/** /**
* Paperclip agent activity hooks — mirror agent work into Legal-AI UI. * Paperclip agent ACTIVITY hooks — mirror live agent work into the Legal-AI UI.
*
* Frontend platform-presentation module (G12 / docs/spec/X15): the web-ui is a
* presentation layer, and showing the agent platform's live activity is a
* legitimate, declared use of platform data. Distinct from
* `paperclip-agents.ts`, which is the settings/management view of an agent's
* full config — hence the activity DTO here is `PaperclipAgentStatus`, not the
* config `PaperclipAgent` (the two are different projections; the name no
* longer collides).
*/ */
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
@@ -32,7 +40,7 @@ export type PaperclipComment = {
agent_icon: string | null; agent_icon: string | null;
}; };
export type PaperclipAgent = { export type PaperclipAgentStatus = {
id: string; id: string;
name: string; name: string;
role: string; role: string;
@@ -105,7 +113,7 @@ export type Interaction = {
export type AgentActivityResponse = { export type AgentActivityResponse = {
issues: PaperclipIssue[]; issues: PaperclipIssue[];
comments: PaperclipComment[]; comments: PaperclipComment[];
agents: PaperclipAgent[]; agents: PaperclipAgentStatus[];
interactions: Interaction[]; interactions: Interaction[];
}; };