File tree Expand file tree Collapse file tree 7 files changed +46
-29
lines changed
message-editor/components Expand file tree Collapse file tree 7 files changed +46
-29
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,12 @@ describe("AgentService", () => {
356356 service . recordActivity ( "run-1" ) ;
357357 const secondDeadline = getIdleTimeouts ( service ) . get ( "run-1" ) ?. deadline ;
358358
359- expect ( secondDeadline ) . toBeGreaterThan ( firstDeadline ! ) ;
359+ expect ( firstDeadline ) . toBeDefined ( ) ;
360+ expect ( secondDeadline ) . toBeDefined ( ) ;
361+ if ( firstDeadline === undefined || secondDeadline === undefined ) {
362+ throw new Error ( "expected idle deadlines" ) ;
363+ }
364+ expect ( secondDeadline ) . toBeGreaterThan ( firstDeadline ) ;
360365 } ) ;
361366
362367 it ( "kills idle session after timeout expires" , ( ) => {
Original file line number Diff line number Diff line change @@ -136,11 +136,13 @@ function seedWorktreeWorkspace(
136136 repositoryId : overrides . repositoryId ?? "repo-1" ,
137137 mode : overrides . mode ?? "worktree" ,
138138 } ) ;
139- const stored = mocks . workspaceRepo . _workspaces . get ( ws . id ) ! ;
139+ const stored = mocks . workspaceRepo . _workspaces . get ( ws . id ) ;
140+ if ( ! stored ) throw new Error ( "expected workspace in test map" ) ;
140141 if ( overrides . lastActivityAt !== undefined )
141142 stored . lastActivityAt = overrides . lastActivityAt ;
142143 if ( overrides . createdAt !== undefined ) stored . createdAt = overrides . createdAt ;
143- const resolved = mocks . workspaceRepo . findById ( ws . id ) ! ;
144+ const resolved = mocks . workspaceRepo . findById ( ws . id ) ;
145+ if ( ! resolved ) throw new Error ( "expected workspace after create" ) ;
144146 mocks . worktreeRepo . create ( {
145147 workspaceId : resolved . id ,
146148 name : `wt-${ resolved . taskId } ` ,
Original file line number Diff line number Diff line change @@ -321,6 +321,12 @@ export class SuspensionService extends TypedEventEmitter<SuspensionServiceEvents
321321
322322 if ( isWorktreeMode ) {
323323 const worktreePath = worktree . path ;
324+ const checkpointId = suspendedTask . checkpointId ;
325+ if ( ! checkpointId ) {
326+ throw new Error (
327+ "Internal error: worktree suspend requires checkpoint id" ,
328+ ) ;
329+ }
324330
325331 const branch = await this . getCurrentBranchName ( worktreePath ) ;
326332 if ( branch && branch !== "HEAD" ) suspendedTask . branchName = branch ;
@@ -330,12 +336,12 @@ export class SuspensionService extends TypedEventEmitter<SuspensionServiceEvents
330336 await this . captureWorktreeCheckpoint (
331337 folderPath ,
332338 worktreePath ,
333- suspendedTask . checkpointId ! ,
339+ checkpointId ,
334340 ) ;
335341 } ,
336342 async ( ) => {
337343 const git = createGitClient ( folderPath ) ;
338- await deleteCheckpoint ( git , suspendedTask . checkpointId ! ) ;
344+ await deleteCheckpoint ( git , checkpointId ) ;
339345 } ,
340346 ) ;
341347
@@ -380,13 +386,14 @@ export class SuspensionService extends TypedEventEmitter<SuspensionServiceEvents
380386 workspace . mode === "worktree" &&
381387 suspension . checkpointId
382388 ) {
389+ const restoreCheckpointId = suspension . checkpointId ;
383390 await step (
384391 async ( ) => {
385392 restoredWorktreeName = await this . restoreWorktreeFromCheckpoint (
386393 folderPath ,
387394 workspace ,
388395 suspension . branchName ,
389- suspension . checkpointId ! ,
396+ restoreCheckpointId ,
390397 recreateBranch ,
391398 ) ;
392399 } ,
Original file line number Diff line number Diff line change @@ -449,7 +449,9 @@ export function InboxSignalsTab() {
449449 variant = "detail"
450450 />
451451 < Flex align = "center" gap = "2" wrap = "wrap" >
452- < SignalReportPriorityBadge priority = { selectedReport . priority } />
452+ < SignalReportPriorityBadge
453+ priority = { selectedReport . priority }
454+ />
453455 < Badge variant = "soft" color = "gray" size = "1" >
454456 { selectedReport . signal_count } occurrences
455457 </ Badge >
Original file line number Diff line number Diff line change @@ -101,25 +101,26 @@ export function ReportCard({
101101 { report . title ?? "Untitled signal" }
102102 </ Text >
103103 < Flex align = "center" gapX = "2" wrap = "wrap" >
104- < span
105- className = "shrink-0 rounded-sm px-1 py-px font-mono text-[9px] uppercase tracking-wider"
106- style = { {
107- color : accent ,
108- backgroundColor : isReady ? "var(--green-3)" : "var(--gray-3)" ,
109- border : `1px solid ${ isReady ? "var(--green-6)" : "var(--gray-6)" } ` ,
110- } }
111- >
112- { statusLabel }
113- </ span >
114- < SignalReportPriorityBadge priority = { report . priority } />
104+ < span
105+ className = "shrink-0 rounded-sm px-1 py-px font-mono text-[9px] uppercase tracking-wider"
106+ style = { {
107+ color : accent ,
108+ backgroundColor : isReady ? "var(--green-3)" : "var(--gray-3)" ,
109+ border : `1px solid ${ isReady ? "var(--green-6)" : "var(--gray-6)" } ` ,
110+ } }
111+ >
112+ { statusLabel }
113+ </ span >
114+ < SignalReportPriorityBadge priority = { report . priority } />
115+ </ Flex >
116+ < div style = { { opacity : isReady ? 1 : 0.82 } } >
117+ < SignalReportSummaryMarkdown
118+ content = { report . summary }
119+ fallback = "No summary yet — still collecting context."
120+ variant = "list"
121+ />
122+ </ div >
115123 </ Flex >
116- < div style = { { opacity : isReady ? 1 : 0.82 } } >
117- < SignalReportSummaryMarkdown
118- content = { report . summary }
119- fallback = "No summary yet — still collecting context."
120- variant = "list"
121- />
122- </ div > </ Flex >
123124 </ Flex >
124125 < Flex direction = "column" align = "end" gap = "1" className = "shrink-0" >
125126 < Text size = "1" color = "gray" className = "font-mono text-[11px]" >
Original file line number Diff line number Diff line change @@ -145,11 +145,11 @@ export function AttachmentMenu({
145145 issueButton
146146 ) }
147147 </ div >
148- ) : (
148+ ) : repoPath ? (
149149 < div className = "issue-picker" >
150- < IssuePicker repoPath = { repoPath ! } onSelect = { handleIssueSelect } />
150+ < IssuePicker repoPath = { repoPath } onSelect = { handleIssueSelect } />
151151 </ div >
152- ) }
152+ ) : null }
153153 </ Popover . Content >
154154 </ Popover . Root >
155155 </ >
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ export function buildPermissionToolMetadata(
136136 permission ?: PermissionRequest ,
137137 selectedOptionId ?: string ,
138138 customInput ?: string ,
139- ) : Record < string , any > {
139+ ) : Record < string , unknown > {
140140 const selectedOption = permission ?. options ?. find (
141141 ( o ) => o . optionId === selectedOptionId ,
142142 ) ;
You can’t perform that action at this time.
0 commit comments