Dedup loadScopedActivityEvents; cover shared feedback card parts - #837
Merged
Merged
Conversation
- Extend loadScopedActivityEvents with an optional includeProjectDir mode (LEFT JOIN agents, COALESCE(ae.project_dir, a.cwd)) and switch handleWorkingTimeByProject to it, removing the hand-inlined copy of the in-range + DISTINCT ON boundary carry-in queries so the two can't drift. Existing real-DB boundary tests for /activity/stats, /activity/daily-status, and /activity/working-time-by-project cover all three consumers. - Add feedback-card-parts.test.tsx (16 tests) for the FeedbackReplyForm and FeedbackResolutionFooter shared components extracted in #836: reply trigger toggle, Cmd/Ctrl+Enter submit, Escape/Cancel, whitespace Send gating, pending disable + spinner placement, inline vs sidebar action-row layout, Dismiss/Mark fixed/Reopen resolution routing, and resolution banner states. Verified non-vacuous with a 10-mutation battery (10/10 caught). Co-Authored-By: Claude Fable 5 <noreply@anthropic.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 freeto 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.
Recurring test-enforcer run (2026-07-26). Local suite was green on first pass (8th consecutive run: check ok; server 2327 pass / 8 skip, web 415, ext 60, scripts 4; E2E 170 pass / 12 skip), flakes list empty, CI scan clean — so this run closed the queued
next_focusrefactor and added coverage for the newest untested extraction.Refactor
loadScopedActivityEvents(apps/server/src/server/activity-query.ts) gains an optionalincludeProjectDirmode (LEFT JOINagents,COALESCE(ae.project_dir, a.cwd) AS project_dir,ae.-aliased columns).handleWorkingTimeByProject(apps/server/src/routes/activity/metrics-routes.ts) now uses it instead of its hand-inlined copy of the in-range +DISTINCT ONboundary carry-in queries, so the two implementations can no longer drift./activity/stats,/activity/daily-status(Add boundary carry-in tests for /activity/stats and /activity/daily-status #797), and/activity/working-time-by-project(Add boundary-merge tests for working-time-by-project #787) cover all three consumers and pass unchanged (96 activity tests green).Coverage
feedback-card-parts.test.tsx(16 tests) for theFeedbackReplyForm+FeedbackResolutionFootershared components extracted in Extract shared FeedbackReplyForm + FeedbackResolutionFooter #836 — their interactive behavior was previously untested at both call sites (diff-annotations inline variant, reviews-sidebar variant):isPendingsurvived until the complementary pending-dismissal case was added).cleanup()inafterEachper the repo's no-auto-cleanup vitest convention.Validation
pnpm run check, full unit suite (server 2327/8 skip, web 431, ext 60),pnpm run finalize:web,lint:web,prettier --check, andpnpm run test:e2e(170 pass / 12 skip) all green after the changes. One general review agent inspected the diff: no must-fix/should-fix findings; one nit applied (split a two-scenario spinner test into twoitblocks).🤖 Generated with Claude Code