Commit Graph
91 Commits
Author SHA1 Message Date
Chris Troutner 4b03210e85 Implement mute/unmute user feature (0x6d16/0x6d17)
- Client: MemoMute service, ProfilePage mute controls, Profile UI Mute/Unmute buttons,
  Profiles mute state, MemoDb mute read APIs, unit/acceptance tests.
- DB: mutes LevelDB store, MuteQuery adapter, /mute REST routes, MuteState and ListMuted use cases, tests.
- Indexer: mute/unmute action codes, handleMute action handler, muteDb adapter, tests.
- Backlog: mark P4.1/P4.2 mute/unmute as shipped.

By coder.
2026-08-28 19:38:42 -07:00
Chris Troutner fa90179869 Spec mute/unmute user (P4.1/P4.2)
Add client, DB, and indexer Gherkin specs for the Memo mute (0x6d16) and
unmute (0x6d17) actions.

By specifier.
2026-08-28 19:07:07 -07:00
Chris Troutner befae539c7 Update briefing and backlog for poll-actions merge
By specifier.
2026-08-28 18:24:22 -07:00
Chris Troutner 6309c4a50d Merge branch 'swarmforge-coder' 2026-08-28 18:11:39 -07:00
Chris Troutner 06e95150e3 Review and harden poll actions: kill mutation survivors, reduce DRY
- Add hardening tests to kill mutation survivors across client, DB, and
  indexer (hex guards, poll byte-limit boundaries, busy-flag defaults,
  parseTxid empty-string, polls controller handleError, memo-codes
  isMemoPrefix, normalizePollCreateDatas, storePollChildRecord returns).
- Reduce duplication: extract shared reflect/isTooLong into MemoTxidAction
  (client), shared _run into the polls controller and configurable execute
  into PollReadUseCase (DB).
- Refresh mutation manifests and Gherkin acceptance-mutation stamps.

By architect.
2026-08-28 17:51:03 -07:00
Chris Troutner 739b13bfb2 Refactor poll actions: reduce CRAP/DRY, add property coverage
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.
2026-08-28 15:23:04 -07:00
Chris Troutner cf05de6630 Implement poll actions (create, option, vote) across client, indexer, and DB
- 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.
2026-08-28 14:50:05 -07:00
Chris Troutner b349af0ae3 Update briefing and backlog for P3 poll-actions handoff
By specifier.
2026-08-28 14:11:50 -07:00
Chris Troutner 5d7ce7601b Spec P3 poll actions: create poll, add option, vote
By specifier.
2026-08-28 14:11:14 -07:00
Chris Troutner 25de2d9eb7 Update backlog and briefing for topic-actions merge
By specifier.
2026-08-28 13:38:29 -07:00
Chris Troutner 61616eb9eb Merge topic-actions implementation from architect
Merge swarmforge-architect into master for task topic-actions.

By specifier.
2026-08-28 13:17:10 -07:00
Chris Troutner 5183359143 Review and harden topic actions: kill mutation survivors
- Add hardening tests for topic-post-page, profiles, topic-feed-page, and
  topic-query to kill mutation survivors.
- Refresh mutation manifests and Gherkin acceptance-mutation stamps.
- Add topic-actions review summary.

By architect.
2026-08-28 13:13:01 -07:00
Chris Troutner d6f56780be Refactor topic actions: reduce CRAP/DRY, add property coverage, complete acceptance
- 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.
2026-08-28 11:13:03 -07:00
Chris Troutner 50e287ed0f Implement topic post, follow, and unfollow
- 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.
2026-08-28 10:55:42 -07:00
Chris Troutner 20cc2e0399 Update backlog and briefing for topic-actions handoff
By specifier.
2026-08-28 10:44:20 -07:00
Chris Troutner b8a10d3706 Spec topic post, follow, and unfollow actions
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.
2026-08-28 10:43:52 -07:00
Chris Troutner b517795573 Update briefing and backlog for ZMQ DB backups fix
By specifier.
2026-08-28 10:28:51 -07:00
Chris Troutner 883f0142c7 Review and harden ZMQ DB backups: centralize backup decision, kill mutation survivor
By architect.
2026-08-28 10:16:20 -07:00
Chris Troutner fcaebeb6a4 Add consolidated architect startup verification script
By architect.
2026-08-28 10:16:16 -07:00
Chris Troutner 89731964de Refactor ZMQ DB backups: add property coverage and constructor test
By refactorer.
2026-08-28 10:10:30 -07:00
Chris Troutner 2d193c6bd2 Implement ZMQ-mode DB backups every epoch blocks
By coder.
2026-08-28 10:05:24 -07:00
Chris Troutner edcb8c8f7f Spec ZMQ-mode DB backups every epoch
By specifier.
2026-08-28 10:02:12 -07:00
Chris Troutner d84a022c1a Update backlog and briefing for topic list/feed
By specifier.
2026-08-28 09:39:28 -07:00
Chris Troutner f12e5b38db Add architect startup cheat-sheet
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.
2026-08-28 09:25:01 -07:00
Chris Troutner c9bdf326d6 Review and harden topic-feed: kill mutation survivors
- Add topic-query, list-topic-posts, topics controller, and client
  topic-page hardening tests to kill mutation survivors.
- Refresh mutation manifests and Gherkin acceptance-mutation stamps.
- Add topic-feed review summary.

By architect.
2026-08-28 08:55:48 -07:00
Chris Troutner 4c5fb38661 Refactor topic feed: reduce CRAP, DRY, and add property coverage
- Add topics controller error-handling unit tests to bring handleError
  CRAP from 14.7 to 4.0.
- Consolidate duplicate getTopicPosts/getPostsByAddr HTTP page fetches
  into a shared getPage helper in memo-db (DRY).
- Add TopicQuery property tests: listTopics conservation/ordering,
  getTopicPostTxids newest-first pagination, and room/txid key round-trips.
- Add client topic-services property tests for getTopic/getPost lookup
  completeness.

By refactorer.
2026-08-28 06:43:18 -07:00
Chris Troutner 30dcf244cf Merge commit '652c70e4ea' into swarmforge-refactorer 2026-08-28 06:32:02 -07:00
Chris Troutner 652c70e4ea Implement topic discovery and topic feed
- Add psf-memo-db /topics and /topics/:room/posts read endpoints
- Add TopicQuery adapter, ListTopics and ListTopicPosts use cases
- Add topic read acceptance fixture and step handlers
- Add psf-memo-client topic services, UI routes, nav link
- Add generated topic discovery/feed acceptance handlers

By coder.
2026-08-28 06:31:43 -07:00
Chris Troutner 7a01b9f4e3 Merge specifier topic-feed specs
By coder.
2026-08-28 06:16:49 -07:00
Chris Troutner d3c3a80bbf Spec topic list/discovery and topic feed
By specifier.
2026-08-28 06:15:58 -07:00
Chris Troutner a6dd857f67 Add efficient-post-query review summary
By architect.
2026-08-27 22:27:20 -07:00
Chris Troutner 4679e7a11e Review and harden efficient-post-query: kill mutation survivors
- 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.
2026-08-27 22:26:32 -07:00
Chris Troutner ba1661d79a Merge efficient post query implementation
By specifier.
2026-08-27 18:35:10 -07:00
Chris Troutner 89f0b678c7 Refactor efficient post query: reduce CRAP, DRY, and property coverage
- 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.
2026-08-27 15:07:58 -07:00
Chris Troutner a68151b5f5 Implement efficient post query with addrPostHeights and postLikes indexes
- 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.
2026-08-27 14:55:09 -07:00
Chris Troutner a5dc01ede5 Spec efficient post queries via addrPostHeights and postLikes indexes
By specifier.
2026-08-27 14:31:20 -07:00
Chris Troutner 83b7233f05 Mark follow/unfollow complete; set next feature to topics
By specifier.
2026-08-27 12:04:49 -07:00
Chris Troutner 7e19503643 Merge branch 'swarmforge-architect' 2026-08-27 12:04:13 -07:00
Chris Troutner bb7b5a6cfd Review and harden follow-user: kill mutation survivors
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.
2026-08-27 11:23:01 -07:00
Chris Troutner b99d881205 Merge refactorer follow-user implementation
By architect.
2026-08-27 10:47:19 -07:00
Chris Troutner d9ba5a2774 Refactor follow use-cases and profile page; add follow property tests
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.
2026-08-27 10:46:39 -07:00
Chris Troutner 247d4a9fcf Implement follow-user and follow-read behavior
- 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.
2026-08-27 10:35:33 -07:00
Chris Troutner 3b36b5c2e8 Update session-end briefing for follow-user handoff
By specifier.
2026-08-27 10:19:00 -07:00
Chris Troutner d901cfc6cb Spec follow/unfollow user (client write path + DB read side)
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.
2026-08-27 10:17:43 -07:00
Chris Troutner 7956d597aa Mark Set Avatar URL complete and set next feature to follow/unfollow
By specifier.
2026-08-27 10:02:43 -07:00
Chris Troutner ba2b3bf317 Review and harden set-avatar-url profile-text refactor
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.
2026-08-27 09:59:49 -07:00
Chris Troutner 58e21ff01a Deduplicate Memo profile-text actions and add set-avatar-url property tests
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.
2026-08-27 09:57:13 -07:00
Chris Troutner 131d31ee10 Merge coder set-avatar-url implementation
By refactorer.
2026-08-27 09:53:50 -07:00
Chris Troutner 7bee85a36f Implement Set Avatar URL client feature
- 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.
2026-08-27 09:53:36 -07:00
Chris Troutner 991053ab12 Spec Set Avatar URL feature
By specifier.
2026-08-27 09:49:07 -07:00