Reference in New Issue
Block a user
Delete Branch "feat/18-19-about-update-checker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #18
Closes #19
#18 — About dialog
bcc_core.__version__ = "1.1.0"is now the single source of truth for theapp version (matches
pyproject.toml). Nothing else hard-codes a versionstring.
QMenuBar(Helpmenu) withAbout Better Claude Config….AboutDialogshows: app icon (icons/twin-gears/rounded/icon-128.png),app name, version, a short description, and (macOS only) a note that the
build isn't Apple-notarized.
via
QDesktopServices.openUrl— never in-app navigation. The license linkpoints at the raw
LICENSEfile on the repo. No secrets or file paths areever shown in this dialog.
#19 — update checker (notify-only)
bcc_core.parse_version()/is_newer_version(): pure, numeric (neverlexical) version comparison. Strips a leading
v, drops pre-release/buildsuffixes, zero-pads differing-length tuples, degrades gracefully on
malformed input instead of raising.
bcc_core.fetch_latest_release(): anonymous GET against the repo's publicGitea releases API (
.../releases/latest) — no token embedded or neededsince the repo is public. Fail-quiet: returns
Noneon any network error,timeout, bad status, or malformed response. Only ever reads release
metadata (tag + URL); never downloads or replaces the running binary.
UpdateCheckWorker(QThread, same pattern asConnTester/SpawnTester)runs the check off the UI thread.
date." or "vX.Y.Z available." with a button that opens the releases page.
QSettingstimestamp, runs off-thread, silent on any failure, and can beturned off via a checkbox in the About dialog (
update/autoCheckinQSettings).Tests
92 → 112 passing (+20). New coverage:
__version__sanity,parse_version(basic / v-prefix / pre-release suffix / malformed / stops-at-non-numeric),
is_newer_version(older / newer / equal / v-prefix / numeric-not-lexical /differing-length / malformed candidate / malformed current), and
fetch_latest_release(success, falls back toRELEASES_URLwhen nohtml_url, network failure, timeout, missing tag, malformed JSON) — all viamonkeypatch.setattr(urllib.request, "urlopen", ...), no live network intests.
Verification
Ran
ruff check .,ruff format --check ., andpython -m pytestagainsta fresh checkout of this branch (not just the working copy) — all green,
112 passed.
Notes / caveats
the tool timeout), so
bcc.pywas only syntax-checked (ast.parse) andreviewed by hand, not import-tested under a display.
bcc_core.py(where__version__,parse_version,is_newer_version, andfetch_latest_releaseall live) is fully unit-tested headlessly.bcc_core.py: the existing_normalize_unicodenon-breaking-space strip used a literal NBSP byte insource, which some layers of this delivery pipeline silently mangled to a
bare space (turning the line into a no-op). Rewrote it as
"\xa0"—behavior-identical, just transmission-safe. Everything else in that
function (smart quotes, zero-width chars) was unaffected.
tests/test_core.pytimeout fix already landed on
mainfrom other work-in-progress (issue#12) partway through. This PR's diff is layered cleanly on top of that
(verified against
main's actual current blob, not a stale localcheckout) and does not touch or revert it.
- Add `__version__ = "1.1.0"` as the single source of truth (matches pyproject.toml). - Add parse_version()/is_newer_version() for numeric (never lexical) version comparison, handling v-prefix, pre-release suffixes, and malformed input. - Add fetch_latest_release(): reads the public Gitea releases API (anonymous, no token) and returns {version, url} or None on any failure. Never downloads or touches a binary — metadata only.Supervisor review (Cowork): approve. CI run #160 green; isolated diff.
__version__is the single source of truth (with a sync-guard test), version compare is numeric not lexical and handles malformed tags, andfetch_latest_releaseis fail-quiet + tokenless + metadata-only (no binary download). About dialog leaks no secrets/paths; startup auto-check is throttled once/day and disableable. Release-time note: at v1.2.0 cut, bump__version__andpyproject.tomlto1.2.0together and updatetest_dunder_version_matches_pyproject. Ready for v1.2.0.Superseded by #26 (release: v1.2.0), which merged this change into
mainas part of the integrated release. Closing.Pull request closed