feat: Add internal debug logging system#245
Draft
Just-Insane wants to merge 10 commits intoSableClient:devfrom
Draft
feat: Add internal debug logging system#245Just-Insane wants to merge 10 commits intoSableClient:devfrom
Just-Insane wants to merge 10 commits intoSableClient:devfrom
Conversation
added 8 commits
March 13, 2026 12:16
- Add comprehensive debug logger utility with circular buffer (1000 entries max) - Add debug log state management with Jotai atoms - Create DebugLogViewer UI component with real-time updates and filtering - Integrate debug logger into Developer Tools settings - Add logging for sync state changes (initMatrix, slidingSync) - Add logging for authentication (login, logout, session management) - Add logging for push notifications (permissions, subscriptions) - Add logging for app lifecycle (visibility changes, backgrounding) - Add logging for network connectivity (online/offline) - Add logging for notifications (filtering, routing, mute decisions) - Add logging for messages (send success/failure, uploads, scheduled) - Add logging for calls (widget lifecycle, join/hangup, events) - Support filtering by category and level - Support exporting logs as JSON (all or filtered) - Support copying logs to clipboard
- Add 'ui' and 'timeline' log categories to debugLogger - Log Room component mount/unmount and drawer state changes - Log RoomTimeline lifecycle events (mount, unmount, initialization) - Track timeline pagination (start, complete, errors) - Monitor live timeline linking state changes - Log scroll position changes (at bottom, scrolled up) - Track jump-to-event operations - Log timeline refresh events - Add UI and Timeline category filters in DebugLogViewer - Update description to mention new categories This provides comprehensive visibility into UI component lifecycle and timeline visualization state for debugging issues with room rendering, timeline scrolling, and UI element visibility.
- Change debugLoggerEnabledAtom from getter function to direct value atom to properly update UI - Convert PopOut components from children function to anchor-based pattern - Add click handlers for category and level filter menus - Fix TypeScript errors with entry.data unknown type checks - Filters should now display correctly when clicked
- Add comprehensive sync cycle logging in slidingSync.ts: - Track room count changes per list with deltas - Log initial sync completion with timing and room counts - Monitor list expansion progress with detailed stats - Detect slow sync cycles (>1s) and expansions (>500ms) - Track network connectivity changes with connection info - Log attach/dispose lifecycle with diagnostics - Add error logging for list operations - Fix filter button closing settings dialog in DebugLogViewer: - Add stopPropagation to category/level menu button handlers - Prevents event bubbling that was closing parent dialog - Add .envrc for automatic Node 24 environment activation via direnv - Add .nvmrc to specify Node v24.14.0 requirement
Debug logging: - Add logging to LeaveRoomPrompt, CreateRoom, Space, AccountSwitcherTab - Add build version to debug log exports - Add network/sync logging to initMatrix Background notifications: - Add explicit listener cleanup before stopping clients - Add exponential backoff retry for failed background clients (5 attempts) - Add 30s timeout to waitForSync to prevent indefinite hangs - Use useMemo for inactive sessions array - Track cleanup callbacks per client
Just-Insane
pushed a commit
to Just-Insane/Sable
that referenced
this pull request
Mar 13, 2026
added 2 commits
March 13, 2026 15:06
- Run Prettier on all modified files - Fix variable declaration order in BackgroundNotifications.tsx (isHighlight and loudByRule used before declaration) - Note: Lint errors are pre-existing (790 base → 703 with changes, net improvement of 87)
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.
Overview
This PR introduces a comprehensive internal debug logging system for Sable, providing detailed insights into application behavior across multiple subsystems.
Features
Core Debug Logger
Debug Log Viewer UI
Instrumented Components
Benefits
Testing
Commits