Skip to content

chore: close audit backlog — 6 polish fixes + docs#107

Merged
nelsonduarte merged 7 commits into
mainfrom
chore/polish-close-audit
Jun 28, 2026
Merged

chore: close audit backlog — 6 polish fixes + docs#107
nelsonduarte merged 7 commits into
mainfrom
chore/polish-close-audit

Conversation

@nelsonduarte

Copy link
Copy Markdown
Owner

Summary

Final polish round to close the 11-round audit backlog. 4 code fixes + 2 docs updates. After merge, the 98 catalogued findings reach final state: 87 fixed in code, 4 remain as v1.14/v2 architectural roadmap items, 7 confirmed not-reproducible / already-fixed-implicitly / feature-gap.

Fixes

Docs

Tests

tests/test_polish_close_audit.py — 9 tests (source-level + behavioral for format helper, fallback path coverage). All pass.

What remains after this PR

  • 4 architectural items for roadmap:
    • Single-instance + IPC (QLocalServer) — HIGH UX value, slated for v1.14
    • pdfapps:// protocol handler — LOW value, skip until user request
    • macOS ~/Library/Application Support/PDFApps/ — HIG compliance, defer v2
    • portalocker cross-process config lock — bounded impact, defer v2
  • Audit catalogue closed: 98 findings → 87 code-fixed + 4 architectural + 7 not-actionable

Validation

  • 7 atomic commits (6 fixes + test suite)
  • pytest unchanged baseline + 9 new pass
  • Translations.json language parity preserved (605 keys × 8 langs)
  • No APP_VERSION bump
  • Compatible with all merged PRs (A through K + security pins)

nelsonduarte and others added 7 commits June 28, 2026 12:33
The recents loop in viewer/panel.py called os.path.isfile(rp) which
forces OneDrive Files-On-Demand placeholders to hydrate from the
network at viewer startup. PR-G applied the same fix in i18n.py:290;
this brings viewer/panel.py to parity.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…d 2.0

The brand SVG/icon pixmap was hardcoded with setDevicePixelRatio(2.0),
which assumes HiDPI and produces blurred rendering on standard
100%-scale monitors. Switch to self.devicePixelRatioF() with a
defensive guard, matching the PR-J #4 PasswordDialog fix.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
_convert_txt uses helv (Type-1 Latin-1) which renders any codepoint
above U+00FF as a tofu glyph. Pre-scan a bounded 64 KB prefix of each
source file and surface tool.warn.font_latin_only on the status bar,
matching the existing PR-I L4 warning in page_numbers.py.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add a QLocale-backed helper so size displays (KB, font sizes) honour
the system locale's decimal separator. DE/FR/IT/ES expect comma; EN/PT
use period. Helper falls back to a plain f-string when QLocale fails,
keeping headless test environments working.

Apply at five callsites previously hardcoding ``:.1f``:
- app/tools/compress.py (input size info)
- app/tools/convert.py (input size info)
- app/tools/info.py (two sites: details panel + status bar)
- app/editor/dialogs.py (_TextEditDialog font-size label)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The schema example previously documented only 3 keys (dark_mode,
language, recent_files) but the application reads 5 (adds tool_usage
and max_recent_files). Replace the bare snippet with a structured
table covering all keys, defaults, and platform path resolution
(XDG vs legacy ~/.pdfapps_config.json).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Document the env vars PDFApps reads or writes, in three groups:

- Standard platform vars (XDG_CONFIG_HOME, FLATPAK_ID, SNAP, APPIMAGE,
  APPDIR) used for sandbox detection and config path resolution.
- PyInstaller internals (_PYI_* and _MEIPASS*) cleared by _restart_app
  to prevent stale-state contamination on relaunch.
- TESSDATA_PREFIX override consumed by the OCR tool.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Nine assertions cover the six polish items:

- viewer recents lexists swap
- brand icon devicePixelRatioF scaling
- import_pdf txt-to-pdf font_latin_only warning
- format_size_localized helper + 5 callsite migration + QLocale
  fallback path
- CONTRIBUTING.md config.json schema with 5 keys
- CONTRIBUTING.md environment variables section

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@nelsonduarte nelsonduarte added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 28, 2026
Comment thread app/editor/dialogs.py
)
from app.i18n import t
from app.utils import error_color
from app.utils import error_color, format_size_localized

from pathlib import Path

import pytest
@nelsonduarte nelsonduarte merged commit 474f19c into main Jun 28, 2026
3 checks passed
@nelsonduarte nelsonduarte deleted the chore/polish-close-audit branch June 28, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants