Repository navigation
Take end times for every parking length, and give time fields the same text (#200, 3/3) - #218
Open
NinjaLikesCheez wants to merge 2 commits into
Open
NinjaLikesCheez wants to merge 2 commits into
NinjaLikesCheez wants to merge 2 commits into
Conversation
…e text (#200) Third of the stack for #200. - /park for:, Another length…, staying longer and Give it to someone… read lengths with readParkingLength (core/how-long.ts plus "rest of day"), so "until 17:00" works as well as "2h30". Refusals use howLongRefusal. - Every form field that takes a time shows examples the same way (placeholderOf in core/time-help.ts) and names the time zone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
midnight is 00:00 at the end of today, after the 23:59 reset, so the example would be refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been 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.
Third and last PR of the stack for #200 (spec: #200 (comment)). Merge #215, then #216, first.
What changes
Every parking length takes an end time too.
/park for:, Another length…, staying longer (the extend action) and Give it to someone… in/admin→ Parking now read lengths withreadParkingLength(services/parking-time.ts), which uses the sharedcore/how-long.ts:30m,2h30,for 2 hoursuntil 17:00,till 5pm,to 17:00, or just17:00rest of day, still parking's ownWhen extending, a length counts from the current end, as before, and an end is when it should end. The reply says which:
✅ Extended by 1h.or✅ Extended until 12:30.The existing limits are unchanged (the reset, when the spot closes, the "can only be extended by …" message). An end that rolls past the reset (till 9amafter 9:00 is tomorrow's) gets the usual "Parking ends at 23:59 every day, so that's too long."/park for:'s preview uses the same reader, sountil 17:00showsuntil 17:00 → 7h, until 17:00.One refusal everywhere. These inputs now use
howLongRefusalinstead of their own "I couldn't understand how long" messages:Consistent form text.
placeholderOf(core/time-help.ts) writes examples as a placeholder (19:00 · fri 8pm · 14th oct · tomorrow noon · in 2 hours). Every form field that takes a time uses it and says which time zone:/scheduledetails19:00 · fri 8pm · 14th oct · tomorrow noon · in 2 hours/scheduleReminders18:00 · 6pm/scheduleResults17:00 · 5pm/park30m · 2h30 · until 17:00 · rest of day/admin→ Parkingnow · in 1 hour · 8:00 · tomorrow 8/17:00 · 5pm · in 2 hours(nothing past the reset)/admin→ Parking23:59 · midnight/2h · until 17:00 · rest of day/park for:'s option description mentionsuntil 17:00. Runjust register dev/just register prodafter deploying so Discord shows the new description.Not changed
parseDuration): they're buttons ("Park for 2h"), not ends.Docs
docs/commands.md(/park, Give it to someone…, the/scheduleform mock-up) anddocs/architecture.md(parking Time). The changelog has an Added entry for end times and a Changed entry for the placeholders.Review
No rule 14 paths are touched.
core/time-help.tsgainsplaceholderOf. Parking's logic only changes where a typed length is read.Testing
just checkpasses./park for: until 11:30,till 9ampast the reset, a vague word,until 12:30when extending, Give it to someone…until 16:00,readParkingLength, and the end-time preview./parkand/admin→ Parking.Closes #200.
🤖 Generated with Claude Code