Skip to content

CauseStarter: persist seeded bridge drafts, home Statements/Projects, and believer-set cache - #133

Merged
AdamSpitz merged 8 commits into
devfrom
causestarter-bridge-editor-seed-persist
Aug 20, 2026
Merged

CauseStarter: persist seeded bridge drafts, home Statements/Projects, and believer-set cache#133
AdamSpitz merged 8 commits into
devfrom
causestarter-bridge-editor-seed-persist

Conversation

@AdamSpitz

Copy link
Copy Markdown
Owner

What & why

CauseStarter work that accumulated on this branch:

  • Bridge editor seed persist. Seeded parent owner/slug stay in the draft so reload does not blank the editor. Missing draft ids no longer mint an empty cluster. The editor warns if the connected wallet owns a parent cause. React StrictMode remounts reuse a just-minted seeded path instead of leaving a leftover draft.
  • Home as a personal dashboard. Statements and Projects sections on the CauseStarter home page: signed-statement count plus a list page, and projects you created, contributed to, or bookmarked — not a public directory. Signed-statement list shows signer/project stats. Project bookmarks hydrate on a fresh device without writing an empty local document that would block later sync.
  • Cause page load. Cap per-plank indexer query fan-out (mapWithConcurrency, six in flight) and cache believer sets at module level so leaving and returning does not refetch every plank. Failures are not cached; expired entries are dropped.
  • Notes. Tentative product idea: treat a human-authored bridge cluster as a nudger. Inbox note that believer sets are still shipped in full to the browser.

Review (enforced for PRs into dev)

  • Reviewed the diff and posted findings as review threads (/code-review --comment, pi, etc.)
  • Posted the receipt so the review-received check goes green (scripts/post-review.sh)
  • All finding threads resolved

You can't merge into dev until review-received is green and every
conversation is resolved — GitHub enforces both. See workflow/review-gate.md.

Checklist

  • Tests pass (pre-commit fast tests green; full suite runs on dev → master)
  • Targeting the right base branch (dev for features; master only for releases)

AdamSpitz and others added 8 commits August 19, 2026 19:25
Seeded parent owner/slug now persist so reload does not blank the editor, missing draft ids no longer mint a empty cluster, skip-modified is stand-in only, and the editor warns if the connected wallet owns a parent cause.
The cause page fired one indexer query per published plank through
Promise.all, so a 40-plank cause opened 40 simultaneous walks on each of
four paths: believer sets, aligned projects, plank texts, and the
signed-already check. mapWithConcurrency keeps input order and
all-or-nothing rejection but holds six in flight.

Believer sets also lived in component state, so leaving a cause page and
coming back refetched every plank. They now go through a module-level
cache keyed by statement and trusted-attester list, sharing in-flight
promises between callers. Failures are not cached, or one blip would
poison a plank for a whole TTL and make retry look broken; refresh()
invalidates first, or the cache would serve the same numbers back.

Not fixed here, and noted in inbox.md: the sets themselves are still
shipped to the browser in full, so a plank with 100k believers downloads
100k IDs to render one number. That needs an indexer-side aggregate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Human-authored clusters and LLM bridge-creator instances share the
same listener-facing identity; opt-in on clusters is the open question.
Home is the personal dashboard: signed-statement count plus a list page, and projects you created, contributed to, or bookmarked, without turning either into a public directory.
Share the cause-row caption (direct/indirect counts and a projects link)
so the Statements page matches other statement surfaces without the
selection eye.
An empty chain ref no longer writes a local document that would block later
sync, and the project page hydrates on mount instead of only the home list.
Reuse a just-minted seeded path across the remount window, show signed-statement
load errors instead of an empty wallet, and drop expired believer-set cache
entries so unused planks do not keep full ID sets.
Skip writing the chain list if localStorage gained a key during getUserRef,
drop the extra reserved-slug check, and shorten two file-level comments.

@AdamSpitz AdamSpitz left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review receipt.

Reviewed PR 133. Fixed hydrate-vs-click clobber on project bookmarks, redundant reserved slug check, and two file-level narrative comments. Remaining follow-up: last-local-wins project bookmarks across devices (causestarter/TODO.md).

Reviewed-with: grok
Reviewed-files: 44
Reviewed-commit: b71a26e

@AdamSpitz AdamSpitz left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review receipt.

Reviewed PR 133 after review-fix commit 3919e38. Hydrate-vs-click clobber on project bookmarks is skipped if a local key appears during getUserRef; reserved slug uses RESERVED_REF_NAMES only; last-local-wins across devices remains in causestarter/TODO.md.

Reviewed-with: grok
Reviewed-files: 44
Reviewed-commit: 3919e38

@AdamSpitz
AdamSpitz merged commit 08b90c0 into dev Aug 20, 2026
4 checks passed
@AdamSpitz
AdamSpitz deleted the causestarter-bridge-editor-seed-persist branch August 20, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant