Skip to content

Develop - #21

Merged
drn1996 merged 3 commits into
releasefrom
develop
Aug 18, 2026
Merged

Develop#21
drn1996 merged 3 commits into
releasefrom
develop

Conversation

@drn1996

@drn1996 drn1996 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Changes

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (existing behavior or public API changes)
  • Refactor (no functional change)
  • Documentation / website
  • CI / tooling

How was this tested?

Checklist

  • Tests added or updated for every behavior change
  • npm test passes with the coverage gate (100/100/100/100)
  • fallow clean from the repo root (dead-code, dupes, health, audit)
  • tsc clean (root, packages, website)
  • Docs / CLAUDE.md updated if behavior or structure changed

Related issues

drn1996 and others added 3 commits August 18, 2026 01:37
`prepareHydration` keyed each persisted store by `node.path.slice(0, -1)` —
the node's ANCESTOR path — while `createStore` looked it up by the current
resource path, which is the same thing. Two keyed siblings therefore share one
hydration entry, so the last one persisted overwrites the others and every
sibling restores its state on the next boot.

The persistence side was already correct: each sibling is saved under its own
`<kebab-name>-<key>` node. Only the restore lookup discarded the segment that
makes them distinct.

Minimal reproduction (before this change, both restore "B"):

    function Holder(props: { seed: string }) {
      const [state] = createStore({ value: props.seed });
      useAsyncOutput({ seed: props.seed }, async (_p, setOutputs) =>
        setOutputs({ value: state.value }));
      return <></>;
    }
    <><Holder key="a" seed="A" /><Holder key="b" seed="B" /></>

Both sides now key by the node's own full path. `createStore` runs before
`useAsyncOutput` has pushed the component's segment, so the segment is derived
the same way in both places — extracted into `runtime/identity.ts` because
`render.ts` (the store attach hook) and `instance.ts` (node ids) both need it
and cannot import each other.

This matters for per-entity state: a component rendered per item in a `<For>`
could not own a `createStore` at all, which pushed that state into outputs
purely to work around the collision.

Tests: a new end-to-end regression (keyed siblings each restore their own
store through a real Memory), plus a unit test that a node's store is not
handed to its parent path. Three existing hydration tests encoded the old
`slice(0, -1)` contract and now address nodes by their own path. Full suite
green: 658 creact + 25 testing, typecheck clean.
…boot

With the same seeds on both renders, a total hydration failure fell back to
those seeds and looked exactly like a successful restore — the test could not
tell "restored" from "re-initialized".

The second boot now seeds X/Y while still expecting A/B, so only a real
restore passes. Verified by reverting the hydration keying: the test fails
with ['X','Y'].
fix(store): hydrate a store by its node's own path, not its parent's
@drn1996
drn1996 merged commit 2c4cbf2 into release Aug 18, 2026
2 checks passed
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@drn1996, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e4391f31-0581-4cd2-8d67-78d82dd3e4d2

📥 Commits

Reviewing files that changed from the base of the PR and between 9950b3a and f1006fc.

📒 Files selected for processing (5)
  • packages/creact/src/runtime/identity.ts
  • packages/creact/src/runtime/instance.ts
  • packages/creact/src/runtime/render.ts
  • packages/creact/src/store/__tests__/store.test.tsx
  • packages/creact/src/store/store.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Grok fallow review — proceed

All gating checks are clean: no dead code, no duplication, no HEALTH threshold breaches, and a clean AUDIT on the single changed file. Release may proceed.

  • HEALTH hotspots show accelerating churn on packages/create-creact-app/src/index.ts, packages/testing/src/wait-for.ts, packages/creact/src/reactive/array.ts, packages/creact/src/reactive/selector.ts, packages/create-creact-app/src/templates.ts, and packages/creact/src/runtime/fiber.ts
  • Several files carry elevated triage/risk tags in file health scores (e.g. runtime/render.ts, reactive/selector.ts, reactive/array.ts, runtime/reconcile.ts), reflecting existing structure/activity rather than audit-attributed defects

Reviews the full fallow report — dead code, duplication, health, and audit. Re-runs edit this comment.

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