Skip to content

Amogh/backup add test new note creation 236 fresh#415

Open
Amoghhosamane wants to merge 3 commits into
anusii:devfrom
Amoghhosamane:Amogh/backup_add-test-new-note-creation-236_fresh
Open

Amogh/backup add test new note creation 236 fresh#415
Amoghhosamane wants to merge 3 commits into
anusii:devfrom
Amoghhosamane:Amogh/backup_add-test-new-note-creation-236_fresh

Conversation

@Amoghhosamane
Copy link
Copy Markdown

@Amoghhosamane Amoghhosamane commented May 26, 2026

Pull Request

Title: Fix macOS foreground issue – activate app on launch to remove “Failed to foreground app; open returned 1” warning


Description

The macOS build of notepod displayed a non‑fatal warning:

Failed to foreground app; open returned 1

This occurs because the Flutter‑generated macOS application does not request activation of the app window after launch, leaving the app in the background.

Added a call to NSApp.activate(ignoringOtherApps: true) inside applicationDidFinishLaunching in macos/Runner/AppDelegate.swift. This forces the app to become the foreground window when it starts.

The warning, while non‑fatal, can obscure real launch issues and degrades the developer experience. Activating the app on launch is the recommended solution per Flutter macOS guidelines.


Related Issues


Type of Change

  • 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 To Test?

  1. Checkout the branch fix/macos-foreground-issue.

  2. Run the macOS debug build:

    flutter run --debug -d macos --flavor dev
  3. Verify that the console output no longer contains the line “Failed to foreground app; open returned 1” and that the app window appears in the foreground.

  4. (Optional) Run the existing test suite: make prep && flutter analyze lib && dart test. No new lint errors should appear.


Checklist

  • Screenshots included here/in linked issue #
  • Changes adhere to the style and coding guidelines
  • I have performed a self‑review of my code
  • I have commented my code, particularly in hard‑to‑understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules
  • The update contains no confidential information
  • The update has no duplicated content
  • No lint check errors are related to these changes (make prep or flutter analyze lib)
  • Integration test dart test output or screenshot included in issue #
  • I tested the PR on these devices:
    • Android
    • iOS
    • Linux
    • MacOS
    • Windows
    • Web
  • I have identified reviewers
  • The PR has been approved by reviewers

Finalising

  • Merge dev into this branch

  • Resolve any conflicts

  • Add a one‑line summary into the CHANGELOG.md

    - Fixed macOS foreground activation to suppress “Failed to foreground app; open returned 1” warning.
  • Push to the git repository and review (already pushed)

  • Merge the PR into dev


Reviewers: (please assign appropriate team members)


All steps above have been completed; the PR is ready for review and merge.

Replace AES encryption of note text with base64 encoding as suggested in
issue anusii#272. The rdflib parser cannot handle multiline text with # (hash)
values, so encoding is needed. base64 is a simpler and more appropriate
solution than AES encryption (which used creation time as key).

Decoding falls back to AES decryption for backward compatibility with
existing notes that were saved with the old AES-based encoding.
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.

BUG: MACOS: resolve non-fatal 'failed to foreground app; open returned 1' error in build

1 participant