Adds the user redux and updated types to users package#73684
Draft
wilkie wants to merge 3 commits into
Draft
Conversation
🖼️ Storybook Visual Comparison Report✅ No Storybook eyes differences detected! |
Extracted from ngfp/music-lab-updated, reconciled with the account-settings scaffold that has since landed on staging: the scaffold's app-shaped build, configs, and entry stub are kept, and the library modules move in — - currentUserSlice: redux slice holding the signed-in user (identity, roles, permissions, progress-table flags) with a ./redux export. - ./redux/currentUserSlice types-only subpath so consumers can type a store containing this slice without importing the runtime. - user constants and types (UserTypes, CourseRoles, SignInStates). - sessionId tab-id helpers. The source branch's standalone package.json/vite config are dropped in favor of the scaffold's; its unused lodash and react-redux dependencies are not carried over. One lint fix vs the source: an unused catch binding in sessionId.ts, which the scaffold's stricter eslint config rejects. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The progress package shipped with a local CurrentUserSliceLike shim because @code-dot-org/users did not yet provide its redux slice. Now that it does, swap the real types-only import back in, as the shim's comment promised, and declare the workspace devDependency. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The ./redux/currentUserSlice export carried only a "types" condition —
no runtime target — existing solely so progress could take `typeof` the
slice. A type-only import of the slice's value binding from ./redux
does the same without the special sub-path:
import type {currentUserSlice} from '@code-dot-org/users/redux';
Types-only sub-paths invite value imports that typecheck and then fail
to resolve at bundle time, so the pattern goes away entirely.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
6010312 to
e056e54
Compare
dec5891 to
35f81fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the current user library to the users package.
Extracted from ngfp/music-lab-updated, reconciled with the
account-settings scaffold that has since landed on staging: the
scaffold's app-shaped build, configs, and entry stub are kept, and the
library modules move in —
roles, permissions, progress-table flags) with a ./redux export.
store containing this slice without importing the runtime.