itsgoin/crates/core/src
Scott Reimers 10de3f6108 feat(fof-layer2): Tauri commands + frontend compose/comment routing
Three new Tauri commands surface Layer 2 to the frontend:

- create_post_with_fof_comments(content) → { postId }
  Builds the FoF gating block from the default persona's keyring and
  publishes a Mode 2 post (public body, FoF-gated comments).
- comment_on_fof_post(post_id_hex, body)
  Backwards-compat wrapper: comment_on_post now auto-detects FoF
  gating on the parent post and dispatches internally. Existing
  comment-send UI works unchanged.
- revoke_fof_commenter(post_id_hex, pub_x_index, reason_code)
  Wraps the Node helper. UI for per-comment revocation can hang off
  this without further Node changes.

Node::comment_on_post now branches on parent post fof_gating presence
— this is the central routing point so neither the frontend nor
existing comment-send code needs to know about FoF specifics. FoF
posts get FoF comments automatically; non-FoF posts get the legacy
path. Same Tauri command, same frontend handler.

Frontend:
- Compose: comment-perm-select gains a "Friends of Friends" option.
  When picked, compose dispatches to create_post_with_fof_comments
  instead of the standard create_post. Standard set_comment_policy
  diff fires after so receivers' four-check accept rule activates.
- Attachments + non-default-persona FoF posts are out-of-v1; compose
  reports + aborts rather than silently producing a non-FoF post.

Layer 2 backend + minimal-viable UI complete. Granular per-comment
revoke UI and access-grant UI deferred — Node + Tauri primitives
exist; the surfaces can be added without further crypto work.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 16:07:07 -04:00
..
activity.rs ItsGoin v0.3.2 — Decentralized social media network 2026-03-15 20:23:09 -04:00
announcement.rs feat(fof-layer2): wire types — WrapSlot, FoFCommentGating, CommentPermission::FriendsOfFriends 2026-05-14 13:39:46 -04:00
blob.rs v0.3.6: Active CDN replication, device roles, budgets, tombstones, engagement fix, DOS hardening 2026-03-20 21:00:28 -04:00
connection.rs feat(fof-layer2): access-grant — retroactive read+comment widening 2026-05-14 15:07:54 -04:00
content.rs feat(fof-layer2): wire types — WrapSlot, FoFCommentGating, CommentPermission::FriendsOfFriends 2026-05-14 13:39:46 -04:00
control.rs feat(fof-layer2): wire types — WrapSlot, FoFCommentGating, CommentPermission::FriendsOfFriends 2026-05-14 13:39:46 -04:00
crypto.rs feat(fof-layer2): wrap-slot dual-derivation seal/open primitives 2026-05-13 07:16:42 -04:00
export.rs Phase 4 (0.6.3-beta): posting-key / network-key split (plumbing) 2026-04-21 22:38:12 -04:00
fof.rs feat(fof-layer2): access-grant — retroactive read+comment widening 2026-05-14 15:07:54 -04:00
group_key_distribution.rs feat(fof-layer2): wire types — WrapSlot, FoFCommentGating, CommentPermission::FriendsOfFriends 2026-05-14 13:39:46 -04:00
http.rs Phase 2d (0.6.1-beta): route manifest + blob ops through file_holders 2026-04-21 21:09:45 -04:00
identity.rs First-run chooser, node shutdown on switch, file picker, export path fix 2026-04-06 01:58:02 -04:00
import.rs feat(fof-layer2): wire types — WrapSlot, FoFCommentGating, CommentPermission::FriendsOfFriends 2026-05-14 13:39:46 -04:00
lib.rs feat(fof-layer2): author publish-side build_fof_comment_gating 2026-05-14 13:50:56 -04:00
network.rs feat(fof-layer2): wire types — WrapSlot, FoFCommentGating, CommentPermission::FriendsOfFriends 2026-05-14 13:39:46 -04:00
node.rs feat(fof-layer2): Tauri commands + frontend compose/comment routing 2026-05-14 16:07:07 -04:00
profile.rs feat(fof-layer2): author publish-side build_fof_comment_gating 2026-05-14 13:50:56 -04:00
protocol.rs Phase 2g: GroupKeyDistribute \u2192 encrypted post 2026-04-22 23:09:19 -04:00
storage.rs feat(fof-layer2): access-grant — retroactive read+comment widening 2026-05-14 15:07:54 -04:00
stun.rs Our Info panel, hole punch race fix, NAT profiles in relay introduction 2026-04-05 17:57:41 -04:00
types.rs feat(fof-layer2): access-grant — retroactive read+comment widening 2026-05-14 15:07:54 -04:00
upnp.rs ItsGoin v0.3.2 — Decentralized social media network 2026-03-15 20:23:09 -04:00
web.rs Phase 2d (0.6.1-beta): route manifest + blob ops through file_holders 2026-04-21 21:09:45 -04:00