2a29104412
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com> Co-authored-by: Henry <nova28@users.noreply.github.com> Co-authored-by: nova28 <17953305+nova28@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: João Salavisa <joao.salavisa@gmail.com> Co-authored-by: Kandev Agent <agent@kandev.dev>
3.3 KiB
3.3 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| task-01-render-prompt-aliases | Render saved prompt aliases consistently | pending | 1 | docs/plans/prompt-alias-rendering/plan.md |
|
|
docs/specs/ui/system-design/prompt-alias-rendering.md |
Render saved prompt aliases consistently
Summary
Reuse the transcript's saved-prompt chip presentation in the anchored last- prompt bar and Prompt history, with no change to persisted message content or agent delivery.
Scope
- Extract the prompt-name subscription, prompt mention component factory, and
chip presentation from
apps/web/components/task/chat/messages/chat-message.tsxinto a reusable module. - Keep
lib/prompts/prompt-mention-segmentsas the only matching implementation. - Pass shared Markdown components to
apps/web/components/task/chat/anchored-last-prompt-bar.tsx. - Render recognized aliases through the shared text renderer in
apps/web/components/task/prompt-history-panel-content.tsxwhile preserving its collapsed overflow measurement, expansion cap, navigation, and mobile hit area. - Add focused Vitest assertions for recognized and unrecognized aliases in the pinned and history surfaces; retain existing transcript assertions.
- Extend the relevant existing Playwright coverage if the fixture can seed a saved prompt without introducing a separate test-only data path.
Exclusions
- Prompt parser, backend expansion, prompt persistence, APIs, WebSocket payloads, entity-reference behavior, prompt numbers, and raw-message rendering.
- General Markdown redesign or a second Prompt history layout.
Likely files
apps/web/components/task/chat/messages/chat-message.tsxapps/web/components/task/chat/messages/prompt-mention-components.tsxapps/web/components/task/chat/messages/chat-message.test.tsxapps/web/components/task/chat/anchored-last-prompt-bar.tsxapps/web/components/task/chat/anchored-last-prompt-bar.test.tsxapps/web/components/task/prompt-history-panel-content.tsxapps/web/components/task/prompt-history-panel-content.test.tsxapps/web/e2e/tests/chat/last-prompt-scroll.spec.tsapps/web/e2e/tests/task/prompt-history-panel.spec.ts
Targeted verification
cd apps/web && pnpm exec vitest run \
components/task/chat/messages/chat-message.test.tsx \
components/task/chat/anchored-last-prompt-bar.test.tsx \
components/task/prompt-history-panel-content.test.tsx
cd apps/web && pnpm run typecheck
cd apps/web && pnpm exec eslint \
components/task/chat/messages/chat-message.tsx \
components/task/chat/messages/prompt-mention-components.tsx \
components/task/chat/anchored-last-prompt-bar.tsx \
components/task/prompt-history-panel-content.tsx
Run the focused Playwright spec only when the local E2E backend/profile is available:
cd apps/web && pnpm exec playwright test \
e2e/tests/chat/last-prompt-scroll.spec.ts \
e2e/tests/task/prompt-history-panel.spec.ts
Risks
The history row is intentionally not converted to block Markdown: its one-line collapsed projection depends on measuring a text span. The shared text renderer must therefore produce the same chip nodes without changing row geometry.