From bdeacd5d0d2a4dfb31b30a02ca627fb0dcf31dd6 Mon Sep 17 00:00:00 2001 From: mantrakp04 Date: Tue, 2 Jun 2026 09:54:57 -0700 Subject: [PATCH] Update CLAUDE-KNOWLEDGE.md: Remove outdated Q&A on template typecheck failures and clarify context provider definitions. This streamlines documentation and enhances clarity on using `createGlobal` for context management. --- .claude/CLAUDE-KNOWLEDGE.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/.claude/CLAUDE-KNOWLEDGE.md b/.claude/CLAUDE-KNOWLEDGE.md index 528821517..ebd0e38ac 100644 --- a/.claude/CLAUDE-KNOWLEDGE.md +++ b/.claude/CLAUDE-KNOWLEDGE.md @@ -574,6 +574,3 @@ A: Add `docs` to `pnpm-workspace.yaml`, keep the package named `@hexclave/docs`, ## Q: How should template React contexts avoid duplicate client-bundle context identities? A: Define exported provider contexts such as `StackContext` and `TranslationContext` through `createGlobal` from `@stackframe/stack-shared/dist/utils/globals`, not direct `React.createContext(...)` exports. That helper stores the React context under `globalThis[Symbol.for("__hexclave-globals")]`, so duplicated SDK bundles still share the same provider/consumer context object. - -## Q: Why can `packages/template` typecheck fail after adding new `@hexclave/shared/dist/*` imports? -A: `packages/template` resolves `@hexclave/shared` through the shared package's generated `dist` declarations. If new shared source files or exports were merged but packages have not been rebuilt by the dev watcher, template typecheck can report missing `@hexclave/shared/dist/*` modules or members even while `packages/stack-shared` source typechecks cleanly. Do not switch back to legacy `@stackframe/stack-shared` imports to mask this; wait for or ask the user to run the package build.