Repository navigation
Conversation
The packaged version cannot answer "which build is this?" - pyproject carries a static version that only moves on a release, so every commit between two releases reports the same string. An editable install makes it worse: the code is read live from a checkout, so the version stays fixed while the code underneath changes with every branch switch. Ask git when there is a checkout to ask, and fall back to the packaged metadata and install time when there is not - a wheel has no .git, and a user machine may have no git. Both the missing-binary and timeout paths degrade rather than raise, so identifying a build can never be what breaks the app. Code assisted by Opus 5. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds a second Help entry opening a small dialog with the logo, the version block and a Copy button, so the answer to "which build are you on?" can be pasted into a bug report rather than retyped. The text is selectable and monospaced: version_info aligns its labels in columns, which a proportional font would undo. Code assisted by Opus 5. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The fallback paths matter more than the happy one - they are what runs on an installed copy, which is where nobody is watching. Missing git binary, non-zero exit outside a repository, and a timeout are each covered, as is the dialog surviving a missing logo asset. Code assisted by Opus 5. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Adds
Help > About qtxterm, showing which build is running - including for development checkouts that are nowhere near a release.Why
There is no usable version string today.
pyproject.tomlcarries a static1.0.0that only moves on a release, so every commit between two releases reports the same thing, andsrc/qtxterm/__init__.pyhas no__version__at all. An editable install sharpens the problem: the code is read live from a checkout, so the reported version stays fixed while the code underneath changes with every branch switch.What it shows
Development checkout:
Installed wheel, where there is no
.gitto ask:The describe string carries
-dirtywhen the checkout has uncommitted changes, which is the case that a commit hash alone would misreport.Design
version_info.pyholds no Qt, so the string is testable without a widget. Git is consulted only whenREPO_ROOT/.gitexists, with a 2s timeout - the About dialog is not worth hanging the UI for. All three real-world failures degrade to the packaged metadata rather than raising:giton PATH ->FileNotFoundErrorTimeoutExpiredbuild_info()is cached; the answer cannot change mid-process.The dialog keeps the text selectable and monospaced, since
version_lines()aligns its labels in columns that a proportional font would undo, and a Copy button puts the block on the clipboard for pasting into a bug report.Tests
13 new tests. The fallback paths get the most attention, since they are what runs on an installed copy where nobody is watching. Full suite: 519 passed, 1 skipped.
🤖 Generated with Claude Code