Skip to content

feat(frontend): follow-up parser hardening, unit tests, and chip affordance (FE-001)#72

Merged
avsolatorio merged 2 commits intodevfrom
feat/fe-001-follow-ups-parser-chips
Apr 4, 2026
Merged

feat(frontend): follow-up parser hardening, unit tests, and chip affordance (FE-001)#72
avsolatorio merged 2 commits intodevfrom
feat/fe-001-follow-ups-parser-chips

Conversation

@avsolatorio
Copy link
Copy Markdown
Owner

Summary

Closes #63

Implements FE-001 (follow-up parser hardening, unit tests, and clearer suggestion chips). Suggested follow-ups are easier to parse when the model adds blank lines or markdown heading prefixes, and the UI makes chips read more clearly as clickable actions.

Changes

  • parseFollowUps (frontend/lib/parse-follow-ups.ts)

    • Documents the expected heading and list formats (for alignment with backend/prompt work, e.g. BE-001).
    • Tolerates optional ### -style headings and the existing bold/colon variants.
    • Skips blank lines after the heading and between list items instead of stopping at the first empty line, so multi-line spacing from the model does not drop later bullets.
  • Unit tests (frontend/lib/__tests__/parse-follow-ups.test.ts)

    • Covers missing heading, bullets, heading variants, * / / numbered lists, blank lines, the four-item cap, and intro text before the first bullet.
  • Suggestion chips (frontend/components/message.tsx)

    • Keeps outline Button-style chips; adds a small message icon (aria-hidden) so the affordance matches “suggested reply” without changing the visible label text.
  • Scripts (frontend/package.json)

    • Adds pnpm test:unit using Node’s test runner via tsx.
  • Tasks

    • Marks FE-001 as done and refreshes TODO/README.md.

How to test

cd frontend && pnpm test:unit

Manually: complete an assistant reply that includes a Suggested follow-ups: block with blank lines between items; confirm all bullets show as chips and behave as before (send / populate input per existing behavior).

Related

  • Task: TODO/FE-001-follow-ups-parser-and-chips.md
  • Coordinate heading wording with BE-001 if the model output format is tightened on the backend.

avsolatorio and others added 2 commits April 2, 2026 01:30
- Harden parseFollowUps: optional ### heading, skip blank lines between items
- Document heading/list rules in module comment for BE alignment
- Add node:test suite and test:unit script (tsx --test)
- Show MessageSquare icon with outline chips for clearer affordance
- Mark FE-001 done and refresh TODO index

Made-with: Cursor
@avsolatorio avsolatorio changed the title Feat/fe 001 follow ups parser chips feat(frontend): follow-up parser hardening, unit tests, and chip affordance (FE-001) Apr 2, 2026
@avsolatorio avsolatorio merged commit 38aff66 into dev Apr 4, 2026
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.

[FE-001] Follow-ups — parser hardening and chip affordance

1 participant