Repository navigation
Conversation
Empty minutes on the split HH/MM fields produced a NaN validation error loop (e.g. typing 08 / 0800 with blank MM). Accept compact forms like 0800 and 0800 AM on both the frontend and backend normalizer, default missing parts, and cover with unit tests. Co-authored-by: jssturm <jssturm@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Share timeparse across planner, calendar, API schemas, and reminders. Accept free-form departure times at the request boundary (drop strict HH:MM AM/PM pattern). Add addressparse so run-on starting locations like "9801 International Dr Orlando FL 32819" structure for Census geocoding without blocking the user on commas. Co-authored-by: jssturm <jssturm@users.noreply.github.com>
…flow The Test job only installed requirements.txt, which does not include pytest, so CI failed with "No module named pytest" (including on main). Install requirements-dev.txt and run the full pytest suite. Co-authored-by: jssturm <jssturm@users.noreply.github.com>
jssturm
force-pushed
the
cursor/graceful-departure-time-parse-72c3
branch
from
July 31, 2026 17:50
36966f4 to
eae073f
Compare
This branch was successfully deployed
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.
Problem
Entering a departure time like
0800 AM(or filling hours while leaving minutes blank against the00placeholder) triggered:That toast blocked Generate and put the user in a retry loop. Related parsers (calendar, reminders, API schema) were similarly strict. Starting location also required comma-structured addresses for Census geocoding.
Root cause
parseInton both fields. Empty minutes →NaN→ hard error.0700, etc.) were normalized, but the normalizer only matched colon/7am/bare-hour patterns.TravelRequest.departure_timehad a strictHH:MM AM/PMregex that rejected free-form input before normalization.requirements.txt, so pytest was missing (No module named pytest).Fix
app/engine/timeparse.pyused by planner, calendar ICS export, schedule/reminder parsing, and request/itinerary schemas.app/engine/addressparse.pynormalizes free-form US starting locations (commas optional) for Census + UI soft-format on submit.requirements-dev.txtand runs the full suite.Test plan
pytestlocally (49 passed on this branch)08only + AM →08:00 AM0800/0800 AM→ no toast loop9801 International Dr Orlando FL 32819(no commas) accepted and normalized