Skip to content

Enhance gabriel.view to render paraphrases and media inputs - #13

Merged
hemanth-asirvatham merged 1 commit into
mainfrom
enhance-gabriel.view-for-paraphrase-display
Feb 6, 2026
Merged

Enhance gabriel.view to render paraphrases and media inputs#13
hemanth-asirvatham merged 1 commit into
mainfrom
enhance-gabriel.view-for-paraphrase-display

Conversation

@hemanth-asirvatham

Copy link
Copy Markdown
Collaborator

Motivation

  • Make it easy to compare paraphrased outputs with their originals inside the notebook viewer by detecting revised columns and rendering a clear paraphrase / original split.
  • Improve UX for non-text modalities by rendering images and audio inline (centered image or audio player) instead of showing raw file paths or base64 strings.
  • Preserve existing behavior when no paraphrase or media is present so the current viewer UI remains unchanged.

Description

  • Added media/paraphrase-related imports and helpers including encode_audio and load_image_inputs and an os import for path handling in src/gabriel/utils/passage_viewer.py.
  • Introduced _resolve_paraphrase_columns to detect paraphrase/revised columns (including numbered _<n> variants) and _media_from_value to detect images/audio from URLs, data URIs, paths, or base64 blobs.
  • Implemented _build_media_html, _build_paraphrase_html, and _build_passage_body to render media blocks and a two-section paraphrase view that shows Paraphrased text (emphasized) above a thin divider and Original text below.
  • Wire-up: the passage payload now carries revised and media keys; the main rendering path uses _build_passage_body so existing highlighted-snippet rendering is preserved when no paraphrase/media are found; added CSS rules to style paraphrase sections and media presentation for both dark and light themes.

Testing

  • No automated tests were run as part of this change.

Codex Task

@hemanth-asirvatham
hemanth-asirvatham merged commit 6a5aea0 into main Feb 6, 2026
1 check failed
@github-actions

github-actions Bot commented Feb 6, 2026

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot locked and limited conversation to collaborators Feb 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant