Skip to content

Fix/issues#168

Merged
Ravenyjh merged 10 commits intomainfrom
fix/issues
Feb 17, 2026
Merged

Fix/issues#168
Ravenyjh merged 10 commits intomainfrom
fix/issues

Conversation

@ymh357
Copy link
Collaborator

@ymh357 ymh357 commented Feb 17, 2026

No description provided.

ymh357 and others added 10 commits February 13, 2026 03:52
…X improvements

Migrate use0GBroker hook to BrokerProvider context to eliminate duplicate
broker instances. Fix isInitializing lifecycle by fetching ledger data
directly via broker instance in initializeBroker, replacing fragile
cross-effect handoff. Add cancellation-safe finally block.

Key changes:
- Extract BrokerProvider with Symbol-based cancellation and self-contained init lifecycle
- Add neuronToA0giString for lossless BigInt-to-string conversion
- Unify formatNumber across 5 components with optional full-precision mode
- Fix XSS: replace dangerouslySetInnerHTML with React.ReactNode
- Fix balance validation: use availableBalance instead of totalBalance
- Fix scroll: increase threshold to 50px, use refs to avoid stale closures
- Centralize minimum deposit constants in limits.ts
- Extract ChainAwareDataCache to shared chainCache module

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix spurious chain switch during initial wallet connection by
  initializing currentChainIdRef as undefined and only recording
  chainId when wallet is connected
- Reset currentChainIdRef on disconnect to prevent false chain
  switch on reconnection
- Remove deprecated use0GBroker hook (no consumers remain)
- Remove redundant refreshLedgerInfo effect from OptimizedChatPage
- Simplify scroll handler by removing unnecessary refs and using
  proper useEffect deps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace props-driven auto-advance logic with localStorage-driven step
tracking to prevent steps from cascading 1→2→3 on page load when
hasProvider and hasBalance are already true.

- Change localStorage key from 'chat-onboarding-completed' to
  'chat-onboarding-step' storing "1"/"2"/"3"/"completed"
- Remove hasProvider/hasBalance props and internal useEffect
  auto-advance logic from ChatOnboarding component
- Move step state management to useChatOnboarding hook with
  advanceStep/completeOnboarding/resetOnboarding
- Make step indicator dots clickable (forward-only persistence)
- Remove unnecessary typeof window guards inside useEffect/callbacks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…egression

advanceStep was comparing against React state which gets updated on
dot navigation, causing localStorage to regress when viewing earlier
steps then clicking forward (e.g. step 3 → dot 1 → dot 2 wrote "2").
Compare against localStorage value instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…y broker support

  Major refactoring and new features:

  - Add DepositGuardProvider for centralized deposit flow management
  - Add model aggregation view with ModelCard and ModelFilters components
  - Add read-only broker support for browsing without wallet connection
  - Add new hooks: useChainRestore, useReadOnlyBroker, useWalletGuard
  - Refactor BrokerProvider to support both connected and read-only modes
  - Simplify LayoutContent and useMessageHandling by removing duplicate logic
  - Extract DepositModal as standalone component
  - Move Message type to shared broker types
  - Improve provider management with better type safety
  - Remove redundant wallet connection checks from chat page
  - Update all inference pages to support read-only browsing

  Breaking changes:
  - Provider management hooks now require both broker and readOnlyBroker params
  - LedgerInfo refresh function signature changed

  Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Centralize scroll control in OptimizedChatPage with debounced tracking,
replace smooth scrollIntoView with instant scrollTo to avoid animation
conflicts, extract magic number to CHAT_CONFIG.SCROLL_DEBOUNCE, and
remove unused messagesEndRef from useMessageHandling and MessageList.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts:
#	web-ui/src/app/inference/chat/components/OptimizedChatPage.tsx
#	web-ui/src/shared/hooks/useMessageHandling.ts
@vercel
Copy link

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
0g-serving-user-broker Ready Ready Preview, Comment Feb 17, 2026 1:37pm

Request Review

@Ravenyjh Ravenyjh merged commit 20cbd87 into main Feb 17, 2026
3 checks passed
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.

2 participants