Skip to content

feat(ui): Log viewer (#28b) #55

Description

@jaybarden1

Parent

Sub-issue of #28.

Summary

Implement the in-app log viewer per .claude/rules/onedrive-logviewer.md. Self-contained — no account dependency.

Scope (~4 production files)

  • InMemoryLogSink — Serilog sink + ILogEntryProvider; ring buffer (500 entries); PII scrubbing (email, OS username); thread-safe via ConcurrentQueue + Subject<LogEntry>
  • ILogEntryProvider — interface: IObservable<LogEntry> EntryAdded + IReadOnlyList<LogEntry> GetSnapshot()
  • LogViewerViewModel — subscribes to EntryAdded, loads snapshot on construction, marshals to UI thread via RxApp.MainThreadScheduler; ObservableCollection<LogEntry> Entries; level filter
  • LogViewerView.axaml + .axaml.cs — list bound to Entries, level filter dropdown, auto-scroll toggle
  • DI registration in startup (InMemoryLogSink as singleton for both ILogEventSink and ILogEntryProvider)

Acceptance criteria

  • Live log entries appear in the viewer as they are emitted
  • Level filter hides entries below the selected level
  • Auto-scroll toggle works
  • Email addresses and OS username are scrubbed from displayed entries
  • Ring buffer evicts oldest when capacity (500) is exceeded
  • dotnet build zero warnings; dotnet test all pass

Depends on

  • #28a (settings shell to host the viewer)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions