Skip to content

Paint combinators early; nontransferable reimbursement shares - #143

Merged
AdamSpitz merged 6 commits into
devfrom
feature/combinator-operand-nonblocking-load
Aug 31, 2026
Merged

Paint combinators early; nontransferable reimbursement shares#143
AdamSpitz merged 6 commits into
devfrom
feature/combinator-operand-nonblocking-load

Conversation

@AdamSpitz

Copy link
Copy Markdown
Owner

Summary

Several stacked pieces on this branch (not only combinator painting):

  • Combinator statement pages paint immediately; operand IPFS bodies fill in after, with tests.
  • Conceptspace browse/profile/statement loaders ignore stale writes after navigation; unmount now also bumps the load token so late completions cannot setState.
  • Leftover CauseStarter package glue (standalone Vite/HTML/tsconfig) is swept after the ui/src/causestarter/ fold.
  • Accepted abortion compromise triple is promoted in seed content.
  • Reimbursement claims become nontransferable share tokens (ADR 0013), with SDK/UI/Hardhat updates.

Review

Branch review vs origin/dev: 0 bugs, 2 suggestions.

  • Unmount stale-write gap: fixed on this branch.
  • foldReimbursements still splits donations with per-holder integer division instead of the contract’s per-share accumulator — filed in TODO.md, not rewritten here.

Test plan

  • Pre-commit: lint, build, test:fast
  • Merge gate: review-received + resolve threads (/code-review --comment + scripts/post-review.sh)

Operand bodies fill in with CID fallbacks instead of blocking the whole
page spinner on Promise.all.
StatementPage: extend the existing loadTokenRef guard (previously only
covering operand fetches) to all state writes after await points —
setStatement, setStatementContent, setContentStatus, metrics,
setUserBeliefState, and the catch block. A slow load that resolves after
the user has navigated to a different statement no longer paints stale
content.

Sweep the same pattern across the other conceptspace pages:
- UserProfilePage: guard against stale writes when navigating between
  profiles (address param change)
- BrowseStatementsPage: guard against stale writes when rapidly toggling
  sort options

All 112 existing tests pass.
Delete unused files that referenced the old causestarter/src/ directory:
- vite.config.ts (dev/build now go through ui/ workspace)
- index.html (referenced deleted src/main.tsx)
- vitest.config.ts (referenced deleted src/test/setup.ts)
- tsconfig.app.json (included non-existent src/ directory)

Fix tsconfig files:
- tsconfig.json: simplify to extend tsconfig.node.json
- tsconfig.node.json: update includes to [playwright.config.ts, eslint.config.js, e2e]

Update 19 stale causestarter/src path references to ui/src/causestarter across:
- docs/founder/ (2 files, 4 refs)
- inbox.md (3 refs)
- cause-assist/ (2 refs)
- services/bridge-creator/ (1 ref)
- specs/ (4 files, 6 refs)
- fake-data-generation/ (2 refs)
- causestarter/README.md (1 ref)

Remove completed TODO item.
File foldReimbursements rounding mismatch as a follow-up.

@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

Combinator non-blocking paint and stale-write guards look correct (unmount now bumps the load token). Reimbursement share tokens match ADR 0013. One non-blocking follow-up: foldReimbursements donation rounding vs the contract accumulator — filed in TODO.md.

No blocking bugs.

Comment thread sdk/src/subsystems/lazy-giving/folds.ts

@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 vs origin/dev. No blocking bugs. Combinator paint + stale-write guards look correct; remaining foldReimbursements rounding mismatch is a TODO follow-up (thread resolved).

Reviewed-with: grok
Reviewed-files: 52
Reviewed-commit: 2a63978

@AdamSpitz
AdamSpitz merged commit 36e9d24 into dev Aug 31, 2026
3 of 5 checks passed
@AdamSpitz
AdamSpitz deleted the feature/combinator-operand-nonblocking-load branch August 31, 2026 00:11
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