Skip to content

refactor(state): centralize session state management into JamSessionInfoContext - #1391

Open
kishore08-07 wants to merge 8 commits into
develfrom
kishore/session-info
Open

refactor(state): centralize session state management into JamSessionInfoContext#1391
kishore08-07 wants to merge 8 commits into
develfrom
kishore/session-info

Conversation

@kishore08-07

Copy link
Copy Markdown
Member
  • Access jmSessionStore once inside JamSessionInfoContextProvider
  • Export useJamSession helper hook for clean session state
  • Refactor App root and UI components (OrderbookContent, LoginPage, CreateWalletPage, ImportWalletPage, DevPage) to consume useJamSession
  • Migrate custom hooks (useRefreshSession, useQueryUtxos, useQueryDisplayWallet) to session context
  • Update unit test mocks across affected files to use React context mocks

Closes #1359

@kishore08-07 kishore08-07 self-assigned this Jul 30, 2026
Copilot AI review requested due to automatic review settings July 30, 2026 15:13
@kishore08-07 kishore08-07 added refactoring Code refactoring without functional changes SoB Issues, PRs, tasks, and discussions related to Summer of Bitcoin. labels Jul 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kishore08-07
kishore08-07 force-pushed the kishore/session-info branch from ca48edd to cec70b5 Compare July 30, 2026 15:14
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 91.11% (🎯 85%) 5004 / 5492
🟢 Statements 90.7% (🎯 85%) 5477 / 6038
🟢 Functions 88.09% (🎯 85%) 1732 / 1966
🟢 Branches 83.48% (🎯 80%) 3464 / 4149
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/App.tsx 65.38% 60% 58% 67.85% 62, 63, 64, 132, 154-156, 164, 176, 190-191, 200-201, 205-206, 299-304, 318-349, 391-394, 467-474, 481, 492-499, 521, 536-543, 556-563
src/components/create/CreateWalletPage.tsx 77.96% 57.14% 80% 77.58% 114-135, 163, 170, 182-183, 211-214, 227, 249
src/components/dev/DevPage.tsx 52.94% 80% 25% 69.23% 25, 27, 28, 29, 85-109
src/components/earn/EarnPage.tsx 91.66% 92.02% 89.65% 91.2% 48-54, 236-239, 450-490
src/components/import/ImportWalletPage.tsx 79.48% 60% 72.72% 79.22% 88-89, 184, 256-257, 265-280, 298-329
src/components/layout/Layout.tsx 97.29% 73.68% 91.66% 97.05% 111
src/components/login/LoginPage.tsx 87.09% 76.47% 85.71% 86.66% 75, 87-88, 98
src/components/orderbook/OrderbookContent.tsx 81.72% 64.03% 62.96% 80.95% 119-137, 164, 243-255, 348-422
src/components/send/SendPage.tsx 91.09% 87.03% 88.09% 92.64% 129, 135, 193-196, 217, 223, 241, 486-487
src/components/sweep/SweepPage.tsx 75.51% 80.15% 63.33% 76.34% 98-99, 112-113, 139-141, 167-168, 185-195, 200, 223, 229, 251, 265-267, 284, 402-425
src/context/JamSessionInfoContext.ts 76.47% 100% 50% 75% 56-57, 61-62
src/context/JamSessionInfoContextProvider.tsx 100% 86.66% 100% 100%
src/hooks/useQueryDisplayWallet.ts 100% 80% 100% 100%
src/hooks/useQueryUtxos.ts 100% 87.5% 100% 100%
src/hooks/useQueryWalletHistory.ts 90% 80% 100% 90% 58
src/hooks/useRefreshSession.ts 95% 71.42% 100% 100% 59
Generated in workflow #3736 for commit 130fac7 by the Vitest Coverage Report Action

@kishore08-07
kishore08-07 marked this pull request as draft July 30, 2026 17:25
Signed-off-by: kishore08-07 <kishorebsm8@gmail.com>
Copilot AI review requested due to automatic review settings July 31, 2026 12:48
@kishore08-07
kishore08-07 force-pushed the kishore/session-info branch from cec70b5 to f1d2f5f Compare July 31, 2026 12:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 31, 2026 13:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kishore08-07
kishore08-07 force-pushed the kishore/session-info branch from 3e67f4c to 6e7d061 Compare July 31, 2026 13:31
Copilot AI review requested due to automatic review settings July 31, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kishore08-07
kishore08-07 force-pushed the kishore/session-info branch from 6e7d061 to 50bf240 Compare July 31, 2026 14:10
Copilot AI review requested due to automatic review settings July 31, 2026 14:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Signed-off-by: kishore08-07 <kishorebsm8@gmail.com>
@kishore08-07
kishore08-07 force-pushed the kishore/session-info branch from 50bf240 to df1db7f Compare July 31, 2026 14:27
Copilot AI review requested due to automatic review settings July 31, 2026 14:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

# Conflicts:
#	src/components/earn/EarnPage.tsx
#	src/components/send/SendPage.tsx
#	src/components/sweep/SweepPage.tsx
@kishore08-07
kishore08-07 marked this pull request as ready for review August 15, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Code refactoring without functional changes SoB Issues, PRs, tasks, and discussions related to Summer of Bitcoin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(state): centralize session management under JamSessionInfoContext

3 participants