Repository navigation
Commit 9753d16
fix(console): audit log From / To filters use the platform date picker (#26061)
Fixes #25875
Clause-②: no
Metadata-protocol: none
## What changed
Setup → Audit Log drew the browser's native `input type=date` for its
From and To filters, which shows the operating system's `mm/dd/yyyy`
face and picker whatever the console's language. Both filters now draw
the platform date picker that a record form's `date` field draws (the
objectui#12642 family): a text box in the display locale's format, a
calendar popover, a clear button and today / tomorrow shortcuts.
- `ui/apps/console/src/pages/system/AuditLogPage.tsx`: From and To
render `getLazyFieldWidget('date')` (resolved once at module scope, as
`ScreenView` does for `lookup`) inside a `Suspense` with a `Skeleton`
fallback. Props: `id` (the existing label target), `value`, `onChange`
(keeps `setPage(0)`), `field={{ type: 'date', name, label }}`. The
`Input` import is dropped (no other use).
- No direct `DatePickerField` import and no new subpath export: the
picker stays in its own lazy chunk, reached through the existing public
`getLazyFieldWidget`.
- The filter state and the request do not change: the picker writes
`YYYY-MM-DD`, and `''` on clear, as the native input did, so the
`created_at` bounds are the same (`$gte` the From day, `$lte` the To day
at `T23:59:59`). "Clear filters" resets both pickers through the same
state.
## Tests
`AuditLogPage.filterLabels-13224.test.tsx` flips its native-input pins:
- From and To each still name exactly one control, and it is the
picker's text box (`type=text`, inside the `date-picker` slot), never
its calendar button; no `input type=date` is left on the page.
- The live-filter case types `10/01/2026` (en-US display format) and
blurs, then `10/20/2026` and presses Enter. The requests carry `{
created_at: { $gte: '2026-10-01' } }` and then `{ created_at: { $gte:
'2026-10-01', $lte: '2026-10-20T23:59:59' } }`.
## Verification (head `63114661`, after merging `origin/main`)
- `vitest run --project @object-ui/console` over the six
`AuditLogPage.*.test.tsx`, `consolePagesLocale-secondPass-13460`,
`consoleFaces.displayLocale-9909` and `orphanedPageComponentRefs-10520`:
Test Files 9 passed (9), Tests 68 passed (68).
- `turbo run type-check --filter=@object-ui/console` (with its `^build`
closure): 71 successful, 71 total, exit 0.
- eslint over the two changed files: 0 errors (2 warnings already on
`main`, on lines this diff does not touch).
- Ablation (fix committed first; the page file restored from `HEAD` and
its blob hash compared): with `AuditLogPage.tsx` swapped for the base
copy (2 native date inputs, 0 picker), the flipped suite goes red, 2
failed / 1 passed. Restored: hash matches `HEAD`, `git diff HEAD` empty.
- `dispatch-gates --commands` derived 34 commands. All 34 exited 0, and
`--ran` reconciles: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.
`check-changeset-fixed` (its roster lives under `.changeset/`) also
exited 0. `check-sdui-manifest` is green, so
`scripts/sdui-manifest.record.json` is untouched.
## Acceptance notes
- The audit log's English filter labels belong to objectui#13521. This
PR changes the control only.
- The picker's own strings (`fields.datePicker.*`) already ship in every
locale pack. No locale file is touched.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9a0af4e commit 9753d16
3 files changed
Lines changed: 74 additions & 11 deletions
File tree
- .changeset
- ui/apps/console/src/pages/system
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
137 | 153 | | |
138 | 154 | | |
139 | 155 | | |
| |||
145 | 161 | | |
146 | 162 | | |
147 | 163 | | |
| 164 | + | |
148 | 165 | | |
149 | 166 | | |
150 | 167 | | |
| |||
160 | 177 | | |
161 | 178 | | |
162 | 179 | | |
163 | | - | |
164 | | - | |
165 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
166 | 188 | | |
167 | 189 | | |
168 | 190 | | |
| |||
187 | 209 | | |
188 | 210 | | |
189 | 211 | | |
| 212 | + | |
190 | 213 | | |
| 214 | + | |
| 215 | + | |
191 | 216 | | |
192 | | - | |
| 217 | + | |
| 218 | + | |
193 | 219 | | |
194 | 220 | | |
195 | 221 | | |
196 | 222 | | |
| 223 | + | |
| 224 | + | |
197 | 225 | | |
198 | | - | |
| 226 | + | |
| 227 | + | |
199 | 228 | | |
200 | 229 | | |
201 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | | - | |
| 73 | + | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| |||
562 | 570 | | |
563 | 571 | | |
564 | 572 | | |
565 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
566 | 583 | | |
567 | 584 | | |
568 | 585 | | |
569 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
570 | 594 | | |
571 | 595 | | |
572 | 596 | | |
| |||
0 commit comments