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

[v3] fix: general auto save and general password auto save always enabled #4134

Open
wants to merge 2 commits into
base: v3-alpha
Choose a base branch
from

Conversation

oSethoum
Copy link
Contributor

@oSethoum oSethoum commented Mar 12, 2025

Description

general auto save and general password auto save always enabled.

Fixes # (issue)

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.

Test Configuration

Please paste the output of wails doctor. If you are unable to run this command, please describe your environment in as much detail as possible.

 Wails (v3.0.0-alpha.9)  Wails Doctor

# System

┌───────────────────────────────────────────────────────────────────────────────────────────────┐
| Name              | Windows 10 Pro                                                            |
| Version           | 2009 (Build: 26100)                                                       |
| ID                | 24H2                                                                      |
| Branding          | Windows 11 Pro                                                            |
| Platform          | windows                                                                   |
| Architecture      | amd64                                                                     |
| Go WebView2Loader | true                                                                      |
| WebView2 Version  | 133.0.3065.92                                                             |
| CPU               | 13th Gen Intel(R) Core(TM) i7-1360P                                       |
| GPU 1             | NVIDIA GeForce RTX 3050 4GB Laptop GPU (NVIDIA) - Driver: 32.0.15.7242    |
| GPU 2             | Intel(R) Iris(R) Xe Graphics (Intel Corporation) - Driver: 31.0.101.3688  |
| Memory            | 32GB                                                                      |
└───────────────────────────────────────────────────────────────────────────────────────────────┘

# Build Environment

┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| Wails CLI      | v3.0.0-alpha.9                                                                                                                                                                                                           |
| Go Version     | go1.24.0
                                                                                                                    |
| -buildmode     | exe
                                                                                                                    |
| -compiler      | gc
                                                                                                                    |
| CGO_CFLAGS     |
                                                                                                                    |
| CGO_CPPFLAGS   |
                                                                                                                    |
| CGO_CXXFLAGS   |
                                                                                                                    |
| CGO_ENABLED    | 1
                                                                                                                    |
| CGO_LDFLAGS    |
                                                                                                                    |
| DefaultGODEBUG | asynctimerchan=1,gotestjsonbuildtext=1,gotypesalias=0,httpservecontentkeepheaders=1,multipathtcp=0,randseednop=0,rsa1024min=0,tls3des=1,tlsmlkem=0,x509keypairleaf=0,x509negativeserial=1,x509rsacrt=0,x509usepolicies=0 |
| GOAMD64        | v1
                                                                                                                    |
| GOARCH         | amd64
                                                                                                                    |
| GOOS           | windows
                                                                                                                    |
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies

┌───────────────────────────┐
| npm  | 10.9.2             |
| NSIS | v3.10              |
└─ * - Optional Dependency ─┘

# Diagnosis

 SUCCESS  Your system is ready for Wails development!

Need documentation? Run: wails3 docs
 ♥   If Wails is useful to you or your company, please consider sponsoring the project: wails3 sponsor

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Refactor

    • Enhanced the configuration of autofill and password auto-save settings for a more seamless experience.
    • Streamlined error management to improve the overall reliability of these features.
  • Bug Fixes

    • Corrected the logic governing the auto-save and password auto-save functionalities to ensure they operate as intended rather than being perpetually enabled.

Copy link
Contributor

coderabbitai bot commented Mar 12, 2025

Walkthrough

This update refactors the setupChromium method in the Windows webview window implementation. The method now directly passes the values for autofill and password autosave options instead of conditionally setting them. The refactored error handling removes redundant boolean checks and directly logs warnings for unsupported capabilities. No changes were made to the exported or public interface.

Changes

File(s) Change Summary
v3/.../webview_window_windows.go Refactored the setupChromium method to directly pass opts.GeneralAutofillEnabled and opts.PasswordAutosaveEnabled to their respective methods, and streamlined error handling logic by removing redundant checks.
docs/.../changelog.mdx Added a changelog entry for a fix related to the auto-save functionality, correcting the logic governing the auto-save features to ensure they operate as expected.

Sequence Diagram(s)

sequenceDiagram
    participant W as windowsWebviewWindow
    participant C as chromium
    participant L as Logger

    W->>C: PutIsGeneralAutofillEnabled(opts.GeneralAutofillEnabled)
    alt UnsupportedCapabilityError encountered
        C->>L: Log warning
    end
    W->>C: PutIsPasswordAutosaveEnabled(opts.PasswordAutosaveEnabled)
    alt UnsupportedCapabilityError encountered
        C->>L: Log warning
    end
Loading

Possibly related PRs

  • V3 alpha feature/3659 support webview options #3766: The changes in the main PR directly modify the setupChromium method in the windowsWebviewWindow class to handle autofill and password autosave options, which are also introduced in the retrieved PR by adding the corresponding fields to the WindowsWindow struct, indicating a strong relationship between the two.

Poem

In the code's warren where logic did roam,
I refactored paths so they clearly call home.
Boolean flows replaced with options so true,
Warnings now echo when capabilities are new.
I hop with delight in this tidy domain,
A rabbit’s cheer for cleaner code reigns! 🥕
Hop on, dear devs, let clarity sustain!

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0be2efc and 46dd5ef.

📒 Files selected for processing (1)
  • docs/src/content/docs/changelog.mdx (1 hunks)
🔇 Additional comments (1)
docs/src/content/docs/changelog.mdx (1)

78-78: Changelog Entry for Auto Save Fix

The changelog entry now clearly indicates that the auto save and password auto save bug has been fixed, referencing the correct PR and author. This concise note is appropriate for the changelog, though if further details about the conditions under which the bug appeared (or its impact) are available, consider adding a bit more context elsewhere (e.g. in release notes or the PR description).


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@oSethoum oSethoum changed the title fix: general auto save and general password auto save always enabled [v3] fix: general auto save and general password auto save always enabled Mar 12, 2025
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.

1 participant