Skip to content

feat(client): show the task id in the detail header - #68

Merged
cloader merged 1 commit into
cloader:devfrom
reysonk:feat/detail-task-id
Oct 31, 2026
Merged

cloader merged 1 commit into
cloader:devfrom
reysonk:feat/detail-task-id

Conversation

@reysonk

@reysonk reysonk commented Oct 30, 2026 •

Copy link
Copy Markdown

What

The task id is the only stable handle to talk about a card from outside the board, yet the UI never rendered it: TaskCard and TaskDetail use task.id only as a React key / controller argument, and the search box (filterTasks) is the only place it is ever matched. So a user could not answer "which card is t-mvo6xjqx-au429w?" without asking an agent.

This PR shows the id in the detail header, right after the "Updated … · last change by …" line, as a small monospace chip that copies the full id on click and briefly acknowledges with Copied / Copy failed, then returns to the id itself.

Why here

  • The header already carries the per-card affordances (v{version}, status pill, workspace), so the id belongs next to them, not in a new section.
  • Copying reuses the same failure-tolerant pattern as the existing copyPath helper (navigator.clipboard.writeText + a timed acknowledgement), so a denied clipboard never leaves a stuck label.
  • No new i18n namespace: three keys under the existing detail.sub.* group in both dictionaries.

Changes

File Change
src/client/board/TaskDetail.tsx idCopyState (idle/copied/failed) + copyTaskId with a 1500 ms reset timer and timer cleanup on unmount; chip rendered inside .dsh-atb-detail-sub
src/client/styles.ts .dsh-atb-detail-id chip styles (cursor: copy, monospace, data-state colours)
src/client/i18n/en.ts detail.sub.idTitle, detail.sub.idCopied, detail.sub.idCopyFailed
src/client/i18n/zh.ts same three keys
tests/detail-id.spec.tsx renders the id, copies on click, reports a denied copy, and checks the zh label
changelog.md Unreleased entry (zh + en)

Verification

  • npx vitest run tests/detail-id.spec.tsx → 3 passed
  • npx vitest run → 45 files / 586 tests passed
  • npx tsc --noEmit → clean
  • npm run build:client → lib/client.js 333.78 kB, the chip class present in the bundle

Notes

  • The id is displayed in full, not shortened: shortened session ids already use shortId(), but a task id must be quotable verbatim to be useful.
  • If feat(client): add Russian (ru) locale #67 (Russian locale) merges after this one, src/client/i18n/ru.ts needs the same three keys; I will send that follow-up once the merge order is settled.

The task id was never rendered anywhere in the board, so a card could not be
pointed at from a conversation, a log or a bug report: the search box matched
it, nothing displayed it. Render it next to the update line in the detail
panel as a monospace chip and copy it on click, with a short Copied/Copy
failed acknowledgement and the id always coming back afterwards.
@cloader
cloader merged commit adadbff into cloader:dev Oct 31, 2026
1 check passed
@cloader

cloader commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

维护者补充(2026-10-31)

感谢 @reysonk 的贡献!

本 PR 已合入 dev,合并提交为 adadbff。后续 #67 集成补齐了 3 个俄语复制提示词条,并增加对不同语言下复制成功、失败提示的测试。相关变更已纳入 0.9.7 更新日志。

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants