Commit Graph
10 Commits
Author SHA1 Message Date
Chris Troutner 9dd9bf9274 Cover empty-message broadcast fallback and persist mutation state
Add a unit test for the broadcast-error message fallback to kill the last
new-post mutant, and commit the differential and acceptance mutation
manifests written by the approved tools during the architect verification
pass for the new-post-errors feature.

By architect.
2026-08-25 17:40:39 -07:00
Chris Troutner 66a684923c Refactor new-post failure handling and add property coverage
- Extract _handleSubmitFailure helper to lower submit() complexity
- Refresh mutation manifest via approved tool
- Add property test for broadcast-failure surfacing/no-navigation

By refactorer.
2026-08-25 17:38:44 -07:00
Chris Troutner 164bdb3cba Surface broadcast errors on the new post page
Implements New Post Page scenario 6 (specs/memo-new.feature): when a memo
broadcast fails, the app surfaces the real wallet error and the user stays
on /posts/new instead of navigating to the feed.

- src/services/new-post.js: distinguish local validation errors from
  broadcast failures; expose the real error message via broadcastError.
- src/components/app-body/new-post/index.js: render the broadcast error.
- acceptance/lib/handlers.js: support wallet-fail, attempts-to-broadcast,
  error-containing, and remain-on-path steps.
- Unit tests for broadcast-failure surfacing.

By coder.
2026-08-25 17:33:28 -07:00
Chris Troutner 84f5fe7931 Fix standard lint in posting-state test
Rename a Promise constructor param to satisfy standard's promise/param-names.

By coder.
2026-08-25 17:13:16 -07:00
Chris Troutner 009fba71fd Add posting-state coverage and persist mutation state
Cover the new-post posting flag (initial idle, in-flight true, settled
false) to kill the four surviving mutants, and commit the differential and
acceptance mutation manifests written by the approved tools during the
architect verification pass for the new-post-page feature.

By architect.
2026-08-25 17:09:14 -07:00
Chris Troutner d57975c466 Add property tests for memo post and new post invariants
- Add a small seeded property-testing harness (node:test based)
- Property-test validation classification, character-counter
  conservation, setInput round-trip, and menu-link idempotence
- Expose as explicit test:property command, separate from unit tests

By refactorer.
2026-08-25 17:06:00 -07:00
Chris Troutner 05f393c03f Implement New Post Page
Adds a New Post page for composing and broadcasting Memo posts:
- src/services/new-post.js: testable controller (input, character counter
  counting down from the memo limit, validation/length errors, navigation to
  the recent feed after a successful post).
- src/components/app-body/new-post: React view with a message textarea, post
  button, and remaining-character counter.
- Route /posts/new and a navigation menu link.
- Extend acceptance step handlers to cover both specs/post-memo.feature and
  specs/memo-new.feature wording; add unit tests for the controller.
- Drop redundant 'use strict' in compiled modules to fix the CI build warning.

By coder.
2026-08-25 17:00:27 -07:00
Chris Troutner 8e2693ad08 Refactor memo-post for lower complexity
- Extract _throwIfInvalid and _reflectPost helpers from post()
- Consolidate duplicate validation tests into one parameterized test

By refactorer.
2026-08-25 16:17:23 -07:00
Chris Troutner 514298bf96 Implement Post a Memo behavior with acceptance pipeline
Implements the post-memo behavior slice per specs/post-memo.feature:
- src/services/memo-post.js: compose, validate (empty/length), and broadcast
  a Memo post OP_RETURN (0x6d02) via the minimal-slp-wallet adapter surface.
- Stands up the Babashka APS acceptance pipeline (entrypoint generator,
  runtime, regex step handlers, convenience runner).
- Adds focused unit tests for the memo behavior.

By coder.
2026-08-25 16:13:05 -07:00
Chris Troutner a8230982a4 Integrating swarm-forge into project 2026-08-25 14:50:21 -07:00