screenshots, diffs to annotate scrollback/history of fullscreen (tui/curses) apps
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- rust
- Domain
- cli, desktop-dev
Research direction
Start by reviewing Warp's current Data model and the referenced alacritty_terminal Grid serialization and deserialization APIs. Trace how each fullscreen app block's grid is handled at precmd time. The issue is not complete until the capture representation, trigger timing, and annotation behavior are specified.
Written by the indexing model from the issue text.
Description
from #78
I was just using htop for the first time in a while, and I had a thought that it would be interesting to extend (or merely apply) the notion of excerpting like I describe in #23 (3) to such apps (fullscreen / TUI / curses).
Status Quo
Currently when you use such an app (htop, vim, less, etc.) in Warp, once you exit it - the history block is rendered showing only the command
This is of very limited use to have in either the immediate scrollback of an active session, or in a retained artifact of a past session
(either: as I imagine in #23, something where you save a (shared) session to use as part of an incident post-mortem learning review or perhaps an educational tutorial / screencast, akin to https://asciinema.org et al ; or perhaps in the persistent cloud history that I believe is more solidly on the roadmap #33 )
What would be more useful?
What comes to my mind is some concept of capturing one or more "screenshots" of the app as it's running. Another idea (more suitable for editors) is a diff of a file before and after invocation (at least for file(s) which are passed as command line argument(s) to an editor, rather than opened from within it).
Mocking that up, I imagine something like:
screenshots-mockup.psd.zip

(For less and other pagers, it might also just be good to include a scrollable fixed-height buffer of the file contents; very much like what is currently shown in the share modal; or just a file:/// hyperlink?)
How?
These "screenshot"s could either:
-
render the contents of the ~frame buffer captured as it appeared on screen- capturing text as text (so copy and pasteable, etc.), ansi escapes as is (raw or post processed);
this might be easy enough with the current Data model, since I see that https://docs.rs/alacritty_terminal/0.14.0/alacritty_terminal/grid/struct.Grid.html#impl-Serialize and https://docs.rs/alacritty_terminal/0.14.0/alacritty_terminal/grid/struct.Grid.html#impl-Deserialize%3C%27de%3E
this would creating a richer, likely smaller and more compressible artifact – and one more alike to what is currently offered with sharable command output; but could require more work
and*/or
-
capture a raw rasterized screenshot of the window (in macOS, at least, I believe that capturing your own window this way does not require screen recording permission, but I might be wrong)- probably as a png.
*it likely would make sense to do (1) but e.g. have rasterized thumbnails
When?
It might make sense to make such capture at one or more of:
-
Application exit time. I think of this like what you see in the iOS multi-tasking view.
Since each block already has its own grid that is being discarded(?) at precmd time, you would just need to serialize rather than discard that (as I guess you already do for non-fullscreen apps)
-
Periodically. I think of this like macOS's Time Machine visualization. This would be triggered either by some clock time interval, or heuristics like:
- snooping on file saves (fd flushes of the exec'd process? or just plain old File System Events API / inotify ; for at least files mentioned in invoking command?)
- a heuristic on how much of the screen is redrawn at once (between keystrokes)
- network traffic?
-
(Only or additionally) by user request—via command palette, keyboard shortcut
or maybe even a button-on-hover; possibly a menu option under a version of the ⋮ like we see in scrollback blocks, but just floated in upper right while a fullscreen app is active.
When thus HCI-initiated it might make sense also to prompt for a caption/label (to indicate what is intended to be highlighted/captured), crop(?), and maybe even to (at screenshot time or after-the-fact) allow further annotations
(something akin to, or identically (if rasterizing): macOS markup / Skitch / CleanShotX's image editor )
- Dominant language
- Rust
- Stars
- 65.1k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from warpdotdev/warp
-
area:agent area:window-tabs-panes enhancement needs-info os:mac repro:high triaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
warpdotdev/warp#15768 · 3 comments · 1 reaction ·
-
bug factory-auto-implement factory:revops-factory os:mac ready-to-implement repro:high triaged warp:auto-triage-review
Difficulty 1/5 Under an hour Newbie friendliness 90/100
warpdotdev/warp#15697 · 2 comments ·
-
area:editor-notebooks bug repro:high triaged warp:auto-triage-review warp:tracking
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
warpdotdev/warp#13949 · 3 comments ·
-
markdown_parser: unclosed `<u>` markers pair via the emphasis algorithm and delete surrounding text Openarea:editor-notebooks bug ready-to-implement repro:high triaged warp:auto-triage-review
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
warpdotdev/warp#12863 · 2 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
warpdotdev/warp#11969 · 2 comments ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100