[Agent] feat(logs): PVLogFileManager + session log browser (#3612)#3615
[Agent] feat(logs): PVLogFileManager + session log browser (#3612)#3615github-actions[bot] merged 6 commits intodevelopfrom
Conversation
|
@claude please do a self-review pass on this PR: Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches) |
✅ Self-Review CompleteCompleted
Completed: 2026-04-03 02:22 UTC |
Self-Review Complete ✅Ran a thorough self-review pass. Found and fixed 5 issues across 3 files. Issues Fixed
|
| Platform | onDelete |
.navigationBarTrailing |
ActivityShareSheet |
|---|---|---|---|
| iOS | ✅ | ✅ | ✅ (#if !os(tvOS) guarded) |
| tvOS | ✅ compiles (no-op) | ✅ (used elsewhere without guard) | ✅ excluded |
| macOS/Catalyst | ✅ | ✅ | ✅ |
No new platform guard issues introduced.
96dae36 to
9e67fb4
Compare
|
@claude please do a self-review pass on this PR: Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches) |
Self-Review ResultsReviewed all changed files. All 56 tests pass. Two issues found and fixed: Issues Fixed1.
2.
Verified
|
593bc02 to
fbbbe10
Compare
|
🤖 Merge conflict detected — Claude has been dispatched to resolve the conflicts automatically. If conflicts cannot be resolved cleanly, the workflow will post a comment explaining what needs manual attention. |
fbbbe10 to
952599e
Compare
|
✅ Rebase conflicts resolved — kept both |
952599e to
ea6a276
Compare
|
@claude please do a self-review pass on this PR: Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches) new pvlog code recently added too, react to that |
ea6a276 to
55af798
Compare
Self-Review Pass — Findings & FixesReviewed all 5 changed files. Issues Fixed1.
2.
3. Broken
Verified Clean
Build & Test |
dbc2eab to
4300f03
Compare
4300f03 to
f88a90e
Compare
|
@claude please do a self-review pass on this PR: Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches) |
f88a90e to
05f8f70
Compare
Self-Review Pass — ResultsWhat Was CheckedCompilation
Type Safety
Thread Safety
Multi-Platform
Dead Code / Unused Imports
Bug Fixed
The Fix: call Files changed:
|
f2ff087 to
df3c623
Compare
0a77a24 to
7024b2c
Compare
|
@claude please do a self-review pass on this PR: Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches) |
011f75c to
143e90a
Compare
Self-Review ResultsReviewed all 5 changed files. The PR is clean — here's what was found and fixed: Issues Fixed1. Deprecated API — 2. Test Isolation — No Issues Found
Commit Pushed
|
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
dcae79e to
320d365
Compare
PVLogFileManager subscribes to PVLogPublisher and writes rotating date-stamped log files to Library/Logs/Provenance/ (max 10 files × 2 MB). PVLogSessionBrowserView in Settings › Debug lets users view, share, and delete session log archives and toggle file logging on/off. Part of #3612 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Guard AnyCancellable property with #if canImport(Combine) to fix Linux compile failure - Fix thread-safety: isLogging and currentSessionURL now use queue.sync to safely access queue-protected state - Fix startLogging/stopLogging non-Combine guard to use currentFileHandle instead of missing cancellable - Fix logsDirectory force-unwrap crash on Linux (no libraryDirectory) - Remove dead `fm`/`_ = fm` code from PVLogSessionViewModel.refresh() - Add PVLogFileManagerTests suite (7 tests) covering start/stop, file listing, delete, and prune behaviour Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace deprecated FileHandle.write(_:) with write(contentsOf:) to eliminate Xcode deprecation warnings on iOS 13.4+/iOS 17+ targets - Discard unused Bool from FileManager.createFile(atPath:) call - Migrate PVLogSessionViewModel from ObservableObject+@published to @observable (iOS 17+ mandate per project conventions); update view to use @State instead of @StateObject Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace ActivityShareSheet (UIViewControllerRepresentable) with ShareLink per CLAUDE.md minimum-deployment-target guidelines (iOS 17+) - Fix ToolbarItem placement .navigationBarTrailing → .topBarTrailing (deprecated; rest of codebase uses .topBarTrailing) - Fix broken .alert binding: .constant(expr) is frozen at eval time and won't dismiss; replaced with Binding(get:set:) computed from errorMessage - Remove now-unused UIKit import and shareItems/showingShareSheet state vars All 56 PVLogging tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Without this, creating many small sessions (<2 MB each) never triggers pruneOldFiles(), so maxFileCount is silently ignored. Now pruneOldFiles() runs at the start of every session. Test updated to verify the limit is actually enforced. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace deprecated edgesIgnoringSafeArea(.all) with ignoresSafeArea() in PVLogSessionBrowserView (two locations) - Add defer in pruneOldFilesKeepsMaxCount test to reset maxFileCount, preventing singleton state leakage between test runs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
320d365 to
b7e2f29
Compare
Summary
PVLogFileManagertoPVLogging— subscribes toPVLogPublisherand writes rotating date-stamped log files toLibrary/Logs/Provenance/startLogging()/stopLogging()APIPVLogSessionBrowserViewFiles Changed
PVLogFileManager.swiftPVLogging— rotating file logger subscribing toPVLogPublisherPVLogSessionBrowserView.swiftPVSwiftUI— session log list + viewer + share + deleteSettingsSwiftUI.swiftTest plan
Part of #3612
🤖 Generated with Claude Code