Dedup fetch entries by (method, endpoint) — fixes #31#32
Merged
Conversation
Two fetch() calls to the same endpoint with different HTTP methods (e.g. GET + PATCH on /api/tenants/:id) collapsed into a single catalog entry, hiding mutations that shared a URL with an earlier read in the same file. - Add optional `method` field to ProjectDataEntry - Extract method from axios.<verb>, fetch/ofetch/$fetch options, hx-* attrs - Replace non-greedy inline-call regex with a balanced-paren walker so the options object is visible past nested encodeURIComponent(...) etc. - Include method in display_name and the binding-graph key
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
Fixes #31. Two
fetch()calls to the same endpoint with different HTTP methods (e.g. GET + PATCH on/api/tenants/:id) were silently collapsed into a single catalog entry by the data source scanner. Mutations that shared a URL with an earlier read in the same file were invisible in the Data tab and to agents.methodfield toProjectDataEntryaxios.<verb>,fetch/ofetch/$fetchoptions, andhx-*attributes; default toGETencodeURIComponent(...),JSON.stringify(...), and template expressions — that was the reasonmethod: 'PATCH'wasn't seen(method, endpoint)per file; method is also included indisplay_nameand the binding-graph key so GET + PATCH pairs stay distinct in the sidebar and overlaysTest plan
pnpm exec vitest run— 224 passed (16 files), including new regression case reproducing the issue-report snippetpnpm typecheck— clean