Repository navigation
fix: catch an empty recording date instead of crashing in datestr - #34
Merged
Merged
Conversation
This was referenced Oct 22, 2026
Closed
tabedzki
force-pushed
the
tabedzki/fix/recording-date-nat
branch
from
October 23, 2026 00:32
156b2b7 to
09ddfda
Compare
Registering a recording without a behavior session crashed with "DATESTR failed converting date number to date vector. Date number out of range." at createRecording line 87: the Recording Date picker was never set, so its Value was NaT and went straight to datestr. buildRecordingDatetime now validates the date (not empty or NaT) and the hour (0-24) and combines them with datetime arithmetic, so hour 24 rolls over to the next day instead of wrapping on the same date. createRecording shows the problem in a dialog, re-enables the button and clears the busy label. checkParamSelection now passes event to createRecording, which its error handlers need. Fixes #33 Assisted-by: ClaudeCode:claude-opus-5-5
tabedzki
force-pushed
the
tabedzki/fix/recording-date-nat
branch
from
October 23, 2026 00:42
09ddfda to
02ff599
Compare
tabedzki
marked this pull request as ready for review
October 23, 2026 00:42
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.
🤖 AI text below 🤖
Fixes #33
Problem
Registering a recording without a behavior session crashed in
createRecording(line 87) with "DATESTR failed converting date number to date vector. Date number out of range." The Recording Date picker hadn't been set, so its value wasNaT, and that went straight todatestr. The crash happened before any error dialog, so the busy label stayed on.Fix
buildRecordingDatetime.m(new) checks that a date was picked (not empty, notNaT) and that the hour spinner is between 0 and 24. It then buildsrecording_datetimeand the cupsession_datewith datetime arithmetic, so hour 24 rolls over to the next day instead of wrapping back to 00:xx on the same date.createRecordingcalls it. If the date or hour is invalid, the user gets an error dialog, the button is re-enabled and the busy label clears. No Slack message is sent for this.checkParamSelectionnow passeseventtocreateRecording. Before, anycreateRecordingerror handler that ran on this path would have failed onevent.Source.Tests
tests/TestBuildRecordingDatetime.mcovers:NaTdateAGENTS.mdandREADME.md.670e661d. On that commit theNaTvalue went straight todatestr, as in the reported traceback. CI will be the first run.prek) passes.Note
Rebased onto
mainafter #36. The date check now sits inside #36's try/catch for the steps before the copy. It keeps its own catch, so a missing date gets an error dialog but no Slack message: the user can fix that themselves.Assisted-by: ClaudeCode:claude-opus-5-5