@@ -17,6 +17,14 @@ import type { AgentMemoryReviewAction } from "@/lib/types";
1717export const dynamic = "force-dynamic" ;
1818
1919const STATUSES = [ "pending" , "evidence_only" , "confirmed" , "rejected" , "stale" ] as const ;
20+ const STATUS_LABELS : Record < string , string > = {
21+ pending : "Pending" ,
22+ evidence_only : "Evidence" ,
23+ confirmed : "Confirmed" ,
24+ rejected : "Rejected" ,
25+ stale : "Stale" ,
26+ all : "All" ,
27+ } ;
2028
2129export default async function AgentMemoryPage ( {
2230 searchParams,
@@ -66,71 +74,61 @@ export default async function AgentMemoryPage({
6674 }
6775
6876 return (
69- < div className = "space-y-6" >
70- < div className = "flex flex-col gap-4 md:flex-row md:items-start md:justify-between" >
71- < div >
72- < h1 className = "text-2xl font-semibold mb-1" > Agent Memory</ h1 >
73- < p className = "text-text-secondary text-sm" >
74- Review what agents saved before it becomes reusable context.
75- </ p >
76- </ div >
77- < Link
78- href = "/agent-memory/traces"
79- className = "inline-flex items-center justify-center rounded-lg border border-border bg-bg-elevated px-3 py-2 text-sm text-text-secondary hover:bg-bg-hover hover:text-text-primary transition-colors"
80- >
81- Recall traces
82- </ Link >
83- </ div >
84-
85- < div className = "flex flex-wrap items-center gap-2" >
86- { STATUSES . map ( ( item ) => (
77+ < div className = "space-y-4" >
78+ < div className = "flex flex-col gap-3 md:flex-row md:items-center md:justify-between" >
79+ < div className = "flex flex-wrap items-center gap-2" >
80+ { STATUSES . map ( ( item ) => (
81+ < Link
82+ key = { item }
83+ href = { statusUrl ( item ) }
84+ className = { `border px-3 py-1.5 text-sm transition-colors ${
85+ status === item
86+ ? "border-violet/30 bg-violet-surface text-violet"
87+ : "border-border bg-bg-surface text-text-secondary hover:bg-bg-hover hover:text-text-primary"
88+ } `}
89+ >
90+ { STATUS_LABELS [ item ] }
91+ </ Link >
92+ ) ) }
8793 < Link
88- key = { item }
89- href = { statusUrl ( item ) }
90- className = { `rounded-lg border px-3 py-1.5 text-sm transition-colors ${
91- status === item
94+ href = { statusUrl ( "all" ) }
95+ className = { `border px-3 py-1.5 text-sm transition-colors ${
96+ status === "all"
9297 ? "border-violet/30 bg-violet-surface text-violet"
93- : "border-border bg-bg-surface text-text-secondary hover:bg-bg-hover"
98+ : "border-border bg-bg-surface text-text-secondary hover:bg-bg-hover hover:text-text-primary "
9499 } `}
95100 >
96- { item }
101+ All
97102 </ Link >
98- ) ) }
103+ </ div >
104+
105+ < div className = "flex flex-wrap items-center gap-3" >
106+ < p className = "font-mono text-xs text-text-muted" >
107+ { workspaceId }
108+ < span className = "mx-2 text-text-muted/60" > /</ span >
109+ { projectId || "all-projects" }
110+ </ p >
99111 < Link
100- href = { statusUrl ( "all" ) }
101- className = { `rounded-lg border px-3 py-1.5 text-sm transition-colors ${
102- status === "all"
103- ? "border-violet/30 bg-violet-surface text-violet"
104- : "border-border bg-bg-surface text-text-secondary hover:bg-bg-hover"
105- } `}
112+ href = "/agent-memory/traces"
113+ className = "ob1-command-button h-9 px-3 text-sm"
106114 >
107- all
115+ Recall traces
108116 </ Link >
109- </ div >
110-
111- < div className = "grid gap-3 text-xs text-text-muted md:grid-cols-3" >
112- < div className = "rounded-lg border border-border bg-bg-surface p-3" >
113- Workspace < span className = "font-mono text-text-secondary" > { workspaceId } </ span >
114- </ div >
115- < div className = "rounded-lg border border-border bg-bg-surface p-3" >
116- Project{ " " }
117- < span className = "font-mono text-text-secondary" >
118- { projectId || "all projects" }
119- </ span >
120- </ div >
121- < div className = "rounded-lg border border-border bg-bg-surface p-3" >
122- Showing < span className = "font-mono text-text-secondary" > { data . count } </ span > { " " }
123- memories
124117 </ div >
125118 </ div >
126119
127120 { error && < p className = "text-danger text-sm" > { error } </ p > }
128121
129- < div className = "overflow-hidden rounded-lg border border-border bg-bg-surface " >
122+ < div className = "ob1-glass-panel overflow-hidden " >
130123 < table className = "w-full text-sm" >
131124 < thead >
132125 < tr className = "border-b border-border text-xs uppercase tracking-wider text-text-muted" >
133- < th className = "px-4 py-3 text-left font-medium" > Memory</ th >
126+ < th className = "px-4 py-3 text-left font-medium" >
127+ Memories:{ " " }
128+ < span className = "font-mono tracking-normal text-text-secondary" >
129+ { data . count } /{ limit }
130+ </ span >
131+ </ th >
134132 < th className = "px-4 py-3 text-left font-medium w-48" > Trust</ th >
135133 < th className = "px-4 py-3 text-left font-medium w-44" > Policy</ th >
136134 < th className = "px-4 py-3 text-left font-medium w-40" > Created</ th >
@@ -146,7 +144,7 @@ export default async function AgentMemoryPage({
146144 </ tr >
147145 ) : (
148146 data . memories . map ( ( memory ) => (
149- < tr key = { memory . memory_id } className = "align-top hover:bg-bg-hover transition-colors " >
147+ < tr key = { memory . memory_id } className = "ob1-memory-row align-top " >
150148 < td className = "px-4 py-3" >
151149 < Link
152150 href = { `/agent-memory/${ memory . memory_id } ` }
@@ -191,21 +189,21 @@ export default async function AgentMemoryPage({
191189 < form action = { reviewAction } >
192190 < input type = "hidden" name = "memory_id" value = { memory . memory_id } />
193191 < input type = "hidden" name = "action" value = "evidence_only" />
194- < button className = "rounded border border-border px-2 py-1 text-xs text-text-secondary hover:bg-bg-hover" >
192+ < button className = "border border-border px-2 py-1 text-xs text-text-secondary hover:bg-bg-hover hover:text-text-primary " >
195193 Evidence
196194 </ button >
197195 </ form >
198196 < form action = { reviewAction } >
199197 < input type = "hidden" name = "memory_id" value = { memory . memory_id } />
200198 < input type = "hidden" name = "action" value = "confirm" />
201- < button className = "rounded border border-success/30 px-2 py-1 text-xs text-success hover:bg-success/10" >
199+ < button className = "border border-success/30 px-2 py-1 text-xs text-success hover:bg-success/10" >
202200 Confirm
203201 </ button >
204202 </ form >
205203 < form action = { reviewAction } >
206204 < input type = "hidden" name = "memory_id" value = { memory . memory_id } />
207205 < input type = "hidden" name = "action" value = "reject" />
208- < button className = "rounded border border-danger/30 px-2 py-1 text-xs text-danger hover:bg-danger/10" >
206+ < button className = "border border-danger/30 px-2 py-1 text-xs text-danger hover:bg-danger/10" >
209207 Reject
210208 </ button >
211209 </ form >
0 commit comments