Commit Graph
100 Commits
Author SHA1 Message Date
Chris Troutner ace703831f Harden profile-last-post with mutation-killing tests
Add unit tests for the profileRecency backfill and recent-profiles read
path that kill the language-mutation survivors: status-tip confirmation
(no tip, exact tip), exclusion of addresses without a profile, replies,
and polls, malformed addrPostHeight entries, missing optional stores,
seen/height defaulting, stale-record removal, and the height/seen/address
comparator tie-breakers. Tighten the indexer recency tests the same way
and assert the set-profile text and max-size boundary.

Refresh the mutate4javascript manifests and write the gherkin-mutator
acceptance mutation metadata for the changed features.

By architect.
2026-09-20 15:29:24 -07:00
Chris Troutner 6b8da07981 Refactor profile-last-post: split recency logic, add property tests
Split backfillProfileRecency and establishProfileRecency into small
helpers so every analyzed function scores CRAP 6 or below, without
changing behavior. Extract the post recency-qualification check in
handlePost.

Add seeded property tests covering backfill conservation and
idempotence, the addrPostHeight key round trip, recent-profile read
ordering and pagination, and the indexer's recency convergence.

By refactorer.
2026-09-20 14:45:37 -07:00
Chris Troutner bdf2c3015e Implement profile ordering by last post
Indexer: maintain a profileRecency index keyed by address with the newest
confirmed qualifying post (top-level 0x6d02 or topic message 0x6d0c).
Replies and poll creations do not qualify, and mempool (unconfirmed) posts do
not write the index. Setting a profile after posting establishes recency from
the address's existing addrPostHeights, excluding replies and polls.

DB: GET /profile/recent now orders profiles by their most recent qualifying
post (height desc, seen desc, address asc) from profileRecency plus per-page
profile lookups, so it no longer scans addrPostHeights or sorts the whole
profiles store. Add a profileRecency backfill library and CLI that rebuilds
the index from addrPostHeights, posts, postParents, polls, and status,
ignoring unconfirmed entries and removing stale records.

Add focused unit tests, acceptance fixtures, and regex step handlers.

By coder.
2026-09-20 14:36:08 -07:00
Chris Troutner 1119988009 Specify profile ordering by last post
Add indexer profileRecency index, recent-profile ordering, and backfill specs;
seed profileRecency in the recent-profile-identity fixture; mark the feature in
progress in the backlog.

By specifier.
2026-09-20 14:12:13 -07:00
Chris Troutner 915971a46c Record recent profile identity completion in backlog and briefing
By specifier.
2026-09-20 13:17:31 -07:00
Chris Troutner 5fce1405d4 Record recent profile identity review and verification
Add the client and DB verification records (both pinned to review commit
7973e2d) and the architect review summary for the recent-profile-identity
task.

By architect.
2026-09-20 13:15:30 -07:00
Chris Troutner 7973e2dcdf Review recent profile identity: record mutation manifests and acceptance stamps
Architectural review of the recent-profile-identity task found no structural
changes needed: the DB join lives in the ProfileQuery adapter behind the
ListRecentProfiles use case and controller, and the client account cell follows
the established CommonJS + acceptance-render-adapter pattern for DOM-free
testing. Committing the tool-written mutate4javascript manifests and the
gherkin-mutator mutation stamps/manifests produced by the verification run.

By architect.
2026-09-20 13:09:01 -07:00
Chris Troutner 63107855a2 Harden recent profile identity with property tests
Add seeded property tests for the new identity join and table view model:
profile-path round trips, display-name fallback, account mapping, table
row shape, DB identity-field independence, missing-store null behavior,
and page-only join with conserved order and pagination.

Cover the account-cell click handler so RecentProfileAccount reaches 100%
unit coverage (CRAP <= 2).

Tests only; no production behavior changed.

By refactorer.
2026-09-20 13:00:03 -07:00
Chris Troutner 9fb092e845 Implement recent profile identity join and Account column
DB: GET /profile/recent joins each profile's display name (names store)
and avatar URL (profilePics store) by address, reporting null when a
record is absent. The join runs on the requested page only and leaves the
profile order and pagination unchanged.

Client: the /profile/recent table gains a leftmost Account column showing
the display name and avatar, both linking to the profile, with a
truncated-address fallback when the name is absent and an identicon
fallback when the avatar is absent. The existing columns are preserved.

Add focused unit tests, acceptance fixtures, and regex step handlers for
both components.

By coder.
2026-09-20 12:46:12 -07:00
Chris Troutner dda94b1a81 Specify recent profile identity for /profile/recent
Add DB Gherkin for GET /profile/recent joining each profile's display
name (names store) and avatar URL (profilePics store), null when absent.
Add client Gherkin for the new leftmost Account column showing the
display name and avatar, linking to the profile, with truncated-address
and identicon fallbacks and the existing columns preserved.

By specifier.
2026-09-20 12:24:19 -07:00
Chris Troutner 761d5268d0 Record feed tabs completion in backlog and briefing
By specifier.
2026-09-20 10:41:13 -07:00
Chris Troutner 2d1755a03d Record feed tabs review and verification
By architect.
2026-09-20 10:40:13 -07:00
Chris Troutner e4bda31256 Review feed tabs: consume controller snapshot, kill mutation survivors
Route the posts view through FeedTabsPage.getState() instead of reaching
into the controller's internal fields, and consolidate the default-mode
unit tests. Add initial-state and unloaded-pagination tests that kill the
four constructor/canLoadMore mutation survivors (22 killed, 0 survived,
0 uncovered).

By architect.
2026-09-20 10:36:45 -07:00
Chris Troutner 4b8b4ed499 Refactor feed tabs: simplify mode loading, add feed-tabs properties
Reduce FeedTabsPage._loadMode complexity below the CRAP threshold by
extracting the mode-to-page lookup and the empty-Following predicate, and
drop the unused getActiveTabLabel helper. Add property tests for default
mode selection, delegation, tab-switch reset, paging, and empty-state
invariants, and share the default-mode unit-test setup. FeedTabsPage
functions are at 100% coverage with CRAP <= 5.

By refactorer.
2026-09-20 10:16:14 -07:00
Chris Troutner d1372dac11 Merge Following feed into the posts page as Recent/Following tabs
The /posts/recent posts page now shows a row of two mode buttons. On
first load it selects Following when the viewer's address follows at
least one account (via GET /follow/following/:addr) and Recent
otherwise, and switching tabs resets the feed to its first page. The
/posts/following route and its navbar item are removed, so the
Following feed is reached only through the Following button. Add the
testable FeedTabsPage controller with unit coverage and the acceptance
handlers for feed-tabs.

Also drop the Feed Tabs - 4 assertion that the global Recent feed hides
a followed author's post: /posts/recent is the global feed, so followed
posts appear in both tabs. Approved by the user.

By coder.
2026-09-20 10:07:06 -07:00
Chris Troutner f3a41de488 Specify merged posts feed with Recent/Following tabs
Add psf-memo-client/specs/feed-tabs.feature specifying the two-tab
posts feed, default-mode selection by follow state, tab switching,
and first-page reset. Record the feature in the backlog.

By specifier.
2026-09-20 09:54:01 -07:00
Chris Troutner b5699b4eed Record following feed cap completion in backlog and briefing
By specifier.
2026-09-20 08:49:16 -07:00
Chris Troutner de3f1c8bb6 Record following feed cap review and verification
By architect.
2026-09-20 08:48:02 -07:00
Chris Troutner b7c20560c2 Review following feed cap: drop dead reply-txid loader
Remove PostQuery.loadReplyTxids after the capped following-feed scan
switched to per-candidate isReply point lookups; it had no callers and
was the only uncovered code in post-query.js (99.4% -> 100%).
Refresh the mutate4javascript and acceptance-mutation manifests via the
tools.

By architect.
2026-09-20 08:44:25 -07:00
Chris Troutner 5653ecef9d Refactor following feed cap: share acceptance seeding, add cap properties
Extract putPost/putFollowEdge seeding helpers in the psf-memo-db acceptance
handlers and route the following-feed capped/mixed fixtures and the
many-top-level-posts fixture through them, removing repeated store/key writes.

Add property tests for the capped total, newest-first page conservation, and
the bounded eligible scan, plus unit coverage for the remaining PostQuery
constructor guards and static key helpers (post-query.js statements 94.5% ->
99.4%).

CRAP stays at or below 6, src/adapters/post-query.js remains at 40 mutation
sites with its manifest intact, and the DRY tool reports no duplicates in the
changed source file.

By refactorer.
2026-09-20 08:32:43 -07:00
Chris Troutner db216949ec Implement following feed capped scan
By coder.
2026-09-20 08:19:27 -07:00
Chris Troutner 2ce0a62af9 Specify following feed capped scan
By specifier.
2026-09-20 08:13:19 -07:00
Chris Troutner 6462977b87 Record mute broadcast result completion in backlog and briefing
By specifier.
2026-09-18 15:35:39 -07:00
Chris Troutner eaaed8e5ea Record mute broadcast result review and verification
Add the architect review summary and the machine-readable client verification
record (unit, property, acceptance, lint, build) pinned to review commit
a7d9ca6299.

By architect.
2026-09-18 15:34:11 -07:00
Chris Troutner a7d9ca6299 Review mute broadcast result: drop dead modal reset, pin error getter
Remove the unobservable showMuteResultModal reset in
ProfilePage._broadcastMute: the flag is set true unconditionally after the
awaited broadcast, so no observer can read the reset value. Add unit coverage
for getMuteResultError's empty-string contract when there is no result and
when a failure carries no message. Record the tool-written mutation and
acceptance-mutation manifests.

Mutation: 31 killed, 0 survived, 0 uncovered (profile-page.js). CRAP <= 4.
DRY clean. Soft Gherkin: 5 intrinsic case-equivalents.

By architect.
2026-09-18 15:31:41 -07:00
Chris Troutner 722c486ef6 Refactor mute broadcast result: share result handlers, add property tests
Deduplicate the like/mute acceptance broadcast-result assertion handlers and
the follow/unfollow/mute/unmute prefix handlers behind shared helpers, and
extract the broadcast explorer transaction link into one component used by
both result components. Add property tests for the mute result component and
the profile page mute result state machine (explorer URL composition, error vs
success markup, determinism, outcome mirroring, failure state preservation,
and dismiss).

CRAP stays at or below 6, every changed source module stays below 100 mutation
sites, and mutation manifests are left intact for differential runs.

By refactorer.
2026-09-18 15:07:09 -07:00
Chris Troutner 24d7f0f82c Implement mute broadcast result
Show a mute/unmute broadcast result modal on the profile page: success
message, transaction id, and block explorer link on success; the broadcast
error on failure. The modal stays open until dismissed, dismissing only
closes it, and a failed broadcast leaves the button in its previous state.

By coder.
2026-09-18 14:57:37 -07:00
Chris Troutner c0e18d8169 Add mute broadcast result specification
By specifier.
2026-09-18 14:52:23 -07:00
Chris Troutner 8eab46dba2 Improving notifications 2026-09-18 13:36:12 -07:00
Chris Troutner ea679795a6 Removing authors name from post, redundent 2026-09-18 13:23:48 -07:00
Chris Troutner e0882678fd Record notification-entry-display completion in backlog and briefing
By specifier.
2026-09-18 12:47:41 -07:00
Chris Troutner a1e4a4f95f Record notification entry display review and verification
Add the client verification record (git_sha bbbf4adcd7, result pass) and the
architect review summary for the notification-entry-display task.

By architect.
2026-09-18 12:46:39 -07:00
Chris Troutner bbbf4adcd7 Review notification entry display: wire SPA profile links, cover renderer
Wire the existing onProfileClick seam in the Notifications page so the actor
avatar and display name navigate through the SPA router instead of a full-page
reload (which 404s on the BrowserRouter/GH Pages deployment). Add a component
unit test so the renderer's mutation sites are covered, and a fresh-state
controller test to kill the constructor's empty=false mutant.

Refresh the tool-written mutation manifests for the changed modules and the
soft Gherkin mutation manifest for the feature.

By architect.
2026-09-18 12:43:39 -07:00
Chris Troutner 7dfc315840 Refactor notification entry display: share acceptance assertions, add property tests
Deduplicate the notification-entry acceptance step handlers behind shared
entry-assert helpers and collapse the repeated ready-state guards in the
notifications view. Add property tests for the entry view model (profile link
round trip, name fallback, view-model derivation, message mapping) and for
notifications page profile resolution, entry derivation, and actor lookup.

CRAP stays at or below 6 and every changed source module stays below 100
mutation sites; mutation manifests are left intact for differential runs.

By refactorer.
2026-09-18 12:30:53 -07:00
Chris Troutner 521d434524 Implement notification entry display
Name each Notifications entry with the actor's Memo display name and
avatar resolved client-side, link both to the actor's profile, show the
full address as plain text, and add a View Post link for like and reply
notifications that opens the referenced post thread. Fall back to the
truncated address and an identicon when a profile is missing or its
lookup fails.

By coder.
2026-09-18 12:20:52 -07:00
Chris Troutner f4d94999b5 Add notification entry display specification
By specifier.
2026-09-18 12:09:04 -07:00
Chris Troutner 889366042f Record notifications-query-performance completion in backlog
By specifier.
2026-09-18 10:56:30 -07:00
Chris Troutner a1eb548688 Record notifications-query-performance review and verification
By architect.
2026-09-18 10:52:07 -07:00
Chris Troutner c9728cc301 Review notifications query performance: harden defaults, refresh mutation manifests
Add unit coverage for the notification height/seen defaults, the seen
sort tie-break, the missing-status cutoff, and the config flags; refresh
the language mutation manifests and the soft Gherkin acceptance mutation
manifests for the three affected feature files.

By architect.
2026-09-18 10:46:29 -07:00
Chris Troutner 45a7b34fad Refactor notifications query: cut CRAP, share test double, add membership property
Reduce the notifications-query collector cyclomatic complexity below the CRAP
threshold by extracting prefix-range, txid-fallback, height-selection, and
actor-suppression helpers, and by sharing one per-post index scan between the
like and reply collectors. Reuse the shared FakeDb in the unit and property
suites instead of two local LevelDB doubles, cover every not-found branch, and
add a property test asserting returned notifications map to exactly one
generated interaction.

By refactorer.
2026-09-18 10:19:26 -07:00
Chris Troutner f45d63cd70 Implement notifications query performance
Bound GET /posts/notifications/:addr to the viewer's activity in a
configurable block window (NOTIFICATION_BLOCK_WINDOW, default 25000):
read the viewer's posts from addrPostHeights, prefix-scan postLikes and
postChildren for those posts only, and read follows from the new
followeeHeights index. The global likes, postChildren, and follows stores
are no longer full-scanned, and pagination.total counts only in-window
notifications.

Add the indexer write of a followeeHeights entry on every follow and
unfollow, the DB followee-index backfill utility and CLI, the
followeeheight /level route, the notification window config, unit,
property, and acceptance coverage, and developer docs.

By coder.
2026-09-18 09:57:42 -07:00
Chris Troutner 22928d764a Spec notifications query performance
Bound GET /posts/notifications/:addr to the viewer's activity in a
configurable block window instead of full-scanning likes, postChildren,
and follows. Adds the followeeHeights index spec, its backfill spec, and
the notifications-query-performance spec.

By specifier.
2026-09-18 09:28:25 -07:00
Chris Troutner f4e40a9dcd Fixing errors in client 2026-09-18 08:52:19 -07:00
Chris Troutner 4c6d20fefc Widening topics table 2026-09-18 08:27:18 -07:00
Chris Troutner 42af1f7d96 Record topics-table-layout completion in backlog and briefing
By specifier.
2026-09-18 07:48:14 -07:00
Chris Troutner 1e58b5b8b1 Record topics-table-layout review and verification
- Add the client verification record pinned to the review commit d1f0f76 and
  the architect review summary.

By architect.
2026-09-18 07:47:45 -07:00
Chris Troutner d1f0f76cca Review topics table layout: refresh mutation manifests
- No production or test changes were required: buildTopicsTable passes
  language mutation 2/2, dry4javascript reports no candidates, CRAP is 1.0 at
  100% coverage, and soft Gherkin mutation kills all 16 mutations.
- Commit the tool-written mutate4javascript manifest and the gherkin-mutator
  stamp/manifest only.

By architect.
2026-09-18 07:44:43 -07:00
Chris Troutner ec753a9c88 Add property tests for the topics table view model
- Add client property tests for buildTopicsTable: one row per topic in input
  order, four-cell alignment with the header order, link percent-encoding
  round trips, and post/follower count conservation over random topic lists
  that also omit count/last-seen fields.
- No production change: the coder's view model already scans at CRAP 1.0
  with zero dry4javascript candidates and only 2 mutation sites. The JSX
  Topics component stays a thin, tool-excluded shell over the testable model.

Verification: client 447 unit / 94 property / 34 acceptance + lint + build;
indexer 113 unit / 12 property / 7 acceptance + lint; db 392 unit / 57
property / 16 acceptance + lint.

By refactorer.
2026-09-18 07:42:52 -07:00
Chris Troutner ac4d9ea7f7 Render topics page as a table
Replace the topics page flex list with a react-bootstrap Table driven by a
testable topics-table view model: a labeled header row, aligned cells for
name, relative time, post count, and follower count, feed links on each row,
and a horizontal-scroll wrapper for narrow screens.

By coder.
2026-09-18 07:36:16 -07:00
Chris Troutner 41af8f955e Spec topics table layout
Require the topics page to render a react-bootstrap Table with aligned
columns, a header row, linked rows, and horizontal scroll on narrow screens.

By specifier.
2026-09-18 07:31:13 -07:00
Chris Troutner 17d2afff48 Record topic-metadata completion in backlog and briefing
By specifier.
2026-09-18 06:36:58 -07:00
Chris Troutner af54b0ebe7 Record topic-metadata review and verification
- Add the canonical per-component verification records (indexer, db, client)
  pinned to the review commit 3f05488, and the architect review summary.

By architect.
2026-09-18 06:35:33 -07:00
Chris Troutner 3f05488da0 Review topic metadata: harden default-value coverage
- Add DB unit tests covering a summary missing postCount, a post missing
  blockHeight in listTopics/getTopicPostTxids ordering, listTopics' default
  limit/offset, and topicRecencyKey's missing-height fallback. These kill the
  remaining language-mutation survivors in the changed DB sources.
- Refresh the mutate4javascript manifests for the changed sources and commit
  the gherkin-mutator manifests/stamps written into the three topic-metadata
  features.
- No production behavior changes; the review adds tests and tool-written
  metadata only.

By architect.
2026-09-18 06:29:01 -07:00
Chris Troutner dd11964174 Refactor topic metadata: cut CRAP, share test doubles, harden property tests
- Replace the ternary follower delta in recordTopicFollow with
  Number(isActive) - Number(wasActive), dropping its cyclomatic complexity
  from 8 to 6 (CRAP 8.0 -> 6.0). No behavior change.
- Extend the indexer topic property test to conserve lastSeen (newest post
  time) and followerCount (each address's final active follow state)
  alongside postCount/lastHeight, with varying post seen times.
- Extend the DB backfill and topic-query property tests to conserve lastSeen
  and followerCount; generated follows now include unfollows.
- Add a client topic-metadata property test covering relativeTime bucket
  classification, pluralization, monotonicity, and getLastSeenLabel
  consistency, and cover ensureTopicRoom's existing-summary path plus
  recordTopicFollow's legacy-follower-count fallback.
- Share one in-memory DB double per component (indexer test/support/
  memory-db.js, DB test/support/level-double.js) and table-drive the
  parallel topic-follow/topic-message/topic-query cases, clearing every
  dry4javascript candidate in the changed files.

Verification: indexer 113 unit / 12 property / 7 acceptance; db 387 unit /
57 property / 16 acceptance; client 441 unit / 90 property / 33 acceptance
+ build; lint clean. CRAP max 6.0; mutation scans under 100 sites/file.

By refactorer.
2026-09-18 06:02:13 -07:00
Chris Troutner 8da0f09f46 Implement topic metadata columns
Add lastSeen and followerCount to topicSummaries across the indexer, DB,
and client. The indexer now tracks the newest post seen time, updates
follower counts idempotently on follow/unfollow, and preserves post
metadata. The DB exposes lastSeen and followerCount from GET /topics and
rebuilds both from the rooms store in the backfill. The client renders the
four-column topics page with relative-time labels.

By coder.
2026-09-18 05:46:58 -07:00
Chris Troutner a599b34e38 Spec topic metadata columns
Define four-column topics page behavior across client, indexer, and DB:
topic name, time since most recent post, post count, and follower count.

By specifier.
2026-09-18 05:38:41 -07:00
Chris Troutner 6ef2e3589e Skip empty room names in topic index backfill
A historical rooms record with an empty room name made the backfill call
put('') and abort with "key cannot be an empty String". Skip records with no
room name so the one-time backfill can complete; such rooms have no listing
entry to write.

By specifier.
2026-09-17 12:44:57 -07:00
Chris Troutner c1a07cbd9d Merge topic-recency-pagination process notes from swarmforge-architect
By specifier.
2026-09-17 10:37:55 -07:00
Chris Troutner a743d8d1e6 Note manifest-restore and verify-ordering process lessons
Capture three time-costing lessons from this session in the architect
process notes so future sessions read them at startup: restore a
manifest stripped by a killed mutate4javascript run with
--update-manifest, gauge gherkin-mutator progress from the mutations
directory, and commit review changes before running verify.sh so the
record's git_sha matches the review commit.

By architect.
2026-09-17 10:37:36 -07:00
Chris Troutner 2c4a38d75d Record topic-recency-pagination completion in backlog and briefing
By specifier.
2026-09-17 10:34:11 -07:00
Chris Troutner 090f41fecf Record topic-recency-pagination review and verification
Architect review summary and per-component canonical verification records
(indexer, db, client) for review commit 0e8f8f0.

By architect.
2026-09-17 10:31:54 -07:00
Chris Troutner 0e8f8f0eae Review topic-recency-pagination: harden mutation coverage
Architectural review of the topic recency indexes and pagination:

- Indexer topic index maintenance lives in its own topic-indexing.js,
  separate from the action handlers; the backfill library takes injected
  LevelDB handles so its logic stays testable.
- DB listTopics reads counts from topicSummaries and paginates the
  topicRecency index without iterating the rooms store; the client reuses
  PaginatedPage.
- Kill four topic-indexing mutation survivors with focused unit tests
  covering the height fallbacks, plus exact-key/isNotFound and max-size
  boundary tests.
- One topic-message survivor is an intrinsic equivalent: handlePost reads
  the text at push index 1 and ignores push index 0.

Includes tool-written mutate4javascript and acceptance-mutation manifests.

By architect.
2026-09-17 10:27:26 -07:00
Chris Troutner d94aed8e64 Narrow gherkin mutation runner-worker to the changed scenario
The DB soft Gherkin mutation re-ran the whole feature for every mutant;
with a fresh LevelDB world per example, a 48-mutation feature exceeded
900s. The runner-worker now diffs the mutated IR against the base feature
at <work>/base/feature.json (derived from the mutation path, since
job.work_dir may be mutation-specific) and runs only the changed
scenario/example. Safe because each scenario uses an isolated world.
The same feature now completes in ~74s.

By architect.
2026-09-17 10:27:06 -07:00
Chris Troutner 0072b81aac Pool DB acceptance test files to cut verification wall time
Run the 15 generated DB acceptance files with bounded concurrency
(default min(4, files), ACCEPTANCE_CONCURRENCY to override) instead of
strictly sequentially. Generation still runs first and sequentially.
Each generated file uses its own tmp/acceptance/level-* world, so the
pool is isolated. Full DB acceptance drops from ~430-790s to ~96s.

Also record the orphaned-mocha mutation-hang finding and remediation in
the architect process notes.

By architect.
2026-09-17 09:22:13 -07:00
Chris Troutner 92ce290873 Refactor topic recency indexing: cut CRAP, harden property coverage
- Extract roomFromEntry/applyPost from backfill collectSummaries so its
  cyclomatic complexity drops from 7 to 4 (CRAP 7.0 -> 4.0), and extract
  the shared roomRange key bounds from getTopicPostTxids/listRoomFollowers.
- Add indexer property tests over arbitrary post/follow/unfollow
  interleavings: postCount conservation, newest-height recency shape,
  replay idempotence, and inverted-key ordering.
- Add DB property tests for the topic index backfill: conservation,
  recency shape, stale-record removal, and inverted-key ordering.
- Cover the topic action error paths (invalid push counts, oversized
  topic message), the topic-query room fallbacks, and the client
  openTopic/topicFeedPath navigation.

By refactorer.
2026-09-17 08:07:24 -07:00
Chris Troutner e02bea5460 Implement topic recency ordering and pagination
- Indexer maintains topicSummaries and topicRecency for topic messages and
  follows, idempotently, moving each room's recency record to its newest post.
- DB adds the two index stores and serves GET /topics from them with
  limit/offset pagination, without iterating the rooms store. Adds
  util/room/backfill-topic-indexes.js to build the indexes idempotently.
- Client topics page loads 50 per page with Previous/Next.

By coder.
2026-09-17 07:24:45 -07:00
Chris Troutner e2c0bbe523 Spec topic recency ordering and pagination
Add Gherkin for efficient GET /topics ordering by most recent post, the
topicSummaries and topicRecency index stores, an idempotent backfill, and
client topics-page pagination.

By specifier.
2026-09-17 06:46:43 -07:00
Chris Troutner a4b0e080a3 Record memo-multipush-encoding completion in backlog and briefing
By specifier.
2026-09-16 21:39:00 -07:00
Chris Troutner 4dedc518c3 Merge memo-multipush-encoding from swarmforge-architect
By specifier.
2026-09-16 21:37:14 -07:00
Chris Troutner 6050d80f63 Note gherkin-mutator empty-manifest behavior for intrinsic survivors
By architect.
2026-09-16 21:35:09 -07:00
Chris Troutner 18d1fb1222 Record multi-push encoding review and verification
By architect.
2026-09-16 21:34:14 -07:00
Chris Troutner fac01730c4 Review multi-push encoding: fix browser Buffer and harden coverage
Import the browser-safe buffer module in the multi-push adapter so the
CRA production bundle no longer reads the Node global Buffer, add
regression tests for the falsy-wallet and idempotent-attach paths, share
the script-encoding test helper, and de-duplicate the UTF-8 push
acceptance assertions. Refresh the language mutation manifests and the
soft acceptance-mutation manifest.

By architect.
2026-09-16 21:31:23 -07:00
Chris Troutner 8310b6a1d8 Refactor multi-push helpers and add adapter property tests
Share a single UTF-8 encoding helper across hex, poll-create, and
topic-post instead of repeating new TextEncoder().encode(), drop the
redundant Uint8Array branch in the push normalizer, rename the
txid-action push builder parameter from buildPayload to buildPushes to
match what it returns, and factor the db repair unit-test setup into a
repairedFixture helper.

Add property tests for the multi-push adapter covering prefix/ordering,
field-byte conservation, buffer round trips, array expansion, single
field delegation, and idempotent attach, plus a unit test for the
unsupported-wallet guard.

By refactorer.
2026-09-16 20:56:42 -07:00
Chris Troutner 2e2db86263 Implement multi-push encoding for Memo multi-field actions
Reply, topic message, add-poll-option, poll-vote, and create-poll now
broadcast each protocol field as its own OP_RETURN script push instead of
combining them into one push. The indexer requires three pushes for reply,
topic message, and poll children, and accepts four for create-poll; the
combined form was rejected or misparsed.

hex.js builds the txid and text as separate pushes, and a new
memo-multipush adapter teaches minimal-slp-wallet's single-push sendOpReturn
to expand an array of fields into separate pushes. Acceptance step handlers
assert the individual pushes, and unit/property tests cover the new shape.

By coder.
2026-09-16 20:37:59 -07:00
Chris Troutner 6eddd9c3f8 Specify multi-push encoding for Memo multi-field actions
Add Gherkin pinning that reply, topic message, add-poll-option, poll
vote, and create-poll broadcast each protocol field as its own OP_RETURN
push, so the indexer and memo.cash can parse them.

By specifier.
2026-09-16 20:14:16 -07:00
Chris Troutner 85fdc75eeb Record txid-wire-encoding completion in backlog and briefing
By specifier.
2026-09-16 15:35:05 -07:00
Chris Troutner 8f24ac0449 Merge txid-wire-encoding from swarmforge-architect
By specifier.
2026-09-16 15:32:58 -07:00
Chris Troutner c018a01cb5 Note multi-component verification records and gherkin-mutator paths
By architect.
2026-09-16 15:32:45 -07:00
Chris Troutner 292d2005ea Record txid-wire-encoding review and verification
By architect.
2026-09-16 15:31:38 -07:00
Chris Troutner a2229f7dd4 Review txid wire encoding: harden mutation coverage and DRY test doubles
Refresh the mutate4javascript and Gherkin acceptance-mutation manifests,
kill the memo-like/memo-reply boundary survivors, and extract the shared
FakeDb/makeLevel double used by the txid repair unit and property tests.

By architect.
2026-09-16 15:25:23 -07:00
Chris Troutner a76fceee73 Refactor txid wire encoding and repair library
Share the txid-and-text payload builder between hex and reply, extract the
repair store loop from repairTxidEncoding to cut CRAP from 13 to 5, correct
the poll-services property test to the little-endian wire order, and add
property tests for wire round trips and repair idempotence/conservation.

By refactorer.
2026-09-16 14:59:00 -07:00
Chris Troutner dedb7a1343 Fix txid wire encoding and add txid repair utility
Client likes, replies, poll options, and poll votes now embed the
referenced txid in little-endian wire order, matching the indexer's
byte reversal. Add a psf-memo-db repair library and CLI that rewrites
byte-reversed references in likes, postParents, pollOptions, and
pollVotes and rebuilds the postLikes and postChildren indexes, leaving
correct and unknown references untouched and staying idempotent.

By coder.
2026-09-16 14:40:13 -07:00
Chris Troutner bb0c9abb83 Spec txid wire encoding and database repair
Add client Gherkin pinning little-endian wire order for every action that
embeds a parent txid (like, reply, poll option, poll vote), and a
psf-memo-db Gherkin for a utility that repairs existing byte-reversed
references and rebuilds the affected indexes.

By specifier.
2026-09-16 13:56:40 -07:00
Chris Troutner 3de67ea491 Record like-result-modal completion in backlog and briefing
By specifier.
2026-09-16 12:35:06 -07:00
Chris Troutner f92f596bdd Merge like-result-modal from swarmforge-architect
By specifier.
2026-09-16 12:33:44 -07:00
Chris Troutner bf7edd50fc Record like-result-modal review and verification
By architect.
2026-09-16 12:32:40 -07:00
Chris Troutner e071881ea0 Harden like result modal: kill mutation survivors and DRY test setup
Add unit coverage for the LikeTipPage initial state, deps seeding, the
dust-limit boundary, and empty/null tip parsing, and assert exact
validation/broadcast error messages. Add the NewPostPage initial
result-modal state assertion. Refresh the mutate4javascript footer
manifests for the touched services and the soft Gherkin
acceptance-mutation manifest for the like-result feature.

By architect.
2026-09-16 12:29:53 -07:00
Chris Troutner e978516a0f Refactor like result modal and share the block explorer link
Deduplicate the new like-result acceptance steps behind one render helper,
and extract the bch.loping.net transaction link shared by the New Post result
modal, the post options menu, and the like/tip result into a block-explorer
service. Cover the LikeTipPage open/parse/handler failure branches and add
property tests for the explorer URL, the LikeResult markup, and the result
modal state machine.

CRAP is at or below 5 with full coverage on the changed services; every
changed/new plain source file scans at 21 or fewer mutation sites. The
existing mutation manifests are left for the mutation tool to refresh.

By refactorer.
2026-09-16 12:03:41 -07:00
Chris Troutner a0040f98c1 Implement like broadcast result modal
Keep the like/tip modal open after a successful like and show a broadcast
result instead of closing: the success message, the like transaction id, and
a link to that transaction on bch.loping.net that opens in a new tab. The
like count and filled heart update immediately, and dismissing the result
closes the modal. The result state lives on the testable LikeTipPage
controller; a server-renderable LikeResult component backs the modal and the
acceptance adapter, with acceptance step handlers for the new wording.

By coder.
2026-09-16 11:41:49 -07:00
Chris Troutner 3af0d42c67 Add like broadcast result specification
By specifier.
2026-09-16 11:15:35 -07:00
Chris Troutner efe7a6c1c9 Record post-options-menu completion in backlog and briefing
By specifier.
2026-09-16 10:05:35 -07:00
Chris Troutner fdb6efc950 Merge post-options-menu from swarmforge-architect
By specifier.
2026-09-16 10:05:06 -07:00
Chris Troutner 3486da3bf5 Record post-options-menu review and verification
Add the architect review summary and the machine-readable client verification
record (git_sha 07ff61392b) for task post-options-menu.

By architect.
2026-09-16 10:04:36 -07:00
Chris Troutner 07ff61392b Harden post-options menu: testable outside-click, kill mutation survivors
Move the outside-click decision into the pure post-options service so the
effect stays a thin adapter and the previously uncovered `&&` mutation is
unit testable. Add unit tests for the outside-click predicate and for the
default no-focus open menu, killing the two surviving `-1` default-focus
mutations.

Stamp the mutate4javascript manifests for both modules and the soft
acceptance-mutation manifest for post-options-menu.

By architect.
2026-09-16 10:02:29 -07:00
Chris Troutner d0882bbd82 Refactor post options menu and add property tests
Move the keyboard shortcut mapping into the pure post-options service so the
React component is a thin adapter and the Escape/ArrowDown decisions are unit
and property testable. DRY the duplicated post-options acceptance steps behind
two helpers, and add property tests for the explorer URL, menu-item shape,
state transitions, key command, and rendered markup.

The createElement post-options component and service stay scannable by
mutate4javascript; the JSX call sites (post-feed-item, profile) are unchanged
except for rendering the shared menu.

By refactorer.
2026-09-16 09:48:36 -07:00
Chris Troutner 20e67da216 Implement post options menu on every post card
Add a shared PostOptionsMenu component, used by the feed/thread post card and
the profile post card, with a pure post-options service for the block explorer
link and the open/close/focus state. Its first item links to the post
transaction on bch.loping.net in a new tab; the menu opens on the button and
closes on the button again, an outside click, or Escape, with ArrowDown moving
focus to the first item.

By coder.
2026-09-16 09:42:15 -07:00
Chris Troutner 5644ca75f7 Update specifier briefing for post-options-menu handoff
By specifier.
2026-09-16 09:36:51 -07:00
Chris Troutner bc964fa88c Specify post options menu for all post cards
By specifier.
2026-09-16 09:36:28 -07:00
Chris Troutner 091272df18 Record feed-total-cap completion in backlog and briefing
By specifier.
2026-09-16 09:12:11 -07:00
Chris Troutner 5e62d1ea14 Record feed-total-cap review and verification
Written review report and machine-readable verification record for the
raised recent-feed total scan cap. Verification passed 4/4 (unit 358,
property 48, acceptance all 12 suites, lint). Mutation killed 37/37 in
post-query.js; CRAP max 6.0; DRY clean for the changed files.

By architect.
2026-09-16 09:09:56 -07:00