refactor(FR-2616): rely on React Compiler ('use memo') for memoization#6857
Merged
graphite-app[bot] merged 1 commit intoApr 23, 2026
Conversation
This was referenced Apr 22, 2026
Contributor
Author
5 tasks
Contributor
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 8.91% | 1831/20559 |
| 🔴 | Branches | 8.08% | 1165/14421 |
| 🔴 | Functions | 5.28% | 294/5565 |
| 🔴 | Lines | 8.64% | 1723/19948 |
Test suite run success
865 tests passing in 40 suites.
Report generated by 🧪jest coverage report action from e109675
4cc35d4 to
9e0defc
Compare
29873c3 to
19fb0f2
Compare
f80af6f to
6dcbbec
Compare
19fb0f2 to
5991ab4
Compare
This was referenced Apr 22, 2026
6dcbbec to
19bc0b6
Compare
a4cd73c to
31e44f6
Compare
19bc0b6 to
0e60f45
Compare
This was referenced Apr 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors memoization patterns to rely on the React Compiler ('use memo') instead of manual useCallback wrappers, and documents this as a project rule.
Changes:
- Removed
useCallbackwrappers inuseSTokenandSTokenLoginBoundaryin favor of plain functions under React Compiler memoization. - Added/ensured
'use memo'directives on relevant components. - Added a
.clauderule document for React Compiler memoization guidance and updated the related spec metadata.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| react/src/hooks/useSToken.ts | Drops useCallback for the returned clear function, relying on compiler memoization. |
| react/src/components/STokenLoginBoundary.tsx | Removes useCallback handlers and adds 'use memo' directives to components. |
| .specs/draft-stoken-login-boundary/metadata.json | Updates spec tracking metadata for a closed/redundant subtask. |
| .claude/rules/react-compiler-memoization.md | Documents the “prefer React Compiler memoization” rule for the codebase. |
0e60f45 to
35db452
Compare
53a39ab to
61ad3d1
Compare
35db452 to
3edbd01
Compare
61ad3d1 to
8dd4a80
Compare
3edbd01 to
9b8a859
Compare
Merge activity
|
#6857) resolves #NNN (FR-MMM) <!-- replace NNN, MMM with the GitHub issue number and the corresponding Jira issue number. --> <!-- Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes, and how it affects the users and other developers. --> **Checklist:** (if applicable) - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
8dd4a80 to
f96e136
Compare
9b8a859 to
e109675
Compare
Base automatically changed from
04-21-test_fr-2633_add_unit_tests_for_stokenloginboundary
to
main
April 23, 2026 10:44
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.

resolves #NNN (FR-MMM)
Checklist: (if applicable)