Skip to content

Conversation

@cngonzalez
Copy link
Member

@cngonzalez cngonzalez commented Jan 29, 2026

FIXES SDK-743

Description

This PR is prep for #723, so the changes here aren't actually used anywhere.

It exists because stores like the projection store need to be separated out by perspective. This is because:

  1. The projection store bulk-queries. It can't bulk query against multiple perspectives
  2. If a user switches perspective, the projection store finds a value already in its store and considers it valid, rather than re-fetching, as it should.

I also had to move isReleasePerspective to its own utility file because of import dependency cycles which someone definitely warned me about in a previous PR.

What to review

Hopefully this is pretty straightforward, nothing in particular I'm super worried about.

Testing

Tests were added for the new utilities.

@vercel
Copy link

vercel bot commented Jan 29, 2026

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

Project Deployment Actions Updated (UTC)
sdk-docs Ready Ready Preview, Comment Feb 3, 2026 6:44pm
sdk-kitchensink-react Ready Ready Preview, Comment Feb 3, 2026 6:44pm

Request Review

const sourceKey = createSourceKey(instance, source)

return {
name: `${sourceKey.name}:${perspectiveKey}`,
Copy link
Member Author

@cngonzalez cngonzalez Jan 29, 2026

Choose a reason for hiding this comment

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

The naming is only here to ensure uniqueness among stores -- resources will read perspective from the key rather than this string.

@cngonzalez cngonzalez marked this pull request as ready for review January 29, 2026 16:34
@cngonzalez cngonzalez requested a review from a team as a code owner January 29, 2026 16:34
@cngonzalez cngonzalez requested review from colepeters and removed request for a team January 29, 2026 16:34
@cngonzalez cngonzalez force-pushed the 01-26-fix_query_use_store_key_to_determine_client_for_live_events branch from 3b1698d to fffce17 Compare January 30, 2026 14:34
@cngonzalez cngonzalez force-pushed the 01-29-feat_core_add_action_binder_for_source_and_perspective branch from 8677c7e to 4655bb1 Compare January 30, 2026 14:34
Base automatically changed from 01-26-fix_query_use_store_key_to_determine_client_for_live_events to main February 3, 2026 18:34
@cngonzalez cngonzalez force-pushed the 01-29-feat_core_add_action_binder_for_source_and_perspective branch from 4655bb1 to a5da929 Compare February 3, 2026 18:38
@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 95.28% (🎯 95%) 7773 / 8158
🟢 Statements 95.28% (🎯 95%) 7773 / 8158
🟢 Functions 96.24% (🎯 95%) 384 / 399
🟢 Branches 92.95% (🎯 90%) 2308 / 2483
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/query/queryStore.ts 96.61% 95.65% 100% 96.61% 183-185, 240-245
packages/core/src/releases/getPerspectiveState.ts 100% 100% 100% 100%
packages/core/src/releases/utils/isReleasePerspective.ts 100% 100% 100% 100%
packages/core/src/store/createActionBinder.ts 97.95% 97.5% 100% 97.95% 252-253
Generated in workflow #2855 for commit a5da929 by the Vitest Coverage Report Action

@cngonzalez cngonzalez merged commit 53c193e into main Feb 3, 2026
21 checks passed
@cngonzalez cngonzalez deleted the 01-29-feat_core_add_action_binder_for_source_and_perspective branch February 3, 2026 20:47
@squiggler squiggler bot mentioned this pull request Feb 3, 2026
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