Skip to content

fix(onboarding): normalize times and breaks sent to the daily schedule row update - #1595

Merged
gabrielseco merged 2 commits into
mainfrom
fix/daily-schedule-normalize-update-row
Oct 16, 2026
Merged

gabrielseco merged 2 commits into
mainfrom
fix/daily-schedule-normalize-update-row

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Custom daily schedule editors no longer have to reformat times and breaks before updating a row. Times with seconds and numeric breaks are accepted as sent.

Why

A native time input can return 09:00:00, and a partner may send a break as a number. The row update wrote whatever it received, so the value only failed validation later, on blur or save. Partners had to learn the exact stored format and reproduce it themselves.

What changed

Toggle details

Not a breaking change and no new exports; the row update keeps its signature.

  • start_time / end_time: surrounding whitespace is trimmed and seconds are dropped (09:00:00 becomes 09:00).
  • break_duration_minutes: a number is stored as a string.
  • Everything else, including partial input while typing and values without a leading zero such as 9:00, is stored as sent, so the existing validation for those is unchanged.

Narrowing the value type of the row update from unknown is left out on purpose: it would be a breaking type change for existing callers.

Screenshots

N/A

Related Resources

Testing

Unit tests cover the normalizers and one wiring test covers the row update through the edit state. Removing the normalization call from the row update makes the wiring test fail (expected '09:00:00' to be '09:00'); I confirmed this and restored the code.

  • Tested against the example/ app in a browser
  • Feature flag: N/A

🤖 Generated with Claude Code


Note

Low Risk
Localized onboarding daily-schedule edit-form coercion with no API signature change; validation behavior for invalid partial input is explicitly preserved.

Overview
Daily schedule updateRow now normalizes values on write so custom editors and native inputs do not need to match the edit form’s stored shape before calling the API.

start_time / end_time are trimmed and seconds are stripped (e.g. 09:00:00 → 09:00); break_duration_minutes accepts numbers and stores them as strings. Partial or non-HH:mm times are left as sent so existing blur/save validation is unchanged. Normalization is implemented in new normalizeTimeInput / normalizeRowValue helpers and applied inside useDailyScheduleEditForm’s updateRow; types doc is updated and unit/integration tests cover the helpers and wiring.

Reviewed by Cursor Bugbot for commit 2b49128. Bugbot is set up for automated code reviews on this repo. Configure here.

…e row update

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 230.94 kB 230.8 kB +144 B (+0.1%) 🔴
Total (raw) 642.94 kB 642.63 kB +317 B (+0.0%) 🔴
CSS (gzip) 21.95 kB 21.95 kB 0 B (0%) 🟢
CSS (raw) 114.51 kB 114.51 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 230.94 kB / 350 kB (66.0%)
  • ✅ Total raw: 642.94 kB / 850 kB (75.6%)
  • ✅ CSS gzipped: 21.95 kB / 25 kB (87.8%)

Largest Files (Top 5)

  1. index.esm-wIkXrqU6.js - 11.4 kB (0 B (0%))
  2. styles.css - 10.97 kB (0 B (0%))
  3. index.css - 10.97 kB (0 B (0%))
  4. internals-BOZceErx.js - 6.13 kB (0 B (0%))
  5. hooks-ThU7CDLI.js - 5.85 kB (0 B (0%))
View All Files (291 total)
File Size (gzip) Change
index.esm-wIkXrqU6.js 11.4 kB 0 B (0%)
styles.css 10.97 kB 0 B (0%)
index.css 10.97 kB 0 B (0%)
internals-BOZceErx.js 6.13 kB 0 B (0%)
hooks-ThU7CDLI.js 5.85 kB 0 B (0%)
sdk.gen-BRPiw4M1.js 5.58 kB 0 B (0%)
index.js 5.51 kB 0 B (0%)
flows/Onboarding/hooks.js 4.67 kB 0 B (0%)
utils-CUgvJHl4.js 4.07 kB 0 B (0%)
FieldSetField-D0HdSLTs.js 4.04 kB 0 B (0%)

✅ Bundle size check passed

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-d6e65869u-remotecom.vercel.app
Latest Commit:2b49128

Deployed with vercel-action

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-nv7euw4rj-remotecom.vercel.app
Latest Commit:2b49128

Deployed with vercel-action

…es values

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage Report

✅ Coverage increased! 🎉

Metric Current Previous Change Status
Lines 89.59% 89.59% 0% ⚪
Statements 89.47% 89.47% 0% ⚪
Functions 88.49% 88.48% +0.01% 🟢
Branches 81.24% 81.24% 0% ⚪

Detailed Breakdown

Lines Coverage
  • Covered: 5405 / 6033
  • Coverage: 89.59%
  • Change: 0% (8 lines)
Statements Coverage
  • Covered: 5470 / 6114
  • Coverage: 89.47%
  • Change: 0% (8 statements)
Functions Coverage
  • Covered: 1430 / 1616
  • Coverage: 88.49%
  • Change: +0.01% (2 functions)
Branches Coverage
  • Covered: 3361 / 4137
  • Coverage: 81.24%
  • Change: 0% (10 branches)

✅ Coverage check passed

@gabrielseco
gabrielseco merged commit 3b5a69c into main Oct 16, 2026
13 checks passed
@gabrielseco
gabrielseco deleted the fix/daily-schedule-normalize-update-row branch October 16, 2026 09:46
@gabrielseco gabrielseco mentioned this pull request Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants