Skip to content

Added Web support#35

Draft
Ojin13 wants to merge 21 commits into
develfrom
web-support
Draft

Added Web support#35
Ojin13 wants to merge 21 commits into
develfrom
web-support

Conversation

@Ojin13
Copy link
Copy Markdown
Collaborator

@Ojin13 Ojin13 commented Feb 16, 2026

No description provided.

@quapka
Copy link
Copy Markdown
Collaborator

quapka commented Mar 12, 2026

A couple of things to have a look at, please - could already be present in main, but I've tested these against the web client.

  • Declining any task does not work; clicking the respective button does not seem to do anything.
  • For decryption, other groups (that self is not part of) aren't visible. I think that as soon as there are any available groups that support decryption, we could/should make them visible (for anyone).
  • The local authentication seems to be broken for Linux/Web client; it works with this patch
    local_auth.patch. The patch switches the order and authenticates the user if the device cannot do authentication. This seems weird, but because the local auth is optional, I think it is sensible.
  • Due to the support of multiple accounts on a single device, I think we have a visual bug. Say device A has two accounts A1 and A2, and device B creates a group for A1, A2 and B. This is possible, even though A1 and A2 do not see each other. When a task is sent to this group, it appears twice for A1 and A2 (likely because it is sent to both of A's accounts).
  • (Turning local authentication off could require said authentication; this is rather a nice-to-have.)
  • Thanks to the web clients, it is much easier to spin up several of them in a single browser.
  • I wonder if we should bring back the visibility of all of the accounts in the group creation, but tag the ones coming from the same device. E.g., if device A has A1 and A2, then for A1 show A2 as (self) A2 or something like that.
  • Changing the device hangs and the console shows this error:
    Uncaught : Bad state: Tried to send Request (id = 16): StatementMethod.select: SELECT * FROM "tasks" WHERE "did" = ? AND "id" = ?; with ... over isolate channel, but the connection was closed!
    

@Ojin13 can you please go through these? If possible, either fix them here or in a separate PR, whatever is easier for you.

@quapka
Copy link
Copy Markdown
Collaborator

quapka commented Mar 14, 2026

While the build succees, I am getting the following error:

[+6773 ms] Found incompatibilities with WebAssembly.

                    package:grpc/src/client/transport/xhr_transport.dart 17:1 - dart:html unsupported (0)
[   +1 ms] Wasm dry run findings:
[        ] Found incompatibilities with WebAssembly.

           package:grpc/src/client/transport/xhr_transport.dart 17:1 - dart:html unsupported (0)

[        ] Consider addressing these issues to enable wasm builds. See docs for more info: https://docs.flutter.dev/platform-integration/web/wasm

[   +6 ms] Use --no-wasm-dry-run to disable these warnings.

@Ojin13
Copy link
Copy Markdown
Collaborator Author

Ojin13 commented Mar 16, 2026

@quapka All issues should be fixed:
1.) Declining any task does not work - Fixed, bad logic in if statement.

2.) Allow creating decryption tasks for groups I am not part of: Added
Group listing is now split into 2 sub tabs for the groups that I am part of and for all other existing groups on the server where I am not a member. User can open the detail of those other groups and inspect its settings and participants as if it was his own group. See images bellow for example. Decryption tab now does not require to create a decryption group before allowing to create first decryption task. Instead we now check if there are any external decryption groups or our decryption groups so user can create decryption tasks right away for other decryption groups without being member of any decryption group himself. Furthermore, since the creator of such decryption task is not a member of the target decryption group, I had to add a new local db table called observed tasks, which allows us to store the decryption tasks that we created for groups we are not part of. This allows the creator to see what happened to the decryption task that he created, as he now subscribes to new observed tasks gRPC subscription stream to automatically receive updates on that tasks. It is important to also mention that task updates now show how many participants already approved the tasks so other group participants and task observers can see the approval progress.

Important
Task update streaming for task observers is implemented only in this PR for the meesign-server. Main branch of the meesign server wont work with this update until merged:
crocs-muni/meesign-server#62


Streamed approval progress example:
Screenshot 2026-03-16 at 14 06 10

New tabbed group listing:
image

image

3.) The local authentication broken - Fixed with the proposed patch
4.) Visual bug due to the multiple account support - Fixed, it was caused by the same device id, added deduplication.
5.) Require local-authentication for turning of local-authentication - Added
6.) Remove filtering of accounts on the same device - Added self indicator instead of filtering:
Screenshot 2026-03-16 at 14 10 56

7.) Changing the device hangs - Fixed with proper user session disposal


Regarding the "Found incompatibilities with WebAssembly" warning, I will investigate it later as its not currently a blocker.

quapka added a commit to crocs-muni/meesign-server that referenced this pull request Mar 18, 2026
This PR adds support for streaming task updates to so called task
observers. Tasks observers are users who created a task for a group that
they are not a member of (used for decryption tasks). However, since
observers still need to receive updates about what happened with the
tasks they created we need to stream tasks updates not only to the group
participants, but also to the observers. This is what this PR
introduces.

Relevant PR that implements this new logic on the client:
crocs-muni/meesign-client#35
@quapka
Copy link
Copy Markdown
Collaborator

quapka commented Mar 18, 2026

  • Requiring local auth can get into a broken state. It's possible to turn on without the local authentication being present on the device. However, it's not possible to turn off - effectively locking oneself out of any functionality. I suggest just graying out this option for device that does not support local authentication.

@Ojin13
Copy link
Copy Markdown
Collaborator Author

Ojin13 commented Mar 19, 2026

@quapka good catch. I added new logic that will check if any local auth mechanism is available and if it isn't the switch for local auth is disabled and a new message bellow the switch is shown to inform the user that local authentication is not available on this device.

image

@Ojin13 Ojin13 self-assigned this May 1, 2026
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.

2 participants