Skip to content

objectui: a second hardcoded aria-label of "Resize drawer" in plugin-detail's RecordDetailDrawer — same literal #5506 localized in NavigationOverlay #5733

Description

@yinlianghui

Found while sweeping the consumption radius for objectstack#5506 (objectui PR objectstack-ai/objectui#3423). Outside that task's file fence (packages/plugin-detail was not in it), so filed rather than fixed there.

(Note for whoever edits this issue: the body below deliberately avoids writing a JSX open-tag literally. GitHub's body sanitizer strips a left-angle-bracket followed by a letter as an HTML tag at rest and silently truncates everything after it — the first version of this issue was cut off mid-sentence at a div tag. Describe tags, don't paste them.)

The finding

packages/plugin-detail/src/RecordDetailDrawer.tsx:277 carries a byte-identical twin of the literal #5506 just removed from packages/components/src/custom/navigation-overlay.tsx:

  • guarded by {resizable && ( … )}
  • a plain div element carrying role="separator", aria-orientation="vertical", aria-label="Resize drawer", and onPointerDown={handleResizePointerDown}
  • className "hidden sm:block absolute left-0 top-0 h-full w-1.5 cursor-col-resize …"

Same control (a drag-resize handle on a record drawer's left edge), same shape (a separator with no visible label, so the literal is the control to a screen reader), same defect: a zh/ja/de session gets one English string in an otherwise localized drawer.

This is not dormant code — RecordDetailDrawer is the detail drawer the console renders, and the handle is only gated on resizable.

Why this should be a one-liner

Two halves of the fix already exist once objectui PR objectstack-ai/objectui#3423 merges:

  1. The key common.resizeDrawer lands in all ten locale packs in that PR (en "Resize drawer", zh "调整面板宽度", de "Panelbreite anpassen", …).
  2. RecordDetailDrawer.tsx already has the hook wired — const { t } = useDetailTranslation(); at line 136, used elsewhere in the same file.

So the change is: add 'common.resizeDrawer': 'Resize drawer' to DETAIL_DEFAULT_TRANSLATIONS in packages/plugin-detail/src/useDetailTranslation.ts (that map is what keeps the no-provider path English), then swap the literal for t('common.resizeDrawer') at line 277.

Acceptance

  • RecordDetailDrawer's separator announces the session locale's value; a zh session sees no "Resize drawer" anywhere.

  • With no I18nProvider mounted it still resolves to English — plugin-detail's existing suites and the live e2e specs address this chrome by English accessible name with no provider.

  • A test under packages/plugin-detail/src/__tests__/, in the shape of objectui's packages/components/src/__tests__/navigation-overlay-chrome-i18n.test.tsx.

    Note the trap that PR hit and paid for: createI18n calls instance.use(initReactI18next), and initReactI18next registers that instance as react-i18next's module-global default. The registration survives unmount and cleanup(), so once any test in a file mounts a provider with defaultLanguage: 'de', every later "no provider" render in that same file silently resolves against the German instance. Any no-provider assertion must therefore live in its own test file that never imports the provider — never in a describe block after a provider mount.

Blocked-by: the common.resizeDrawer key, which lands in objectstack-ai/objectui#3423 (objectstack#5506). Trivially unblockable by adding the key in the same PR if this is picked up first.

Activity

  1. changed the title [-]objectui: a second hardcoded `aria-label="Resize drawer"` in plugin-detail's RecordDetailDrawer — same literal #5506 localized in NavigationOverlay[/-] [+]objectui: a second hardcoded `aria-label` of "Resize drawer" in plugin-detail's RecordDetailDrawer — same literal #5506 localized in NavigationOverlay[/+] on Aug 6, 2026
  2. yinlianghui commented on Aug 6, 2026

    @yinlianghui
    CollaboratorAuthor

    分诊:bug + pm:queue + repo:objectui(objectui 分片 PM,会话 session_01GTRjn8xBqp75dk7kFupVRt)。

    判级理由:具名落点(packages/plugin-detail/src/RecordDetailDrawer.tsx:277,role="separator" 拖拽手柄的英文 aria-label)、与 objectstack#5506 同类同证据链。该文件 :136 已接 useDetailTranslation(),common.resizeDrawer 键随 objectui PR #3423 落地(auto-merge 已挂)后为一行修。

    派发前置:以 origin/main 为准确认 #3423 已合并、common.resizeDrawer 在十包齐;文件面 packages/plugin-detail,与队内 #3419(app-shell)/#3422(fields)互不相交,可同批。


    Generated by Claude Code

  3. self-assigned this
    on Aug 6, 2026
  4. yinlianghui commented on Aug 6, 2026

    @yinlianghui
    CollaboratorAuthor

    认领:objectui 分片 PM 并行批第 28 单
    会话:session_01GTRjn8xBqp75dk7kFupVRt
    分支:claude/issue-5733-detaildrawer-resize-i18n(落地仓 objectui,repo:objectui 路由)
    Worktree:objectui-issue-5733
    文件面:packages/plugin-detail/src/RecordDetailDrawer.tsx + 该包测试 + changeset(不动 i18n 包——common.resizeDrawer 已随 objectui PR #3423 落 main@5dd012776;越界即停,报告说明)
    与在飞第 26 单(#3419,app-shell)、第 27 单(#3422,fields)文件面互不相交。


    Generated by Claude Code

  5. yinlianghui commented on Aug 6, 2026

    @yinlianghui
    CollaboratorAuthor

    验收:ACCEPT → objectui PR #3429(并行批第 28 单,会话 session_01GTRjn8xBqp75dk7kFupVRt),CI 16/16 绿,已转 ready + auto-merge,合并后本单自动关闭。

    复核要点:

    1. 两行实质改动 + 5 个围栏内文件,零越界。复用 common.resizeDrawer 而非新造 detail.resizeDrawer 的取舍正确——同一控件形态从两个包渲染不该有两份会漂移的翻译;成为 DETAIL_DEFAULT_TRANSLATIONS 首个 common.* 条目已留注释说明。
    2. 测试方向三分表如实:zh/de/ja 红转绿(反向验证实跑,报错串逐字吻合),en 与无 provider 双向绿(钉回退,PR 正文明说不冒充复现)。无 provider 断言独立成文件遵守了 react-i18next 全局实例陷阱;resizable:false 用例堵了空树误绿。
    3. 消费半径按调用方扫(kanban/calendar/gantt 宿主),无英文名寻址。
    4. stash 事故处置堪称范本:dev 在 PM 警告送达前自行侦测,把 fix(seed-loader): resolve seed references for marketplace-installed objects (engine-registry fallback) #3422 被丢的 stash commit 用耐久 ref 抢救、验证 byte-identical 后归还,自己的改动手工重写,提交经远端 diff 证明恰为围栏文件。危害根因两仓各有立案:objectui#3430(hook/文档侧)+ 本仓 git stash is repo-GLOBAL across worktrees — two parallel agents popped each other's stashes today; AGENTS.md's worktree discipline never warns about it #5742(AGENTS.md/os-dev 定义侧,已分诊)。

    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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions