Skip to content

feat: secure logger and group list sidebar active state#164

Open
patopatrish wants to merge 1 commit into
Lumina-eX:mainfrom
patopatrish:feat/secure-logger-and-group-sidebar
Open

feat: secure logger and group list sidebar active state#164
patopatrish wants to merge 1 commit into
Lumina-eX:mainfrom
patopatrish:feat/secure-logger-and-group-sidebar

Conversation

@patopatrish
Copy link
Copy Markdown
Contributor

Summary

  • Implements a centralized, privacy-safe logging service (lib/logger.ts) with automatic redaction of sensitive fields
  • Enhances the group list sidebar with a visually distinct active-group state, group avatars, and improved last-message layout

Changes

lib/logger.ts — new file

  • Configurable log level via LOG_LEVEL env var (debug | info | warn | error; defaults to info)
  • Structured JSON log entries: { timestamp, level, event, correlationId?, context? }
  • Deep sanitizer that redacts any field whose key matches a sensitive set — ip, content, message, token, email, metadata, password, authorization, etc. — at any nesting depth, so no PII or message content ever reaches the log output
  • Four-method surface: logger.debug / .info / .warn / .error

app/chat/page.tsx — sidebar enhancement

  • Each group row now shows a circular avatar with the group's first letter (filled with primary colour when active, muted otherwise)
  • Active group gets an inset left-border accent (shadow-[inset_3px_0_0_hsl(var(--primary))]) + bolder name, making the selected room unmistakably distinct
  • Last-message preview and timestamp/unread badge rearranged for a cleaner two-row layout

Closes

Closes #94
Closes #105

Test plan

  • Visit /chat — verify groups sidebar renders with avatars and last-message previews
  • Click a group — confirm the active-state highlight (left accent + avatar fill + bold name) appears and switches correctly
  • Import logger in any server file and call logger.info("test", { ip: "1.2.3.4", content: "hello" }) — confirm both fields are [REDACTED] in output
  • Set LOG_LEVEL=warn and confirm logger.info(...) calls produce no output
  • Set LOG_LEVEL=debug and confirm all levels emit

🤖 Generated with Claude Code

…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>
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@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! 🚀

Learn more about application limits

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.

Group List Sidebar with Active State Logging Without Storing Sensitive Data

1 participant