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.
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.
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.
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.
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.
Architectural review of the raised recent-feed total scan cap (10 -> 500)
and the refactorer's property tests. No structural change was warranted:
the cap stays a private constant in PostQuery, the new property tests use
in-memory store doubles with no IO, and dry4javascript found no duplicate
candidate in the changed source or the new property test. Mutation killed
all 37 sites in post-query.js.
This commit carries only the tool-written manifests: the mutate4javascript
manifest in post-query.js and the gherkin-mutator acceptance stamps in the
two touched feature files.
By architect.
Cover the total-scan cap and bounded raw scan of
PostQuery.scanRecentPostTxidsAndCount over seeded random corpora: capped
total, newest-first pagination conservation, the raw-scan bound, the 500
default cap, and reply exclusion.
By refactorer.
GET /posts/recent now caps its total scan at 500 eligible top-level posts
instead of 10, so corpora smaller than the cap report an exact total while
larger corpora stay bounded. Added unit coverage for the exact-total-under-cap
and default-cap cases, plus the many-top-level-posts acceptance fixture.
By coder.
Commit the review summary and the client verification record (git_sha
19e57be, the review commit) alongside the review. All five client commands
pass.
By architect.
Merged the refactorer handoff (e77e174). The architecture holds: the image
helpers isImageUrl/imageAltText are pure post-links functions, failed-images
is a pure state transition, and PostImage/PostContent stay presentational
with no IO. Added a unit test for isImageUrl non-string input to kill the
last surviving language mutant; mutation and acceptance manifests are
tool-written.
By architect.
Extract the pure failed-image set transition into a testable service,
DRY the acceptance no-link/no-image assertions, and add property tests
for image URL detection, alt text, and image rendering.
By refactorer.
Recognize common image file extensions in post URLs (query string and
fragment ignored), render them as inline images inside new-tab anchors
with the filename as alt text, and fall back to a plain link when the
image fails to load. Non-image URLs keep the existing plain-link
behavior.
By coder.
Add Gherkin for inline image rendering in posts: extension-based image URL
detection (.jpg/.jpeg/.png/.gif/.webp/.bmp, query and fragment ignored),
anchor-wrapped inline <img> with filename alt text, non-image URLs stay
plain links, and an image load failure falls back to a plain link.
By specifier.
Mark the feature done in the backlog, add gotchas about stale architect
verification records and surviving link-example prose mutations, and
refresh the standing briefing HEAD/next-action lines.
By specifier.
The architect's record named e17c515, which predated the review commit
b63792f. Re-ran client verification on the merged b63792f; all 5 commands
pass.
By specifier.
Harden the post link parser after the refactorer handoff:
- add start-of-text and leading-token boundary unit tests and drop a
redundant range guard, killing the isBareDomainBoundary survivors
- replace the mutable React key counter with React.Children.toArray and
assert the embedded iframe is fullscreen, killing both PostContent
mutation survivors
- record the client verification pass and the review summary
By architect.
Render http(s) URLs and bare domains in post text as anchors that open in a
new tab. Explicit URLs keep their scheme; bare domains get an https href while
their visible text stays as written. Embeddable YouTube links keep their
embedded-player behavior.
By coder.
Add Gherkin acceptance spec for auto-linking http(s) URLs and bare domains
in post text, opening in a new tab, while preserving YouTube embeds.
By specifier.
The process changes were only in Git history and a briefing paragraph. Add a
consolidated what/why record with commit hashes and verification evidence, and
point to it from the feature backlog so the next specifier discovers it.
By specifier.
Unrelated tracked changes could ride along with a handoff. Refuse to send when
git status --porcelain is non-empty, list the offending files, and keep the
draft so it can be fixed and resent. SWARMFORGE_ALLOW_DIRTY=1 overrides.
By specifier.
Add state.sh to print each role branch HEAD and the main-checkout status.
Update the briefing to use the single tmp/aps checkout, note daemon
self-healing, and point merge verification at verify.sh and the architect's
verification record.
By specifier.
The default differential run can select fewer covered sites than exist after a
function is added or removed, forcing a manual --mutate-all rerun. Add
mutate-file.sh (auto-reruns when Selected < Covered) and clean-builds.sh
(removes worker-copy bloat), and document them plus the intrinsic upper-bound
Gherkin survivors in the architect cheat-sheet.
By specifier.
Verification commands were transcribed in several places and the same full
suite was re-run by every role. Add verify.sh/verify.mjs as the single
per-component verification sequence emitting a machine-readable record
(git_sha, per-command exit/duration/summary). The architect records it for
each touched component; the specifier trusts a matching-SHA pass and only
re-runs the merged feature's acceptance test.
By specifier.
Every acceptance run re-parsed and regenerated all features even when only
one changed. Record feature_hash and aps_commit in the per-feature metadata
and skip parse/generate when both match, and drop generated tests for
features that no longer exist.
By specifier.
There were up to four APS copies (tmp/aps, tmp/aps-spec, tmp/aps-fresh, and a
component-local client copy) and the briefing, wrappers, and runners disagreed
on which to use. Add ensure-aps.sh (ensure/update/reclone) as the one canonical
tmp/aps checkout, point the gherkin-parser wrapper, architect startup, and all
three acceptance runners at it, and update the architect cheat-sheet.
By specifier.
Handoffs sit undelivered when handoffd is not running, and recovery was a
manual step. Add ensure_handoff_daemon.sh and call it from swarm_handoff.sh
and ready_for_next.sh so the daemon is restarted whenever it is missing.
By specifier.
Each psf-memo-db acceptance scenario opened an isolated LevelDB directory
but close() only closed the handles, so tmp/acceptance grew without bound
(found at 961 dirs / 293 MB). Delete the scenario dir in close() and sweep
tmp/acceptance at the start of the acceptance run.
By specifier.
The architect's terminal handoff went only to coder and refactorer, so the
specifier never received a merge notification and a human had to bridge the
gap. Require an end-of-chain git_handoff to the specifier for every completed
task or batch, including manifest- and metadata-only churn.
By specifier.
Merge hardening verified on master: psf-memo-db unit (357), property (44),
acceptance (11 suites, including thread-query-performance), and lint all
pass. Record the completion and add a gotcha about upper-bound performance
assertions surviving Gherkin mutation.
By specifier.
Encapsulate the postChildren prefix scan in PostQuery.listChildTxids and have
GetPostThread depend only on the PostQuery interface (listChildTxids,
getPostOrNull). countRepliesForTxids now reuses listChildTxids. Remove the dead
whole-database buildLikeCountMap that this task made obsolete. Cover the
prefix-scan guards and cycle back-edge, realign the thread property tests to the
adapter seam, and refresh mutation/Gherkin-acceptance manifests.
By architect.
Scope the thread endpoint to per-thread reads:
- Count likes for only the thread's txids via countLikesForTxids instead of
the whole-database buildLikeCountMap scan.
- Prefix-scan postChildren by parent txid in loadChildTxids instead of walking
the entire store for every node.
- Add unit tests pinning bounded postChildren reads and thread-scoped likes.
By coder.
Bound /posts/:txid/thread to per-thread reads: prefix-scan postChildren
by parent txid and scope like counts to the thread's txids instead of
the global postLikes scan. Record both implementation parts in the
feature backlog.
By specifier.
Extract reply/mute eligibility check into PostQuery.isEligibleRecentPost,
lowering scanRecentPostTxidsAndCount CRAP from 7 to 6. Refresh mutation
manifest.
By refactorer.
- Replace full-postHeights and full-postChildren scans in ListRecentPosts with
a single capped scan and per-page reply counting.
- Add PostQuery.scanRecentPostTxidsAndCount with TOTAL_SCAN_CAP=10.
- Update acceptance handlers and fixture for the new feed-query-performance
spec, and add entry-count wrappers for bounded-read assertions.
By coder.
Fix Adapters.openDatabases so muteQuery is constructed before postQuery, which
previously resolved an undefined muteQuery at PostQuery construction and silently
disabled recent-feed mute filtering. Fix the follow-notification key fallback to
strip the :<followeePkHash> suffix instead of key.split(':')[0] (which yielded
only the "bitcoincash" network prefix). Add unit tests for the shared muted-posts
helper and the follow key-fallback path.
By architect.
Extract the duplicated _mutedAddrs lookup and _isMutedPost check into a shared
lib helper (loadMutedAddrs / isMutedPost) used by the post, topic, search, and
notifications adapters. Extract follow/like notification predicates in
NotificationsQuery to bring CRAP down to 6. Add a mute-filtering conservation,
exclusion, and pagination property test for topic queries.
By refactorer.
Follow/mute/unfollow/unmute now broadcast the target's raw 20-byte hash160
as the OP_RETURN payload via a browser-safe Uint8Array (no Node Buffer
global), shared through the new MemoStateAction base.
By specifier.
Extract the near-identical follow/unfollow and mute/unmute action classes
onto a config-driven MemoStateAction base, removing 150 duplicated lines.
Preserves public API and static exports. Coder's hexToBytes broadcast stays
intact. Refreshed mutation manifests via the tool.
By refactorer.
Replaces the Node-only Buffer global in memo-follow and memo-mute with
the existing hexToBytes helper, which returns a Uint8Array. Updates unit
and property tests to assert bytes without requiring Buffer in the
production source, and adds an acceptance handler for the new binary
payload wording so the Binary Payload Broadcast regression spec passes.
By coder.
Client follow/mute (and their inverse unmute/unfollow) must broadcast the
target's raw 20-byte hash160 as the OP_RETURN payload and must not depend on
the Node-only Buffer global. Adds the Binary Payload Broadcast regression
spec covering the binary payload for all four actions.
By specifier.
Merge finalized architect work: reduce paginated client page size to 50,
refactor paginated pages onto a shared base, and carry in the reviewed
youtube-embed property tests and startup smoke-check polish.
By specifier.
Extract PaginatedPage base for the recent feed and recent profiles page
controllers to remove the duplicated load/canLoadMore pattern introduced
with the 50-item page size. Refresh mutation manifests via the tool. Add
property tests for the base pagination invariants (canLoadMore mirrors
hasMore, load forwards limit/offset, item lookup).
By refactorer.
Add unit tests for invalid video id and non-/watch youtube.com URL to
kill mutation survivors; document the match[1]/match[0] equivalent and
the soft-Gherkin example-value equivalents.
By architect.
Extract validVideoId, parseCandidate, videoIdFromWatchUrl,
videoIdFromShortUrl, and pushText helpers to lower cyclomatic
complexity of extractYouTubeVideoId and parsePostText to <= 6.
By refactorer.
- Add tests for profile/level handleError to raise coverage
- Extract DbBackup pure helpers into testable db-backup-util module
- Add tests for DbBackup zip/unzip and the pure helpers
- Extract shared handleControllerError helper across 7 REST controllers
By refactorer.