Skip to content

fix(logs): improve file display and support long path filters - #482

Merged
youzi-1122 merged 1 commit into
mainfrom
fix/log-file-display
Oct 9, 2026
Merged

youzi-1122 merged 1 commit into
mainfrom
fix/log-file-display

Conversation

@youzi-1122

@youzi-1122 youzi-1122 commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Log files can have long directory paths, but the log viewer hid the file field by default and file filters rejected paths longer than 256 bytes. This change shows the basename by default, exposes the full path on hover and in a keyboard-accessible copy popover, and accepts file paths up to 4096 bytes.

  • Normalize Loki filename metadata into the canonical file field and support existing filename aliases in the UI.
  • Match file labels to adjacent log fields and table cells. Preserve original source IDs and filtering semantics.
  • Add regression coverage and clarify adjacent-element consistency in the UI guidelines.

Validation

  • Passed: 26 log-page tests, frontend production build, focused ESLint, and git diff --check.
  • Passed: go test -race ./internal/pkg/logquery ./internal/manager/biz/logs ./internal/manager/server/logs.
  • Verified in the local test environment: a 258-byte file path returns five matching records; histogram and field-value queries succeed; a 4097-byte path is rejected.
  • Verified raw/table views, light/dark themes, Chinese/English, narrow layout, full-path inspection, keyboard access, and copy success/failure behavior.
  • Full npm run lint still reports 9 errors and 43 warnings in unchanged files.
  • Passed: go test ./... against the committed source snapshot in a non-root Linux container. macOS cannot compile the existing Linux-only Edge code.

Risk and rollback

No schema, collector configuration, source-ID, or dependency changes. File values remain bounded and retain existing query escaping and count limits. Revert this commit to restore prior behavior. Local test deployment backups are retained; the test deployment is not a production release.

Author confirmation

Show log basenames with full-path inspection and copy actions, using the existing field styles. Normalize Loki filenames and accept file paths up to 4096 bytes in scoped and field filters. Add regression coverage and document adjacent-element consistency checks.
@youzi-1122
youzi-1122 requested a review from singchia as a code owner October 8, 2026 11:01
@youzi-1122

Copy link
Copy Markdown
Member Author

@codex review

Please review the current head for correctness and regressions in log filename display, full-path inspection/copy, Loki filename normalization, and long file-path filtering. Pay particular attention to preserving source IDs, query escaping and limits, and keyboard accessibility.

@youzi-1122
youzi-1122 merged commit fa9b9f1 into main Oct 9, 2026
11 of 13 checks passed
@youzi-1122
youzi-1122 deleted the fix/log-file-display branch October 9, 2026 01:56
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.

1 participant