feat: secure logger and group list sidebar active state#164
Open
patopatrish wants to merge 1 commit into
Open
Conversation
…mina-eX#105) - Add lib/logger.ts: centralized secure logging with configurable log levels (debug/info/warn/error via LOG_LEVEL env var), structured JSON output, and automatic redaction of sensitive keys (ip, content, message, token, email, metadata, etc.) at any nesting depth. - Enhance group list sidebar in app/chat/page.tsx: add group avatar with first-letter initial, stronger active-group highlight using an inset left-border accent + bolder name, and reorganized last-message preview layout for cleaner readability. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@patopatrish Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
lib/logger.ts) with automatic redaction of sensitive fieldsChanges
lib/logger.ts— new fileLOG_LEVELenv var (debug|info|warn|error; defaults toinfo){ timestamp, level, event, correlationId?, context? }ip,content,message,token,email,metadata,password,authorization, etc. — at any nesting depth, so no PII or message content ever reaches the log outputlogger.debug / .info / .warn / .errorapp/chat/page.tsx— sidebar enhancementshadow-[inset_3px_0_0_hsl(var(--primary))]) + bolder name, making the selected room unmistakably distinctCloses
Closes #94
Closes #105
Test plan
/chat— verify groups sidebar renders with avatars and last-message previewsloggerin any server file and calllogger.info("test", { ip: "1.2.3.4", content: "hello" })— confirm both fields are[REDACTED]in outputLOG_LEVEL=warnand confirmlogger.info(...)calls produce no outputLOG_LEVEL=debugand confirm all levels emit🤖 Generated with Claude Code