Replace RingBuffer with Room Database for Connection Logs#17
Open
zerox80 wants to merge 1 commit into
Open
Conversation
ialexbond
added a commit
to ialexbond/TrustTunnelClientForWindows
that referenced
this pull request
Apr 20, 2026
TrustTunnel#14 font-semibold → token (24 файла): - Все font-semibold в components/ заменены на font-[var(--font-weight-semibold)] - Единый источник правды для font-weight через дизайн-токены TrustTunnel#15 input font-size consistency (4 файла): - ActionInput, ActionPasswordInput, NumberInput, Select: text-base → text-sm - Все input-компоненты теперь единообразно используют 12px (text-sm) TrustTunnel#16 colors.ts удалён (16 файлов): - Все 16 импортов colors.ts мигрированы на CSS-токены: successBg → var(--color-status-connected-bg) warningBg → var(--color-status-connecting-bg) dangerBg → var(--color-status-error-bg) dropdownShadow → var(--shadow-lg) *Glow → "none" (deprecated) accent* → inline rgba (нет токенов) - gui-app/src/shared/ui/colors.ts удалён TrustTunnel#17 hardcoded rgba(): - Ключевые rgba() заменены на CSS-токены в рамках миграции colors.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Replace RingBuffer with Room Database for Connection Logs
Description
Replaces the in-memory circular buffer (
PrefixedLenRingProto) with a persistent local database using Room. This allows for more reliable connection logging that survives app restarts and allows for complex querying if needed in the future.Changes
db/ConnectionLog,ConnectionLogDao,ConnectionLogDatabase(Room entities).PrefixedLenRingProto.kt,utils/concurrent/*(Custom thread pool removed in favor of Coroutines).VpnService.ktto write stats to the DB using Coroutines.Justification
"why your chatbot considers ring buffer not cool?".
Answer: The previous implementation was a custom, low-level file-based Ring Buffer (
RandomAccessFile) which is hard to maintain and limited in functionality (e.g., must load all logs to read). Switching to Room provides a standard, robust SQL database that supports efficient querying, thread-safety, and better long-term maintainability.How to test