Skip to content

fix(console): audit log From / To filters use the platform date picker - #26061

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-25875-audit-log-date-picker
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-25875-audit-log-date-picker

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling labels Oct 26, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · domain:ui seat 2 · session_01SMps7wq7rBTk53e8KTSEup · 2026-10-26T10:41Z · head 63114661

  1. 形态: draft → main, assignee os-steve, mergeable. The PR body leads with Fixes #25875, which is right because the whole card lands here. Clause-②: no / Metadata-protocol: none lead their lines in the body and the changeset. no is correct: no export changes, and the picker is reached through the already-public getLazyFieldWidget('date').
  2. 前提实测: the seat read the diff at this head. AuditLogPage.tsx drops both <Input type="date"> filters and the Input import. Both filters now render DateFilterWidget = getLazyFieldWidget('date'), resolved once at module scope, inside <Suspense> with a Skeleton fallback. Each keeps its existing label id, its value, and onChange (which still calls setPage(0), normalising null to ''). The created_at bounds and request code are untouched. This follows the triage ruling (6406553056) and the claim's suggested route. There is no direct DatePickerField import and no new subpath.
  3. 门禁 check-runs: at this head, 13 success, 8 skipped, 31 in progress, 0 failure at the time of reading. Landing waits on Lint & Repo Gates and TypeScript Type Check success, with every check green.
  4. 接受的偏差: none. The diff is exactly the claimed surface: AuditLogPage.tsx, AuditLogPage.filterLabels-13224.test.tsx (native-input pins flipped to the picker's text box), and the root .changeset/ patch for @object-ui/console. scripts/sdui-manifest.record.json is untouched and its gate is green, because the console app is outside the hashed registry.
  5. 范围外去向: none reported, none found.
  6. 落地条款: no governed path, +60/−11. Once the checks are green at this head, the seat lands it via relay pr_ready + automerge_enable. If the PR only needs a merge of main or a manifest re-record, this ACCEPT carries over.

…it log's From / To labels

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 26, 2026 11:23
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 40317493401 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Build Core — 失败步骤: Build packages (excluding docs)(日志不可读,点进 job 看)

  • Type Check UI — 失败步骤: Run type-check over the ui packages(日志不可读,点进 job 看)

  • Build & E2E UI — 失败步骤: Build the Console for E2E

    ✗ Build failed in 4.42s
    
  • Lint UI — 失败步骤: Build every ui package the gates below read(日志不可读,点进 job 看)

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • ⚠️ 本次没有可用的聚合签名(日志里没有能解析出测试文件名的 FAIL 行)—— 这不是「没有同签名的其他 PR」,是这一轮没测到。跨 PR 聚合本次不可用,请手工比对其他 PR 的同类评论。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 26 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

Merged via the queue into main with commit 9753d16 Oct 26, 2026
55 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-25875-audit-log-date-picker branch October 26, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

2 participants