Skip to content

fix(workflow): stage timeline mixes Chinese event lines and tiny 「刚刚」 timestamps #1489

Closed

Description

@Birfy

Problem

Written-by: FlyBotDebugger visual pass 4 (LIVE prod via cookie proxy :8765)

LIVE prod Workflow stage activity / timeline (main pane feed) mixes locales in an otherwise English UI:

  • Event lines such as 「任务已分配」 / 「开始」 next to English issue titles (#1460 - issue #1460…)
  • Relative timestamps render as tiny 「刚刚」 under the lines (low contrast / hard to read)

Distinct from #1477 (flowchart node Chinese sub-labels) and from #1470 (closed: English event-line mid-hash truncation).

Expected

  • Timeline copy matches the shell locale (English here): e.g. “Task assigned” / “Started”
  • Timestamps readable (size / contrast); prefer English relative time (“just now”) when UI is English

Context

issue-room

Owner

Birfy / bot-im

Activity

  1. Birfy commented on Oct 28, 2026

    @Birfy
    CollaboratorAuthor

    LIVE re-confirm (Asia/Shanghai 2026-10-28) — stronger symptom

    Owner asked bot-im to re-inspect two Workflows on prod tip ~55e1c27a (cookie proxy): 「FlyBot issue → 合入」 and 「PR → 合入」. Confirmed this issue’s 「刚刚」 timestamps, with a sharper correctness bug:

    Actual: Every timeline timestamp shows 「刚刚」, including old Done runs (e.g. #1445, #1499), not only in-flight events. Relative time never advances / never differentiates age.

    Expected: Relative (or absolute) times that age correctly for Done / historical events; “刚刚 / just now” only for truly recent lines.

    Still distinct from locale-only polish in the original body, but same root surface (timeline timestamp renderer). Please treat “stuck at 刚刚 for Done runs” as in-scope for this issue rather than filing a duplicate.

    Not filing separately (dedupe). Owner: 「这些问题也要提issue去改」 (t640u).

  2. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 28, 2026
  3. Birfy commented on Oct 28, 2026

    @Birfy
    CollaboratorAuthor

    Triage: agent-ready

    Written-by: Triage (2026-10-28T04:29Z, base ThinkFlowLab/FlyBot @ main; read issue body, the 2026-10-28 LIVE re-confirm comment, labels [], assignees [], and merged PR #1494)

    Readiness against the three conditions. (1) No open design conflict: the timeline already stores at on every message (push() in plugins/workflow/src/service.js), and every other workflow string follows the shell locale through the plugin's tr() (the convention #1494 used for its sidebar/header copy), so "English here, Chinese in the zh shell" needs no owner decision. (2) Scope is clear and enumerable — the timeline producer, the one kind:'time' renderer, the .wf-ts rule, one test file. (3) Not hold, not a tracking/umbrella issue, not group work.

    Why it is still valid despite #1494 (merged 2026-10-27T17:01Z, body claimed Fixes #1489). #1494 only changed client-side copy (plugins/workflow/client.js strings + i18n entry + test). On main the defect is untouched:

    • plugins/workflow/src/service.js:522 pushes { kind: 'time', text: '刚刚' } as a literal once, at emit time; client.js:421 renders message.text verbatim (h('div',{className:'wf-ts'}, message.text)), so every timestamp is frozen at 「刚刚」 forever, including Done runs (fix(host): a Workflow run Bot keeps the team tools, whatever the node's tools list says #1445, fix(host): refuse the team tools to a deleted Bot's Sessions #1499) — the sharper symptom in the 2026-10-28 re-confirm.
    • Event lines are hard-coded Chinese regardless of shell locale: 任务已分配 · … (523), 排队 · … (568), Workflow「…」已创建 · … (743), ⏸ 已暂停 · … (849), ▶ 已继续 · … (865), ■ 已停止 · … (893), <node> 不能开始:缺少输入 … (341), <node> 没有接到这一步(…) (386), 进行中/… 收到。我继续处理「…」 (948).
    • .wf-ts is font-size:11px; color:var(--bt-ink-3,#9a9a9a) — the low-contrast small type from the original report.

    Reproduction (no prod needed). Build and run the workflow plugin, start one task, let the run reach done, reopen the room: the first kind:'time' line still reads 「刚刚」 next to an English issue title such as #1460 - …; the same line renders 「刚刚」 for a run finished days ago. In English shell the system lines are still Chinese.

    Executable acceptance.

    1. With the English shell (host Tasks ≠ 任务), a new run's timeline reads English: "Task assigned · …", "Queued · …", "⏸ Paused · …" / "▶ Resumed · …" / "■ Stopped · …", and the failure line in English; with the Chinese shell the same lines read Chinese. No line mixes an English title with a Chinese frame.
    2. A timestamp line ages: at = now renders "just now"; at = now − 2h renders "2h ago"; at = now − 3d renders "3d ago" (same ages in Chinese: 刚刚 / 2 小时前 / 3 天前). Done and historical runs no longer show 「刚刚」.
    3. .wf-ts is at least 12px on a readable ink token (--bt-ink-2 or better), still centered and muted, not competing with event lines.
    4. Legacy persisted messages that only carry a Chinese text still render (fallback to the stored text) — no blank timeline after upgrade.

    Files to change. plugins/workflow/src/service.js (push { kind:'system', key, params } or keep text plus a key; drop the literal 刚刚 from the kind:'time' line — at is already on every message), plugins/workflow/client.js (translate key/params in Bubble and in the kind:'time' branch, format relative time from message.at, add .wf-ts size/token), the plugin's ZH map in plugins/workflow/client.js (and core/src/client/i18n.js only if a shared key is reused), then regenerate the generated bundles (core/client.js, patches/ds-bot/) with node scripts/ds-bot-patches.mjs generate && check.

    Tests (red first). Add plugins/workflow/test/timeline-locale.test.js:

    • renders a timeline message {kind:'system', key:'Task assigned', params:{…}} in an English host and asserts the English frame → fails today (the view prints the Chinese literal);
    • renders {kind:'time', at: Date.now() - 2*3600e3} and asserts "2h ago"/"2 小时前" without a text → fails today (message.text is 刚刚);
    • asserts the same two lines with a zh host; and a legacy {kind:'system', text:'任务已分配 · …'} still renders its text.
      Extend plugins/workflow/test/client.test.js with one assertion that .wf-ts is not 11px/lowest-ink in the emitted style block. Reverting the source change must turn these red.

    Risk tier. T1 by judgment — one plugin's service + client copy/format and CSS, plus tests; no auth, secrets, queue/merge, release, or persisted-schema change (at already exists). The controller recomputes the tier at merge time; this line is advisory.

    Claimed scope for Dev: locale of the timeline lines and the aging timestamp and the .wf-ts readability, in one PR on #1489 (do not reopen #1494; one PR per issue).

  4. self-assigned this
    on Oct 28, 2026
  5. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 28, 2026
  6. Birfy commented on Oct 28, 2026

    @Birfy
    CollaboratorAuthor

    Claiming as Dev (implement). Branch: dev/1489-workflow-timeline-locale — will base on main 62023599, cover the English/Chinese event lines and the always-「刚刚」 time rows, and open a PR with Fixes #1489.

  7. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 28, 2026
  8. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 28, 2026
  9. Birfy commented on Oct 28, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Triage

    Reconcile at 2026-10-28T10:35:25Z: PR #1557 already exists for this issue (branch dev/1489-workflow-timeline-locale, head c59e715dd1a69e5e789a412e4e7c4dbf0e6a5ba7, repo branch), so agent-ready is removed and nothing new is implemented here.

    Two blockers sit on that pull request, not on this issue:

    • mergeable_state: dirty — it conflicts with main and needs a rebase or update-branch.
    • Its body carries no Fixes #1489 line anywhere (the checkpoint block has "issue": 1489, but enqueue-guard reads Fixes #<n>), so the queue would refuse it as it stands; check the Owner:/Reviewer: lines in the first 20 lines at the same time.

    One issue, one pull request: no second branch and no second pull request for #1489.

  10. Birfy commented on Oct 28, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Triage

    Label repair at 2026-10-28T10:50:16Z: agent-pr added — this issue's open pull request is #1557 (this repository), head c59e715dd1a69e5e789a412e4e7c4dbf0e6a5ba7. Implementation stays on the pull request line; nothing new starts from this issue.

  11. added 2 commits that reference this issue on Oct 28, 2026
    22a1a38
    034aba2
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