Skip to content

ui: migrate tray backend to energye/systray#618

Open
SergioChan wants to merge 3 commits intoUnpackerr:mainfrom
SergioChan:fix/issue-617-systray-upstream
Open

ui: migrate tray backend to energye/systray#618
SergioChan wants to merge 3 commits intoUnpackerr:mainfrom
SergioChan:fix/issue-617-systray-upstream

Conversation

@SergioChan
Copy link
Contributor

Summary

  • Replace tray backend import from github.com/getlantern/systray to github.com/energye/systray.
  • Adapt the MenuItem wrapper to energye's callback model by bridging click callbacks to the existing channel-based interface.
  • Update lint allowlist and module dependencies to remove stale getlantern transitive packages.

Testing

  • go test ./...

Related

@SergioChan
Copy link
Contributor Author

Pushed a small follow-up to address the failing golangci-lint checks on this branch:

  • wrap zenity.Entry(...) errors in pkg/ui/dlgs.go (show entry dialog: %w) to satisfy wrapcheck
  • rename variadic params from v to args in dialog helpers to satisfy varnamelen

Validation run:

  • GOOS=windows go test ./pkg/ui -run TestDoesNotExist -count=1
  • GOOS=darwin go test ./pkg/ui -run TestDoesNotExist -count=1 still fails due upstream github.com/energye/systray darwin symbols missing in this environment

@SergioChan
Copy link
Contributor Author

Pushed a small follow-up commit to keep the Entry dialog path as explicit as possible while we wait for CI to re-run:

  • renamed the local Entry result variable from entry to value for clarity
  • kept the wrapped error path (show entry dialog: %w) and the args variadic naming in Question(...)

Validation run locally:

  • GOOS=windows go test ./pkg/ui -run TestDoesNotExist -count=1
  • GOOS=darwin go test ./pkg/ui -run TestDoesNotExist -count=1 still fails due upstream github.com/energye/systray darwin symbol resolution in this environment (same limitation as before)

@SergioChan
Copy link
Contributor Author

I dug into the failing lint jobs and found the current blocker:

The pull_request_target workflow is checking out origin/main instead of the PR head commit, so lint is running against upstream main code (not this branch).

From the golangci-lint (windows) log in run 22996276291:

  • git fetch ... +ec92f44...:refs/remotes/origin/main
  • git checkout --progress --force -B main refs/remotes/origin/main

That explains why the same pkg/ui/dlgs.go findings keep appearing even after the follow-up commits on this PR.

If you want, I can open a separate small PR to adjust the checkout ref in that workflow so PR lint runs against the actual PR branch.

@davidnewhall
Copy link
Collaborator

If you want, I can open a separate small PR to adjust the checkout ref in that workflow so PR lint runs against the actual PR branch.

I tried to fix that yesterday with your last PR. Please go for it.

@SergioChan
Copy link
Contributor Author

Thanks for the review. I’m working through the requested changes and will update this PR with a focused patch shortly.

@SergioChan
Copy link
Contributor Author

Done �� I opened the separate CI fix as requested:

That patch updates pull_request_target checkout to use the PR head repository/SHA so lint/test jobs run against the actual PR branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

getlantern/systray is stale

2 participants