MinglunZhu asked twice for a provider by time of day and said the time
setting in Routing rules is awkward. Three causes:
- A conversation a night rule sent to its member stayed there after the
hours: no rule matched the new turn, so Auto affinity kept it on the
night's member by its cache (Smart and every routing but In order).
ruleFor now sets RuleHit.Ended when the last turn's rule had hours
that are over, and affine lets the conversation go (Affinity.Why
"hours"); the trace says so in en, zh, zh-TW, ja, de. Tool rounds of
a turn begun inside the hours stay put; Session, Strict and In turn
keep their own way.
- The time boxes took only ASCII "HH:MM", while their numeric keypad
on a phone has no colon and a Chinese IME types ":". clockOf (GUI)
and clockMinutes (CLI, saved files) now read "22", "2200", "930",
"22:00", "22.00", "22点30" and full-width digits; "9:5" is still
no time. time=22~08 takes ~ and ~ for the dash.
- A new rule starts with an intent box; hours took an × and a +. Adding
another condition now drops the intent box while it is empty.
A time rule in a nested group doesn't give its conversation back yet:
#5977.
Run (mote): go test ./internal/provider (ok); go test -run
'TestRuleHoursOver|TestRuleTime|TestRule|Affinity|StandIn|Session|TestParse|Clock'
./internal/gateway (ok); go vet darwin, GOOS=linux -tags nogui,
GOOS=windows for gateway and provider; gofmt. GUI, chromium and webkit:
routing-time (8/8 after the new trace test's fix), and 28 rule/affinity/
i18n files (routing-rule-*, routing-time*, routing-intent-entry,
routing-folder, routing-pause*, routing-smart-intent, routing-save*,
routing-rules-line, routing-affinity-*, routing-behind-why,
routing-kept-again, routing-session-folder, i18n-keys, i18n-en-no-cjk):
477/481, the 4 reds the new trace test's first wording, fixed and rerun.
Broken by hand: affine's "hours" case off -> TestRuleHoursOverGiveThe
ConversationBack red (Smart stays on kb by cache); origin's
grouprule.go/ruleparse.go -> TestRuleTimeTypedLoosely red; client.js's
"hours" case and the intent give-way off -> routing-time 0/4 in
chromium; the old clockOf -> routing-time red on "9:00".
Not tried: the real app with a real night/day pair of providers; the
full gateway package and full GUI suite (the full Go suite runs after
the tag); Windows run of the touched packages (vet only).