Skip to content

Prettify and fix scrolling in the metadata viewer - #4

Merged
matanby merged 1 commit into
matanby:mainfrom
barakyoresh:feat/prettify-metadata-viewer
Jul 1, 2026
Merged

Prettify and fix scrolling in the metadata viewer#4
matanby merged 1 commit into
matanby:mainfrom
barakyoresh:feat/prettify-metadata-viewer

Conversation

@barakyoresh

@barakyoresh barakyoresh commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What

Improves the m metadata popup in the TUI browser.

  • Syntax-highlighted JSON via rich.json.JSON instead of flat monochrome text.
  • Nested JSON expansion — metadata values that are themselves JSON-encoded strings (common in LoRA/VAE training metadata, e.g. config) are now parsed and rendered as real nested structures instead of one long escaped blob.
  • Keyboard scrolling — the scroll region is now focusable and focused on mount, so ↑↓ / PgUp / PgDn work immediately (previously mouse-wheel only).
  • Footer no longer clipped — the container now has a definite height with a 1fr scroll region, so the "Press ESC or M to close" hint stays pinned in view even when metadata is tall (it was being pushed off-screen before).

Before / After

Before — escaped blob, no scroll, hint truncated:
sft_before

After — expanded & highlighted, scrollable, hint pinned:
sft_after

Testing

  • All 8 tests/test_metadata.py tests pass.
  • Headless Textual render tests confirm the scroll region is focused on mount and the close hint stays inside the container for tall, short, and empty metadata.

🤖 Generated with Claude Code

Improve the `m` metadata popup in the TUI browser:

- Syntax-highlight the JSON via rich.json.JSON instead of flat text.
- Expand values that are themselves JSON-encoded strings (common in
  LoRA/VAE training metadata) so nested structures render properly
  instead of as one long escaped blob.
- Make the scroll region focusable and focus it on mount so arrow /
  PgUp / PgDn keys scroll immediately (previously mouse-only).
- Give the container a definite height with a 1fr scroll region so the
  "Press ESC or M to close" hint is always pinned in view instead of
  being clipped off-screen when metadata is tall.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@barakyoresh
barakyoresh force-pushed the feat/prettify-metadata-viewer branch from 9b6475a to 9f33ee6 Compare July 1, 2026 14:03

@matanby matanby left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@matanby
matanby merged commit e0e228f into matanby:main Jul 1, 2026
8 of 9 checks passed
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