feat: add vortix report bug report command#37
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new vortix report CLI subcommand to generate a privacy-oriented bug report, preview it interactively, and help users submit it via browser/clipboard/stdout, alongside updating the GitHub bug issue template to match the generated sections.
Changes:
- Introduces
vortix reportcommand flow (data collection, preview, issue body formatting, submit options). - Adds constants + dependencies for GitHub URL construction (
open,urlencoding) and URL length limiting. - Updates
.github/ISSUE_TEMPLATE/bug_report.mdto align with the auto-generated report sections.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/constants.rs |
Adds GitHub repo URL + issue URL length limit constants used by the report command. |
src/cli/report.rs |
Implements diagnostics collection, report formatting, URL construction, clipboard/browser submission, and unit tests. |
src/cli/mod.rs |
Exposes the new report module. |
src/cli/commands.rs |
Wires the Report subcommand into CLI dispatch. |
src/cli/args.rs |
Adds the Report subcommand to the CLI enum. |
Cargo.toml |
Adds open and urlencoding dependencies for report submission. |
Cargo.lock |
Locks new transitive dependencies from open/urlencoding. |
.github/ISSUE_TEMPLATE/bug_report.md |
Restructures the bug report template to match the generated Markdown sections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add a CLI command that collects safe system diagnostics (version, OS, terminal, shell, runtime dependencies, config state, kill switch) and lets users file a pre-filled GitHub issue via browser, clipboard, or printed Markdown output. Privacy-by-design: never collects IPs, server endpoints, profile names, credentials, DNS servers, or log contents. Users review everything before any action is taken. - New `src/cli/report.rs` module with collection, formatting, and submission logic (~420 lines, 10 unit tests) - Adds `open` and `urlencoding` dependencies for browser/URL handling - Redesigns `.github/ISSUE_TEMPLATE/bug_report.md` to align with the auto-generated report sections
- Extract count_profiles into shared pub(crate) helper in commands.rs
to eliminate duplication with report.rs
- Fix read_user_description prompt ordering: print indent before each
read, not after
- Refactor detect_install_method: extract install_method_from_path()
for meaningful unit testing
- Use env!("CARGO_PKG_REPOSITORY") for GITHUB_REPO_URL to stay in sync
with Cargo.toml metadata
- Fix build_github_url truncation: binary search on raw body length to
avoid splitting percent-encoding sequences
- Redact home directory prefix with ~ in config_dir for privacy
- Fix clippy warnings (match_same_arms, uninlined_format_args)
58e2058 to
e30af78
Compare
- Add `vortix report` to Usage section - Add Nix flakes installation instructions (run + install) - Add Nix to sudo PATH "not affected" list - Add `nix develop` to Development section
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
vortix reportCLI command that collects safe system diagnostics and helps users file GitHub issues with pre-filled environment infoUX Flow
New Dependencies
open = "5"-- cross-platform browser opening (used by starship, bat)urlencoding = "2"-- URL percent-encoding for GitHub issue bodyTest plan
cargo build-- cleancargo clippy-- no warningscargo test cli::report-- 10/10 passecho "q" | cargo run -- report-- preview renders correctlyecho "p" | cargo run -- report-- Markdown output is well-formedoto verify browser opens with pre-filled issuecto verify clipboard works