mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-20 04:20:38 +09:00
[codex] Add runtime lifecycle recovery and live issue visibility (#4419)
This commit is contained in:
parent
9a8d219949
commit
5a0c1979cf
121 changed files with 9625 additions and 2044 deletions
|
|
@ -382,7 +382,7 @@ function IssueDetailLoadingState({
|
|||
<div className="flex items-center gap-2 min-w-0 flex-wrap">
|
||||
{headerSeed ? (
|
||||
<>
|
||||
<StatusIcon status={headerSeed.status} />
|
||||
<StatusIcon status={headerSeed.status} blockerAttention={headerSeed.blockerAttention} />
|
||||
<PriorityIcon priority={headerSeed.priority} />
|
||||
{identifier ? (
|
||||
<span className="text-sm font-mono text-muted-foreground shrink-0">{identifier}</span>
|
||||
|
|
@ -692,6 +692,7 @@ const IssueDetailChatTab = memo(function IssueDetailChatTab({
|
|||
const commentsWithRunMeta = useMemo<IssueDetailComment[]>(() => {
|
||||
const activeRunStartedAt = runningIssueRun?.startedAt ?? runningIssueRun?.createdAt ?? null;
|
||||
const runMetaByCommentId = new Map<string, { runId: string; runAgentId: string | null; interruptedRunId: string | null }>();
|
||||
const followUpCommentIds = new Set<string>();
|
||||
const agentIdByRunId = new Map<string, string>();
|
||||
|
||||
for (const run of resolvedLinkedRuns) {
|
||||
|
|
@ -710,10 +711,22 @@ const IssueDetailChatTab = memo(function IssueDetailChatTab({
|
|||
interruptedRunId,
|
||||
});
|
||||
}
|
||||
for (const evt of resolvedActivity) {
|
||||
if (evt.action !== "issue.comment_added") continue;
|
||||
const details = evt.details ?? {};
|
||||
const commentId = typeof details["commentId"] === "string" ? details["commentId"] : null;
|
||||
if (!commentId) continue;
|
||||
if (details["followUpRequested"] === true || details["resumeIntent"] === true) {
|
||||
followUpCommentIds.add(commentId);
|
||||
}
|
||||
}
|
||||
|
||||
return comments.map((comment) => {
|
||||
const meta = runMetaByCommentId.get(comment.id);
|
||||
const nextComment: IssueDetailComment = meta ? { ...comment, ...meta } : { ...comment };
|
||||
if (followUpCommentIds.has(comment.id)) {
|
||||
nextComment.followUpRequested = true;
|
||||
}
|
||||
const queuedTargetRunId = locallyQueuedCommentRunIds.get(comment.id) ?? null;
|
||||
const locallyQueuedComment = applyLocalQueuedIssueCommentState(nextComment, {
|
||||
queuedTargetRunId,
|
||||
|
|
@ -2702,7 +2715,7 @@ export function IssueDetail() {
|
|||
const canApplyTreeControl =
|
||||
Boolean(treeControlPreview)
|
||||
&& !treeControlPreviewLoading
|
||||
&& (treeControlMode !== "cancel" || (treeControlReason.trim().length > 0 && treeControlCancelConfirmed));
|
||||
&& (treeControlMode !== "cancel" || treeControlCancelConfirmed);
|
||||
const attachmentUploadButton = (
|
||||
<>
|
||||
<input
|
||||
|
|
@ -2840,6 +2853,7 @@ export function IssueDetail() {
|
|||
<div className="flex items-center gap-2 min-w-0 flex-wrap">
|
||||
<StatusIcon
|
||||
status={issue.status}
|
||||
blockerAttention={issue.blockerAttention}
|
||||
onChange={(status) => updateIssue.mutate({ status })}
|
||||
/>
|
||||
<PriorityIcon
|
||||
|
|
@ -3448,7 +3462,7 @@ export function IssueDetail() {
|
|||
|
||||
<div className="space-y-1.5">
|
||||
<label className="text-xs text-muted-foreground">
|
||||
{treeControlMode === "cancel" ? "Reason (required)" : "Reason (optional)"}
|
||||
Reason (optional)
|
||||
</label>
|
||||
<Textarea
|
||||
value={treeControlReason}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue