File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export async function GET(request: NextRequest) {
3535 dlq : state . dlq ,
3636 candidates : state . candidates ,
3737 suppression : state . suppression ,
38+ lastTickSuppressedCount : state . lastTickSuppressedCount ,
3839 } ) ;
3940 } catch ( error ) {
4041 const message = error instanceof Error ? error . message : 'Unknown error' ;
Original file line number Diff line number Diff line change @@ -274,6 +274,7 @@ interface GoalManagerStatusData {
274274 reasonCode : string ;
275275 timestamp : string ;
276276 } > ;
277+ lastTickSuppressedCount ?: number ;
277278}
278279
279280interface RuntimeAutonomyPolicyData {
@@ -1700,7 +1701,7 @@ export default function Dashboard() {
17001701 </ p >
17011702 < div className = "flex items-center gap-2 text-[10px]" >
17021703 < span className = "bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded font-bold" >
1703- suppression { goalManager ?. suppression ?. length || 0 }
1704+ suppression { goalManager ?. lastTickSuppressedCount ?? 0 }
17041705 </ span >
17051706 < span className = "bg-red-100 text-red-700 px-1.5 py-0.5 rounded font-bold" >
17061707 dlq { goalManager ?. dlq ?. length || 0 }
@@ -1882,8 +1883,8 @@ export default function Dashboard() {
18821883 </ button >
18831884 </ div >
18841885
1885- < p className = "mt-2 text-[10px] text-gray-500" >
1886- planId: < span className = "font-mono text-gray-700" > { shortId ( autonomousPlanId , 14 ) } </ span > · operationId: < span className = "font-mono text-gray-700" > { shortId ( autonomousOperationId , 14 ) } </ span >
1886+ < p className = "mt-2 text-[10px] text-gray-500 break-all " >
1887+ planId: < span className = "font-mono text-gray-700" > { autonomousPlanId || '-' } </ span > · operationId: < span className = "font-mono text-gray-700" > { autonomousOperationId || '-' } </ span >
18871888 </ p >
18881889 { autonomousPlanSteps && autonomousPlanSteps . length > 0 && (
18891890 < div className = "mt-2 border border-gray-200 rounded-lg overflow-hidden" >
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ import type { GoalDlqItem } from '@/types/goal-orchestrator';
2424const DEFAULT_CANDIDATE_LIMIT = 6 ;
2525const DEFAULT_QUEUE_LIMIT = 100 ;
2626
27+ /** Suppressed candidate count from the most recent tick (resets on process restart) */
28+ let _lastTickSuppressedCount = 0 ;
29+
2730export interface GoalManagerConfig {
2831 enabled : boolean ;
2932 dispatchEnabled : boolean ;
@@ -179,6 +182,7 @@ export async function tickGoalManager(now: number = Date.now()): Promise<GoalMan
179182 } ) ;
180183 }
181184
185+ _lastTickSuppressedCount = prioritized . suppressed . length ;
182186 await Promise . all ( prioritized . queued . map ( ( item ) => store . upsertAutonomousGoalQueueItem ( item ) ) ) ;
183187 await persistSuppressionRecords ( prioritized . suppressed ) ;
184188
@@ -204,6 +208,7 @@ export async function listGoalManagerState(limit: number = 50): Promise<{
204208 candidates : AutonomousGoalCandidate [ ] ;
205209 suppression : GoalSuppressionRecord [ ] ;
206210 dlq : GoalDlqItem [ ] ;
211+ lastTickSuppressedCount : number ;
207212} > {
208213 const safeLimit = Math . min ( Math . max ( limit , 1 ) , 500 ) ;
209214 const store = getStore ( ) ;
@@ -221,6 +226,7 @@ export async function listGoalManagerState(limit: number = 50): Promise<{
221226 candidates,
222227 suppression,
223228 dlq,
229+ lastTickSuppressedCount : _lastTickSuppressedCount ,
224230 } ;
225231}
226232
You can’t perform that action at this time.
0 commit comments