ref(seer): Filter LLM context to widget-builder on builder routes#113623
Merged
Mihir-Mavalankar merged 2 commits intoApr 22, 2026
Merged
Conversation
Mihir-Mavalankar
marked this pull request as ready for review
April 21, 2026 23:38
When the widget builder is open, both the dashboard and widget-builder register as root-level LLM context nodes. The full dashboard tree is noise on widget builder pages. Filter the snapshot to only include widget-builder nodes on widget builder routes so the Seer agent receives only the relevant context. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Include dashboardTitle, dashboardWidgetCount, and dashboardFilters in the widget-builder's useLLMContext data so the node is self-contained when the snapshot is filtered on widget builder routes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mihir-Mavalankar
force-pushed
the
mihir-mavalankar/ref/filter-llm-context-widget-builder-routes
branch
from
April 22, 2026 16:43
6a38dbe to
179753c
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 179753c. Configure here.
gggritso
approved these changes
Apr 22, 2026
Comment on lines
-400
to
+413
| screenshot = JSON.stringify(getLLMContext()); | ||
| let snapshot = getLLMContext(); | ||
| if (WIDGET_BUILDER_ROUTES.has(getPageReferrer())) { | ||
| snapshot = { | ||
| ...snapshot, | ||
| nodes: snapshot.nodes.filter(n => n.nodeType === 'widget-builder'), | ||
| }; | ||
| } | ||
| screenshot = JSON.stringify(snapshot); |
Member
There was a problem hiding this comment.
It might make sense to have a mechanism to figure out node priority based on the node's properties (e.g., a priority property, or something similar) rather than using routes, but this makes sense in a pinch 👍
Contributor
Author
There was a problem hiding this comment.
Yeah it's a bit hacky for sure. I'll think on this a bit and come back to it with some priority based system.
Mihir-Mavalankar
deleted the
mihir-mavalankar/ref/filter-llm-context-widget-builder-routes
branch
April 22, 2026 18:15
3 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Uh oh!
There was an error while loading. Please reload this page.