fix(dashboard): real-time recipe-run feedback + clear run→inbox output trail#757
Merged
Merged
Conversation
…t trail Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
handleRunConfirmnow callsrefetchRuns()andrefetchRecipes()immediately after a successful run POST, matching the patternhandleTogglealready used forrefetchRecipes.useEffectwatches therunslist for in-flight statuses (running/queued/pending) and setsrunsIntervalMsto 3 000 ms while any are in-flight, back to 10 000 ms when idle. AprevInFlightRefgatessetRunsIntervalMsso it only fires on actual transitions — no render loop.layout.tsxrecipesintervalMsreduced from 30 000 → 10 000 ms so the pill reconciles within ~10 s after a run or toggle.inboxOutputsnow shows a subtle→ inboxlink to the delivered item. AuseEffectwithlastSeenCompletedSeqReffires a "Output delivered to inbox" toast (with "View in inbox" action) exactly once per newly-completed run that produced output — it skips existing runs on initial load.Render-loop guarantee
runsIntervalMsis updated only when in-flight presence changes, not on every render.prevInFlightRefstores the previous boolean and thesetRunsIntervalMscall is guarded byif (prevInFlightRef.current === hasInFlight) return.Test plan
running, verify the poll interval drops to ~3 s (observable via Network tab)inboxOutputsshow a subtle→ inboxlink🤖 Generated with Claude Code