One-page microblog (Twitter-like) MVP with server-backed feed and client hardening#7
Open
mentatai[bot] wants to merge 4 commits intomainfrom
Open
One-page microblog (Twitter-like) MVP with server-backed feed and client hardening#7mentatai[bot] wants to merge 4 commits intomainfrom
mentatai[bot] wants to merge 4 commits intomainfrom
Conversation
- Server:
- Add in-memory Tweets store and REST endpoints:
- GET /api/tweets (newest first)
- POST /api/tweets { text } (1..280 chars)
- POST /api/tweets/:id/like (increment likes)
- Update fallback page link to /api/tweets
- Client:
- Replace landing page with one-page feed:
- Compose box with 280-char counter and Post button
- Timeline showing posts, like button with counter, timestamps
- Minimal styling consistent with existing styles
- Wire up to new API endpoints
- Tests:
- Replace client tests to cover compose/post and like flows
- Robust fetch mocking via mockImplementation by URL/method
Mentat precommit script failed. Log: https://qa.mentat.ai/gh/AbanteAI/qa-party/log/451be634-b8d9-4d4a-8540-2898284e55e1
Co-authored-by: granawkins <50287275+granawkins@users.noreply.github.com>
- Update server app tests to target /api/tweets and root fallback - All client tests pass locally; server tweet tests pass Mentat precommit script failed. Log: https://qa.mentat.ai/gh/AbanteAI/qa-party/log/bb103b89-da87-46b0-b2da-c3b7d1c33a06 Co-authored-by: granawkins <50287275+granawkins@users.noreply.github.com>
- Validate items from GET /api/tweets before setting state - Guard POST /api/tweets optimistic prepend; refetch on unexpected shape - Extra safety when rendering the feed Mentat precommit script failed. Log: https://qa.mentat.ai/gh/AbanteAI/qa-party/log/e493ac37-68d9-441c-b7df-e4a975c156fa Co-authored-by: granawkins <50287275+granawkins@users.noreply.github.com>
- client/src/App.tsx: add `isTweet` type guard; use in parsing - client tests: make fetch mock helpers generic and type mock responses by URL/method Mentat precommit script passed. Log: https://qa.mentat.ai/gh/AbanteAI/qa-party/log/636b5476-4636-48f5-ad3a-ed223b0ec6b7 Co-authored-by: granawkins <50287275+granawkins@users.noreply.github.com>
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.
Implements a minimal “Twitter clone” as a single page.
Tests:
Notes:
Closes #? (Chat request: “Create a super basic twitter clone. just one page.”)
🤖 This PR was created with Mentat. See my steps and cost here ✨