mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 12:37:55 +01:00
Address issue monitor review feedback
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
4fac7ef621
commit
1ee6280877
4 files changed
+66
-1
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 180 KiB |
@@ -500,6 +500,7 @@ function buildStateWithCompletedStages(input: {
|
||||
completedStageIds: input.completedStageIds,
|
||||
lastDecisionId: input.previous?.lastDecisionId ?? null,
|
||||
lastDecisionOutcome: input.previous?.lastDecisionOutcome ?? null,
|
||||
monitor: input.previous?.monitor ?? null,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -519,6 +520,7 @@ function buildSkippedStageCompletedState(input: {
|
||||
completedStageIds: input.completedStageIds,
|
||||
lastDecisionId: input.previous?.lastDecisionId ?? null,
|
||||
lastDecisionOutcome: input.previous?.lastDecisionOutcome ?? null,
|
||||
monitor: input.previous?.monitor ?? null,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ export function IssueProperties({
|
||||
updateMonitor({
|
||||
nextCheckAt: nextCheckAt.toISOString(),
|
||||
notes: monitorNotesInput.trim() || null,
|
||||
scheduledBy: issue.executionPolicy?.monitor?.scheduledBy ?? "assignee",
|
||||
scheduledBy: "board",
|
||||
kind: serviceName ? "external_service" : null,
|
||||
serviceName,
|
||||
externalRef: null,
|
||||
|
||||
@@ -56,6 +56,43 @@ const longerWaitIssue: Issue = {
|
||||
},
|
||||
};
|
||||
|
||||
const triggeredIssue: Issue = {
|
||||
...baseIssue,
|
||||
monitorNextCheckAt: null,
|
||||
monitorLastTriggeredAt: new Date(Date.now() - 3 * 60_000),
|
||||
monitorAttemptCount: 3,
|
||||
monitorNotes: "Greptile review was checked and needs another pass.",
|
||||
executionPolicy: {
|
||||
...(baseIssue.executionPolicy ?? { mode: "normal", commentRequired: true, stages: [] }),
|
||||
},
|
||||
executionState: {
|
||||
...(baseIssue.executionState ?? {
|
||||
status: "pending",
|
||||
currentStageId: null,
|
||||
currentStageIndex: null,
|
||||
currentStageType: null,
|
||||
currentParticipant: null,
|
||||
returnAssignee: null,
|
||||
reviewRequest: null,
|
||||
completedStageIds: [],
|
||||
lastDecisionId: null,
|
||||
lastDecisionOutcome: null,
|
||||
}),
|
||||
monitor: null,
|
||||
},
|
||||
};
|
||||
|
||||
const clearedIssue: Issue = {
|
||||
...baseIssue,
|
||||
monitorNextCheckAt: null,
|
||||
monitorLastTriggeredAt: null,
|
||||
monitorAttemptCount: 0,
|
||||
monitorNotes: null,
|
||||
executionPolicy: {
|
||||
...(baseIssue.executionPolicy ?? { mode: "normal", commentRequired: true, stages: [] }),
|
||||
},
|
||||
};
|
||||
|
||||
function MonitorSurfaceStories() {
|
||||
return (
|
||||
<div className="space-y-8 p-6">
|
||||
@@ -117,6 +154,32 @@ function MonitorSurfaceStories() {
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="space-y-2">
|
||||
<div className="text-xs uppercase tracking-wide text-muted-foreground">
|
||||
IssueProperties Monitor row - Triggered recently
|
||||
</div>
|
||||
<div className="rounded-lg border border-border bg-background/70 p-4">
|
||||
<IssueProperties
|
||||
issue={triggeredIssue}
|
||||
onUpdate={() => undefined}
|
||||
inline
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="space-y-2">
|
||||
<div className="text-xs uppercase tracking-wide text-muted-foreground">
|
||||
IssueProperties Monitor row - Cleared
|
||||
</div>
|
||||
<div className="rounded-lg border border-border bg-background/70 p-4">
|
||||
<IssueProperties
|
||||
issue={clearedIssue}
|
||||
onUpdate={() => undefined}
|
||||
inline
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user