Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

[plugin-grid] ObjectGrid's record-detail date fallback renders the MACHINE locale #4541

Closed

Description

@yinlianghui

Found while implementing #4272's residue. Filed rather than fixed: #4272's ruling limited the plugin-grid surface to "ONLY the two date-cell call sites" (the two 'short' consumers in the mobile card view), and this is a third, separate site that was never among them.

The site

packages/plugin-grid/src/ObjectGrid.tsx, inside renderRecordDetail's type-inference fallback:

return (span className="text-sm tabular-nums")[formatDate(value)](/span);

(written without raw angle brackets — the real line is a span wrapping formatDate(value))

formatDate is called with no options, so its default branch hands Intl an undefined tag. undefined is not "the user's locale", it is the machine's — the exact mechanism #4468/#4272 were about. On a zh console this cell renders Aug 15, 2024 while every neighbouring date cell now renders 2024年8月15日.

Why it is a separate site, measured

The #4272 residue comment named the two consumers as ObjectGrid.tsx:2778,2795 at its time of writing. Relocating by content across the intervening churn, both of those are the two calls that pass 'short', and they moved by a constant -121 line offset (2899/2916 at #4531's parent). This site's offset does not fit that mapping, so it was never one of the two.

Scope of the fix

Small and self-contained: the component already reads const displayLocale = useDisplayLocale(); at component level after #4272's PR, so this is one call site gaining { locale: displayLocale }. It needs its own red-first case — a zh session asserting the Chinese form in the record-detail panel, which is a different render path from the mobile card view.

Sibling context: #4272 (the formatter residue, where this was found), #4468 / PR #4512 (the six renderer sites), #4513 (plugin-timeline).


Generated by Claude Code

Activity

  1. self-assigned this
    on Aug 13, 2026
  2. yinlianghui commented on Aug 13, 2026

    @yinlianghui
    ContributorAuthor

    CLAIM — session_017Qqyix2QcnpUC9XeYVDzx3, branch claude/issue-4541-record-detail-date-locale. Dispatching a dev agent now.

    PM ruling (delegated decision authority; maintainer veto window open — record objections here): straightforward completion of #4272's channel inside the same file, sized honestly as a one-liner-plus-pins:

    1. Thread { locale: displayLocale } into renderRecordDetail's formatDate(value) call — the component already reads useDisplayLocale() at component level after PR fix(fields): the date formatter's last three en-US channels thread the display locale (#4272) #4544, so this is consumption, not plumbing.
    2. Red-first on a zh session at the record-detail rendering path (the drawer/detail partition of the card view — measure how the existing fix(fields): the date formatter's last three en-US channels thread the display locale (#4272) #4544 suite mounts and extend it); en output pinned byte-identical; expectations spelled explicitly per the standing "never pin against the machine" rule (label en cases as pins if the runner makes them coincide).
    3. Must-not-change: the two fix(fields): the date formatter's last three en-US channels thread the display locale (#4272) #4544-threaded 'short' cells, LinkCell (fix(plugin-grid): the link column renders a real anchor when the host publishes record URLs (#4490) #4531), kebab/rowCrudAffordances — untouched; full plugin-grid suite green.
    4. Changeset: plugin-grid patch (consumer threading, module-local — fix(app-shell): organization & invitation UI translates its six English holdouts (#4474) #4496 precedent).

    Sequencing: gate worktree creation on PR #4544 (armed, green) visible in origin/main — same file, and the hook line this fix consumes lands there. Disjoint from in-flight #4271/#4527/#4528/#4254.


    Generated by Claude Code


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions