Skip to content

fix: categorize diagnostic files in logs get and logs clear#1977

Closed
max-sixty wants to merge 7 commits intomainfrom
state-logs-docs-2
Closed

fix: categorize diagnostic files in logs get and logs clear#1977
max-sixty wants to merge 7 commits intomainfrom
state-logs-docs-2

Conversation

@max-sixty
Copy link
Copy Markdown
Owner

verbose.log was shown under HOOK OUTPUT (wrong category — it's debug log output not hook output) and diagnostic.md was invisible to both logs get and logs clear (.md extension not matched by is_wt_log_file). Both were added in 1181f05 without updating the state logs docs.

Code: Added is_diagnostic_file() helper matching verbose.log and diagnostic.md by exact name. Fixed is_wt_log_file() to match .md. Added a DIAGNOSTIC section to logs get (text, JSON, and table output). Excluded diagnostic files from HOOK OUTPUT.

Docs: Updated after_long_help to document three file categories instead of two. Added diagnostic.md to the FAQ's "What files does Worktrunk create?" table.

Tests: New test_state_get_logs_diagnostic_files_in_own_section (verifies section placement) and test_state_clear_logs_includes_diagnostic_files (verifies .md cleared). Updated existing tests for the third section.

This was written by Claude Code on behalf of @max-sixty

max-sixty and others added 4 commits April 7, 2026 09:42
…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
max-sixty and others added 3 commits April 7, 2026 10:06
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>
@max-sixty
Copy link
Copy Markdown
Owner Author

Superseded by #1981, which includes the same diagnostic file changes plus deduplication of the render functions and a test filter fix.

@max-sixty max-sixty closed this Apr 7, 2026
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.

2 participants