Repository navigation
fix(prompts): refresh all prompts after tracking fanout query - #357
Conversation
There was a problem hiding this comment.
Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.
In the meantime, two things that make review faster:
- A short description of why the change matters, not just what it does — most of our PRs link a
Fixes #...to the issue that explains the why. - A quick local test note if there's anything worth eyeballing in the browser.
If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.
gkhngyk
left a comment
There was a problem hiding this comment.
Nice — this is exactly the right fix for #345 (the onTracked → loadData wiring, and the parent passing loadData). 🙌
One thing before it can merge: PR #355 (the "High frequency" pagination) landed in _fanout-tab.tsx after you branched, so this now conflicts with main (GitHub shows it as not mergeable). Please rebase onto the latest main and resolve _fanout-tab.tsx, keeping both the new pagination code and your onTracked wiring — in handleTrack that means keeping setPage(1) and adding await onTracked?.() after await load().
Once it's rebased and green I'll re-review. Thanks!
b8785a9 to
ee15a75
Compare
|
Thanks! I've rebased onto the latest main, resolved the conflict, and kept both the pagination change (setPage(1)) and the onTracked refresh callback as requested. The branch has been force-pushed and is ready for another look. |
gkhngyk
left a comment
There was a problem hiding this comment.
Thanks for the rebase — the conflict's resolved cleanly (handleTrack keeps both setPage(1) from the pagination work and the new await onTracked?.()), it's mergeable, and Prettier's happy. The All Prompts list now refreshes right after tracking a fan-out sub-query. LGTM! 🎉
Summary
Refresh the parent Prompts page after successfully tracking a Query Fan-out sub-query.
This PR adds an optional
onTrackedcallback toQueryFanoutTaband invokes it after a successfultrackFanoutQueryoperation. The parentPromptspage passes its existingloadDatafunction as the callback, ensuring the All Prompts list and related metrics are refreshed immediately without requiring a manual page reload.Related issue
Closes #345
Type of change
fix— Bug fixfeat— New featurechore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsChecklist
feature/,fix/,chore/,docs/)yarn lintpasses (run fromweb/) (warnings only, no errors)yarn typecheckpasses (requires project environment setup)yarn format:checkpasses (run fromweb/)