Merge dev-talesam into main - #26
Merged
Merged
Conversation
The image window sorted OCR boxes by their top edge alone. Real detections jitter vertically by a few pixels on the same visual line, so the sort reordered them: a captured "Nome: Joao Silva" came out as "Joao Nome: Silva". Measured on three boxes whose tops differ by 2 and 4 px, which is an ordinary label/value row, not a pathological case -- it happened on nearly every capture that produced more than one box. The pipeline already owns a formatter that gets this right. `TextFormattingController.format` groups boxes into lines by vertical overlap, orders each line left to right, spaces them proportionally, and finds tables, paragraphs and hyphen joins. The 55-line copy in `screen_capture` is gone, and a capture now formats the same way a page of the same layout does. Its alignment is made of spaces, so the result view is monospace: in a proportional font the columns it computes would not line up, which makes the output claim a layout it does not have. Capture asked the XDG portal first and only fell back to Spectacle when the portal was absent. On this KDE session the portal's interactive mode opens "Solicitar captura de tela" with Area set to full screen and "include mouse pointer" checked -- four or more clicks to reach a region, and the cursor drawn into the image that goes to OCR. `spectacle -r -b -n -o` opens the region selector directly and writes exactly the file we name; verified that it overwrites an existing empty file in place and exits 0 with a valid PNG, with another Spectacle instance already registered on the bus. So KDE runs the native tool first and the portal second. Everywhere else the portal still leads, because it is the only backend that works from inside a sandbox. A cancelled region selection stays cancelled and does not open the portal behind it. While measuring that, Spectacle wrote a complete 672 KB PNG and then exited on SIGSEGV. `_run_standard_tool` read the exit status before the file, so it threw that capture away and reported failure. The bytes on disk decide first now. The crash is intermittent -- three later runs exited 0 -- which is exactly why it was worth handling rather than chasing. "No text extracted." was written into the editable result buffer, offering prose the OCR never read as if it were the extracted text, and it needed a `_result_copyable` flag to stop Copy from putting that sentence on the clipboard. An empty result is its own state now, with a cause and the two ways to get a result, so the flag is gone and Copy follows the buffer alone. Five tests cover the new behaviour: the KDE ordering, the fall back to the portal when no native tool answers, a tool that crashes after writing, the empty page, and the same-line ordering that started this. Two existing portal tests now pin XDG_CURRENT_DESKTOP, because the backend order reads it. pt and pt_BR carry the two new strings. The other 29 catalogs fall back to English for them and still hold the retired msgid; the gate accepts that, and merging them is a separate pass.
Remove file-to-directory device comparisons from staged file validation and recovery journal parsing. OverlayFS can report different devices for files and their parent directory, blocking settings creation and application startup. Preserve atomic installation through destination-local snapshots and retain per-file identity checks during publication and recovery. Set bigocrpdf.svg and bigocrimage.svg intrinsic dimensions to 256x256. Preserve their viewBox and artwork to avoid enlarging 24px textures. Add regression coverage for creating and overwriting settings when directory and file device IDs differ.
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 3 high |
🟢 Metrics 3 complexity · 0 duplication
Metric Results Complexity 3 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
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.



Pull request created by GitRepo.