Commit Graph
95 Commits
Author SHA1 Message Date
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 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 bc964fa88c Specify post options menu for all post cards
By specifier.
2026-09-16 09:36:28 -07:00
Chris Troutner 19e57be1ec Review post-image-rendering: cover isImageUrl guard, stamp manifests
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.
2026-09-16 07:34:13 -07:00
Chris Troutner e77e174c92 Refactor post image rendering and cover image helpers
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.
2026-09-16 07:20:40 -07:00
Chris Troutner 3971e0736f Render image URLs inline in posts
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.
2026-09-16 07:07:40 -07:00
Chris Troutner 53d74398be Spec post image rendering
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.
2026-09-16 06:57:52 -07:00
Chris Troutner ac306daca9 Removing strict typo 2026-09-16 06:49:01 -07:00
Chris Troutner ea5c69eb7e title and footer 2026-09-16 06:44:17 -07:00
Chris Troutner b63792fb7b Review post-link-formatting: kill link-parser boundary mutants
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.
2026-09-15 19:33:46 -07:00
Chris Troutner e17c515065 Add property tests for post link parsing
Cover parsePostLinks invariants over broad seeded random inputs: round
trip reconstruction, link/text segment shape, trailing-punctuation
handling, input ordering, email exclusion, and determinism.

By refactorer.
2026-09-15 19:20:48 -07:00
Chris Troutner 6c7952f469 Format post URLs and bare domains as links
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.
2026-09-15 19:08:49 -07:00
Chris Troutner 968970b364 Spec post link formatting
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.
2026-09-15 19:04:17 -07:00
Chris Troutner 5bbe276c58 Generate acceptance entry points incrementally
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.
2026-09-15 18:13:11 -07:00
Chris Troutner 66a791bd72 Single-source the APS checkout under tmp/aps
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.
2026-09-15 17:47:33 -07:00
Chris Troutner 8244e11ec4 New posts display TXID after broadcast 2026-09-13 06:42:14 -07:00
Chris Troutner d2c0bedab3 Changing order of nav menu 2026-09-13 06:26:54 -07:00
Chris Troutner 407b9f5e4a Fixing nav menu for small screens 2026-09-13 06:15:25 -07:00
Chris Troutner c612212342 Adding tooltip when copyin txid of a post 2026-09-13 05:54:05 -07:00
Chris Troutner 5afaa64b26 Review account-avatar-display: refresh mutation manifests, add review summary
By architect.
2026-09-05 13:17:41 -07:00
Chris Troutner 8088d73fc3 Add property tests for account page avatar display logic
By refactorer.
2026-09-05 13:09:09 -07:00
Chris Troutner afd4585374 Implement account avatar image display on the account page
By coder.
2026-09-05 13:04:24 -07:00
Chris Troutner c849c41dbc Specify account avatar image display on the account page
By specifier.
2026-09-05 12:58:56 -07:00
Chris Troutner 3992395480 Review mute-feed-filtering: fix mute dependency order and follow-key fallback, add helper coverage
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.
2026-09-04 13:35:02 -07:00
Chris Troutner 448bddc31f Implement mute feed filtering across recent, topic, search, and notifications feeds
By coder.
2026-09-04 12:23:00 -07:00
Chris Troutner c8ef2ddd95 Spec mute feed filtering across recent, topic, search, and notifications feeds
By specifier.
2026-09-04 12:09:02 -07:00
Chris Troutner 167a64ae6b Review binary-payload-broadcast: verify MemoStateAction dedup, document Gherkin equivalents
By architect.
2026-09-04 11:30:12 -07:00
Chris Troutner 53f6b90f56 Deduplicate Memo follow/mute onto shared MemoStateAction base
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.
2026-09-04 11:25:28 -07:00
Chris Troutner 5e1f4739e3 Broadcast follow/mute/unfollow/unmute hash160 payloads as Uint8Array
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.
2026-09-04 11:13:15 -07:00
Chris Troutner 62e04799c8 Specify binary hash160 broadcast payload for follow/mute
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.
2026-09-04 11:07:25 -07:00
Chris Troutner a4cd814931 Review page-size-50: harden pagination null edge, document equivalents
By architect.
2026-09-04 10:45:35 -07:00
Chris Troutner a9488d9ae2 Refactor paginated pages onto shared base, add property coverage
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.
2026-09-04 10:06:27 -07:00
Chris Troutner 38f7a42b90 Merge commit '59cce4426d' into swarmforge-refactorer 2026-09-04 10:00:44 -07:00
Chris Troutner 59cce4426d Reduce paginated client page size to 50
By coder.
2026-09-04 10:00:19 -07:00
Chris Troutner 81cedabcdf Specify 50-item page size for all paginated pages
By specifier.
2026-09-04 09:47:47 -07:00
Chris Troutner 9ec8760b59 Add property tests for youtube-embed parser invariants
Cover round-trip reconstruction, segment shape, non-YouTube URLs staying
text, and video-id round trips over broad random inputs.

By refactorer.
2026-09-04 09:43:51 -07:00
Chris Troutner b63019c31f Review youtube-embed: harden parser edge cases, document equivalents
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.
2026-09-04 09:28:13 -07:00
Chris Troutner 93baa25ad0 Reduce CRAP in youtube-embed parser
Extract validVideoId, parseCandidate, videoIdFromWatchUrl,
videoIdFromShortUrl, and pushText helpers to lower cyclomatic
complexity of extractYouTubeVideoId and parsePostText to <= 6.

By refactorer.
2026-09-04 09:19:18 -07:00
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