Skip to content

Adds the user redux and updated types to users package#73684

Draft
wilkie wants to merge 3 commits into
ngfp/progress-packagefrom
ngfp/users-package
Draft

Adds the user redux and updated types to users package#73684
wilkie wants to merge 3 commits into
ngfp/progress-packagefrom
ngfp/users-package

Conversation

@wilkie

@wilkie wilkie commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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 —

  • 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.

@wilkie wilkie changed the base branch from staging to ngfp/progress-package July 6, 2026 21:01
@wilkie wilkie changed the title Ngfp/users package Adds the user redux and updated types to users package Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🖼️ Storybook Visual Comparison Report

✅ No Storybook eyes differences detected!

wilkie and others added 3 commits July 13, 2026 16:13
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>
@wilkie wilkie force-pushed the ngfp/progress-package branch from 6010312 to e056e54 Compare July 13, 2026 23:48
@wilkie wilkie force-pushed the ngfp/users-package branch from dec5891 to 35f81fc Compare July 13, 2026 23:48
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.

1 participant