Skip to content

Fix Storybook model cache mocks#493

Merged
cooper (czxtm) merged 1 commit into
developfrom
cm/storybook-model-cache-mocks-c635
Jul 16, 2026
Merged

Fix Storybook model cache mocks#493
cooper (czxtm) merged 1 commit into
developfrom
cm/storybook-model-cache-mocks-c635

Conversation

@czxtm

@czxtm cooper (czxtm) commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds Storybook Tauri runtime oRPC mocks for model-cache calls used by provider selectors.
  • Covers models.setCached, models.getCached, and models.clearCached.
  • Split out from Fix critical import finalization bugs #490 for focused review.

Reproduction / verification steps

Regression being verified: provider selectors can call the Storybook model-cache oRPC mock methods used by the app.

cd apps/native
bun run test:unit src/storybook-tauri-runtime.test.ts

Expected result: the test passes and covers models.setCached, models.getCached, and models.clearCached in the Storybook Tauri runtime mock.

Manual Storybook check, if desired:

  1. Start Storybook with cd apps/native && bun run storybook.
  2. Open a story containing provider/model selectors.
  3. Select a CLI/provider model option that causes model-cache calls.
  4. Expected: the story remains interactive; no missing models.*Cached oRPC handler error is thrown in the browser console.

Test Plan

  • cd apps/native && bun run test:unit src/storybook-tauri-runtime.test.ts

Docs

  • No docs update needed
Open in Web Open in Cursor 

Co-authored-by: cooper <czxtm@users.noreply.github.com>
@cursor cursor Bot mentioned this pull request Jul 6, 2026
8 tasks
@czxtm
cooper (czxtm) marked this pull request as ready for review July 7, 2026 03:57

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@czxtm
cooper (czxtm) merged commit 6ce2eaf into develop Jul 16, 2026
10 of 17 checks passed
@czxtm
cooper (czxtm) deleted the cm/storybook-model-cache-mocks-c635 branch July 16, 2026 02:35
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.

3 participants