-
Notifications
You must be signed in to change notification settings - Fork 1.3k
store cleanup #29012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chrisnojima-zoom
wants to merge
24
commits into
nojima/HOTPOT-next-670-clean
Choose a base branch
from
nojima/ZCLIENT-simplify-1
base: nojima/HOTPOT-next-670-clean
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+473
−696
Open
store cleanup #29012
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0db2c7a
fs + convostate cleanup (#29012)
chrisnojima-zoom 363661c
fix bugs in teams store
chrisnojima-zoom 4ce23a4
simplify chat store: fix logger bug, remove redundant casts, skip no-…
chrisnojima-zoom 43a3c1a
simplify config store: merge set calls, fix network change detection,…
chrisnojima-zoom 207c1eb
simplify profile store: merge router imports, merge set calls, dedup …
chrisnojima-zoom 561499d
simplify tracker store: remove username alias, fix dead code, dedupli…
chrisnojima 8cf4d23
simplify crypto store: fix double encrypt, remove dead code and misle…
chrisnojima 27adad9
simplify provision store: remove dead state, extract cancel helpers, …
chrisnojima e249fde
fix lint/tsc: eliminate always-falsy flags, fix optional chain in stores
chrisnojima e227a1d
simplify people store: remove dead code, fix O(n²) spreads, single-pa…
chrisnojima acc90ab
simplify team-building store: remove dead state, deduplicate work
chrisnojima 702c4a8
remove dead serviceResultCount from team-building Props type
chrisnojima be76372
simplify archive store: fix type typo, race conditions, unsafe side e…
chrisnojima a3aca1d
simplify push store: fix Promise anti-pattern, extract token helper, …
chrisnojima aecc6c9
simplify signup store: prune dead state/fields, remove restartSignup …
chrisnojima 4441d59
simplify daemon store: batch set calls, inline helpers, remove dead b…
chrisnojima 6febf12
simplify settings store: extract pprof helper, fix setProxyData state…
chrisnojima e961b4e
simplify users store: merge duplicate imports, batch identity updates…
chrisnojima 75de866
archive: replace WebCrypto job ID with cross-platform makeUUID
chrisnojima-zoom d7bcf92
WIP
chrisnojima d95ba73
fix lint and tsc: add async to pprof callbacks, add makeUUID import t…
chrisnojima ae796a4
fix exploding state
chrisnojima 4180fe5
lint hook
chrisnojima 4bc5e9b
remove path
chrisnojima File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #!/bin/bash | ||
|
|
||
| INPUT=$(cat) | ||
| COMMAND=$(echo "$INPUT" | jq -r '.tool_input.command') | ||
|
|
||
| if echo "$COMMAND" | grep -qE "git commit"; then | ||
| REPO_ROOT=$(git -C "$(dirname "$0")" rev-parse --show-toplevel) | ||
|
|
||
| echo "Running yarn lint..." >&2 | ||
| if ! (cd "$REPO_ROOT/shared" && yarn lint 2>&1); then | ||
| echo "Lint failed — commit blocked." >&2 | ||
| exit 2 | ||
| fi | ||
|
|
||
| echo "Running yarn tsc..." >&2 | ||
| if ! (cd "$REPO_ROOT/shared" && yarn tsc 2>&1); then | ||
| echo "TypeScript check failed — commit blocked." >&2 | ||
| exit 2 | ||
| fi | ||
|
|
||
| echo "Pre-commit checks passed." >&2 | ||
| fi | ||
|
|
||
| exit 0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(yarn lint)", | ||
| "Bash(yarn lint-warn:*)", | ||
| "Bash(yarn prettier:*)", | ||
| "Bash(yarn build-*)", | ||
| "Bash(yarn package)", | ||
| "Bash(yarn start*)", | ||
| "Bash(yarn rn-gobuild*)", | ||
| "Bash(yarn rn-download-android*)", | ||
| "Bash(yarn tsc)", | ||
| "Bash(yarn tsc:*)", | ||
| "Bash(yarn pod*)", | ||
| "Bash(yarn coverage:*)", | ||
| "Bash(yarn maestro*)" | ||
| ] | ||
| }, | ||
| "hooks": { | ||
| "PreToolUse": [ | ||
| { | ||
| "matcher": "Bash", | ||
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": ".claude/hooks/pre-commit-check.sh", | ||
| "timeout": 120, | ||
| "statusMessage": "Running lint and tsc..." | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } |
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crypto.getRandomValuesassumes a global WebCrypto implementation is available. In React Native (and some Electron/Node contexts)cryptomay be undefined, causing a runtime crash when starting a chat archive job. Consider switching to an existing cross-platform ID generator used elsewhere in the app (or adding a guarded fallback) so job ID generation works reliably across mobile + desktop.