Repository navigation
Fetch flow drafts directly from dashboard URLs - #227
facumenzella wants to merge 3 commits into
Conversation
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, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8619fee. Configure here.
| rt := RuntimeFrom(cmd.Context()) | ||
| client, err := rt.API() | ||
| return rt, client, "proj" + match[1], match[2], err | ||
| } |
There was a problem hiding this comment.
Wrong project ID reconstructed from URL
Medium Severity
resolveFlowShowTarget builds the API project ID as proj plus the dashboard path segment. dashboardProjectID strips proj and an optional _, so IDs like proj_abc become /projects/abc/... in dashboard links (including the View it URL from rc flows edit). Pasting that URL requests projsnap/projabc instead of proj_snap/proj_abc and the lookup 404s.
Reviewed by Cursor Bugbot for commit 8619fee. Configure here.


Checklist
go build ./...,go test -race ./..., andgofmt.Motivation
A dashboard link contains the project and flow IDs. Users can paste the link into
rc flows showto fetch the editable draft in one command.Description
Pass the dashboard URL as the positional argument. Quote the URL so the shell preserves its query string and fragment.
rc flows show 'https://app.revenuecat.com/projects/abc12345/flows/wf_abc/editor?returnTo=paywalls#ln=components' --jsonThe URL selects the project and flow for this request. Paywall builder links that contain a flow ID also work. A bare flow ID uses the selected project.
Note
Low Risk
Localized CLI argument parsing for one read-only command; no auth or data mutation paths.
Overview
rc flows shownow accepts a RevenueCat dashboard link as the positional argument, not only a flow ID. Two URL shapes are recognized:/projects/…/paywalls/…/builderand/projects/…/flows/…/editor(query strings and fragments are ignored). Project and flow IDs are taken from the path and used for the API call, so a pasted builder/editor link works even when--project-idpoints at another project.Command help and
docs/command-surface.mddocument the[id-or-url]usage and add a URL example. A regression test asserts both URL forms hit the correct project/flow and return the draft.Reviewed by Cursor Bugbot for commit 8619fee. Bugbot is set up for automated code reviews on this repo. Configure here.
AI session context
CLI 1.0.0 sent the entire URL as a flow ID and reported a missing resource. The first PR version printed a hint. After review, we changed the command to fetch the draft directly. The regression test checks both URL formats with a different project selected. A live check confirmed that the example editor link returned its draft.