Repository navigation
Conversation
Code Metrics Report
Details | | main (94f6a5a) | #546 (28c783b) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 88.1% | 88.4% | +0.2% |
| Files | 207 | 207 | 0 |
| Lines | 6176 | 6225 | +49 |
+ | Covered | 5446 | 5507 | +61 |
+ | Test Execution Time | 2m20s | 2m19s | -1s |Code coverage of files in pull request scope (79.7% → 83.0%, patch 82.3%)
Reported by octocov |
There was a problem hiding this comment.
🟡 Changes recommended
Datetime handling remains inconsistent across configured timezones and operator changes, while permissive parsing can silently alter invalid values.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates DataTable datetime filters to use RFC 3339 instants while retaining local-time editing.
Changes:
- Normalizes datetime values during editing and submission.
- Displays persisted instants as local picker values.
- Adds documentation, tests, and release metadata.
File summaries
| File | Description |
|---|---|
packages/core/src/components/data-table/toolbar.tsx |
Applies datetime conversion in filter editors. |
packages/core/src/components/data-table/toolbar.test.tsx |
Tests datetime serialization and ranges. |
packages/core/src/components/data-table/filter-value-utils.ts |
Adds normalization and local-part helpers. |
packages/core/src/components/data-table/filter-value-utils.test.ts |
Tests normalization and picker hydration. |
docs/components/data-table.md |
Documents the RFC 3339 contract. |
.changeset/bright-clocks-wait.md |
Records the patch-level behavior fix. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: IzumiSy <982850+IzumiSy@users.noreply.github.com>
Co-authored-by: IzumiSy <982850+IzumiSy@users.noreply.github.com>
Co-authored-by: IzumiSy <982850+IzumiSy@users.noreply.github.com>
Co-authored-by: IzumiSy <982850+IzumiSy@users.noreply.github.com>
e2ee407 to
fb64592
Compare
|
@copilot fix CI errors |
Co-authored-by: IzumiSy <982850+IzumiSy@users.noreply.github.com>
Addressed in 78003cc. I fixed the remaining datetime validation paths to use the configured AppShell timezone consistently and verified with targeted DataTable tests plus lint. |
|
@copilot fix CI errors by fixing docs |
Co-authored-by: IzumiSy <982850+IzumiSy@users.noreply.github.com>
Fixed in 514914f. I resynced the generated DataTable docs outputs with the docs pipeline and verified |
interacsean
left a comment
There was a problem hiding this comment.
We'll need to be loud about the importance of
If it is not specified as the business's timezone, then filtering may have unexpected results — For us in Australia/Japan timezones, when we search for a date, we may get misses when we expect hits for document dates that are coded on a US timezone
The real problem here is that document dates which are calendar dates, are coded as instants, which is incorrect but this was a problem we created some time ago
|
Claude found: Major
The description admits this (“normalized when re-applied”), but it undercuts the stated reason for the PR, which is a reliable query contract. Fix: normalize where values enter the system. parseCollectionSearchParams already has the table metadata and knows the field types, so it can normalize datetime fields there. The DataTable could also normalize its filters once when it mounts. The timezone isn’t used everywhere, so filters and cells can disagree.
When the two zones differ (the exact setup the new tests use), a row can display as 9 Oct 01:00 while a filter for “after 9 Oct 00:00” excludes it. Fix: pass useTimeZone().value into the date cell renderer and into toFilterValue. A visible contract change ships as a patch, and the docs weren’t updated.
Fix:
|
|
@copilot resolve the merge conflicts in this pull request |
…fc3339 # Conflicts: # docs-manifest.json Co-authored-by: IzumiSy <982850+IzumiSy@users.noreply.github.com>
Motivation
DataTable.Filtersemitted local datetime strings without a timezone and passed them straight to GraphQL collection queries. PlatformDateTimefilters require RFC 3339 instants, so these values were not a reliable query contract.Design Decision
Local-time selection, instant serialization
The picker continues to present the user's local date and time. On input it converts that local selection to an RFC 3339 UTC instant with
Date#toISOString()rather than appendingZ, which would change the selected instant. Existing instants are converted back to local picker parts when displayed.Backward compatibility
Previously stored timezone-less datetime filters remain readable and are normalized when re-applied. Date and time filters retain their existing
YYYY-MM-DDandHH:mmformats.Summary