Skip to content

feat: support jsonl object preview#87

Merged
overtrue merged 1 commit intorustfs:mainfrom
savvym:feat/support-jsonl-preview
Mar 23, 2026
Merged

feat: support jsonl object preview#87
overtrue merged 1 commit intorustfs:mainfrom
savvym:feat/support-jsonl-preview

Conversation

@savvym
Copy link
Contributor

@savvym savvym commented Mar 23, 2026

Pull Request

Description

Add support for previewing .jsonl / NDJSON files in the object preview modal.

This change:

  • recognizes .jsonl and .ndjson as previewable text files
  • adds MIME inference for NDJSON content types
  • keeps JSONL rendering in the existing text preview flow

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed

Commands executed:

pnpm install --frozen-lockfile
pnpm run type-check
pnpm lint
pnpm exec prettier --check components/object/preview-modal.tsx lib/mime-types.ts

Notes:

  • pnpm lint completes with existing repository warnings outside the scope of this PR, including a pre-existing <img> warning in components/object/preview-modal.tsx.
  • pnpm test:run is not available in the current upstream package.json.
  • pnpm prettier --check . is not included here because current repository baseline contains unrelated formatting drift.

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

Closes #

Screenshots (if applicable)

N/A

Additional Notes

JSONL files are treated as safe text previews, similar to JSON and CSV, with support for both extension-based and MIME-based detection.

@savvym savvym force-pushed the feat/support-jsonl-preview branch from 810ed35 to b86c13d Compare March 23, 2026 04:54
@overtrue overtrue merged commit a151aeb into rustfs:main Mar 23, 2026
@savvym savvym deleted the feat/support-jsonl-preview branch March 23, 2026 06:10
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