Skip to content

Reactions#42

Merged
alexgarrettsmith merged 4 commits into
mainfrom
reactions
Jul 3, 2026
Merged

Reactions#42
alexgarrettsmith merged 4 commits into
mainfrom
reactions

Conversation

@alexgarrettsmith

Copy link
Copy Markdown
Collaborator

No description provided.

alexgarrettsmith and others added 2 commits July 3, 2026 08:20
Users can toggle emoji reactions on ideas. The whole feature is gated
behind a Laravel Pennant 'reactions' flag that defaults to off: the
route is protected by EnsureFeaturesAreActive, and the reaction bar
only renders when the flag is active.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

⚠️ High Risk

Reaction Mutations
Reason: Creates and deletes user-associated reaction records (toggle logic) on an authenticated POST endpoint — mutates user data.

  • app/Http/Controllers/ReactionController.php (added)
  • app/Http/Requests/StoreReactionRequest.php (added)
  • routes/web.php (modified)
  • tests/Feature/Ideas/ReactToIdeaTest.php (added)

Medium Risk

Reaction Data Model
Reason: New table with cascade-delete foreign keys and a composite unique constraint that enforces reaction dedup.

  • app/Models/Reaction.php (added)
  • database/migrations/2026_07_02_000000_create_reactions_table.php (added)
  • database/factories/ReactionFactory.php (added)

Idea Reaction Payload
Reason: Adds conditional aggregation logic to the shared Idea resource and eager-loads a new relation into the existing idea-show flow.

  • app/Http/Resources/IdeaResource.php (modified)
  • app/Http/Controllers/IdeaController.php (modified)
  • app/Models/Idea.php (modified)

Low Risk

Reaction UI

  • resources/js/Components/ReactionBar.vue (added)
  • resources/js/Pages/Ideas/Show.vue (modified)

Migration Test

  • tests/Feature/Migrations/SplitNameBackfillTest.php (modified)

Skip

Auto-generated

  • resources/js/actions/App/Http/Controllers/ReactionController.ts (auto-generated — skip)
  • resources/js/actions/App/Http/Controllers/index.ts (auto-generated — skip)
  • resources/js/routes/feedback/index.ts (auto-generated — skip)

5 groups, 4 high-risk files to focus on

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Database
────────

Required

  • Run php artisan migrate to create the reactions table (idea_id/user_id/emoji with unique constraint and cascade-on-delete FKs) — database/migrations/2026_07_02_000000_create_reactions_table.php

Deployment
──────────

Verify

  • Rebuild and deploy front-end assets (npm run build) so the new reaction UI ships — resources/js/Components/ReactionBar.vue, resources/js/Pages/Ideas/Show.vue
  • Confirm the generated Wayfinder route/action files are deployed with the build so feedback.react resolves client-side — resources/js/actions/App/Http/Controllers/ReactionController.ts, resources/js/routes/feedback/index.ts

Operational
───────────

Nice to confirm

  • New unauthenticated-blocked POST endpoint feedback.react is live behind auth and reachable through any proxy/WAF rules — routes/web.php

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

QA checklist — Emoji reactions on feedback ideas

Before you start: Sign in with a test account and open an existing feedback idea's detail page. Have a second account handy for the shared-count check.

  • On an idea page, find the reaction row below the description — you should see a reaction (smiley) picker button and no counts yet if nobody has reacted.
  • Click the picker button — a small popover should open showing the five emoji options (👍 ❤️ 🎉 🚀 👀).
  • Click one emoji (e.g. 🚀) — the popover closes and a pill for that emoji appears in the row showing a count of 1, highlighted as your reaction.
  • Click that same emoji pill again — the reaction is removed and its pill disappears (count drops back to zero).
  • Add two different emojis (e.g. 👍 then 🎉) — both pills should show, each with count 1, confirming a user can hold multiple distinct reactions at once.
  • Open the picker, click outside it (or press Escape) — the popover should close without adding a reaction.
  • From the second account, react with an emoji the first account already used — the count on that pill should increase to 2, showing counts are shared across users.
  • Sign out and open the same idea — reaction pills and their counts still show, but the picker/pills are disabled and you should see a "Sign in to react" hint; clicking does nothing.
  • While signed out, confirm attempting to react redirects you to the login page rather than recording anything.

@alexgarrettsmith alexgarrettsmith merged commit db67f25 into main Jul 3, 2026
4 checks passed
@alexgarrettsmith alexgarrettsmith deleted the reactions branch July 3, 2026 07:58
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.

1 participant