feat(frontend): follow-up parser hardening, unit tests, and chip affordance (FE-001)#72
Merged
avsolatorio merged 2 commits intodevfrom Apr 4, 2026
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)###-style headings and the existing bold/colon variants.Unit tests (
frontend/lib/__tests__/parse-follow-ups.test.ts)*/•/ numbered lists, blank lines, the four-item cap, and intro text before the first bullet.Suggestion chips (
frontend/components/message.tsx)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)pnpm test:unitusing Node’s test runner viatsx.Tasks
TODO/README.md.How to test
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
TODO/FE-001-follow-ups-parser-and-chips.md