For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Show the feedback ticket issue ID in the “My feedback” detail view and provide a copy button for the raw ID.
Architecture: Keep the feature inside TicketDetailView because the existing FeedbackTicketDetail.id already contains the stable issue identifier. Use the browser clipboard API directly from the UI component and log copy failures through the UI logger.
Tech Stack: React 19, TypeScript, Vitest static markup tests, lucide-react icons, existing Button UI primitive.
Files:
Create: docs/ui/feedback-ticket-detail-issue-id.md
[x] Step 1: Write the spec
Document that FeedbackTicketDetail.id is displayed as Issue #<id>, the copy action writes only <id>, and failure logging uses packages/ui/src/logger.ts.
Confirm the change does not alter feedback service APIs, realtime stream boundaries, or remote-control delivery semantics.
Files:
Modify: packages/ui/test/feedbackTicketDetail.test.ts
[x] Step 1: Add the test
it("shows the issue id with a copy action", () => {
const html = renderToStaticMarkup(
createElement(
ZCodeIntlProvider,
{ initialLocale: "zh-CN" },
createElement(TicketDetailView, {
ticket: createTicket(),
feedbackService: {} as IFeedbackService,
onRefresh: vi.fn(),
onOpenProcess: vi.fn(),
}),
),
);
expect(html).toContain("Issue #");
expect(html).toContain("ticket-1");
expect(html).toContain('aria-label="复制 issue 编号"');
});
[x] Step 2: Run the focused test and verify red
Run: pnpm vitest run packages/ui/test/feedbackTicketDetail.test.ts
Expected: the new test fails because TicketDetailView does not render the issue ID or copy action yet.
Files:
packages/ui/src/feedback/TicketDetail.tsxpackages/ui/src/i18n/locales/zh-CN.tsModify: packages/ui/src/i18n/locales/en-US.ts
[x] Step 1: Add component state and copy handler
Import useCallback, useEffect, useRef, useState, Check, CopyIcon, and the UI logger. Track a transient copied state and write ticket.id to navigator.clipboard.writeText.
Place a compact Issue #<id> row below the status indicator and above the title. The copy button uses Button variant="ghost" size="icon-sm" and an accessible localized label.
Add:
"feedback.detail.issueCopy": "复制 issue 编号",
"feedback.detail.issueCopied": "已复制 issue 编号",
"feedback.detail.issueCopyFailed": "复制 issue 编号失败",
and English equivalents:
"feedback.detail.issueCopy": "Copy issue ID",
"feedback.detail.issueCopied": "Issue ID copied",
"feedback.detail.issueCopyFailed": "Failed to copy issue ID",
Files:
Test: packages/ui/test/feedbackTicketDetail.test.ts
[x] Step 1: Run focused test
Run: pnpm vitest run packages/ui/test/feedbackTicketDetail.test.ts
Expected: all tests in the file pass.
Run: pnpm typecheck
Expected: TypeScript completes successfully.
Run: pnpm lint
Expected: oxlint completes successfully.
Run:
git add docs/ui/feedback-ticket-detail-issue-id.md docs/superpowers/plans/2026-06-16-feedback-ticket-detail-issue-id.md packages/ui/test/feedbackTicketDetail.test.ts packages/ui/src/feedback/TicketDetail.tsx packages/ui/src/i18n/locales/zh-CN.ts packages/ui/src/i18n/locales/en-US.ts
git commit -m "feat(ui): show feedback issue id in details"