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

vikunja-desktop: init at 0.24.6 #195231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kolaente
Copy link
Member

@kolaente kolaente commented Oct 9, 2022

Description of changes

This PR adds the desktop version of Vikunja. Since it is only an electron wrapper around the frontend and the frontend is already packaged in nixos, this package reuses that.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@kolaente
Copy link
Member Author

kolaente commented Oct 9, 2022

Not sure about my change to the release notes, never done that before.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation labels Oct 9, 2022
@kolaente kolaente force-pushed the feature/add-vikunja-desktop branch from 4aa2554 to 98cbb52 Compare October 9, 2022 13:27
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Oct 9, 2022
@kolaente kolaente changed the title vikunja-desktop: init at 0.19.1 vikunja-desktop: init at 0.20.0 Oct 28, 2022
@mweinelt
Copy link
Member

The package is not referenced by any top-leve attribute.

@mweinelt
Copy link
Member

{"error":"invalid_request","error_description":"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. The 'redirect_uri' parameter does not match any of the OAuth 2.0 Client's pre-registered redirect urls."}

The app recognized my instance was using SSO to login, but once I click that button I get this error.

Tried both https://example.com as well as https://example.com/api/v1.

@kolaente
Copy link
Member Author

What frontend version is that? You should be able to see that by opening the dev console in the electron shell.

@mweinelt
Copy link
Member

mweinelt commented Oct 29, 2022

@kolaente
Copy link
Member Author

The deployment still uses 0.19.1.

Let's wait until the frontend update got merged, that should fix the problem.

The redirect url is way off.

I'm afraid there's no way around that. The desktop app spins up a local server to serve frontend files, a redirect back from the provider has to happen there.

@kolaente kolaente changed the title vikunja-desktop: init at 0.20.0 vikunja-desktop: init at 0.20.1 Nov 11, 2022
@mweinelt
Copy link
Member

Please rebase and squash the commits.

@kolaente kolaente force-pushed the feature/add-vikunja-desktop branch 3 times, most recently from 8ee5fcf to e056727 Compare January 18, 2023 21:09
@kolaente kolaente changed the title vikunja-desktop: init at 0.20.1 vikunja-desktop: init at 0.20.2 Jan 18, 2023
@kolaente kolaente force-pushed the feature/add-vikunja-desktop branch from e056727 to 89f8f56 Compare January 18, 2023 21:10
@kolaente
Copy link
Member Author

kolaente commented Jan 18, 2023

Took me a little longer than I'd like to admit but it should all be correctly rebased now.

@kolaente
Copy link
Member Author

@mweinelt I'm not sure what I need to change so that ofborg works.

@wegank wegank added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 2.status: merge conflict This PR has merge conflicts with the target branch labels Mar 19, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
@kolaente kolaente force-pushed the feature/add-vikunja-desktop branch from 89f8f56 to 9fe285b Compare September 20, 2024 15:56
@kolaente kolaente changed the title vikunja-desktop: init at 0.20.2 vikunja-desktop: init at 0.24.3 Sep 20, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 20, 2024
@kolaente kolaente force-pushed the feature/add-vikunja-desktop branch 2 times, most recently from 28f2d2f to aeec716 Compare September 20, 2024 16:10
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Sep 20, 2024
@mweinelt
Copy link
Member

Will defer to @lilyinstarlight and @winterqt

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 27, 2024
@kolaente kolaente force-pushed the feature/add-vikunja-desktop branch from aeec716 to a7cab86 Compare September 28, 2024 17:11
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 28, 2024
@maralorn
Copy link
Member

I would love to see progress on this, but I have little to no clue about the problem.

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 9, 2024
Copy link
Contributor

@weriomat weriomat left a comment

Choose a reason for hiding this comment

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

I got it to build locally, but I am not satisfied with the solution of symlinking the frontend before building the app.asar. There might be a better solution, but I don't have enough knowledge to provide one.
I would love to see progress on this and get this merged :)

On a side note, the current (25.05) release notes should probably be updated instead of the 24.11 one.

pkgs/by-name/vi/vikunja-desktop/package.nix Show resolved Hide resolved
pkgs/by-name/vi/vikunja-desktop/package.nix Show resolved Hide resolved
pkgs/by-name/vi/vikunja-desktop/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/vi/vikunja-desktop/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/vi/vikunja-desktop/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/vi/vikunja-desktop/package.nix Outdated Show resolved Hide resolved
@weriomat
Copy link
Contributor

On another note, since we do have a monorepo it might be an okay to passthru the src and version in order to not have to bump the version and hash of both vikunja and vikunja-desktop. Any opinions on this idea?

@kolaente
Copy link
Member Author

Thanks for your suggestions!

On another note, since we do have a monorepo it might be an okay to passthru the src and version in order to not have to bump the version and hash of both vikunja and vikunja-desktop. Any opinions on this idea?

I like that idea, also because then we can update the desktop and server packages in one go.

@kolaente kolaente force-pushed the feature/add-vikunja-desktop branch from 1999cf9 to 5f2d8bf Compare January 17, 2025 12:38
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 17, 2025
@kolaente
Copy link
Member Author

I've applied the changes and upgraded to 0.24.6. It seems to build and work fine now.

Can I get another review from @lilyinstarlight, @winterqt and maybe @mweinelt or @leona-ya (since you're one of the maintainers of the Vikunja server package)?

@kolaente kolaente changed the title vikunja-desktop: init at 0.24.3 vikunja-desktop: init at 0.24.6 Jan 17, 2025
@mweinelt
Copy link
Member

mweinelt commented Jan 17, 2025

Starts like that:

image

Entering my instance (https://todo.darmstadt.ccc.de/api/v1) and clicking CHANGE. No visual feedback.

For each click on CHANGE I see a successful HTTP request against the API, but it will not proceed.

"GET /api/v1/info HTTP/2.0" 200 424 "http://127.0.0.1:45735/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) vikunja-desktop/0.24.6 Chrome/130.0.6723.170 Electron/33.3.1 Safari/537.36"

Edit: Okay, the display changed to this now:

image

@kolaente
Copy link
Member Author

@mweinelt Looks like you didn't enable cors for your instance.

If you only want to allow connections from Vikunja desktop, you need to enable at least http://localhost:45735 (if that port is taken, it will try port++ until it finds one that's free). Since you're using openid auth, you'll need to make sure that the provider allows redirects back to that host as well.

I was able to verify that the desktop app works with the demo.

@mweinelt
Copy link
Member

mweinelt commented Jan 17, 2025

Why does Vikunja itself not send CORS headers when accessing the API though?

Edit: Can confirm accesing it works after allowing CORS, but now I'm stuck at logging into the OIDC provider using my Passkey 🤡

@kolaente
Copy link
Member Author

Why does Vikunja itself not send CORS headers when accessing the API though?

Because the API can't know in which context it is accessed. That's why each host needs to be allowed explicitly.

A workaround could be to allow access from localhost by default, but that's a Vikunja issue.

@kolaente
Copy link
Member Author

Can confirm accesing it works after allowing CORS, but now I'm stuck at logging into the OIDC provider using my Passkey 🤡

That sounds like a Vikunja issue as well, not sure if that belongs here?

@mweinelt
Copy link
Member

Yeah, sorry for mixing issues with our setup and reviewing/testing the app.

@kolaente
Copy link
Member Author

Happy to take an issue in the Vikunja repo

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants