Repository navigation
fix(web): show queued memory extraction tasks as pending instead of failed - #18297
Conversation
…ailed Memory extraction tasks that are created but not yet picked up have progress = 0 and no progress_msg. getTaskStatus mapped any progress <= 0 to RunningStatus.FAIL, so these queued tasks were rendered as Failed and their process-log popup was empty. Map progress < 0 (set by the extractor on real failures, together with an error message) to FAIL and progress == 0 to UNSTART, rendering a neutral dot and a Pending status label.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe memory message table now maps negative progress to ChangesTask status display
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The change makes queued memory extraction tasks display as Pending instead of Failed without altering genuine failure handling, and no actionable merge-blocking risk remains beyond normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
wangq8
left a comment
There was a problem hiding this comment.
LGTM. The root cause and mapping change are correct: queued tasks are created with progress = 0 and no progress_msg, so progress <= 0 \u2192 FAIL was wrong. Genuine failures are written with progress = -1 plus an error message, so splitting on progress < 0 \u2192 FAIL / progress == 0 \u2192 UNSTART is right. RunningStatus.UNSTART and RunningStatusMap[UNSTART] = 'Pending' already exist, so the log popup now correctly shows Pending instead of Failed.
One minor, non-blocking nit: the new dot color uses bg-text-secondary while the other three states use the semantic bg-state-* palette (bg-state-success/error/warning). If a neutral/pending token exists in that palette it'd be more consistent — cosmetic only.
Problem
In the Memory → Messages page, memory extraction tasks that are stuck in the queue show a Failed status in the Action column, and clicking the status dot opens an empty process-log popup.
Root cause
Queued extraction tasks are created with
progress = 0and noprogress_msg.getTaskStatusinweb/src/pages/memory/memory-message/message-table.tsxmapped anyprogress <= 0toRunningStatus.FAIL, so queued tasks were rendered as Failed. Since there is no progress message yet, the log popup has nothing to show.Genuine failures are written by the extractor with
progress = -1together with an error message (internal/service/memory_extractor.go), so they always have details in the popup.Fix
progress < 0→RunningStatus.FAIL(real failures, with error message)progress == 0→RunningStatus.UNSTART(queued, renders a neutral dot and a Pending label from the existingRunningStatusMap)Verification
Verified locally against a memory with queued extraction tasks: the Action column now shows a neutral status dot, and clicking it shows Status: Pending instead of Failed.
Type of change