Add the indexer and DB verification records (both pinned to review
commit ace7038) and the architect review summary for the
profile-last-post task.
By architect.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Add the architect review summary and the machine-readable client verification
record (unit, property, acceptance, lint, build) pinned to review commit
a7d9ca6299.
By architect.
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.
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.
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.
Add the client verification record (git_sha bbbf4adcd7, result pass) and the
architect review summary for the notification-entry-display task.
By architect.
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.
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.
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.
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.
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.
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.
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.
- 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.
- 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.