feat(dub): expand link coverage and fix cross-operation param leakage#5469
Conversation
- add tenantId/folderId/trackConversion support and conversions output to link tools - add cursor pagination (startingAfter/endingBefore) to list_links, logo param to get_qr_code - add list_domains, list_tags, create_tag, list_folders tools - fix block param leakage where an unset field on one operation inherited a stale value left over from another operation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview New capabilities: Four operations—List Domains, List Tags, Create Tag, and List Folders—with matching tools, block sub-blocks, outputs, and registry wiring. Link create/update/upsert/get/list flows gain Fixes: The block’s Reviewed by Cursor Bugbot for commit 86cc363. Configure here. |
Greptile SummaryThis PR expands the dub.co integration with four new tools (
Confidence Score: 5/5Safe to merge — all changed paths correctly wire block UI through the transform layer to tools, with no data integrity issues introduced. Both issues flagged in the previous review round are resolved: trackConversion is now present in the non-mutation clearing block, and the transform emits true | undefined instead of true | false, so the default 'No' selection no longer sends a false payload to Dub's PATCH endpoint. The four new tools follow the established pattern exactly, and the leakage-clearing logic correctly uses explicit undefined assignment before per-operation re-population. No new unsafe code paths were introduced. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[DubBlock UI] -->|operation selected| B{params transform}
B -->|isLinkMutation| C[Clear non-mutation fields\ndomain/key/url/linkId/search etc.]
B -->|!isLinkMutation| D[Clear mutation fields\ndomain/key/title/desc/externalId\ntagIds/tenantId/folderId/trackConversion]
C --> E{trackConversion dropdown}
E -->|'true'| F[result.trackConversion = true]
E -->|'false' default| G[result.trackConversion = undefined]
F --> H[Tool receives boolean true]
G --> I[Tool receives undefined\n→ NOT included in PATCH body]
D --> J{operation branch}
J -->|list_links| K[dub_list_links tool\n+ cursor pagination\nstartingAfter/endingBefore]
J -->|list_domains| L[dub_list_domains tool\nGET /domains]
J -->|list_tags| M[dub_list_tags tool\nGET /tags]
J -->|create_tag| N[dub_create_tag tool\nPOST /tags]
J -->|list_folders| O[dub_list_folders tool\nGET /folders]
J -->|get_qr_code| P[dub_get_qr_code tool\n+ logo param]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[DubBlock UI] -->|operation selected| B{params transform}
B -->|isLinkMutation| C[Clear non-mutation fields\ndomain/key/url/linkId/search etc.]
B -->|!isLinkMutation| D[Clear mutation fields\ndomain/key/title/desc/externalId\ntagIds/tenantId/folderId/trackConversion]
C --> E{trackConversion dropdown}
E -->|'true'| F[result.trackConversion = true]
E -->|'false' default| G[result.trackConversion = undefined]
F --> H[Tool receives boolean true]
G --> I[Tool receives undefined\n→ NOT included in PATCH body]
D --> J{operation branch}
J -->|list_links| K[dub_list_links tool\n+ cursor pagination\nstartingAfter/endingBefore]
J -->|list_domains| L[dub_list_domains tool\nGET /domains]
J -->|list_tags| M[dub_list_tags tool\nGET /tags]
J -->|create_tag| N[dub_create_tag tool\nPOST /tags]
J -->|list_folders| O[dub_list_folders tool\nGET /folders]
J -->|get_qr_code| P[dub_get_qr_code tool\n+ logo param]
Reviews (2): Last reviewed commit: "fix(dub): stop trackConversion from rese..." | Re-trigger Greptile |
- only send trackConversion true or omit it, matching linkRewrite/linkArchived's partial-PATCH-safe pattern, so a routine update_link no longer silently disables conversion tracking on an existing link - include trackConversion in the cross-operation reset block so it can't leak a stale value into non-mutation operations either
|
Addressed both Greptile findings in 86cc363:
Re-triggering both reviews now. |
|
@greptile review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 86cc363. Configure here.
Summary
/validate-integrationpass on the dub.co integration against Dub's live API docstenantId,folderId,trackConversionsupport and aconversionsoutput to link tools (create/update/upsert/get/list)startingAfter/endingBefore) tolist_links, and alogoparam toget_qr_codelist_domains,list_tags,create_tag,list_folderstools.config.params— several raw subBlock ids (domain,key,url,linkId,tagIds,tenantId,folderId,externalId,search,showArchived,page,pageSize) are shared across operations, so a value left in block state from a previously-selected operation could silently leak into the request for a different operation. Now explicitly cleared per operation.trackConversionbeing sent as the literal string"false"instead of a boolean when unsetType of Change
Testing
Tested manually —
bun run lintandtsc --noEmitboth pass clean. Two independent parallel verification passes confirmed tool-layer correctness against live Dub docs and block↔tool wiring correctness.Checklist