Repository navigation
Conversation
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #43599: feat(tui): markdown preview panel Why it's related:
Recommendation: Review PR #43599 to understand if it already implements similar functionality or if these PRs should be coordinated. |
Contributor
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Refs #43598 — this is a draft prototype for the design discussion; will switch to
Closesif the direction is approved.Type of change
What does this PR do?
Adds a read-only file preview to the TUI, as proposed in #43598:
/previewopens a file picker backed by the same server-side search the@mention uses.mdfiles render as markdown, other text files show with syntax highlighting, binary files show a noticeesccloses;j/k/up/down/pgup/pgdn/g/GscrollDesign choices: reuses
/find/file+DialogSelectso ranking matches@mentions (no client-side search logic), reads content via the existing/file/contentendpoint (it already classifies text vs binary), and renders with opentui's built-in<markdown>element — zero new dependencies.Note: #43599 is another draft prototype for the same issue. Neither has received maintainer direction yet — happy to coordinate, or close this one if the core team prefers that approach.
How did you verify your code works?
packages/tui/test/cli/tui/dialog-preview.test.tsx(markdown, code, binary, oversized, error, and a picker end-to-end flow).bun testinpackages/tui: 199 pass, 0 fail.bun typecheckpasses for all packages, oxlint clean on touched files.Screenshots / recordings
https://gist.github.com/xxxiaocat/095d822983c36b1bf9d702b137ffbc43 (asciinema cast:
/preview→ filterreadme→ select → markdown preview → scroll →esc)Checklist