Skip to content

feat(notifications): notify background permission requests - #1819

Merged
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev
Jul 28, 2026
Merged

feat(notifications): notify background permission requests#1819
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a default-enabled setting for background permission request notifications.
  • Notify for actionable core and ACP approval requests only while BitFun is not focused.
  • De-duplicate request events and batch requests from the same session round within 400ms.
  • Mount the listener at the app layout level so toolbar mode is covered, and update the cached setting immediately after toggling.

Fixes #1812

Type and Areas

Type: Feature

Areas: Rust core, desktop/Tauri, web UI, ACP, i18n

Motivation / Impact

Users can now receive a generic OS notification when an approval request needs attention while BitFun is in the background. The notification intentionally excludes tool arguments and other sensitive request details.

Verification

  • pnpm --dir src/web-ui run test:run src/app/hooks/permissionRequestNotifyPolicy.test.ts src/flow_chat/services/flow-chat-manager/AcpPermissionToolCardModule.test.ts (6 tests passed)
  • pnpm run type-check:web
  • pnpm run i18n:audit
  • cargo check -p bitfun-desktop
  • cargo test -p bitfun-core permission_request_notifications_default_to_enabled
  • pnpm run fmt:rs
  • git diff --cached --check
  • Manual: verified a background single-session permission request produces a notification.

Reviewer Notes

  • Core and ACP requests share the same notification policy.
  • Requests are grouped by sessionId + roundId; requests from separate sessions remain separate OS notification calls.
  • Windows Toast acceptance should be checked using an installed NSIS build, not the unpackaged desktop:build:fast executable.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

Add a default-enabled permission request notification preference.
Notify for actionable core and ACP approval requests while BitFun is in
the background, with request de-duplication and same-round batching.
Keep the listener active in toolbar mode and apply preference changes
immediately.
@wsp1911
wsp1911 merged commit 00bfc64 into GCWing:main Jul 28, 2026
7 checks passed
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.

[Feature]: 支持设置“等待审批通知”

1 participant