Skip to content

filter: use document text for encoding-safe filtering#215

Merged
webispy merged 1 commit intomainfrom
pr/update_filter_apply
Mar 24, 2026
Merged

filter: use document text for encoding-safe filtering#215
webispy merged 1 commit intomainfrom
pr/update_filter_apply

Conversation

@webispy
Copy link
Owner

@webispy webispy commented Mar 24, 2026

Summary

  • Pass document.getText() to LogProcessor.processFile via a new content option instead of reading files from disk with fs.createReadStream
  • Fixes filter apply failures on Windows caused by file encoding mismatches
  • Removes the untitled-file temp file workaround — now handled naturally via the content stream

Test plan

  • Verify filter apply works on saved files (Windows & macOS)
  • Verify filter apply works on untitled documents
  • Verify workflow pipeline still works (uses file-based streaming, unaffected)
  • Verify Windows CI passes

🤖 Generated with Claude Code

On Windows, log files may use non-UTF-8 encoding (e.g. CP949,
UTF-16). VS Code auto-detects and decodes these correctly, but
LogProcessor always read from disk as UTF-8, causing filter
matches to fail while highlights worked fine.

Pass document.getText() directly to LogProcessor when available
so filtering uses the same decoded text that VS Code displays.
For large files (>50MB) without a document, the existing disk
read path is preserved. This also removes the now-unnecessary
temp file workaround for untitled documents.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@webispy webispy self-assigned this Mar 24, 2026
@webispy webispy added the bug Something isn't working label Mar 24, 2026
@webispy webispy added this to the v1.6.6 milestone Mar 24, 2026
@webispy webispy linked an issue Mar 24, 2026 that may be closed by this pull request
@github-actions
Copy link

📦 Artifact Ready

Download the extension package here:
logmagnifier-1.6.5-dev.20260324101210.vsix

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 59.31%. Comparing base (aadba0f) to head (5f9cdbd).

Files with missing lines Patch % Lines
src/services/LogProcessor.ts 85.71% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
- Coverage   59.38%   59.31%   -0.07%     
==========================================
  Files          59       59              
  Lines       14747    14707      -40     
  Branches     1014     1011       -3     
==========================================
- Hits         8758     8724      -34     
+ Misses       5969     5963       -6     
  Partials       20       20              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@webispy webispy merged commit e3cb816 into main Mar 24, 2026
5 checks passed
@webispy webispy deleted the pr/update_filter_apply branch March 24, 2026 10:25
@github-project-automation github-project-automation bot moved this from Todo to Done in LogMagnifier Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Windows 환경 동작 확인

2 participants