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: Restore the v4 timeline scroll-to-bottom control to the icon-only design used by ~/workspace/z-code-2 while preserving its position and accessible name.
Architecture: Keep ConversationTimeline as the owner of visibility and click behavior. Add one module-level button renderer that uses the shared Button primitive and ArrowDownIcon, then reuse it in both the composer-dock and no-dock placements.
Tech Stack: React 19, TypeScript, Vitest, lucide-react, shared UI Button.
chat.scrollToBottom translation for aria-label and title; do not show label text inside the button.Button primitive on desktop and mobile Web.Files:
packages/ui/test/v4SessionPaneLayoutParity.test.tspackages/ui/src/v4/ConversationTimeline.tsxInterfaces:
handleBackToBottom, TID_V4_TIMELINE_BOTTOM, and chat.scrollToBottom translation.Produces: an icon-only button with the same test id, click behavior, placement, accessible label, and title.
[x] Step 1: Write the failing regression test
Add a source-level parity assertion to the existing layout test:
expect(timelineSource).toContain('<ArrowDownIcon className="size-4" />');
expect(timelineSource).not.toMatch(/>\s*回到底部\s*</);
expect(timelineSource).toContain('id: "chat.scrollToBottom"');
Run: pnpm exec vitest run packages/ui/test/v4SessionPaneLayoutParity.test.ts
Expected: FAIL because ConversationTimeline.tsx still renders the visible text 回到底部 and does not render ArrowDownIcon.
In ConversationTimeline.tsx, import ArrowDownIcon, the shared Button, and useZCodeIntl. Define a module-level ConversationBackToBottomButton that renders:
<Button
aria-label={label}
title={label}
type="button"
size="icon"
variant="outline"
className={cn("rounded-full bg-card hover:bg-card-selected", className)}
data-testid={TID_V4_TIMELINE_BOTTOM}
onClick={onClick}
>
<ArrowDownIcon className="size-4" />
</Button>
Use intl.formatMessage({ id: "chat.scrollToBottom" }) for label and reuse the component in both existing placement branches without changing their positioning semantics.
Run: pnpm exec vitest run packages/ui/test/v4SessionPaneLayoutParity.test.ts
Expected: PASS.
Run:
pnpm typecheck
pnpm lint
git diff --check
Expected: all commands exit 0.
Commit:
git add docs/superpowers/plans/2026-07-12-v4-scroll-bottom-icon.md packages/ui/test/v4SessionPaneLayoutParity.test.ts packages/ui/src/v4/ConversationTimeline.tsx
git commit -m "fix(ui): restore scroll-to-bottom arrow icon"