Repository navigation
Show the notice that a transcript was saved under another name in the window too, not only in the log file - #359
Merged
Conversation
… window too, not only in the log file When the transcript cannot be written under its name -- it is open in Word, say -- save_doc saves it under another and logs that in red with a link to the file. The window failed on it: the tag came as the string 'error', and _append_log_text added the link's tags to it as a list, so `'error' + ['hyper', 'hyper-0']` raised a TypeError, which was caught and written to the log file instead. A job that finishes shows the new name again at the end; for one that fails or is cancelled, this notice is the only place that says where its partial transcript went. Co-Authored-By: Claude Opus 5.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.
When the transcript cannot be written under its name (it is open in Word, say),
save_docsaves it under another name and logs that in red, with a link to the file:In the window this line never appeared.
_append_log_textadds the link's tags to the given ones,tags + self.hyperlink.add(...), and the tag comes as the string'error'. So'error' + ['hyper', 'hyper-0']raised aTypeError, which was caught and written to the log file instead:ERROR: Error updating log_textbox: can only concatenate str (not "list") to str. A job that finishes shows the new name again at the end. For a job that fails or is cancelled, this notice is the only place that says where its partial transcript went.A single tag given as a string is now wrapped in a list before the link's tags are added. It is the only caller that combines a tag with a link; the others pass none, and those already worked.
tests/test_log_link.pylogs a line with a link and the tag'error', once as a string and once as a list. Both must reach the textbox with the tags['error', 'hyper', 'hyper-0']. The string case fails onmain. Checked with a real textbox too: the line gets all three tags and the link still opens.One thing you may want to decide: the notice now appears, but in the link's blue, not in the error colour. Tk gives the tag created last priority, and
hyperis created aftererror.self.log_textbox.tag_raise('error')after creating theHyperlinkManagerwould make it yellow and still underlined. I left that out, since it changes how links look next to error text.This touches
_append_log_textonly and merges cleanly with #357, which changeslogandlogrnearby.🤖 Generated with Claude Code