Extract shared txid-action and poll-page bases in the client, a shared
poll-read use-case base and a poll-txid iteration helper in the DB, and a
shared poll-child record helper in the indexer. Reduce normalizePollCreateDatas
complexity (CRAP 7.1 -> 5.0). Add property tests for poll services, handlers,
and query filtering. Preserve behavior; all unit, acceptance, and property
suites pass across client, DB, and indexer.
By refactorer.
- Client: add MemoPollCreate, MemoPollOption, MemoPollVote services and page controllers.
- Indexer: add create-poll, add-poll-option, and poll-vote handlers with new poll DB adapters.
- DB: add polls/pollOptions/pollVotes stores, PollQuery adapter, GET /polls/:txid endpoints, and use cases.
- Add Gherkin acceptance handlers and focused unit tests for all three components.
By coder.
- Add unit coverage for Profiles topic follow state to bring CRAP to 4.
- DRY Profiles set/get follow state via shared nested-map helpers.
- Add TopicQuery topic-follow read-side property tests and MemoTopicPost
byte-accounting property tests.
- Complete client and DB acceptance step handlers and mocks for the
topic-follow and topic-post features.
By refactorer.
- Add MemoTopicPost service and TopicPostPage controller for topic messages.
- Add MemoTopicFollow service for topic follow/unfollow broadcasts.
- Extend TopicFeedPage with follow state and follower list.
- Update TopicFeed view with composer and Follow/Unfollow button.
- Extend MemoDb client with topic follow state and followers endpoints.
- Extend Profiles store with topic follow state.
- Add DB topic follow read side: TopicQuery, use cases, REST routes.
- Add unit tests for all new behavior.
By coder.
Add client specs for the topic post composer and topic follow/unfollow
buttons, plus the DB read side for topic follow state and followers.
By specifier.
Capture tool locations, the --mutate-all differential gotcha, the
gherkin-mutator invocation, and the refactorer-forward no-op pattern to
speed up the next session's startup.
By architect.
- Add isReply and scanPostsByAddrTxidsAndCount unit tests in post-query to
kill the true->false and limit-bounding survivors.
- Add normalizeTwoPushMemoDatas, stripLeadingEmptyPushes, and txHashFromPush
unit tests in indexer helpers to kill 4 survivors.
- Refresh tool-generated mutation manifests and Gherkin acceptance-mutation
stamps for the batch features (backfill-post-indexes, efficient-post-query,
addr-and-like-indexing).
By architect.
- Extract computeLikeTip and isPaymentTo in the like handler to bring
CRAP from 13.2 to <=5.0 without changing behavior.
- Add a level-db unit test to raise openDbs coverage and cut its CRAP
from 10.3 to 3.0.
- Consolidate duplicate txid-extraction helpers in post-query and
extract txidFromKeyParts (DRY).
- Add coverage for likeTxidFromPostLike and getPostOrNull edge cases.
- Add property tests for the addrPostHeights/postLikes key round-trips
and by-address pagination conservation.
By refactorer.
- Add addrPostHeights and postLikes LevelDB stores to psf-memo-db.
- Update PostQuery to use addrPostHeights for /posts/by/:addr and postLikes for per-post counts.
- Add backfill utility for the new indexes.
- Update indexer to write addrPostHeights (posts/replies) and postLikes entries.
- Add acceptance handlers and unit tests for the new behavior.
By coder.
Add unit test pinning FollowQuery._nextString exclusive upper bound and
empty-string/non-string validation-rejection cases for the follow use
cases, killing the remaining mutation survivors. Update mutation manifests
and add the follow-user architectural review report.
By architect.
Share the follow list use-case contract through a FollowListUseCase base
and delegate construction validation to the existing ListUseCase, removing
the duplicated follow use-case constructors and execute bodies. Extract
ProfilePage.load helpers and a shared follow/unfollow setter to reduce
CRAP below the threshold and remove duplicated follow logic. Add property
tests covering MemoFollow broadcast conservation and hash160 length, the
FollowQuery address round trip, and isFollowing/listFollowing/listFollowers
consistency over random record sets.
By refactorer.
- Add MemoFollow service for follow/unfollow broadcast with hash160 payloads
- Update Profiles store with follow state
- Extend ProfilePage and Profile UI with Follow/Unfollow buttons
- Add psf-memo-db /follow/state, /follow/following, /follow/followers endpoints
- Add FollowQuery adapter, use cases, REST controller, and unit tests
- Update acceptance handlers for both components
By coder.
Add Gherkin specs for the Follow/Unfollow button (0x6d06/0x6d07) and the
DB follow state + following/followers read side. Use bch-js Address tools
for cashaddr<->hash160 conversion instead of a new dependency.
By specifier.
Merge refactorer set-avatar-url work: shared MemoProfileTextAction base with
a profileTextConfig factory so MemoSetName/MemoSetBio/MemoSetAvatarUrl become
thin config declarations, plus avatar URL byte-limit, round-trip, and byte
budget property tests. No hardening fix required; language mutation reports
no survivors and soft Gherkin acceptance mutation survivors are documented
equivalents. Record the durable review report.
By architect.
Extract a shared MemoProfileTextAction base with a config factory so the
set-name, set-bio, and set-avatar-url actions each become a thin data
declaration, removing the duplicated config and broadcast method. Add
property tests covering the avatar URL byte limit, round trips, and byte
budget conservation.
By refactorer.
- Add MemoSetAvatarUrl service broadcasting 0x6d0a with 217-byte limit.
- Add SetAvatarUrlPage controller and React view at /memo/set-avatar-url.
- Wire route in AppBody and add Account page avatar URL display.
- Add Set Avatar URL button on Account page linking to the editor.
- Update Profiles store, AccountPage behavior, and acceptance handlers.
- Add unit tests for avatar URL behavior, page, and account page.
By coder.