Repository navigation
MENU-HELP-REPORTBUG: Help ▸ Report a Bug… (#1015) - #1128
LloydNicholson wants to merge 1 commit into
Conversation
A new Help item next to Send Feedback… (which stays a plain new issue). The
dialog takes what happened, hides the home folder and photo file names by
default, can add the two previous runs' logs, and previews the issue. Create
Report writes lightcraft-report-<time>.txt next to the logs (what happened,
the System Info rows and the logs, each up to its last 4 MB), reveals it, and
opens a new GitHub issue pre-filled with the same and the end of this run's
log; the link is kept under 8,000 characters. Nothing is sent by the app.
Without a log (web, --memory) the issue holds the system info only.
The System Info rows move to `bug_report::system_rows`, shared by both dialogs.
`app.reportBug {create: true}` does it without the dialog (agents, tests).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5263c62 to
693f0ef
Compare
AlexChambers
left a comment
There was a problem hiding this comment.
I'm a fellow contributor, not a maintainer. I'm using Codex to help review PRs and checking potential findings with focused tests where possible.
Reviewed pinned head 693f0ef74ed283361265a6c1bf75fa1919a1d2dd.
[P2] Preserve punctuation inside photo names during redaction
The default privacy option leaves complete photo names visible when the basename ends in a legal punctuation character. For example, redact("import /Users/ann/Pictures/Private Client (1).CR2: no preview", Some("/Users/ann")) returns import ~/Pictures/Private Client (1).CR2: no preview. Resetting the candidate at ) makes the name before the extension empty, so it is never replaced. Import warnings log unquoted paths directly, and both the GitHub issue and attached report use this helper. Treat punctuation within a path basename as part of the filename, with regression cases for parentheses, brackets and apostrophes, so the enabled privacy option hides the promised names.
Exact-source redaction helper plus exact import extension registry compiled and executed in redaction-probe.rs. It confirms full names remain for (1).CR2 and [final].jpg; O'Brien.CR2 is only partially hidden. Engine import.rs:1007 logs import {path}: {e}. No native UI run.
[P2] Keep the bug-report dialog open when creation fails
If writing the report fails, for example because the log folder is unwritable or the disk is full, create() returns Err through the new Dialog::ReportBug arm. However, show() only displays errors and keeps the dialog for its existing explicit list, which omits ReportBug; this result falls through to _ => close = true. The dialog therefore disappears without an error and discards the reporter's typed description before opening the GitHub issue. Add ReportBug to the error-preserving path and show the error so the user can copy the text or retry. The same recovery is needed when reveal or browser opening returns an error.
Source trace: bug_report.rs:336,338,344 propagate errors; dialogs.rs:1300-1338 handles only enumerated dialog errors, then closes all other results and sets app.ui.dialog=None. Description exists only in the discarded ReportBug options. No filesystem-failure or native dialog execution.
# Conflicts: # docs/parity-checklist.md # docs/whats-new.md
|
Thanks for this, the report flow is well thought out. Before we can review it: (1) Redaction: names with punctuation in the basename stay visible, e.g. If you haven't already, come and say hi on our Discord: https://discord.gg/artcraft |
|
GridCraft, PdfCraft and DeckCraft are adding a Help item that opens a prefilled GitHub issue (no dialog, nothing sent: version, OS, graphics adapter, interface language and the document's file type, never its name or contents). We plan to use the label "Report an Issue…" (already in craft-i18n's common.tsv in 20 locales) and PhotoCraft 1312's issue-form field ids ( |
|
@LloydNicholson thanks for this. echelon asked for three things on 23 Oct (punctuation in photo names during redaction, keeping the dialog open when the report fails, and a rebase), and the branch has been quiet since. So I've opened #3763, which carries your commit unchanged and with your authorship and does those three. With that, this PR can be closed. If you'd rather finish it here yourself, just say so and I'll close mine. |
wanikhawar
left a comment
There was a problem hiding this comment.
This conflicts with main now. Please rebase so CI can run on the merged result.
|
Please rebase. The redaction only hides the home folder and photo file names. It misses the library path outside |
Closes #1015 (first version; the later items are listed below)
Help ▸ Send Feedback… opens a blank GitHub issue, so bug reports often arrive without the version, system or log. This adds Help ▸ Report a Bug… next to it. Send Feedback… is unchanged, for feature requests and questions.
The dialog:
~and photo and sidecar names become<photo>.ext(~/Pictures/<photo>.CR2), in the log and in the system info (the library path, say)lightcraft.1.log,.2.log), shown when they existCreate Report:
lightcraft-report-<time>.txtnext to the logs: what happened, the System Info rows, and each chosen log up to its last 4 MB (logs are capped at 16 MB)issues/new?title=…&body=…with the title ("Bug: " and the first line), what happened, the system info, the last 40 lines of this run's log, and a note to attach the file. The link stays under 8,000 characters: the log excerpt loses its oldest lines first, then a very long description is shortened.Nothing is sent by the app; the reporter checks and submits the issue on GitHub. No issue template is needed. Without a log file (the web build,
--memory,LIGHTCRAFT_NO_PREFS), no file is written and the issue holds the system info only.Choices:
.txtinstead of the proposed.zip. Thezipcrate is only in the tree through candle, and a direct dependency risks C compression back ends. GitHub accepts.txtattachments.bug_report::system_rowsand shared by both dialogs. OS version, CPU model and RAM aren't among them and would need a new dependency or platform calls.app.reportBug {create: true, what?, previousLogs?, private?}does the same without the dialog, for agents and tests.tr()falls back to English). No newtr_format!messages, so the format catalogs are unchanged.Not in this PR (from the issue's list): offering a report at the next launch after a crash, a link to search for duplicates, a hosted service for reporting without a GitHub account, and sharing the system block with EffectCraft and FilmCraft.
Tests
bug_report::tests: hiding the home folder and photo names (paths with spaces, quotes, brackets, Windows paths, non-ASCII names; other files and numbers untouched); the link stays under the limit with a long log and with a 20,000-character description; issue title and body with and without a log; reading a log's end from the first whole line.tests_report_bug(headless app):create: truewrites the file next to the logs, with this run's log only, hidden names, and the reveal and link callspreviousLogsand names shown, the file holdslightcraft.1.logand the real namelightcraft-cli snapshotrender (the no-log version; the CLI keeps no log).cargo xtask ci: all 8 steps pass on macOS (Apple silicon, Rust 1.99), with the diffs of Issue #989: the lock test finds true on the PATH #990, Issue #989: clippy 1.99, fill_box reads its buffer with as_chunks::<3>() (item 4) #997, Issue #989: odd_folders_never_fail_the_check skips non-UTF-8 names on APFS (item 3, one of eleven) #1003, Issue #989: the ten sidecar repair tests also pass on a case-insensitive volume (item 3, ten of eleven) #1007 and Issue #989: the Export dialog height test expects the macOS row (Add to Apple Photos, 876 pt) #1018 applied locally, because main doesn't pass on macOS right now (main does not build or pass its tests on macOS (995d5ea4): app won't compile, 12 tests fail, one clippy lint #989). Those diffs are not part of this PR.Docs: new row MENU-HELP-REPORTBUG in
docs/parity-checklist.md,docs/whats-new.md.🤖 Generated with Claude Code