Skip to content

fix(prompts): refresh all prompts after tracking fanout query - #357

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
AyushSrivastava1818:fix/query-fanout-refresh
Jul 7, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
AyushSrivastava1818:fix/query-fanout-refresh

Conversation

@AyushSrivastava1818

Copy link
Copy Markdown
Contributor

Summary

Refresh the parent Prompts page after successfully tracking a Query Fan-out sub-query.

This PR adds an optional onTracked callback to QueryFanoutTab and invokes it after a successful trackFanoutQuery operation. The parent Prompts page passes its existing loadData function 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 fix
  • feat — New feature
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/)
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/) (warnings only, no errors)
  • yarn typecheck passes (requires project environment setup)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@AyushSrivastava1818
AyushSrivastava1818 force-pushed the fix/query-fanout-refresh branch from b8785a9 to ee15a75 Compare July 7, 2026 08:04
@AyushSrivastava1818

Copy link
Copy Markdown
Contributor Author

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 gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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! 🎉

@gkhngyk
gkhngyk merged commit b512dc3 into ansvisor:main Jul 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(prompts): tracking a Query Fan-out sub-query doesn't refresh the All Prompts list

2 participants