feat: add page-aware Flow chat context - #98
Open
Maurice-aXeTech wants to merge 3 commits into
Open
Conversation
Contributor
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (3): Last reviewed commit: "fix: skip dynamic links in page context" | Re-trigger Greptile |
Maurice-aXeTech
marked this pull request as draft
August 16, 2026 21:46
Author
|
Added a Frappe v16 compatibility fix in Flow now uses Regression coverage asserts that the Link-only helper is called and the broad helper is not. The updated fork release is tagged |
Maurice-aXeTech
marked this pull request as ready for review
August 16, 2026 22:09
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
Flow Run, revalidate permissions on resume, and keep context out of the system promptupdate_memorywritesContext behavior
Page context is opt-in and one-shot. When a conversation is open and the user navigates to another document, Flow offers to attach that document's context to the next message. It is never sent automatically, and an armed context is cancelled when the active page changes.
Frappe v16 compatibility fix
Frappe's broad
get_references_across_doctypes()helper also scans Dynamic Link fields. On Frappe v16.25.0 this can attempt to iterate aNonequery result from the virtual Permission Inspector DocType and fail document/list context with:Flow already excludes Dynamic Links and child-table relation paths. The PR now calls
get_references_across_doctypes_by_link_field()directly, so only ordinaryLinkrelationships are discovered. Metadata, permissions, permitted fields, target options, deduplication, and relation limits remain revalidated by Flow.Security and limits
Validation
ruff checkand formatting checks passgit diff --checkpassrelated_projectrelationships