Merged the refactorer's notifications-query property-test suite and reviewed
it architecturally. Property tests are well-placed in test/property/, reuse
the shared harness, and the independent buildExpected oracle traces 1:1
against the production aggregation/sort/pagination. No production source
changed. Verification: 39 property tests pass, 315 unit tests pass, lint
clean, mutation differential 0/0/0 (no regression), DRY no candidates,
soft Gherkin mutation 0 killed / 16 intrinsic equivalents.
By architect.
Use the reactive bchWalletState.cashAddress as the viewer address source
and include it in the profile load effect dependencies. Extract a small
wallet-address selector so the behavior is unit-testable.
By coder.
Pin the NotificationsQuery aggregation invariants over broad random
inputs: newest-first ordering with seen tie-break, global ordering, and
pagination conservation. Coverage, CRAP (max 6.0), DRY, and mutation
scan were assessed; all changed/new source files are well under the
100-site split threshold and mutation manifests are preserved.
By refactorer.
Record the tmp/acceptance and target/mutation-workers bloat that made
mutate4javascript worker copies many GB and mutation runs appear to hang.
Add a startup check that flags any of these dirs over 100MB so they are
cleaned before a mutation run.
By architect.
Extract the post-lookup-with-null helper into a shared module used by both
the notifications and post query adapters, removing duplication. Add a
dedicated NotificationsQuery unit suite (26 tests) and hardening tests that
kill the sort-comparator and followee-guard mutations. Refresh mutation
manifests via the approved tool. Document 5 intrinsic mutation equivalents
and 16 soft-Gherkin equivalents in the review summary.
By architect.
Extract the reply-notification predicate from
_collectReplyNotifications into a _replyNotificationChild helper, moving
the txid-presence guard into the loop so both functions drop to CRAP 5.
Add mutation manifests for the new notifications-query, list-notifications,
and notifications-page modules via the approved tool.
By refactorer.
Add psf-memo-db notifications query, use case, route, and tests.
Add psf-memo-client NotificationsPage service, React page, nav link,
route, and tests. Wire acceptance handlers for notifications.
By coder.
Extract the reply/viewer/membership predicate from
scanFollowingFeedTxidsAndCount into an isFolloweePost helper, reducing
the scan's cyclomatic complexity from 7 to 5 (CRAP 7.0 to 5.0) while
preserving behavior. Refresh the mutation manifest via the approved tool.
By refactorer.
Add Gherkin spec for the Notifications read-side feature: the psf-memo-db
API aggregates replies to the viewer's posts, likes on the viewer's posts,
and follows of the viewer into a single newest-first, paginated list; the
client renders a Notifications page. Only actions by other people on the
viewer's own content are shown.
By specifier.
Merge the architect's second-pass hardening of the Following feed (P6.6):
extract parseRequiredString shared by the addr/room-scoped list use cases,
add client and DB composition-root hardening tests, and record the review
summary and architect process notes.
By specifier.
- Extract parseRequiredString into pagination.js, shared by the three list
use cases, removing duplicated required-field guards.
- Add client hardening tests (emptyBecauseNoFollows init, canLoadMore null
guard) and a DB composition-root test for UseCases.start.
- Refresh mutation manifests and Gherkin acceptance-mutation stamp.
By architect.
- Extract shared runUseCase and listPostsForAddr in the posts controller to
remove the duplicated try/catch error wrapper (CRAP 14.7 -> 4.0) and DRY
the addr-scoped handlers.
- Add error-path unit tests for the posts controller covering both branches
of handleError.
- Consolidate ListFollowingFeed onto the shared ListUseCase constructor to
remove constructor duplication across list use cases.
- Add property tests for scanFollowingFeedTxidsAndCount (ordering, reply/
viewer/membership exclusion, pagination conservation) and for the client
FollowingFeedPage.load state invariants.
By refactorer.
Add psf-memo-db endpoint GET /posts/following/:addr that returns top-level
posts from followed profiles, excluding replies and the viewer's own posts,
newest first and paginated. Add PostQuery.scanFollowingFeedTxidsAndCount,
ListFollowingFeed use case, and REST controller/router wiring.
Add psf-memo-client Following feed page, route /posts/following, nav link,
MemoDb.getFollowingFeed, and FollowingFeedPage service. Update acceptance
handlers for the new following-feed.feature.
By coder.
Add hardening tests to kill mutation survivors in SearchQuery guards and
profileMatches defaults, SearchAll pagination/empty-query guards, the search
REST controller 500-error path, and the client SearchPage constructor/getPost/
getProfile. Refresh mutation manifests and the Gherkin acceptance-mutation
stamp.
By architect.
- Split SearchQuery.searchProfiles/searchPosts into small helpers to bring
CRAP to 5.0 or below across the search feature.
- Extract shared normalizeQuery/sortByHeightDesc (src/lib/search.js) and
loadReplyTxids (src/adapters/lib/load-reply-txids.js) to remove duplication
with search-all, list-recent-profiles, and post-query.
- Add error-path unit tests for the search controller.
- Add property tests for SearchQuery and SearchAll (pagination, ordering,
case-insensitivity, reply exclusion, substring containment).
- Refresh mutation manifests for post-query and list-recent-profiles.
By refactorer.