Repository navigation
Conversation
Co-authored-by: Shrey Pandya <shrey150@yahoo.com>
🦋 Changeset detectedLatest commit: 1b698c0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Architecture diagram
sequenceDiagram
participant User as CLI User
participant BugCmd as Browse Bug Command
participant Env as Environment Detector
participant Redact as Redaction Service
participant URLBuilder as Bug Report URL Builder
participant OpenUrl as URL Opener
participant GitHub as GitHub Issues
Note over User,GitHub: Browse Bug command flow
User->>BugCmd: browse bug [--no-open] [--title "..."]
BugCmd->>Env: detectAgent()
Env-->>BugCmd: agent (e.g., cursor-cli)
BugCmd->>BugCmd: collect env (version, node, os/arch)
BugCmd->>Redact: redactSensitive(values)
Redact->>Redact: redact API keys, tokens, URL params
Redact->>Redact: redact home directory paths
Redact-->>BugCmd: cleaned values
BugCmd->>URLBuilder: buildBugReportUrl({title, env})
URLBuilder->>URLBuilder: build markdown body
URLBuilder->>URLBuilder: encode as URL params (template, title, body)
URLBuilder->>GitHub: validate target URL
alt URL exceeds 8000 chars
URLBuilder->>URLBuilder: truncate body and append marker
end
URLBuilder-->>BugCmd: complete URL
alt --no-open provided OR non-TTY OR CI mode
BugCmd-->>User: print URL and help message
else browser available
BugCmd->>OpenUrl: openUrl(url)
OpenUrl-->>BugCmd: success status
alt open succeeded
BugCmd-->>User: "Opening URL..."
else open failed
BugCmd-->>User: print URL as fallback
end
end
User-->>GitHub: manual submission
GitHub-->>User: issue creation page (prefilled)
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Co-authored-by: Shrey Pandya <shrey150@yahoo.com>
Co-authored-by: Shrey Pandya <shrey150@yahoo.com>
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Co-authored-by: Shrey Pandya <shrey150@yahoo.com>
This branch has not been deployed
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.
why
Bug reports from humans and coding agents often arrive without the diagnostics we need to reproduce and fix issues. Prefilling an issue with environment info reduces friction for reporters and improves triage.
what changed
Add
browse bugcommand that opens a GitHub issue page prefilled with:The command:
openUrlhelper (same asbrowse discord)--no-opento print the URL instead of opening--titleto prefill the issue titlecommand_path=bug)Before (main):
After (this branch):
Decoded body:
test plan
pnpm --filter browse lint— passespnpm --filter browse test:cli— 702 tests pass including new tests for:--no-openprints URL instead of opening--titlesets title parameterbrowse bug --no-openprints valid prefilled GitHub issue URLbrowse bug --no-open --title "Test"includes title parameterSummary by cubic
Adds a
browse bugcommand that opens a prefilled GitHub issue so bug reports include environment diagnostics from the reporter.bug_report.mdtemplate.--no-opento print the URL instead of opening a browser, and--titleto prefill the issue title.Written for commit 1b698c0. Summary will update on new commits.