Commit Graph
53 Commits
Author SHA1 Message Date
Chris Troutner 8e606aecb1 Implement YouTube embed rendering in recent posts feed
By coder.
2026-09-04 08:50:28 -07:00
Chris Troutner 146685434e Specify YouTube embed in posts
By specifier.
2026-09-04 08:43:41 -07:00
Chris Troutner 2a3e742532 Pass appData to Profile route so Follow/Mute buttons receive the wallet
By specifier.
2026-09-03 21:44:01 -07:00
Chris Troutner fdd13ef734 Review profile-wallet-connect: confirm selector, fix gherkin-parser wrapper
Reviewed the refactorer's profile-wallet-connect work. getViewerAddress is a
clean pure selector (reactive-then-wallet precedence, null-on-absent); the
profile index.js wiring fix is sound and correctly re-loads when the address
becomes available. Fixed swarmforge/scripts/gherkin-parser, which delegated to
a non-existent .swarmforge/tools/aps path, to use the established tmp/aps-spec
checkout. Added the mutation differential-manifest for the new module.
Verification: 243 client unit + 33 property tests pass, lint clean,
mutation 2 killed / 0 survived, DRY no candidates, soft Gherkin mutation
6 intrinsic equivalents.

By architect.
2026-09-03 16:19:00 -07:00
Chris Troutner 5c6bffd6de Add getViewerAddress property tests for reactive precedence
Pin the profile wallet-address selector invariants over broad input
space: reactive-state precedence, wallet fallback, and null-on-absent.
CRAP (3.0), DRY, and mutation scan assessed; no split needed and no
manifests discarded.

By refactorer.
2026-09-03 16:13:15 -07:00
Chris Troutner c294617782 Fix profile page wallet address wiring so Follow button appears for other profiles
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.
2026-09-03 16:07:48 -07:00
Chris Troutner 87ca402cae Review notifications refactor: extract shared getPostOrNull, add adapter unit suite
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.
2026-09-03 14:10:54 -07:00
Chris Troutner ab5254c469 Merge commit '5389660b76' into swarmforge-refactorer 2026-09-02 13:11:39 -07:00
Chris Troutner f1841b64a6 Refactor notifications: extract reply predicate, add manifests
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.
2026-09-02 13:11:29 -07:00
Chris Troutner 5389660b76 Review isFolloweePost refactor: confirm CRAP cut, refresh manifests
By architect.
2026-09-02 13:01:34 -07:00
Chris Troutner 8ee07fc35f Implement Notifications read-only feature
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.
2026-09-02 12:53:02 -07:00
Chris Troutner 297abf6389 Spec Notifications (P6.3)
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.
2026-09-02 12:32:57 -07:00
Chris Troutner 4bf99e7db0 Review and harden following feed: kill survivors, DRY parseRequiredString
- 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.
2026-09-02 12:20:37 -07:00
Chris Troutner d606ee6608 Refactor following feed: reduce CRAP/DRY, add property coverage
- 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.
2026-08-29 10:44:28 -07:00
Chris Troutner 6d1bd148e9 Implement Following feed
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.
2026-08-29 10:30:54 -07:00
Chris Troutner 6d94372438 Spec Following feed (P6.6)
By specifier.
2026-08-29 10:21:28 -07:00
Chris Troutner e8bf42a1f3 Review and harden search: kill mutation survivors, refresh manifests
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.
2026-08-29 08:51:42 -07:00
Chris Troutner 8508fdaff0 Implement Search feature (P6.4)
- Add psf-memo-db /search endpoint with SearchQuery adapter, SearchAll use case,
  and REST controller/router.
- Add psf-memo-client SearchPage service, Search component, route, and nav link.
- Wire search support into the acceptance handler fake MemoDb.
- Add unit tests for the new adapter, use case, controller, and page service.

By coder.
2026-08-29 07:18:39 -07:00
Chris Troutner d11365c057 Spec Search feature (P6.4)
Add psf-memo-client/specs/search.feature specifying the /search read
endpoint (posts by text, profiles by name/bio) and the client Search page.
Update the backlog: mark Search in pipeline, note Send money (P5.1) skipped.

By specifier.
2026-08-29 07:10:38 -07:00
Chris Troutner ac468072df Review and harden mute-user: kill mutation survivors, refresh manifests
Add hardening tests to kill mutation survivors in MemoMute.validate,
ProfilePage constructor/_loadState/canMute, MuteQuery._nextString,
MuteState validation guards, and the mute REST controller statused-error
path. Refresh mutation manifests and Gherkin acceptance-mutation stamps.

By architect.
2026-08-28 21:08:50 -07:00
Chris Troutner d8ab5bc79c Refactor mute-user: reduce DRY, add property coverage
Extract shared _getState/_getList helpers in the client MemoDb, a shared
_loadState/_setState base in ProfilePage, and a runAction helper for the
profile follow/mute handlers. Add property tests for the MemoMute service,
the DB MuteQuery adapter, and the indexer handleMute action. Preserve
behavior; all unit, acceptance, and property suites pass across client, DB,
and indexer.

By refactorer.
2026-08-28 19:58:39 -07:00
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 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 5d7ce7601b Spec P3 poll actions: create poll, add option, vote
By specifier.
2026-08-28 14:11:14 -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 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 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 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 d3c3a80bbf Spec topic list/discovery and topic feed
By specifier.
2026-08-28 06:15:58 -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 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 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 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 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
Chris Troutner ecb6ee7f28 Review and harden set-bio profile-text refactor
Merge refactorer set-bio work: MemoAction config-driven byte-limit and
profile-store reflection, shared ProfileTextPage base for SetBioPage and
SetNamePage, and byte-counting property tests. Harden the shared base with
a test asserting the in-flight flag initializes false.

By architect.
2026-08-27 08:09:02 -07:00
Chris Troutner 9c5767d462 Refactor set-bio to share profile-text action and page bases
Deduplicate the set-bio and set-name action and page-controller layers:
move byte-limit and profile-store reflection into MemoAction via config,
and share a ProfileTextPage base for both page controllers. Add property
tests for byte counting and the bio byte-limit boundary.

By refactorer.
2026-08-27 08:00:58 -07:00
Chris Troutner 01a16769bd Implement Set Bio (0x6d05) client write path
Add Memo set-bio action, Set Bio page controller, Set Bio React view,
account bio display, and acceptance step handlers. Includes unit tests.

By coder.
2026-08-27 07:50:33 -07:00
Chris Troutner fcab46d706 Add Gherkin spec for Set Bio (0x6d05) client write path
By specifier.
2026-08-27 07:44:41 -07:00
Chris Troutner 21373f4d10 Harden and review like-count-display refactor
- Add unit tests to kill all mutation survivors in GetPostThread
  (sort order, missing blockHeight/seen fallbacks, non-string txid).
- Add default-limit and falsy-pagination tests for the client page
  controllers (ProfilePage, RecentFeedPage).
- Refresh mutation manifests and Gherkin acceptance mutation metadata.
- Write durable review report to docs/reviews/like-count-display-summary.md.

By architect.
2026-08-26 20:46:35 -07:00
Chris Troutner c208eb38aa Refactor like-count read side and add property tests
- Reduce GetPostThread.buildThreadNode CRAP from 10 to 5 by extracting
  fetchPostOrNull, loadChildTxids, and compareReplies helpers.
- Add like-count property tests (conservation, round-trip, pagination).
- Update post-height property test for the new likesDb requirement.
- Add client thread-page flatten property test and a small harness.

By refactorer.
2026-08-26 19:55:19 -07:00
Chris Troutner 3f5c8f809a Display like counts on feed, profile, and thread
- Add testable RecentFeedPage, ProfilePage, and ThreadPage controllers.
- Wire acceptance handlers for the like-count-display feature.
- Render like counts on the profile page with a read-only LikeButton.
- Add unit tests for the new display page services.

By coder.
2026-08-26 19:48:37 -07:00