Skip to content

keepLatest: keep the initial value when it starts out loading - #202

Open
NullVoxPopuli-ai-agent wants to merge 2 commits into
universal-ember:mainfrom
NullVoxPopuli-ai-agent:nvp/keep-latest-initial
Open

NullVoxPopuli-ai-agent wants to merge 2 commits into
universal-ember:mainfrom
NullVoxPopuli-ai-agent:nvp/keep-latest-initial

Conversation

@NullVoxPopuli-ai-agent

@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent commented Sep 25, 2026 •

Copy link
Copy Markdown

If when() is true on the first run, keepLatest returns the value but does not save it as previous. The next run with an empty value then returns undefined, not the initial value.

Found in limber: the REPL output uses keepLatest to hold the last render while auto-render is paused. A page that loads paused went blank after the first edit.

The new tests in tests/*/tests/utils/keep-latest/js-test.ts and rendering-test.gts fail before the fix and pass after it.

🤖 Generated with Claude Code

If `when()` was true on the first run, keepLatest returned the value
without saving it as `previous`. The next run with an empty value then
returned undefined instead of the initial value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 25, 2026

Copy link
Copy Markdown

@NullVoxPopuli is attempting to deploy a commit to the universal-ember Team on Vercel.

A member of the Team first needs to authorize it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
reactive Ready Ready Preview Sep 25, 2026 6:55pm UTC

This branch was successfully deployed

1 active deployment
Preview — 7147b989 Deployed Sep 25, 2026 by vercel[bot]
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.

2 participants