Fix scrolling after gocui update by mark2185 · Pull Request #473 · wagoodman/dive (original) (raw)

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation17 Commits5 Checks0 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

mark2185

This fixes the scrolling caused by a regression in #447 .

It still has some issues regarding highlighting rows, but I'm not overtly interested in diving into gocui given that it's not actively maintained. At least it enables the user to scroll again.

Fixes #540
Fixes #494
Fixes #469

alexpts, marcusramberg, vinkmr, leosunmo, tom-reinders, cyreb7, colatkinson, turadg, md-scalgo, TimotheeIsnard, and 21 more reacted with thumbs up emoji

@mark2185

@vinkmr

Built using go1.21.0 and tested on Ubuntu 20.04. Unfortunately the scrolling bug is still there. :(

@mark2185

Ah, I see I've only fixed it for the Image Details pane, thanks.

@mark2185

I took the liberty of rebasing onto #478 , give it another spin @vinkmr .

@vinkmr

Yup. Scroll seems to work for me now.

@marcusramberg

Would be great to see a new release with this fix, as it severely limits the usability of dive for nix-based images :)

leosunmo, Vollbrecht, niktekusho, dezyh, sphars, turadg, Aankhen, GuillaumeDesforges, jjmaestro, Timmmm, and 2 more reacted with thumbs up emoji

@glensc

To run this branch

$ gh repo clone https://github.com/wagoodman/dive         
Cloning into 'dive'...
remote: Enumerating objects: 5334, done.
remote: Counting objects: 100% (1258/1258), done.
remote: Compressing objects: 100% (315/315), done.
remote: Total 5334 (delta 1007), reused 1110 (delta 932), pack-reused 4076
Receiving objects: 100% (5334/5334), 5.05 MiB | 5.26 MiB/s, done.
Resolving deltas: 100% (3500/3500), done.

$ cd dive 

$ gh co 473           
From https://github.com/wagoodman/dive
 * [new ref]         refs/pull/473/head -> fix/scrolling-contents
Switched to branch 'fix/scrolling-contents'

$ go run main.go php:7.2-fpm

@MauriceArikoglu

@mehmetumit

Seems like these lines need to be fixed in order to pass ci check

runtime/ui/view/layer.go:298:14: Error return value of v.vm.Update is not checked (errcheck) v.vm.Update(v.constrainedRealEstate) ^ runtime/ui/viewmodel/layer_set_state.go:42:26: func (*LayerSetState).height is unused (unused) func (vm *LayerSetState) height() int { ^ runtime/ui/view/layer.go:153:17: func (*Layer).height is unused (unused) func (v *Layer) height() uint { ^

@black-snow

Please release this - super annoying bug.

@ruffsl

@MauriceArikoglu

@LaTrissTitude

Would be great for this fix to reach the next release

@black-snow

Sadly, the logs have expired already.

@pov1ba

vinkmr

@uuf6429

This is arguably one of the main features of this tool - and this bug's been open since over a year apparently, with devs asking for its release and offering their time and help. What's the hold up then?

PS: On a related point, the "Layer Details" panel takes up 1/3 of the vertical screen area when in fact it seems to require at most 9 lines (which means, less space the "Layers" panel, making this issue even worse).

@mark2185

What's the hold up then?

Can't speak for wagoodman since I'm not him, but just a reminder that this is a free, non-paid project, that nobody is forced to develop and/or maintain, there are no deadlines or milestones it has to reach, so we can't really blame anyone.

If you wish to improve upon it, feel free to fork it. But do remember that we're all human, and life sometimes gets in the way.

@featheredtoast

@mark2185 thanks so much for this patch - The branch might be worth a rebase so the fix still "just works" as is.

I had to rebase your fix on top of the latest version (OCI images on mac weren't loading) but otherwise it worked great.

joschi added a commit to joschi/dive that referenced this pull request

Nov 7, 2024

@joschi @st-gr

joschi added a commit to joschi/dive that referenced this pull request

Nov 7, 2024

@joschi @st-gr

wagoodman pushed a commit that referenced this pull request

Mar 18, 2025

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Old coverage:

go test -race -coverprofile ./.tmp/unit-coverage-details.txt ./...
?   	github.com/wagoodman/dive	[no test files]
?   	github.com/wagoodman/dive/cmd	[no test files]
?   	github.com/wagoodman/dive/dive	[no test files]
?   	github.com/wagoodman/dive/dive/image	[no test files]
ok  	github.com/wagoodman/dive/dive/filetree	0.032s	coverage: 58.0% of statements
?   	github.com/wagoodman/dive/dive/image/podman	[no test files]
ok  	github.com/wagoodman/dive/dive/image/docker	0.076s	coverage: 43.6% of statements
?   	github.com/wagoodman/dive/runtime/ui	[no test files]
?   	github.com/wagoodman/dive/runtime/ui/format	[no test files]
?   	github.com/wagoodman/dive/runtime/ui/key	[no test files]
ok  	github.com/wagoodman/dive/runtime	0.531s	coverage: 53.3% of statements
ok  	github.com/wagoodman/dive/runtime/ci	0.087s	coverage: 62.1% of statements
ok  	github.com/wagoodman/dive/runtime/export	0.096s	coverage: 100.0% of statements
?   	github.com/wagoodman/dive/runtime/ui/layout/compound	[no test files]
?   	github.com/wagoodman/dive/runtime/ui/view	[no test files]
ok  	github.com/wagoodman/dive/runtime/ui/layout	0.021s	coverage: 82.6% of statements
?   	github.com/wagoodman/dive/utils	[no test files]
ok  	github.com/wagoodman/dive/runtime/ui/viewmodel	1.202s	coverage: 55.3% of statements
Coverage: 57.5%

New coverage:

go test -race -coverprofile ./.tmp/unit-coverage-details.txt ./...
    github.com/wagoodman/dive/dive		coverage: 0.0% of statements
    github.com/wagoodman/dive/cmd		coverage: 0.0% of statements
    github.com/wagoodman/dive		coverage: 0.0% of statements
    github.com/wagoodman/dive/dive/image		coverage: 0.0% of statements
    github.com/wagoodman/dive/dive/image/podman		coverage: 0.0% of statements
ok  	github.com/wagoodman/dive/dive/filetree	1.027s	coverage: 58.0% of statements
ok  	github.com/wagoodman/dive/dive/image/docker	1.064s	coverage: 43.6% of statements
    github.com/wagoodman/dive/runtime/ui		coverage: 0.0% of statements
    github.com/wagoodman/dive/runtime/ui/format		coverage: 0.0% of statements
    github.com/wagoodman/dive/runtime/ui/key		coverage: 0.0% of statements
    github.com/wagoodman/dive/runtime/ui/layout/compound		coverage: 0.0% of statements
    github.com/wagoodman/dive/runtime/ui/view		coverage: 0.0% of statements
ok  	github.com/wagoodman/dive/runtime	1.382s	coverage: 53.3% of statements
ok  	github.com/wagoodman/dive/runtime/ci	1.055s	coverage: 62.1% of statements
    github.com/wagoodman/dive/utils		coverage: 0.0% of statements
ok  	github.com/wagoodman/dive/runtime/export	1.048s	coverage: 100.0% of statements
ok  	github.com/wagoodman/dive/runtime/ui/layout	1.012s	coverage: 82.6% of statements
ok  	github.com/wagoodman/dive/runtime/ui/viewmodel	2.202s	coverage: 55.3% of statements
Coverage: 31.8%
Coverage below threshold of 55.0%

https://github.com/fountainhead/action-wait-for-check/releases/tag/v1.2.0

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

github.com/logrusorgru/aurora changed the license from the WTFPL to the Unlicense due to pkg.go.dev restrictions.

Refs logrusorgru/aurora@304bc2c

Refs #535

This reverts commit 1971472.

Error:

❯ docker run -ti --rm  -v /var/run/docker.sock:/var/run/docker.sock joschi/dive:0.13.0-alpha.1 busybox:latest
Image Source: docker://busybox:latest
Extracting image from docker-engine... (this can take a while for large images)
> could not determine docker host: stat /root/.docker: no such file or directory
cannot fetch image
unable to parse docker host ``

Co-authored-by: Pooja Shah 53046887+pooja0805@users.noreply.github.com

Fixes #507 Fixes #510 Fixes #526 Fixes #534

Co-authored-by: Maddog2050 17902029+Maddog2050@users.noreply.github.com

Found via codespell -L ot,te and typos --hidden --format brief

Closes #464

Co-authored-by: Kian-Meng Ang kianmeng@cpan.org

Fixes #346

Co-authored-by: Nikolas Grottendieck git@nikolasgrottendieck.com

Made copy and paste easy for zsh users

Co-authored-by: YóUnǎi c0d3r.nodiru.gaji@gmail.com

go get no longer works with recent versions of go.

Co-authored-by: Trevor Gross tmgross@umich.edu

Co-authored-by: thirdkeyword fliterdashen@gmail.com Signed-off-by: thirdkeyword fliterdashen@gmail.com

Co-authored-by: guoguangwu guoguangwug@gmail.com Signed-off-by: guoguangwu guoguangwug@gmail.com

Co-authored-by: Richard Steinmetz richard@steinmetz.cloud

#546 demonstrates the trouble it may cause.

Co-authored-by: Zhang Yuanfeng 71358306+YuanfengZhang@users.noreply.github.com

Co-authored-by: Ali Afsharzadeh afsharzadeh8@gmail.com

The Fetching... message was confusing.

This replaces it with a clearer messages to avoid confusion.

Additional fix: show original error unless image is not found

Only try doing a pull if the image isn't found. Everything else should just generate the error so the user can fix it.

Fixes #360

Co-authored-by: Christian Höltje docwhat@gerf.org

Fixes #496

Co-authored-by: Scott Moore scott.moore@viavisolutions.com

See https://en.wikipedia.org/wiki/File-system_permissions#Notation_of_traditional_Unix_permissions

Co-authored-by: Alexander Yastrebov alexander.yastrebov@zalando.de

This patch adds support for detecting the "docker host" to connect to which is set in the current docker context. One can have multiple such contexts and one of them can be activated via docker context use <context-name>.

Fixes #397 Fixes #408 Fixes #412 Fixes #463 Fixes #495

Co-authored-by: Rajiv Kushwaha raj25by10@gmail.com

The problem was caused by net/url.Parse():

panic: parse "podman://ubuntu:24.04": invalid port ":24.04" after host

Failure:

$ ./dive podman://ubuntu:24.04
Image Source: docker://podman://ubuntu:24.04
Fetching image... (this can take a while for large images)
Handler not available locally. Trying to pull 'podman://ubuntu:24.04'...
cannot fetch image
cannot find docker client executable

Success:

$ ./dive podman://ubuntu:24.04
Image Source: podman://ubuntu:24.04
...

$ ./dive ubuntu:24.04 --source podman
Image Source: podman://ubuntu:24.04
...

$ ./dive podman://ubuntu:24.04 --source docker
Image Source: podman://ubuntu:24.04
...

Fixes #475

Co-authored-by: Anatoli Babenia anatoli@rainforce.org

Fixes #469 Fixes #494 Fixes #540 Refs #473 Refs #478 Refs #520

Co-authored-by: st-gr 38470677+st-gr@users.noreply.github.com

Add layer-wise filesystem information to the analysis which is written to a JSON file when running dive with -j or --json flag.

Co-authored-by: Akash Nayak akash19nayak@gmail.com

Refs #469 (comment)

Co-authored-by: st-gr 38470677+st-gr@users.noreply.github.com

Refs #224

Co-authored-by: kaedwen kaedwen@heinrich.blue

Refs #129 Refs #415 Refs #499

Co-authored-by: Gwendolyn Goetz gwendolyngoetz@users.noreply.github.com Co-authored-by: Mehmet Ümit Özden ozdenmehmetumit@gmail.com

Refs jesseduffield/lazydocker#489

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: Jochen Schalanda jochen@schalanda.name

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>


Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jochen Schalanda jochen@schalanda.name

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Partially reverts e46f931

Reverts aa75fbf

This reverts commit 8d93877.


Signed-off-by: thirdkeyword fliterdashen@gmail.com Signed-off-by: guoguangwu guoguangwug@gmail.com Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Pooja Shah 53046887+pooja0805@users.noreply.github.com Co-authored-by: Maddog2050 17902029+Maddog2050@users.noreply.github.com Co-authored-by: Kian-Meng Ang kianmeng@cpan.org Co-authored-by: Nikolas Grottendieck git@nikolasgrottendieck.com Co-authored-by: YóUnǎi c0d3r.nodiru.gaji@gmail.com Co-authored-by: Trevor Gross tmgross@umich.edu Co-authored-by: thirdkeyword fliterdashen@gmail.com Co-authored-by: guoguangwu guoguangwug@gmail.com Co-authored-by: Richard Steinmetz richard@steinmetz.cloud Co-authored-by: Zhang Yuanfeng 71358306+YuanfengZhang@users.noreply.github.com Co-authored-by: Ali Afsharzadeh afsharzadeh8@gmail.com Co-authored-by: Christian Höltje docwhat@gerf.org Co-authored-by: Scott Moore scott.moore@viavisolutions.com Co-authored-by: Alexander Yastrebov alexander.yastrebov@zalando.de Co-authored-by: Rajiv Kushwaha raj25by10@gmail.com Co-authored-by: Anatoli Babenia anatoli@rainforce.org Co-authored-by: st-gr 38470677+st-gr@users.noreply.github.com Co-authored-by: Akash Nayak akash19nayak@gmail.com Co-authored-by: kaedwen kaedwen@heinrich.blue Co-authored-by: Gwendolyn Goetz gwendolyngoetz@users.noreply.github.com Co-authored-by: Mehmet Ümit Özden ozdenmehmetumit@gmail.com Co-authored-by: steven-halaka steven.halaka@twosixtech.com

Labels

bug

Something isn't working