fix: categorize diagnostic files in logs get and logs clear#1977
Closed
fix: categorize diagnostic files in logs get and logs clear#1977
logs get and logs clear#1977Conversation
…lear` `verbose.log` was shown under HOOK OUTPUT (wrong category) and `diagnostic.md` was invisible to both `logs get` and `logs clear` (`.md` not matched by `is_wt_log_file`). Add a DIAGNOSTIC section to `logs get`, fix `is_wt_log_file` to match `.md`, and update docs to document all three file categories. Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts: # tests/integration_tests/config_state.rs
Main converted several log tests to inline snapshots. Updated the merged snapshots to include the DIAGNOSTIC section. Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts: # tests/integration_tests/config_state.rs
worktrunk-bot
approved these changes
Apr 7, 2026
The "logs" branch in `handle_state_get` is unreachable — `StateCommand::Logs` routes to `handle_logs_get` directly. Replace the duplicated dead code with a one-line delegation to fix codecov/patch. Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts: # tests/integration_tests/config_state.rs
Main converted JSON state tests to inline snapshots. Updated to include the diagnostic field. Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
approved these changes
Apr 7, 2026
Owner
Author
|
Superseded by #1981, which includes the same diagnostic file changes plus deduplication of the render functions and a test filter fix. |
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.
verbose.logwas shown under HOOK OUTPUT (wrong category — it's debug log output not hook output) anddiagnostic.mdwas invisible to bothlogs getandlogs clear(.mdextension not matched byis_wt_log_file). Both were added in 1181f05 without updating the state logs docs.Code: Added
is_diagnostic_file()helper matchingverbose.loganddiagnostic.mdby exact name. Fixedis_wt_log_file()to match.md. Added a DIAGNOSTIC section tologs get(text, JSON, and table output). Excluded diagnostic files from HOOK OUTPUT.Docs: Updated
after_long_helpto document three file categories instead of two. Addeddiagnostic.mdto the FAQ's "What files does Worktrunk create?" table.Tests: New
test_state_get_logs_diagnostic_files_in_own_section(verifies section placement) andtest_state_clear_logs_includes_diagnostic_files(verifies.mdcleared). Updated existing tests for the third section.