Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Log loginIds #5798

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

Merged
swansontec merged 2 commits into develop from william/log-login-ids
Oct 22, 2025
Merged

Log loginIds #5798

swansontec merged 2 commits into develop from william/log-login-ids
Oct 22, 2025

Conversation

@swansontec
Copy link
Contributor

@swansontec swansontec commented Oct 21, 2025
edited
Loading

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

Include base64-encoded loginIds for all accounts in log uploads, with improved null checks and error typing.

  • Logging:
    • Include loginId for all accounts in uploaded logs (src/actions/LogActions.tsx):
      • Add userId as base64-encoded loginId for context.localUsers.
      • Encode loggedInUser.userId from rootLoginId via base58base64.
    • Safer checks and typings: != null guards, explicit return types, and unknown error handling.
    • sendLogs now returns Promise<void> and improves fetch error handling.
  • UI:
    • LogsModal typing cleanups and clearer error messages when sending logs fails.
  • Changelog:
    • Note added for including loginIds in log uploads.

Written by Cursor Bugbot for commit 16eb1fa. This will update automatically on new commits. Configure here.


await Promise.all([
sendLogs(logs.activity, underDuress).catch((e: any) => {
sendLogs(logs.activity, underDuress).catch((error: unknown) => {
const message = error instanceof Error ? error.message : String(error)
Copy link
Contributor

@samholmes samholmes Oct 22, 2025

Choose a reason for hiding this comment

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

String(error) should result in Error: ${error.message} if its an instance of Error. I can see why you wouldn't want the "Error: " prefix, but I can also see why you might want it.

Copy link
Contributor Author

@swansontec swansontec Oct 22, 2025

Choose a reason for hiding this comment

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

Yeah, just trying to preserve behavior here.


logOutput.loggedInUser = {
userId: rootLoginId,
userId: base64.stringify(base58.parse(rootLoginId)),
Copy link

@cursor cursor bot Oct 22, 2025

Choose a reason for hiding this comment

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

Bug: Base58 Parsing Errors Block Log Uploads

Unhandled base58.parse() calls for user.loginId and rootLoginId can throw an error if the IDs are not valid base58 strings. This crashes the log generation process, preventing users from uploading critical diagnostic logs for support.

Fix in Cursor Fix in Web

Copy link
Contributor Author

@swansontec swansontec Oct 22, 2025

Choose a reason for hiding this comment

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

But edge-core-js promises that they are in base58, so no problem.

@swansontec swansontec merged commit 66a7b8c into develop Oct 22, 2025
3 checks passed
@swansontec swansontec deleted the william/log-login-ids branch October 22, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments

@samholmes samholmes samholmes approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /