UserManager abstraction added - #158
Merged
Merged
Conversation
Reversean
marked this pull request as draft
February 12, 2026 18:36
Reversean
force-pushed
the
refactor/user-manager
branch
2 times, most recently
from
February 12, 2026 19:44
37eecbd to
70760fd
Compare
Reversean
force-pushed
the
chore/core-workspace
branch
2 times, most recently
from
February 16, 2026 07:34
09b7782 to
39d9d88
Compare
Reversean
force-pushed
the
refactor/user-manager
branch
from
February 16, 2026 07:35
70760fd to
3f9a33a
Compare
Reversean
marked this pull request as ready for review
February 16, 2026 07:36
Reversean
force-pushed
the
refactor/user-manager
branch
4 times, most recently
from
February 16, 2026 22:22
a0132ff to
9a60f23
Compare
Reversean
changed the base branch from
chore/core-workspace
to
chore/browser-workspace
February 16, 2026 22:24
Reversean
changed the base branch from
chore/browser-workspace
to
refactor/hawk-storage
February 16, 2026 22:25
Reversean
force-pushed
the
refactor/hawk-storage
branch
from
February 16, 2026 22:26
9e471fc to
2d655c1
Compare
Reversean
force-pushed
the
refactor/user-manager
branch
from
February 16, 2026 22:27
9a60f23 to
eacefe1
Compare
Reversean
force-pushed
the
refactor/hawk-storage
branch
2 times, most recently
from
February 17, 2026 13:27
c3013b6 to
223001d
Compare
Reversean
force-pushed
the
refactor/user-manager
branch
from
February 17, 2026 13:40
eacefe1 to
7d5e8e4
Compare
neSpecc
reviewed
Feb 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a UserManager abstraction in @hawk.so/core to enable environment-agnostic user persistence, as part of the larger effort to extract shared logic from @hawk.so/javascript into a core package (related to issue #151).
Changes:
- Added
UserManagerinterface andHawkStorageUserManagerimplementation in@hawk.so/corefor environment-agnostic user management - Refactored
@hawk.so/javascriptto use the newUserManagerabstraction instead of directly accessing localStorage - Modified user initialization to be lazy (generated on first access) rather than eager (generated in constructor)
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/users/user-manager.ts | New interface defining the user management contract |
| packages/core/src/users/hawk-storage-user-manager.ts | Implementation of UserManager using HawkStorage for persistence |
| packages/core/src/index.ts | Exports new UserManager interface and implementation |
| packages/core/tests/users/hawk-storage-user-manager.test.ts | Unit tests for HawkStorageUserManager |
| packages/core/package.json | Added test scripts and dev dependencies for vitest |
| packages/core/vitest.config.ts | New vitest configuration for core package |
| packages/core/tsconfig.test.json | TypeScript config for test files |
| packages/javascript/src/catcher.ts | Refactored to use UserManager, removed getGeneratedUser, changed user initialization to lazy |
| packages/javascript/src/storages/hawk-local-storage.ts | Browser-specific implementation of HawkStorage |
| packages/javascript/package.json | Added @hawk.so/core as dependency |
| packages/javascript/vite.config.ts | Marked @hawk.so/core as external dependency |
| packages/javascript/vitest.config.ts | Added source condition for workspace dependency resolution |
| yarn.lock | Updated workspace dependency configurations |
| package.json | Added test:all and test:modified scripts for workspace testing |
| .github/workflows/main.yml | Updated test workflow to run tests on modified packages with fetch-depth: 0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reversean
force-pushed
the
refactor/hawk-storage
branch
2 times, most recently
from
February 17, 2026 19:27
8cbdac2 to
cd47f1e
Compare
Reversean
force-pushed
the
refactor/user-manager
branch
2 times, most recently
from
February 18, 2026 17:54
fb57118 to
77fb17d
Compare
Reversean
force-pushed
the
refactor/hawk-storage
branch
from
February 22, 2026 14:47
cd47f1e to
7c1ad96
Compare
Reversean
force-pushed
the
refactor/user-manager
branch
from
February 22, 2026 14:48
77fb17d to
7c596c5
Compare
Reversean
force-pushed
the
refactor/hawk-storage
branch
from
February 25, 2026 17:23
7c1ad96 to
591724a
Compare
Reversean
force-pushed
the
refactor/user-manager
branch
from
February 25, 2026 17:24
7c596c5 to
d0c4bff
Compare
FeironoX5
approved these changes
Feb 26, 2026
Reversean
force-pushed
the
refactor/hawk-storage
branch
from
March 5, 2026 08:41
591724a to
a2abcb9
Compare
Reversean
force-pushed
the
refactor/user-manager
branch
from
March 5, 2026 08:49
798f237 to
88436ca
Compare
neSpecc
reviewed
Mar 5, 2026
Reversean
force-pushed
the
refactor/user-manager
branch
from
March 7, 2026 17:17
48d0fcd to
f727fc0
Compare
neSpecc
approved these changes
Mar 7, 2026
Reversean
force-pushed
the
refactor/user-manager
branch
2 times, most recently
from
March 7, 2026 19:25
cacf090 to
1230cce
Compare
- user management logic moved from Catcher (@hawk.so/javascript) to HawkUserManager (@hawk.so/core) - added RandomGenerator to provide random-generation utilities - utility method `id` moved from @hawk.so/javascript to @hawk.so/core
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.
Related #151
Added
UserManagerinterface which could be used as env-agnositc abstraction to persistAffectedUser's during catching errors.Also
StorageUserManagerimplementation based on env-agnosticHawkStorageadded.