Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clipboard support & feature to copy container id #584

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

peauc
Copy link
Contributor

@peauc peauc commented Oct 14, 2024

Fix #580

@peauc peauc force-pushed the feature/add_clipboard_support branch from 6e8bbcc to 5846bd3 Compare October 17, 2024 10:46
Copy link
Owner

@jesseduffield jesseduffield left a comment

Choose a reason for hiding this comment

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

Sorry for late review: I'm going to try and chip away at this stuff over time. Couple comments

@@ -28,6 +34,9 @@ func (m *statusManager) removeStatus(name string) {
}

func (m *statusManager) addWaitingStatus(name string) {
m.lock.Lock()
defer m.lock.Unlock()

m.removeStatus(name)
Copy link
Owner

Choose a reason for hiding this comment

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

Given that removeStatus tries to obtain the lock that addWaitingStatus already holds, wouldn't that cause a deadlock?

return nil
}

err = gui.WithStaticWaitingStatus(fmt.Sprintf(gui.Tr.CopyContainerIdStatus, utils.TruncateWithEllipsis(ctr.ID, 10)), time.Second*2)
Copy link
Owner

Choose a reason for hiding this comment

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

This isn't really a waiting status: it's a toast message. We should update the naming to reflect that (and I haven't tested it locally but it's important we don't show a loading spinner on this)

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.

Copy container id to clipboard
2 participants